CPC faucet is an application that you can collect CPC test coins for free. The test coins can be used in newly-published CPChain Alpha Mainnet. Refer to https://cpchain.io/faucet/ to try it now.
Apply for a Wallet Address¶
To apply for test coins, a wallet address is required. CPC fusion provides APIs for interested users to create a wallet address.
Refer to Installation, if you have yet installed CPC fusion.
You can choose either start a local chain, or sync with Alpha Mainnet (Rhea).
To start a local chain, use the following commands:
$ cd ./examples/cpchain $ sudo ./cpchain-all.sh
Note that starting a local chain may fails. You may try several times until success.
To sync with Alpha Mainnet, use the following command:
$ build/bin/cpchain run --rpcapi personal,eth,cpc,admission,net,web3,db,txpool,miner --rpcaddr 0.0.0.0:8501 --runmode=testnet
WARNING: The current master version is not compatible with Alpha Mainnet. Interested users can refer to commit 7d29a2b to sync with Alpha Mainnet. After cloning from github repository, you can checkout the commit 7d29a2b by following command:
$ git checkout 7d29a2b $ sudo make all
Then use the commands above to connect to Alpha Mainnet.
Apply a wallet address in the chain.
Enter python3 interpreter, type in:
>>> from cpc_fusion import Web3 >>> cf = Web3(Web3.HTTPProvider('http://127.0.0.1:8501')) >>> cf.personal.newAccount(pwd)
The port here can be varying from 8501 to 8512. And
pwdrefers to the a string of password you prefer.
Once succeeds, it a hexadecimal number, which is the wallet address.