MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / getBalance

Function getBalance

CLI/commands/dividends_manager.js:615–622  ·  view source on GitHub ↗
(address, tokenAddress)

Source from the content-addressed store, hash-verified

613
614// Helper functions
615async function getBalance(address, tokenAddress) {
616 if (tokenAddress !== gbl.constants.ADDRESS_ZERO) {
617 let token = new web3.eth.Contract(abis.erc20(), tokenAddress);
618 return await token.methods.balanceOf(address).call();
619 } else {
620 return await web3.eth.getBalance(address);
621 }
622}
623
624function logPushResults(receipt) {
625 let successEventName;

Callers 2

createDividendsFunction · 0.70
exploreAccountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected