Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署了contracts文件夹下的KVTableTest合约,发起交易失败 #195

Closed
SheenWong opened this issue Jun 1, 2023 · 4 comments
Closed

Comments

@SheenWong
Copy link

我是bicos3版本,成功部署了contracts文件夹下的KVTableTest合约,但是调用sendRawTransaction失败。
代码如下:
receipt = client.sendRawTransaction(
to_address,
contract_abi,
"set",
['aa', 11, 'haha']
)
返回的recipt如下:
{
'blockNumber':14
'checksumContractAddress':''
'contractAddress':''
'extraData':''
'from':'0x2b21ed440abb9a6b493d75c0e5260a9e0609e2d6'
'gasUsed':'11300'
'hash':'0x'
'input':'0xed0c8b170000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046861686100000000000000000000000000000000000000000000000000000000'
'logEntries':[]
'message':''
'output':'0x'
'status':16
'to':'0x2b5dcbae97f9d9178e8b051b08c9fb4089bae71b'
'transactionHash':'0x1e6c6a6b4491cd987508a5eb0e2e54feca18a080eb079003ae05f6f615c0393e'
'version':0
}
请问是哪里有问题,急

@kyonRay
Copy link
Member

kyonRay commented Jun 1, 2023

这里应该是python sdk内带的kvTableTest中CRUD的接口是2.0的接口导致的,推荐使用控制台的示例合约:https://github.com/FISCO-BCOS/console/blob/master/src/main/resources/contract/solidity/KVTableTest.sol

@SheenWong
Copy link
Author

这里应该是python sdk内带的kvTableTest中CRUD的接口是2.0的接口导致的,推荐使用控制台的示例合约:https://github.com/FISCO-BCOS/console/blob/master/src/main/resources/contract/solidity/KVTableTest.sol

依然不行,还是返回status为16,我是bicos3.3.0版本,合约TableTestV320和KVTableTest都试过了

@kyonRay
Copy link
Member

kyonRay commented Jun 1, 2023

是调用哪一个接口失败了?请提供详细的操作步骤,如果能提供节点日志就更好了。

@coderkentzhang
Copy link
Contributor

验证3.0版本的合约https://github.com/FISCO-BCOS/console/blob/master/src/main/resources/contract/solidity/KVTableTest.sol
是可行的。注意:3.0的合约set参数形式和2.0的合约不同。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants