add gsn for polygon network
This commit is contained in:
parent
06db040822
commit
41548556d3
@ -221,7 +221,7 @@ export class Network {
|
|||||||
* Returns a new Network for the %%network%% name or chainId.
|
* Returns a new Network for the %%network%% name or chainId.
|
||||||
*/
|
*/
|
||||||
static from(network?: Networkish): Network {
|
static from(network?: Networkish): Network {
|
||||||
injectCommonNetworks();
|
injectCommonNetworks(false);
|
||||||
|
|
||||||
// Default network
|
// Default network
|
||||||
if (network == null) { return Network.from("mainnet"); }
|
if (network == null) { return Network.from("mainnet"); }
|
||||||
@ -368,7 +368,7 @@ function getPriorityFeePlugin(maxPriorityFeePerGas: bigint) {
|
|||||||
|
|
||||||
// See: https://chainlist.org
|
// See: https://chainlist.org
|
||||||
let injected = false;
|
let injected = false;
|
||||||
function injectCommonNetworks(): void {
|
function injectCommonNetworks(gsn: boolean): void {
|
||||||
if (injected) { return; }
|
if (injected) { return; }
|
||||||
injected = true;
|
injected = true;
|
||||||
|
|
||||||
@ -427,14 +427,14 @@ function injectCommonNetworks(): void {
|
|||||||
|
|
||||||
registerEth("matic", 137, {
|
registerEth("matic", 137, {
|
||||||
ensNetwork: 1,
|
ensNetwork: 1,
|
||||||
plugins: [
|
plugins: gsn? [
|
||||||
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")] : [
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
registerEth("matic-mumbai", 80001, {
|
registerEth("matic-mumbai", 80001, {
|
||||||
altNames: [ "maticMumbai", "maticmum" ], // @TODO: Future remove these alts
|
altNames: [ "maticMumbai", "maticmum" ], // @TODO: Future remove these alts
|
||||||
plugins: [
|
plugins: gsn? [
|
||||||
getGasStationPlugin("https:/\/gasstation-testnet.polygon.technology/v2")
|
getGasStationPlugin("https:/\/gasstation-testnet.polygon.technology/v2")] : [
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user