使用Docker Python 构建智能合约
使用solidity的truffle框架开发智能合约,使用Docker Python调用合约。
1. 合约编写、编译和部署
- 将 https://github.com/jamess010/AIOpen/tree/master/data/blockchain/docker-web3-python 内容拷贝下来
- cd ./docker-web3-python
- mkdir - p smartcontract
- cd ./smartcontract
- truffle init (port: 9545)
- truffle compile
- truffle migrate (--reset)
2. 使用 jupyter notebook 进行 python 调用
- 打开浏览器,输入 http://localhost:8828
- 打开 test_modelrepo.ipynb
- 按照 notebook 步骤进行
本文详细介绍如何使用DockerPython和Solidity的Truffle框架来开发、编译及部署智能合约,并通过Jupyter Notebook实现Python对智能合约的调用。
1215

被折叠的 条评论
为什么被折叠?



