Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. const Web3 = require('web3')
  2. const web3 = new Web3(Web3.givenProvider || "ws://localhost:8546")
  3.  
  4. const amount = 1000
  5.  
  6. (async () => {
  7. const root = (await web3.eth.getAccounts())[0]
  8. const addr = '' // Oracle
  9.  
  10. const tknAbi = JSON.parse( fs.readFileSync('../build/contracts/BurnableERC20.json') ).abi
  11. const tknAddress = ''
  12. const tkn = web3.eth.Contract(tknAbi, tknAddress)
  13.  
  14. // Mint tokens
  15. console.log( await token.methods.mint(addr, amount).send({ from:root }) )
  16. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement