Skip to content

Commit

Permalink
feat: add support for linea mainet & testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaryatrh committed Jun 29, 2023
1 parent d2b5f1d commit 1ce0aef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src.ts/providers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,12 @@ function injectCommonNetworks(): void {
url: "http:/\/api-testnet.bscscan.com"
}
});
registerEth("linea", 59144, {
ensNetwork: 1,
etherscan: { url: "https:/\/lineascan.build/" }
});
registerEth("linea-goerli", 59140, {
ensNetwork: 5,
etherscan: { url: "https:/\/goerli.lineascan.build/" }
});
}
4 changes: 4 additions & 0 deletions src.ts/providers/provider-infura.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ function getHost(name: string): string {
return "optimism-mainnet.infura.io";
case "optimism-goerli":
return "optimism-goerli.infura.io";
case "linea":
return "linea-mainnet.infura.io";
case "linea-goerli":
return "linea-goerli.infura.io";
}

assertArgument(false, "unsupported network", "network", name);
Expand Down

0 comments on commit 1ce0aef

Please sign in to comment.