Skip to content

Commit

Permalink
Merge pull request #2 from decentldotland/staging
Browse files Browse the repository at this point in the history
feat: v0.0.2 - migration to MEM
  • Loading branch information
charmful0x authored Aug 9, 2023
2 parents 5c1c10f + afce427 commit 8203bc0
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
34 changes: 26 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ans-gateway",
"version": "0.0.1",
"version": "0.0.2",
"type": "module",
"description": "DNS resolver for ANS domains",
"main": "./src/gateway.js",
Expand Down
2 changes: 1 addition & 1 deletion src/gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ app.get("/", async (req, res) => {
res.send(Buffer.from(content?.data, "binary"));
res.end();
} catch(error) {
res.redirect(`https://decent.land`);
res.redirect(`https://ans.gg`);
res.end();
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const ANS_CONTRACT_ADDRESS = `VGWeJLDLJ9ify3ezl9tW-9fhB0G-GIUd60FE-5Q-_VI`;
export const ANS_CONTRACT_ADDRESS = `rExhMDVqLfSTdSCwG95_VOe2a3MuKGA0ukGPO0ra9GQ`;
2 changes: 1 addition & 1 deletion src/utils/req.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function resolveDomain(domain) {
try {
const normalizedDomain = _normalizeDomain(domain);
const ans_state = (
await axios.get(`https://api.exm.dev/read/${ANS_CONTRACT_ADDRESS}`)
await axios.get(`https://api.mem.tech/api/state/${ANS_CONTRACT_ADDRESS}`)
)?.data;
const domainOwnerIndex = ans_state.balances.findIndex((user) =>
user.ownedDomains.map((d) => d.domain).includes(normalizedDomain)
Expand Down

0 comments on commit 8203bc0

Please sign in to comment.