我在MySQL中以字符串形式存储了一个智能合约实例。如何将其转换回实体实例?

2024-10-01 07:46:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我将用Solidity编写的智能合约实例存储在MySQL数据库中。 contract_instance = eth_provider.contract( abi=contract_abi, address=contract_address, ContractFactoryClass=ConciseContract)

存储的值类似于0x00000187148C9F98处的web3.contract.ConciseContract对象

当我在Python flask中检索值并访问智能合约函数时,错误显示为AttributeError: 'str' object has no attribute 'getCustomerList' .

如何将str的值转换回智能合约实例


Tags: 实例instance数据库智能addressmysqlprovidereth