(tokenAddress: string)
| 25 | } |
| 26 | |
| 27 | async getTokenInfo(tokenAddress: string): Promise<{ decimals: number; name: string; symbol: string }> { |
| 28 | const tokenContract = new this.web3.eth.Contract(ERC20ABI as AbiItem[], tokenAddress); |
| 29 | return { |
| 30 | decimals: Number(await tokenContract.methods.decimals().call()), |
| 31 | name: await tokenContract.methods.name().call(), |
| 32 | symbol: await tokenContract.methods.symbol().call(), |
| 33 | }; |
| 34 | } |
| 35 | } |