最后更新于5天前
根据账户地址获取其原生代币余额。
def get_balance(self, address: ChecksumAddress) -> Optional[Wei]
# 获取账户余额 balance = chain.get_balance("0x...") if balance is not None: print(f"Balance: {Web3.from_wei(balance, 'ether')} ETH")
address
ChecksumAddress
账户地址
Optional[Wei]
账户原生代币余额(Wei)