Polkadot JS UI

Easiest way to iterate with Polkadot based blockchain to use Polkadot JS App UI.

Before start you need to configure UI:

  • To connect to testnet use next address: wss://testnet.pontem.network/wss.

  • To connect to local node use next address: ws://127.0.0.1:9944.

  • Navigate to Polkadot JS App UI.

  • Setup UI to use an IP address if needed (to see network settings click on the orange circle in the top right corner and change custom endpoint).

Go to Settings -> Developer and put there next JSON:

{
"MoveModuleId": {
"address": "AccountId",
"name": "Text"
},
"MoveTypeTag": {
"_enum": [
"Bool",
"U8",
"U64",
"U128",
"Address",
"Signer",
"Vector",
"Struct"
],
"Bool": null,
"U8": null,
"U64": null,
"U128": null,
"Address": null,
"Signer": null,
"Vector": "MoveTypeTag",
"Struct": "MoveStructTag"
},
"MoveStructTag": {
"address": "AccountId",
"module": "Text",
"name": "Text"
}
}

Save configuration.

Account creation

Account
  • Navigate to "Accounts" in the header menu.

  • Click on "Add account".

  • Write down your seed and store it safely!

  • Put name and password.

Otherwise you can use Polkadot JS Extension, just follow instructions.

Transactions

🧙‍♂️ Read Move VM pallet documentation to build first modules and scripts.

You can use the UI to create new accounts, send transactions, and do RPC calls etc. In the current documentation we describe how to send execute script and publish module transactions, also how to deploy Standard Library using a sudo account.

You need an account with balance, in case of local network use default accounts, in case of Pontem demo network, use FAUCET.

Next steps required to have dove compiler installed, means you already compiled your modules/scripts.

Module

Deploy Module

To deploy compiled module do following steps:

  1. Navigate to Developer -> Extrinsics.

  2. Choose mvm module.

  3. Choose the correct account.

  4. Choose publishModule transaction.

  5. Choose module_bc field and enable file upload.

  6. Upload compiled module file (with .mv extension).

  7. Configure the gas limit parameter (usually 100000 will be enough).

  8. Submit a new signed transaction!

  9. Wait until the transaction is confirmed.

Script

Execute script

🧙‍♂️ Compile a script using dove with arguments using ct command, use file with .mvt extension.

To deploy compiled script transaction do following steps:

  1. Navigate to Developer -> Extrinsics.

  2. Choose mvm module.

  3. Choose the correct account.

  4. Choose execute transaction.

  5. Choose script_bc field and enable file upload.

  6. Upload complied transaction file (with .mvt extension).

  7. Configure the gas limit parameter (usually 100000 will be enough).

  8. Submit a new signed transaction!

  9. Wait until the transaction is confirmed.

Sudo

Sudo

You can use sudo in Substrate to deploy Standard Library to Move VM pallet. Standard library will be stored under the 0x01 address. To deploy a standard library using sudo you need access to sudo account, in case of local network it's usually Alice account.

See how to build Standard Library.

To deploy standard module do following steps:

  1. Navigate to Developer -> Extrinsics.

  2. Choose the origin account (usually it's Alice in case of local network).

  3. Choose the sudo module.

  4. Choose sudo(call) transaction.

  5. Choose the mvm module in the call: Call field.

  6. Choose publishPackage transaction.

  7. Choose package field and enable file upload.

  8. Configure the gas limit parameter (usually 1000000 will be enough).

  9. Submit a new signed transaction!

  10. Wait until the transaction is confirmed.

Tips

To speed up transaction you can provide additional tips to the transaction, when you click on Submit Transaction button it show modal where you can configure tip:

Tips

See gas, weight and tips documentation to learn more.

RPC

Currently, you can't call Move pallet RPC from the UI, but we are going to fix it soon.

So see RPC documentation to see how to send requests to RPC using other methods.