mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-11-25 11:18:29 +01:00
fix cli
This commit is contained in:
parent
0cf811b854
commit
2ec693d0de
@ -44,7 +44,7 @@ async function printETHBalance({ address, name }) {
|
|||||||
|
|
||||||
/** Display ERC20 account balance */
|
/** Display ERC20 account balance */
|
||||||
async function printERC20Balance({ address, name, tokenAddress }) {
|
async function printERC20Balance({ address, name, tokenAddress }) {
|
||||||
const erc20ContractJson = require(__dirname + '../build/contracts/ERC20Mock.json')
|
const erc20ContractJson = require(__dirname + '/../build/contracts/ERC20Mock.json')
|
||||||
erc20 = tokenAddress ? new web3.eth.Contract(erc20ContractJson.abi, tokenAddress) : erc20
|
erc20 = tokenAddress ? new web3.eth.Contract(erc20ContractJson.abi, tokenAddress) : erc20
|
||||||
console.log(`${name} Token Balance is`, web3.utils.fromWei(await erc20.methods.balanceOf(address).call()))
|
console.log(`${name} Token Balance is`, web3.utils.fromWei(await erc20.methods.balanceOf(address).call()))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user