Skip to content

Instantly share code, notes, and snippets.

@ajb413
Created February 11, 2020 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajb413/ac1d79802c732cd5d8525c1a9aa57834 to your computer and use it in GitHub Desktop.
Save ajb413/ac1d79802c732cd5d8525c1a9aa57834 to your computer and use it in GitHub Desktop.
Deploy smart contract example code with Web3.js
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