This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myContract.deploy().send({from: accounts[1]}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| truffle console --network ganache_cli | |
| The full procedure is like this | |
| - make sure that ganache_cli is running and truffle.js is configured properly | |
| - truffle networks --clean // to reset old garbage | |
| - truffle console --network ganache_cli | |
| - migrate | |
| - interact with your deploys smart contract via JS | |
| - MySmartContract.deployed().then(function(instance) {... call your contract's instance methods ;}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = async function(deployer, _, accounts) { | |
| let someContract = await SomeContract.deployed(); | |
| try { | |
| // If this contract method fails, the migration does not stop | |
| await someContract.someMethod(namehash(''), web3.utils.sha3("eth"), accounts[0]); | |
| } | |
| catch (err) { | |
| console.log('Deploy step X failed', err); | |
| throw new Error('Deploy step X failed'); |
OlderNewer