根据合约地址获取其字节码。
def get_code(self, address: ChecksumAddress) -> Optional[HexBytes]
address
ChecksumAddress
合约地址
Optional[HexBytes]
合约字节码
# 获取合约字节码 bytecode = chain.get_code("0x...") if bytecode: print(f"Contract Bytecode: {bytecode.hex()}")
最后更新于22天前