Skip to content

Commit

Permalink
add env var to layerbank
Browse files Browse the repository at this point in the history
  • Loading branch information
melotik committed Jul 18, 2024
1 parent bec0441 commit e6c3565
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions adapters/layerbank/hourly_blocks.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
number,timestamp
7043812,1719856798
number,timestamp
7553921,1721303997
3 changes: 2 additions & 1 deletion adapters/layerbank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"jsbi": "^4.3.0",
"tiny-invariant": "^1.3.1",
"toformat": "^2.0.0",
"viem": "^2.13.1"
"viem": "^2.13.1",
"dotenv": "^16.4.5"
},
"engines": {
"node": ">=18.0.0"
Expand Down
4 changes: 3 additions & 1 deletion adapters/layerbank/src/sdk/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require("dotenv").config();

export const enum CHAINS {
SCROLL = 534352,
}
Expand All @@ -16,7 +18,7 @@ export const SUBGRAPH_URLS = {

export const RPC_URLS = {
[CHAINS.SCROLL]:
"https://scroll.drpc.org",
process.env.SCROLL_RPC_URL || "https://scroll.drpc.org",
};

export const WETH_ADDRESS = {
Expand Down
2 changes: 2 additions & 0 deletions adapters/layerbank/src/sdk/subgraphDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export const getTimestampAtBlock = async (blockNumber: number) => {
transport: http(RPC_URLS[CHAINS.SCROLL]),
});

console.log(RPC_URLS[CHAINS.SCROLL]);

const block = await publicClient.getBlock({
blockNumber: BigInt(blockNumber),
});
Expand Down

0 comments on commit e6c3565

Please sign in to comment.