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

Function getBalance

CLI/commands/sto_manager.js:975–984  ·  view source on GitHub ↗
(from, type)

Source from the content-addressed store, hash-verified

973// HELPER FUNCTIONS //
974//////////////////////
975async function getBalance(from, type) {
976 switch (type) {
977 case gbl.constants.FUND_RAISE_TYPES.ETH:
978 return await web3.eth.getBalance(from);
979 case gbl.constants.FUND_RAISE_TYPES.POLY:
980 return await polyToken.methods.balanceOf(from).call();
981 case gbl.constants.FUND_RAISE_TYPES.STABLE:
982 return await usdToken.methods.balanceOf(from).call();
983 }
984}
985
986async function getAllModulesByType(type) {
987 function ModuleInfo(_moduleType, _name, _address, _factoryAddress, _archived, _paused) {

Callers 2

cappedSTO_statusFunction · 0.70
usdTieredSTO_statusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected