Created
February 11, 2020 21:30
-
-
Save ajb413/ac1d79802c732cd5d8525c1a9aa57834 to your computer and use it in GitHub Desktop.
Deploy smart contract example code with Web3.js
This file contains 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({ | |
data: bytecode | |
}).send({ | |
from: myWalletAddress, | |
gas: 5000000 | |
}).then((deployment) => { | |
console.log('Your contract was successfully deployed!'); | |
console.log('The contract can be interfaced with at this address:'); | |
console.log(deployment.options.address); | |
}).catch((err) => { | |
console.error(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment