2

check this question - https://stackoverflow.com/questions/5786851/define-global-variable-in-a-javascript-function If web3 is not defined as a global variable, but you have "web3 = new Web3(web3.currentProvider)" inside a function - the web3 object will be local for that function only, while with window.web3 it will be globaly accessible


2

I'm curious why metaMask doesn't offer to generate seed words for a specific account Seed words are used as a seed to the master key of a BIP39-compliant deterministic wallet. BIP39 added the support for mnemonics to HD wallets, with the heirarchical deterministic wallet standard itself being BIP44 (previously BIP32). BIP44 allows you to generate private ...


1

A transfer for a simple ERC20 token used 51,574 gas. MetaMask set the gas limit at 54,861 gas. Though the required gas will depend on how the ERC20 contract was implemented. You can always have a look on Etherscan for the transaction fees for previous transfers of the ERC20 token. Gas prices are 5 gwei for standard speed according to https://ethgasstation....


1

Metamask is a browser extension. More info: https://metamask.io It is not used in node.js or server side implementation. For server side, you have to unlock accounts using private keys, etc. For the browser side, it injects web3 object, which you can use in browser side Javascript and call all the methods and all. Sample code for browser side ...


1

Once you are fully aware of the control flow of your smart contract, then you can use the total gas usage of your transaction (transactional cost) along with the EVM fee schedule (defined in the yellow paper) to measure the storage overhead of your transaction. Let's look at an example to give you an idea of the process, let's deploy this contract to the ...


1

You probably haven't used a high enough gas price. Have a look at https://ethgasstation.info/index.php


Only top voted, non community-wiki answers of a minimum length are eligible