Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Web3 = require('web3')
- const web3 = new Web3(Web3.givenProvider || "ws://localhost:8546")
- const amount = 1000
- (async () => {
- const root = (await web3.eth.getAccounts())[0]
- const addr = '' // Oracle
- const tknAbi = JSON.parse( fs.readFileSync('../build/contracts/BurnableERC20.json') ).abi
- const tknAddress = ''
- const tkn = web3.eth.Contract(tknAbi, tknAddress)
- // Mint tokens
- console.log( await token.methods.mint(addr, amount).send({ from:root }) )
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement