目录

contract-sdk-py 是 XuperChain 的官方python 合约SDK,使用前请先在本地运行最新的XuperChain,并确保开启 native 合约支持

要求 python 版本为 python3.6+

  1. 安装 python 合约 SDK

    git clone https://github.com/xuperchain/contract-sdk-py.git
    cd contract-sdk-py
    pip install -r requirements.txt
    python3 setup.py install 
  1. 部署和调用第一个 python 合约
    ./xchain-cli native deploy --account XC1111111111111111@xuper --fee 15587517 --runtime py  -a '{"creator":"xchain"}' --cname counter <PATH_TO_CONTRACT_SDK_PY>/example/counter/counter.py 
    ./xchain-cli native invoke --method Increase -a '{"key":"xchain"}' counter --fee 10
    ./xchain-cli native invoke --method  Get -a '{"key":"xchain"}' counter --fee 10
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号