这篇文档帮助开发人员了解如何加入PlasmaChain测试网进行部署。 如果你要找如何运行节点的信息,或者如何成为验证者,请查看验证者指南。
环境依赖
- 已安装Loom (查看 安装说明 )
curl https://raw.githubusercontent.com/loomnetwork/loom-sdk-documentation/master/scripts/get_loom.sh | sh
如何用Loom生成私钥并获得你的公共地址
$ ./loom genkey -k priv_key -a pub_key
结果
local address: 0x3B334bEd1e7d3e7d9214495120160D9236aCbC31
local address base64: OzNL7R59Pn2SFElRIBYNkjasvDE=
这将创建名为 priv_key
和 pub_key
的文件, priv_key
文件里包含你将用来把合同部署到DApp链的私钥。
Deploy Truffle Example to a Testnet
Make sure you have node and yarn/npm installed
Obtain the testnet URL from PlasmaChain Testnets page
Get the source: bash git clone https://github.com/loomnetwork/truffle-dappchain-example cd truffle-dappchain-example # copy the private key generated earlier to the root directory of the example repo cp ../priv_key extdev_private_key
If you wish to deploy the example contracts to
extdev-plasma-us1
skip this step. Otherwise, add the network you wish to deploy to intruffle-config.js
.Install node modules: bash yarn
Run deploy: bash yarn deploy:extdev