Guest User

Untitled

a guest
Mar 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import commentContract from '../build/contracts/Comment.json';
  2.  
  3. const comment = new web3.eth.Contract(Comment.abi, { from: coinbase });
  4.  
  5. comment.deploy({ data: commentContract.bytecode })
  6. .send({ from: coinbase, gas: 1500000 })
  7. .then(deployedContract => {
  8. // return deployedContract.methods.setText('some text here', {from: coinbase})
  9. // .then(result => console.log(result))
  10.  
  11. return deployedContract.methods.setText('some text here')
  12. .then(result => console.log(result))
  13. });
Add Comment
Please, Sign In to add comment