在百度超级链上部署Solidity合约
作者:shizhishi |
发布时间: |
分类:系统运维 |
声明:个人技术博客 • 非官方 • 仅供技术学习交流
百度开源了 [百度超级链](https://xuper.baidu.com/) 的核心 [XuperChain](https://github.com/xuperchain/xuperchain) ,所以能用`XuperChain`来在自己的电脑或服务器上部署区块链和区块链应用。 这里具体说明在部署了 `XuperCh...
百度开源了 [百度超级链](https://xuper.baidu.com/) 的核心 [XuperChain](https://github.com/xuperchain/xuperchain) ,所以能用`XuperChain`来在自己的电脑或服务器上部署区块链和区块链应用。
这里具体说明在部署了 `XuperChain` 的情况下,如何部署Solidity合约。
### 一 首先启动 XuperChain ,这里官网的教程已经很详细了
[1. 环境部署 — XuperChain 官方文档 5.3 文档](https://xuper.baidu.com/n/xuperdoc/v5.3/quickstart/quickstart.html)
说明XuperChain没有启动,需要查看启动状态或重启
```
[root@iZbp14eggp7jy5nocign0yZ output]# bash control.sh start
/www/wwwroot/xchain/xuperchain-5.4.0/output/bin/xchain
/www/wwwroot/xchain/xuperchain-5.4.0/output/conf/env.yaml
start xchain. cmd:nohup /www/wwwroot/xchain/xuperchain-5.4.0/output/bin/xchain startup --conf /www/wwwroot/xchain/xuperchain-5.4.0/output/conf/env.yaml >/www/wwwroot/xchain/xuperchain-5.4.0/output/logs/nohup.out 2>&1 &
.start proc succ.
start finish.pid:12623
Done!
[root@iZbp14eggp7jy5nocign0yZ output]# bin/xchain-cli status -H 127.0.0.1:37101
{
"blockchains": [
{
"name": "xuper",
"ledger": {
"rootBlockid": "d93c260ea5639a55e1fcad3df494495efad5c65d46e846b6db3a9194a4212886",
"tipBlockid": "183e4bbbdb1eaf18bdc19ad6bde1d44192171accd0969fe7061779591c5d3098",
"trunkHeight": 852092
},
"utxo": {
"latestBlockid": "183e4bbbdb1eaf18bdc19ad6bde1d44192171accd0969fe7061779591c5d3098",
"lockKeyList": null,
"utxoTotal": "100000000852092000000",
"avgDelay": 0,
"unconfirmed": 0,
"maxBlockSize": 134217728,
"reservedContracts": [],
"forbiddenContract": {
"moduleName": "",
"contractName": "",
"methodName": "",
"args": {},
"resource_limits": null
},
"newAccountResourceAmount": 1000,
"irreversibleBlockHeight": 0,
"irreversibleSlideWindow": 0,
"gasPrice": {
"cpu_rate": 1000,
"mem_rate": 1000000,
"disk_rate": 1,
"xfee_rate": 1
}
},
"branchBlockid": [
"183e4bbbdb1eaf18bdc19ad6bde1d44192171accd0969fe7061779591c5d3098"
]
}
],
"peers": null,
"speeds": {}
}
```