Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix(env): change env var from CONTRACT_TX_ID to CONTRACT_ID
Browse files Browse the repository at this point in the history
This aligns env vars with the ar-io-node.
  • Loading branch information
dtfiedler committed Apr 10, 2024
1 parent f90dc9f commit 0d8ff00
Show file tree
Hide file tree
Showing 5 changed files with 1,348 additions and 40 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/ar-io/arns-resolver"
},
"dependencies": {
"@ar.io/sdk": "^1.0.0-alpha.12",
"@ar.io/sdk": "^1.0.0-alpha.19",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const CONTRACT_CACHE_URL = env.varOrDefault(
'CONTRACT_CACHE_URL',
'https://api.arns.app',
);
export const CONTRACT_TX_ID = env.varOrDefault(
'CONTRACT_TX_ID',
export const CONTRACT_ID = env.varOrDefault(
'CONTRACT_ID',
'bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U',
);
export const ARNS_CACHE_PATH = env.varOrDefault(
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ app.get('/ar-io/resolver/healthcheck', async (_req, res) => {

app.get('/ar-io/resolver/info', (_req, res) => {
res.status(200).send({
contractId: config.CONTRACT_TX_ID,
contractId: config.CONTRACT_ID,
cacheUrl: config.CONTRACT_CACHE_URL,
lastEvaluationTimestamp: getLastEvaluatedTimestamp(),
});
Expand Down
4 changes: 2 additions & 2 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ let lastEvaluationTimestamp: number | undefined;
export const getLastEvaluatedTimestamp = () => lastEvaluationTimestamp;
export const contract = new ArIO({
contract: new RemoteContract({
contractTxId: config.CONTRACT_TX_ID,
url: config.CONTRACT_CACHE_URL,
contractTxId: config.CONTRACT_ID,
cacheUrl: config.CONTRACT_CACHE_URL,
}),
});

Expand Down
Loading

0 comments on commit 0d8ff00

Please sign in to comment.