New answers tagged

0

The problem is that deployed() will not work until the migrations script has completed, but you have access to deployed address and create an instance pointing to it. module.exports = async function(deployer) { await deployer.deploy(Migrations); await deployer.deploy(DaiTokenMock); const tokenMock = await DaiTokenMock.at(DaiTokenMock.address); //...


0

Run development network: truffle console --network development NOTE: Start Ganache first Run ropsten network: truffle console --network ropsten NOTE: Do not use the from in the truffle.js


0

You are misunderstanding how Ethereum ERC-20 tokens work. A single Ethereum account (address) can serve multiple tokens. There is no need to create a separate address for each token. To get an ERC-20 balance of an address for an token is well documented. For example. follow this ERC-20 tutorial.


1

In Ethereum you pay for each byte sent - whether it's to a smart contract or to an EOA (externally owned address). With smart contracts you also pay for the execution (and for the initial contract deployment). I would say this depends on what you want to do with the data. IF you simply send a transaction with arbitrary data to any address it's possible but ...


0

In ethereum Private/public key pair is derived using the mnemonic values, wallet address is derived from the public key value. Changing the mnemonic will result in a new wallet.


0

Solidity requires lines to end in a semicolon. Simply change this line: uint256 public myUint to this uint256 public myUint;


1

Since the transaction reverted, no ETH was sent. The only ETH you lost was the transaction fee. If your wallet is appearing to be missing funds, you'll have to contact the developer and/or maintainer (Metamask, exchange, etc.) of your wallet as it likely has a UI bug.


1

The article you linked is more than two years old!! It made references to web3 previous version v0.20. With web3 v1.2 there were several changes. For signing you can choose between: web3.eth.sign(dataToSign, address [, callback]) leverages account managment on web3 provider, for example Metamask. web3.eth.accounts.sign(data, privateKey) in case you have ...


Top 50 recent answers are included