Skip to content

Commit

Permalink
Merge branch 'master' into peter/chore-update-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi authored Nov 21, 2024
2 parents a74f23a + 2508960 commit 7bd6968
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/datastructures/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ As a core ingredient to the ink! language, its main advantage is being simple an
lightweight: It favors being efficient in terms of gas costs and code size
over providing a lot of high-level functionality found in other implementations
like the `ink::prelude::collections::HashMap` type.
Overall, the ink! `Mapping` will be solid choice for most contracts. Moreover, smart
Overall, the ink! `Mapping` will be a solid choice for most contracts. Moreover, smart
contracts developers can implement advanced features themselves.

`Lazy` is a wrapper type that can be used over any other storage compatible type.
Expand Down
13 changes: 5 additions & 8 deletions docs/testing/testnet/faucet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ slug: /faucet
hide_title: true
---

import Faucet from "./Faucet";
<!-- import Faucet from "./Faucet"; -->

<Faucet/>

We are operating a faucet for our [Contracts Testnet on Rococo](./faucet.md).
By requesting funds from the form above you will receive `ROC`
There is a faucet for [Paseo](https://faucet.polkadot.io/).
By requesting funds from the link above you will receive `PAS`
tokens to your account on this parachain.

Note that the funds won't be available on the relay chain, the faucet teleports
them directly to our parachain ([see here for more details](./overview.md)).
The polkadot-js UI will display them under [the "Accounts" tab for the Contracts parachain](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/accounts):
<img src="/img/roc-in-wallet.png" alt="Rococo testnet tokens in wallet" />
The polkadot-js UI will display them under [the "Accounts" tab for the Contracts parachain](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpaseo.dotters.network#/accounts):
<img src="/img/pas-in-wallet.png" alt="Paseo testnet tokens in wallet" />
63 changes: 12 additions & 51 deletions docs/testing/testnet/overview.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
---
title: Contracts on Rococo
title: Contracts on Paseo
hide_title: true
slug: /testnet
---

<img src="/img/title/testnet.svg" className="titlePic" />

# Contracts on Rococo
# Contracts on Paseo

[Rococo](https://wiki.polkadot.network/docs/build-pdk#rococo-testnet) is a testnet for
[Paseo](https://wiki.polkadot.network/docs/build-pdk#paseo-testnet) is a testnet for
Polkadot and Kusama parachains.
We have a live testnet named Contracts as a parachain online there.

<img src="/img/contracts-on-polkadot-js.png" alt="Smart contracts parachain on Rococo" />

## What is the Contracts parachain?

It's a [Substrate](https://github.com/paritytech/substrate) parachain for smart
contracts. We configured it to use Substrate's smart contracts module – the
[`contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)
pallet – in a default configuration.

The code for this parachain can be found [in the `cumulus` repository](https://github.com/paritytech/cumulus/tree/master/parachains/runtimes/contracts/contracts-rococo).
Our parachain uses the Rococo relay chain's native token (`ROC`) instead of having its own token.
Due to this you'll need `ROC` in order to deploy contracts on our testnet.

## How can I use it?
### (1) Create an Account
Expand All @@ -34,48 +20,23 @@ See [here](https://wiki.polkadot.network/docs/learn-account-generation) for a de

### (2) Get Testnet Tokens

<img src="/img/chest.svg" alt="image of a treasure chest" className="faucetHeroImage" />

As a second step, you have to get `ROC` testnet tokens through the [Rococo Faucet](./faucet.md).
As a second step, you have to get `PAS` testnet tokens through the [Paseo Faucet](https://faucet.polkadot.io/).

Alternatively, you can use the [Element chat room](https://wiki.polkadot.network/docs/learn-DOT#getting-tokens-on-the-rococo-testnet).
You must send a message like this (Note the `:1002` after the wallet address):
Alternatively, you can use the [Matrix chat room](https://wiki.polkadot.network/docs/learn-DOT#getting-tokens-on-the-paseo-testnet).
You must send a message like this:

```
!drip YOUR_SS_58_ADDRESS:1002
!drip <PASEO_ADDRESS>
```

The number `1002` is the parachain ID of Contracts on Rococo, by supplying it you instruct the
faucet to teleport `ROC` tokens directly to your account on the parachain.
If you have some tokens on the Rococo relay chain, you can teleport them to the Contracts parachain on your own. Read more on teleporting assets [here](https://wiki.polkadot.network/docs/learn-teleport).

If everything worked out, the teleported `ROC` tokens will show up in your account.
If everything worked out, the `PAS` tokens will show up in your account.
In case you are using the `polkadot-js` frontend, you can see them under
[the "Accounts" tab for Contracts](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/accounts).
[the "Accounts" tab for Paseo](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpaseo.dotters.network#/accounts).

<img src="/img/roc-in-wallet.png" alt="Rococo testnet tokens in wallet" />
<img src="/img/pas-in-wallet.png" alt="Paseo testnet tokens in wallet" />


### (3) Deploy Your Contract

Once you have `ROC` on Contracts you can deploy a contract _nearly_ as you would with
a local developer node.
The only difference is that you can't use pre-endowed accounts like `Alice` or `Bob`,
you have to use the one you generated instead.

<img src="/img/deployment-acc.png" alt="Deploy a smart contract on Rococo/Polkadot" />

You can also deploy your contract from the command-line via `cargo-contract`.
Make sure you are in the folder of your contract and that it has been
built recently. Then execute:

```bash
cargo contract upload --suri "your twelve or twenty-four words"
cargo contract instantiate --suri … --constructor new --args true
```

`new` in this case would be a constructor method exposed by the contract,
`--args` would be any arguments the constructor expects.

See [the `cargo-contract` docs](https://github.com/use-ink/cargo-contract/blob/master/crates/extrinsics/README.md#commands)
for a more detailed documentation.
Once you have `PAS` on Paseo you can deploy by following the instructions in the Pop Docs [here](https://learn.onpop.io/contracts/guides/deploy-on-pop-testnet#:~:text=Transfer%20from%20Paseo%20Relay%20Network%20to%20Pop%20Testnet).
The only difference is that instead of using the `Alice` account you will use the one you generated.
2 changes: 1 addition & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = {
"label": "Testnet",
"items": [
"testing/testnet/overview",
"testing/testnet/faucet"
"testing/testnet/faucet",
],
"link": {
"type": "doc",
Expand Down
Binary file added static/img/pas-in-wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bd6968

Please sign in to comment.