From d3e5e2c45b28c377f306091acfc024e30c49ef20 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Thu, 27 Jul 2023 20:49:02 -0400 Subject: [PATCH] Added linea network to InfuraProvider and Network (#4184, #4190). --- src.ts/providers/network.ts | 24 ++++++++++++++---------- src.ts/providers/provider-infura.ts | 4 ++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src.ts/providers/network.ts b/src.ts/providers/network.ts index 1a5cc0b984..34722a05fa 100644 --- a/src.ts/providers/network.ts +++ b/src.ts/providers/network.ts @@ -333,8 +333,8 @@ function getGasStationPlugin(url: string) { maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9), }; return feeData; - } catch (error) { - assert(false, `error encountered with polygon gas station (${ JSON.stringify(request.url) })`, "SERVER_ERROR", { request, response, info: { error } }); + } catch (error: any) { + assert(false, `error encountered with polygon gas station (${ JSON.stringify(request.url) })`, "SERVER_ERROR", { request, response, error }); } }); } @@ -385,19 +385,19 @@ function injectCommonNetworks(): void { registerEth("classic", 61, { }); registerEth("classicKotti", 6, { }); - registerEth("xdai", 100, { ensNetwork: 1 }); - registerEth("optimism", 10, { - ensNetwork: 1, - }); - registerEth("optimism-goerli", 420, { }); registerEth("arbitrum", 42161, { ensNetwork: 1, }); registerEth("arbitrum-goerli", 421613, { }); - // Polygon has a 35 gwei maxPriorityFee requirement + registerEth("bnb", 56, { ensNetwork: 1 }); + registerEth("bnbt", 97, { }); + + registerEth("linea", 59144, { ensNetwork: 1 }); + registerEth("linea-goerli", 59140, { }); + registerEth("matic", 137, { ensNetwork: 1, plugins: [ @@ -411,6 +411,10 @@ function injectCommonNetworks(): void { ] }); - registerEth("bnb", 56, { ensNetwork: 1 }); - registerEth("bnbt", 97, { }); + registerEth("optimism", 10, { + ensNetwork: 1, + }); + registerEth("optimism-goerli", 420, { }); + + registerEth("xdai", 100, { ensNetwork: 1 }); } diff --git a/src.ts/providers/provider-infura.ts b/src.ts/providers/provider-infura.ts index 7465c69651..f26ea3fb89 100644 --- a/src.ts/providers/provider-infura.ts +++ b/src.ts/providers/provider-infura.ts @@ -45,6 +45,10 @@ function getHost(name: string): string { return "arbitrum-mainnet.infura.io"; case "arbitrum-goerli": return "arbitrum-goerli.infura.io"; + case "linea": + return "linea-mainnet.infura.io"; + case "linea-goerli": + return "linea-goerli.infura.io"; case "matic": return "polygon-mainnet.infura.io"; case "matic-mumbai":