Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import commentContract from '../build/contracts/Comment.json';
- const comment = new web3.eth.Contract(Comment.abi, { from: coinbase });
- comment.deploy({ data: commentContract.bytecode })
- .send({ from: coinbase, gas: 1500000 })
- .then(deployedContract => {
- // return deployedContract.methods.setText('some text here', {from: coinbase})
- // .then(result => console.log(result))
- return deployedContract.methods.setText('some text here')
- .then(result => console.log(result))
- });
Add Comment
Please, Sign In to add comment