(address, contract, blockTag = "latest")
| 43 | } |
| 44 | |
| 45 | async getTokenBalance(address, contract, blockTag = "latest") { |
| 46 | const balanceOfAbi = [{ |
| 47 | "inputs": [{ |
| 48 | "internalType": "address", |
| 49 | "name": "account", |
| 50 | "type": "address", |
| 51 | }, ], |
| 52 | "name": "balanceOf", |
| 53 | "outputs": [{ |
| 54 | "internalType": "uint256", |
| 55 | "name": "", |
| 56 | "type": "uint256", |
| 57 | }, ], |
| 58 | "stateMutability": "view", |
| 59 | "type": "function", |
| 60 | }]; |
| 61 | const erc20 = new Ethers.Contract(contract, balanceOfAbi, this.provider); |
| 62 | |
| 63 | return await erc20.balanceOf(address, { |
| 64 | blockTag |
| 65 | }); |
| 66 | } |
| 67 | |
| 68 | async getTransactionCount(address, blockTag = "latest") { |
| 69 | return await this.provider.getTransactionCount(address, blockTag); |
nothing calls this directly
no outgoing calls
no test coverage detected