Skip to content

Commit 3b70255

Browse files
committed
Add links to code relevant to each protocol in README.md
1 parent b577d64 commit 3b70255

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ The resolution protocol adheres to the following three steps:
5252
3. **Target Network Connection**:
5353
The client uses the connection details from the TLD network to establish a direct connection with the **target network**. Once resolved, the connection details can be cached locally for future use, improving resolution efficiency for subsequent queries.
5454

55+
The implementation of the resolution protocol can be found in [dns_client](./dns_client/dns/resolver.js#L49-L61) and [dns_client_golang](./dns_client_golang/substrate/connect.go#L73-L94).
56+
5557
### Domain Registration Protocol
5658

5759
![domain registration protocol](./img/registration_protocol.png)
@@ -69,6 +71,8 @@ The registration protocol can be described as follows:
6971

7072
This protocol ensures that domains are registered on a **first-come, first-served** basis in a decentralized environment without relying on centralized registrars, incurring only the transaction fees for the registration process.
7173

74+
The implementation of the registration extrinsic can be found in the [tld-pallet](./polkadot-sdk-solochain-template/pallets/tld/src/lib.rs#L193-L220), and the implementation of the registration through the dns client can be found in [dns_client](./dns_client/dns/registry.js#L96-L120).
75+
7276
### Domain Transfer Protocol
7377

7478
![domain transfer protocol](./img/transfer_protocol.png)
@@ -87,6 +91,8 @@ The domain transfer protocol is as follows:
8791
4. **Optional Cancellation by Initiator**:
8892
If the initiator (BC1 Node) decides to cancel the transfer **before the recipient accepts**, it can submit a cancellation request to the TLD network. This step will remove the pending transfer and halt the process.
8993

94+
The implementation of the domain revocation extrinsic can be found in the [tld-pallet](./polkadot-sdk-solochain-template/pallets/tld/src/lib.rs#L269-L323).
95+
9096
### Domain Revocation Protocol
9197

9298
![domain revocation protocol](./img/domain_revocation_protocol.png)
@@ -105,6 +111,8 @@ The domain revocation protocol and its conditions are described as follows:
105111
4. **Asset Removal on Root Network**:
106112
If the root network detects a revoked domain, it initiates the removal of all associated asset references linked to the domain. This is done through an asset removal transaction to maintain data consistency across the architecture.
107113

114+
The implementation of the domain revocation extrinsic can be found in the [tld-pallet](./polkadot-sdk-solochain-template/pallets/tld/src/lib.rs#L247-L267).
115+
108116
## Testing
109117

110118
Each component has its own set of unit tests, and some contain guides for manual testing as well. The testing guides for each component can be found in the following files:

0 commit comments

Comments
 (0)