Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add env var to layerbank #16

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading