mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
added optimism
This commit is contained in:
parent
7abd22bb79
commit
d6aaa161fd
|
@ -23,6 +23,7 @@ const chainIds = {
|
||||||
avalanche: 43114,
|
avalanche: 43114,
|
||||||
polygon: 137,
|
polygon: 137,
|
||||||
arbitrum: 42161,
|
arbitrum: 42161,
|
||||||
|
optimism: 10
|
||||||
};
|
};
|
||||||
|
|
||||||
const alchemyApiKey = process.env.ALCHEMY_API_KEY;
|
const alchemyApiKey = process.env.ALCHEMY_API_KEY;
|
||||||
|
@ -50,6 +51,7 @@ function createConfig(network: string) {
|
||||||
return {
|
return {
|
||||||
url: getNetworkUrl(network),
|
url: getNetworkUrl(network),
|
||||||
accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic },
|
accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic },
|
||||||
|
// gasPrice: 1000000, // 0.0001 GWEI
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +62,8 @@ function getNetworkUrl(networkType: string) {
|
||||||
return `https://polygon-mainnet.g.alchemy.com/v2/${alchemyApiKey}`;
|
return `https://polygon-mainnet.g.alchemy.com/v2/${alchemyApiKey}`;
|
||||||
else if (networkType === "arbitrum")
|
else if (networkType === "arbitrum")
|
||||||
return `https://arb-mainnet.g.alchemy.com/v2/${alchemyApiKey}`;
|
return `https://arb-mainnet.g.alchemy.com/v2/${alchemyApiKey}`;
|
||||||
|
else if (networkType === "optimism")
|
||||||
|
return `https://opt-mainnet.g.alchemy.com/v2/${alchemyApiKey}`;
|
||||||
else return `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`;
|
else return `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +115,7 @@ const config: HardhatUserConfig = {
|
||||||
polygon: createConfig("polygon"),
|
polygon: createConfig("polygon"),
|
||||||
avalanche: createConfig("avalanche"),
|
avalanche: createConfig("avalanche"),
|
||||||
arbitrum: createConfig("arbitrum"),
|
arbitrum: createConfig("arbitrum"),
|
||||||
|
optimism: createConfig("optimism"),
|
||||||
},
|
},
|
||||||
paths: {
|
paths: {
|
||||||
artifacts: "./artifacts",
|
artifacts: "./artifacts",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user