Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
sdk-go
sdk-go
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • sdk-gosdk-go
  • Issues
  • #5

Closed
Open
Opened Feb 04, 2023 by li li@lilihli

example中的代码执行报错!

在执行设置自己余额时报错,调试发现是在ABI.Pack函数中出错,错误如下:

llg@llg-virtual-machine:~/gopath/src/sdk-go/examples/user_contract_evm_balance$ ./user_contract_evm_balance

client1AddrInt: 489803224908156547819714193299779218991898859576

client1EthAddr: 0x55cb8945bc3578b3a699eb3f684d0d88c8ca9838

client2AddrInt: 444028280806120550600082168201460873034129067650

client2EthAddr: 0x4dc6eaaf3b792b7148eebb4bbdc2b3b08655ce82

====================== create client ======================

====================== 创建Balance合约 ======================

CREATE EVM balance contract resp:

====================== 设置addr2余额 ======================

invoke contract success, resp: [code:0]/[msg:]/[contractResult:gas_used:5888 ]

====================== 查看addr2余额 ======================

addr [444028280806120550600082168201460873034129067650] => [%!d(string=1234)]

====================== 设置自己余额 ======================

2023/02/04 11:22:50 1 arguments in struct expected, 2 received

Edited Feb 04, 2023 by li li
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/sdk-go#5

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。