From d1a7f40ded5fd2d5b58eda6fbad01257afa4bf6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Thu, 12 Sep 2024 12:35:41 +0200 Subject: [PATCH 1/2] add support for Linea --- hardhat.config.ts | 15 ++++++++++++++- sdk/contracts.ts | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index a834250..ac9df64 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -110,6 +110,11 @@ export default { ...sharedNetworkConfig, url: `https://linea-goerli.infura.io/v3/${INFURA_KEY}`, }, + linea: { + ...sharedNetworkConfig, + // url: `https://linea.infura.io/v3/${INFURA_KEY}`, + url: "https://rpc.linea.build", + }, core: { ...sharedNetworkConfig, url: "https://rpc.coredao.org", @@ -121,7 +126,7 @@ export default { base: { ...sharedNetworkConfig, url: "https://mainnet.base.org", - } + }, }, namedAccounts: { deployer: 0, @@ -156,6 +161,14 @@ export default { browserURL: "https://basescan.org/", }, }, + { + network: "linea", + chainId: 59144, + urls: { + apiURL: "https://api.lineascan.build/api", + browserURL: "https://lineascan.build/", + }, + }, ], }, }; diff --git a/sdk/contracts.ts b/sdk/contracts.ts index d927222..c86103a 100644 --- a/sdk/contracts.ts +++ b/sdk/contracts.ts @@ -51,6 +51,7 @@ export enum SupportedNetworks { Avalanche = 43114, BinanceSmartChain = 56, HardhatNetwork = 31337, + Linea = 59144, LineaGoerli = 59140, Sepolia = 11155111, CoreTestnet = 1115, @@ -216,6 +217,7 @@ export const ContractVersions: Record< "1.2.0": "0xEF8b46765ae805537053C59f826C3aD61924Db45", }, }, + [SupportedNetworks.Linea]: CanonicalAddresses, [SupportedNetworks.LineaGoerli]: CanonicalAddresses, [SupportedNetworks.Sepolia]: { ...CanonicalAddresses, From c746c88d23a2c556c00387013455c42468309481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Thu, 12 Sep 2024 12:38:40 +0200 Subject: [PATCH 2/2] Remove default rpc URL --- hardhat.config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index ac9df64..b24e118 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -112,8 +112,7 @@ export default { }, linea: { ...sharedNetworkConfig, - // url: `https://linea.infura.io/v3/${INFURA_KEY}`, - url: "https://rpc.linea.build", + url: `https://linea.infura.io/v3/${INFURA_KEY}`, }, core: { ...sharedNetworkConfig,