Skip to content

Commit 118c9d5

Browse files
committed
docs: add instruction on customisation
1 parent 0ab2665 commit 118c9d5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/contracts/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
NETWORK=sepolia
12
REMOTE_GATEWAY=
23
DEPLOYER_KEY=
34
SIGNER_ADDR=

packages/gateway/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ You can run the gateway as a command line tool; in its default configuration it
66

77
```
88
yarn && yarn build
9-
yarn start --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --data test.eth.json
9+
yarn start --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --provider-url <url>
1010
```
1111

1212
`private-key` should be an Ethereum private key that will be used to sign messages. You should configure your resolver contract to expect messages to be signed using the corresponding address.
1313

14-
`data` is the path to the data file; an example file is provided in `test.eth.json`.
14+
`<url>` is the websocket endpoint of the target substrate chain (default: wss://ws.test.azero.dev)
1515

1616
## Customisation
1717
The JSON backend is implemented in [json.ts](src/json.ts), and implements the `Database` interface from [server.ts](src/server.ts). You can replace this with your own database service by implementing the methods provided in that interface. If a record does not exist, you should return the zero value for that type - for example, requests for nonexistent text records should be responded to with the empty string, and requests for nonexistent addresses should be responded to with the all-zero address.
@@ -25,3 +25,6 @@ const db = JSONDatabase.fromFilename(options.data, parseInt(options.ttl));
2525
const app = makeApp(signer, '/', db);
2626
app.listen(parseInt(options.port));
2727
```
28+
29+
## AZERO-ID implementation
30+
The AzeroId gateway implementation in [azero-id.ts](src/azero-id.ts) reads the state from the AZERO-ID registry contract on AlephZero network. [supported-tlds.json](src/supported-tlds.json) stores the TLDs mapped to their target registry. Update it as per need.

0 commit comments

Comments
 (0)