eip-155定义的eth 的chainID
CHAIN_ID | Chain(s) |
---|---|
1 | Ethereum mainnet |
2 | Morden (disused), Expanse mainnet |
3 | Ropsten |
4 | Rinkeby |
5 | Goerli |
42 | Kovan |
1337 | Geth private chains (default) |
ethers.utils.HDNode.isValidMnemonic(): 验证助记词是否有效
ethers.utils.getAddress():转换为checkSum地址
1.查询余额
- eth余额
let pendingBal = await rpcProvider.getBalance(address, "pending")
- 查询其他token余额
const getBalance_USDT = async () => { const contract = new ethers.Contract(USDTaddress, USDTabi, rpcProvide