Skip to content

Commit 8d226b1

Browse files
committed
Add Linea support
1 parent 0ab176a commit 8d226b1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

run.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,24 @@ base_path="$(dirname "$(realpath -s "$0")")/src"
77
# Explanation for the flags:
88
# - `NODE_EXTRA_CA_CERTS`: if using ethers npm package and this is denied, the
99
# script errors out with "Error: could not detect network".
10+
# - `WS_NO_BUFFER_UTIL`: script crashes without access
11+
# https://www.npmjs.com/package/ws?activeTab=readme
1012
# - `--deny-read`: do not prompt for permission to read the node_modules cache,
1113
# which is triggered by the npm module import of ethers.
1214
# - `--allow-net=...`: list of nodes that the script is expected to connect to.
1315
# - `--allow-write=./out`: this is the folder that collects the script's output.
1416
deno run \
1517
--deny-read \
1618
--allow-write="./out" \
17-
--allow-env='NODE_EXTRA_CA_CERTS' \
19+
--allow-env='NODE_EXTRA_CA_CERTS,WS_NO_BUFFER_UTIL' \
1820
--allow-net="\
1921
rpc.mevblocker.io,\
2022
rpc.gnosischain.com,\
2123
ethereum-sepolia.publicnode.com,\
2224
arbitrum-one-rpc.publicnode.com,\
2325
base.llamarpc.com,\
24-
rpc.lens.xyz" \
26+
rpc.lens.xyz,\
27+
rpc.linea.build" \
2528
-- \
2629
"$base_path/replace-owners.ts" \
2730
"$@"

src/networks.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export type SupportedNetworks =
99
| "Avalanche"
1010
| "Arbitrum One"
1111
| "Base"
12-
| "Lens";
12+
| "Lens"
13+
| "Linea";
1314

1415
export function getRpc(network: SupportedNetworks): string {
1516
// For more information about the RPC nodes: https://chainlist.org/
@@ -36,6 +37,8 @@ export function getRpc(network: SupportedNetworks): string {
3637
return "https://api.avax.network/ext/bc/C/rpc";
3738
case "Lens":
3839
return "https://rpc.lens.xyz";
40+
case "Linea":
41+
return "https://rpc.linea.build";
3942
default:
4043
throw new Error(`Invalid network ${network}`);
4144
}

0 commit comments

Comments
 (0)