Register your DApp for discovery - Wiki Parity Tech Documentation

This page explains how to register your DAPP to let Parity UI discover it, load it from the network and display it.

We will be using the following Dapps/Contracts:

Check your assets

Before we get started, let´s check that you have everything we need at hand:

Preparation

Generate a UID

We will first generate a unique ID for our DAPP. Calculate the a sha3 checksum as:

web3.sha3('<DappId> v<DappVersion> from <yourName>')

Replace DappId, DappVersion and YourName by the appropriate values. This will produce our UID.

Register/Watch the DappReg contract

In Parity UI, navigate to the ‘Develop Contracts’ dapp and click ‘Watch’. Select the ‘custom’ option.

Provide the contract’s address:

The ABI can be found on etherscan.

It is:

[{"constant":true,"inputs":[{"name":"_id","type":"bytes32"},{"name":"_key","type":"bytes32"}],"name":"meta","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"count","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"bytes32"}],"name":"unregister","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"bytes32"}],"name":"get","outputs":[{"name":"id","type":"bytes32"},{"name":"owner","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"bytes32"},{"name":"_key","type":"bytes32"},{"name":"_value","type":"bytes32"}],"name":"setMeta","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"drain","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"setDappOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"at","outputs":[{"name":"id","type":"bytes32"},{"name":"owner","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"bytes32"}],"name":"register","outputs":[],"payable":true,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"},{"indexed":true,"name":"key","type":"bytes32"},{"indexed":false,"name":"value","type":"bytes32"}],"name":"MetaChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"}],"name":"Unregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"}]

Confirm to add this contract to your list.

GitHubHint

Navigate to the ‘GitHub Hint’ dapp in Parity UI.

First, ensure that the right account is selected. For each of the following, provide the path and register it to get a hash:

After confirming those transactions, the hashes will disappear. To recall them, paste your links again. This time the hashes will appears in orange, confirming their registration.

Take note of the 3 hashes.

DappReg

Here are the instructions to interact with the DappReg contract manually using the ‘Develop Contracts’ dapp in Parity UI. More information on the DappReg smart contract can be found here. It is also possible to use the ‘Dapp Registration’ dapp instead.

Click on the DappReg contract in ‘Develop Contracts’, then ‘Execute’ the register function and make sure to:

Confirm your transaction and wait until it is processed.

Once your UID has been registered, you can use the setMeta function on the following keys:

NOTE: Everything is uppercase.

For each, you will pass the corresponding hash we got in the previous step.

Once all the transactions are processed (this can take a few minutes), your DAPP will be registered and will appear in the Applications tab in Parity UI.