Skip to content

Commit

Permalink
Added linea network to InfuraProvider and Network (#4184, #4190).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 28, 2023
1 parent 82bb936 commit d3e5e2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src.ts/providers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
});
}
Expand Down Expand Up @@ -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: [
Expand All @@ -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 });
}
4 changes: 4 additions & 0 deletions src.ts/providers/provider-infura.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit d3e5e2c

Please sign in to comment.