Polkadot is based on the concept of parachains. Because of this, it can be a bit confusing as to how to get started developing for this network, especially for WASM-based contract.
Most of all, you need tokens to instantiate and interact with your contracts.
Currently, the preferred network for testing contracts is the rococo-contracts parachain. The process to get test tokens can be a bit confusing for newcomers so here’s how to get tokens on this particular parachain.
From there, you need to ask for a transfer of token with the following message using your own address:
!drip <your_address>
The bot will send 100 ROC tokens to your address within a few seconds. Be aware that there is a once per day limit on the faucet, so you can’t spam requests.
There’s a small issue though: the tokens will have been sent on Rococo, and not the Rococo-contracts parachain. Thankfully, there’s an easy solution to transfer them.
The dev team at Polkadot has created several UI to easily deploy and interact with contracts. It also enables transfering tokens between parachains, which is just what we need.
1- Go to the polkadot app.
2- The selected chain should be Rococo. If it isn’t click on the top-left selector, select “Rococo” and “apply”.
3- Click on accounts, then teleport. Now you can select the Rococo-contracts parachain and send your ROC tokens to it.
Congrats! You now have tokens available to deploy contracts and interact with them.
One last trick: it is possible to have the faucet send the tokens directly to the contracts parachain (or any other parachain actually).
All you need to do is to add the id of the parachain when asking for tokens on Matrix.
!drip <your_address>:<parachain_id>
The ID for the contracts parachain is 1002 so send the following the to bot:
!drip <your_address>:1002
That’s it! Good luck on your dev journey on Polkadot.