New answers tagged

0

When a transaction is issued, the transaction is sent to a node to be mined and added in a block. After issuing the transaction, if the transaction structure is properly filled with necessary fields, the transaction hash will be returned instantly. If there is any wrong in the given transaction structure like to address is not properly set, the error will be ...


3

I fixed it. Add this code in app.js: // MetaMask injects its own web3 instance in all pages, override it // as it might be not compatible with the one used here if (window.web3) window.web3 = web3;


0

I'd say no. Metamask is exactly the kind of user interface that can be built by anyone. The idea is that you don't have to trust the blockchain because that's trustless (or exactly because of that you should trust it, depending on your point of view) so anyone can access it safely with whatever means. However to access the blockchain one needs certain tools....


2

They could possibly be one. Although in their current state they don't steal any data. (at least from my knowledge)


1

When using MetaMask you have a different public/private key. Therefore another value gets returned.


1

Methods of a contract can be accessed by methods method of a contract instance. And the transaction can be either called by call() method or sent by send() method. So, you should use smth like that: contractInstance.methods.notarize(item).send((e,r) => {console.log(e,r)}) See more info in the web3js documentation.


0

What is the ABI for your contract? That is, how many arguments does the notarize method take and of what type? Usually a call to a method in web3 takes arguments like methodName(arg1, arg2, ..., argn, { from: '0xblah', gas: '0xblah', ... }, callbackFunc)


2

Metamask is not correctly estimating the gas because this is not your fallback function. A fallback function is of the format (notice there is no function name): function() external payable {} If you are not providing data to the transaction in Metamask, it will assume you are sending a normal transaction and will estimate 21000 gas. In order to correctly ...


1

You can lookup 82661dc4 via the 4byte.directory: See here: https://www.4byte.directory/signatures/?bytes4_signature=0x82661dc4 web3.eth.abi is part of web3.js 1.2.x, while Metamask uses web3.js 0.2.x See this link on how to use web3.js 1.2.1 with metamask: problem connecting web3 v 1.2.1 with metamask : 'currentProvider' of undefined


2

Metamask is a browser extension, so you can only use it from the browser. You can do this in the following way: Create a file web3-require.js: Web3=require('web3'); Install web3 and browserify npm install web3 npm install browserify Create a browserified version of web3: browserify web3-require.js -o web3-browserify.js Create test.html: Test ...


0

Your fallback function does too much for the 2,300 gas stipend. As a general heuristic, avoid setting state variables in fallback functions. You need something like: function deposit() external payable { ... Hope it helps.


0

It's always better to test your system using a private testnet (first on your localhost as you mention, and then on a public testnet such as Rinkeby or Goerli where ETH is still free and "mined" via a Proof-of-Authority (clique) mechanism. Then you can find and fix mistakes without spending real money. If I understand your question correctly, or if I can ...


2

In Ethereum there is no such thing as super nodes. You can have several differ sync types like. Fast, Full and Full(archived). But they will all be able to donthe same. Also doing this in mainnet might get a bit pricey. Let me suggest you checkout test nets for Ethereum Classic like Kotti. Where you can receive test Ethereum for free through a faucet and ...


4

A beta version of metamask for mobile has been released recently. You can try it from here


0

You can use ethereum.enable() to allow a site to access the account info. For more info see: https://metamask.github.io/metamask-docs/Advanced_Concepts/Provider_API https://medium.com/metamask/eip-1102-preparing-your-dapp-5027b2c9ed76


0

on the same machine use --rpcaddr 127.0.0.1 to start the JSON RCP on the localhost network and only connections from your local machine reach the geth server on a remote machine use --rpcaddr "0.0.0.0" to allow remote connections. For both case in metamask indicate the machine ip (for the first case use http://127.0.0.1:8545 for the second case use the ...


0

MyCrypto.com and their desktop application do (https://download.mycrypto.com)


0

I had the same problem solved by: As advised by Phillip Gibb in the above, I changed the Ganache network id to 5778. Ganache will restart. Re-connect MetaMask to Ganache. check your account. If only Account 1, this is a good sign. You can manually import other accounts. But if more than one account still exist, that's not a good sign. You may have to ...


0

In meta mask you can customize your gas price to zero even though it shows some warning message. I have followed the below link to customize the gas price in meta mask after this user can perform transactions easily. https://metamask.zendesk.com/hc/en-us/articles/360015488771-How-to-Adjust-Gas-Price-and-Gas-Limit-


1

In your case you have 2 running blockchains. The first one is developement blockchain spawned by truffle and you can access its rpc using : http://127.0.0.1:9545 as shown in your terminal and the second one is ganache's chain which you can access its RPC using http://127.0.0.1:7545 If you are deploying your contract using Truffle look at truffle.js file ...


0

I was having this issue and I just fixed it. For me, I had to right click the metamask icon then make sure that metamask was set to "read and change site data on all sites". If you can't right click and find this option, try right clicking the icon then clicking on "manage extensions". Then under the Site Access section, click "On All Sites". That's it. ...


0

Metamask do not expose the accounts by default anymore. You will need to request the user to allow your app to access the account. You can use this code (see original post here: https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8 ) window.addEventListener('load', async () => { // Modern dapp browsers... ...


Top 50 recent answers are included