-
Make sure that your system has Rust installed.
-
Clone the repo,
git clone https://github.com/anudit/ens-fast
-
Create a
.env
file (like the.env.sample
file) in the root directory cloned with the following variables,PROFILE="" WEB3STORAGE_TOKEN=""
- Profile:
dev
,release
- (Optional) Create a Web3.storage API key here for snapshot cron.
- Profile:
-
Run it.
cargo run --release
-
Test it out.
Enpoint: http://localhost:8000
-
[GET]
/ens/resolve/<ens-name>
-
[GET]
/ens/resolve-full/<ens-name>
-
[POST]
/ens/resolve/batch
Example
http://localhost:8000/ens/resolve/batch
Body,
{ "ens": [ "nick.eth", "daws.eth" ] }
Resp,
{ "daws.eth": { "address": "0xc0deaf6bd3f0c6574a6a625ef2f22f62a5150eab", "created": 1632334969, "expiry": 1853233633 }, "nick.eth": { "address": "0xb8c2c29ee19d8307cb7255e1cd9cbde883a267d5", "created": 1571924851, "expiry": 1698131707 } }
-
[POST]
/ens/resolve-full/batch
Example
http://localhost:8000/ens/resolve-full/batch
Body,
{ "ens": [ "daws.eth", "nick.eth", ] }