UBTC智能合约全面开放公测!附有详细测试向导

2018-04-18 22:27 评论 0 条

 

根据UB官网最新公告,实现图灵完备的智能合约的UBTC测试链已经完成内测并部署完毕,现已开放公测。UBTC智能合约支持的编程语言包括C#, Java, Kotlin和LUA。

测试链的P2P端口是18333。

开发人员可以通过如下节点测试智能合约:
13.251.64.171
13.209.29.62
18.182.0.202

不同于其他需要使用自己的编程语言的智能合约技术,UBTC致力于支持通用编程语言(如C#, Java, Kotlin和LUA)使智能合约编程更简单易用。

在进行全面细致的测试之后,UB开发团队将会在UBTC的区块链上正式实施智能合约。

以下内容是从Github英文页面翻译而来的测试向导,原链接为:
https://github.com/UnitedBitcoin/UnitedBitcoin/wiki/ubtc-with-smart-contract-feature-public-beta-testnet-guideline

注意:
1、这是测试链,请不要导入任何主链的私钥到测试链节点。
2、测试链有可能会被全部替换,并清除所有数据。如果测试过程中发现有任何错误,可以尝试重新下载测试链程序,删除旧的数据,并重启节点。

准备环境:

推荐安装 ubuntu 16.04 x64。
运行以下命令安装依赖库。
apt update -y
apt install -ysoftware-properties-common
add-apt-repository-y ppa:bitcoin/bitcoin
apt update -y
apt install -ylibboost1.58-all-dev libminiupnpc-dev libssl-dev libevent-dev libzmq3-dev
apt install -ylibdb4.8-dev libdb4.8++-dev

获取测试链节点:

您可以克隆 contract 分支并从源码构建, 或者从以下链接下载(目前只有Linux版本):
ubcd-test(http://p728vdxow.bkt.gdipper.com/ubcd-test)
ubc-cli-test(http://p728vdxow.bkt.gdipper.com/ubc-cli-test)

您可以参考链接https://github.com/UnitedBitcoin/UnitedBitcoin/wiki/How-to-build-ubtc-contract-local-testnet如何从源码自行构建测试链节点。

启动测试链节点:

-       进入测试链节点程序所在目录
-       运行 mkdir ./testdata
-       运行 ./ubcd-test -datadir=./testdata -rpcuser=user -rpcpassword=password-rpcport=60000 -rpcallowip=127.0.0.1/32 -port=18333 -testnet -txindex -server –contractprint
如果需要在后台运行程序,在命令行加上-daemon参数。
-       运行以下命令连接到测试链网络
./ubc-cli-test-rpcuser=user -rpcpassword=password -rpcport=60000 addnode 13.251.64.171:18333add
./ubc-cli-test-rpcuser=user -rpcpassword=password -rpcport=60000 addnode 13.209.29.62:18333add
./ubc-cli-test-rpcuser=user -rpcpassword=password -rpcport=60000 addnode 18.182.0.202:18333add
-       同步数据需要几分钟时间. 运行 ./ubc-cli-test -rpcuser=user -rpcpassword=password -rpcport=60000getblockcount 来获取当前节点的块高度。
-       现在您应该加入了测试链网络。

使用:

访问 http://13.251.64.171:3000/ 来请求测试链代币。
参考其他wiki文档来学习如何进行测试,链接如下:
https://github.com/UnitedBitcoin/UnitedBitcoin/wiki/UnitedBitcoin-Smart-Contract

 

来源:区块网

版权声明:本文著作权归原作者所有,欢迎分享本文,谢谢支持!
转载请注明:UBTC智能合约全面开放公测!附有详细测试向导 | BitOL|比特在线-关注区块链技术动态的小博客
分类:区块链技术动态 标签:

发表评论

您必须 登录 才能发表留言!