FISCO-BCOS / FISCO-BCOS/console

cpp sdk部署hello_world合约示例后无法使用控制台调用合约接口

Open
#806 1 comment 0 reactions 0 assignees View on GitHub
bug v3.x
Dominant language
Shell
Stars
96
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### 当前的cpp sdk sample/deploy_hello代码中没有设置abi字段,使用该实例代码部署交易后调用合约接口时可能存在找不到abi的情况
### deploy_hello.cpp中设置abi字段为空字符串
![微信图片_20231130150700](https://github.com/FISCO-BCOS/bcos-cpp-sdk/assets/58388819/f7d13ab1-f71c-4279-9ea9-e44c06474c17)
### 在控制台查看区块内容,abi为空
![微信图片_20231130151310](https://github.com/FISCO-BCOS/bcos-cpp-sdk/assets/58388819/fb392b46-adcb-4ae0-86a2-2dfb3cbfde25)
### 调用合约接口时报错 **_Abi is empty, please check contract abi exists._**
![微信图片_20231130150739](https://github.com/FISCO-BCOS/bcos-cpp-sdk/assets/58388819/78b765a9-b59d-4bb3-bb2e-b2f6bcacea1b)
### 自己手动添加abi字段后,查看区块中已包含abi字段,但仍然无法调用abi接口,添加方式如下
![微信图片_20231130151639](https://github.com/FISCO-BCOS/bcos-cpp-sdk/assets/58388819/c1a0061e-f63a-47f4-ae88-d847e7aed267)
![微信图片_20231130151713](https://github.com/FISCO-BCOS/bcos-cpp-sdk/assets/58388819/ca701a82-e339-476e-9bed-65a8a8c91c58)
### 建议在示例代码中添加abi字段,便于开发者学习如何使用cpp sdk部署合约后调用合约接口

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.