Skip to content

Commit

Permalink
Add deployment config for Polygon (balancer#581)
Browse files Browse the repository at this point in the history
* feat: add deployment config for polygon

* feat: add deployment config for polygon mumbai testnet
  • Loading branch information
TomAFrench authored and rabmarut committed Jun 16, 2021
1 parent c5b42e8 commit 1593076
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deployments/migrations/002_vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default async function (hre: HardhatRuntimeEnvironment): Promise<void> {

if (chainId == '1') {
WETH = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2';
} else if (chainId == '137') {
WETH = '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270';
} else {
WETH = await (await deployments.get('WETH')).address;
}
Expand Down
18 changes: 18 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const CHAIN_IDS = {
kovan: 42,
goerli: 5,
mainnet: 1,
polygon: 137,
polygonMumbai: 80001,
rinkeby: 4,
ropsten: 3,
dockerParity: 17,
Expand Down Expand Up @@ -81,6 +83,18 @@ export default {
accounts: [`0x${DEPLOYER_PRIVATE_KEY}`, `0x${CONTROLLER_PRIVATE_KEY}`], // Using private key instead of mnemonic for vanity deploy
saveDeployments: true,
},
polygon: {
chainId: CHAIN_IDS.polygon,
url: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
accounts: [`0x${DEPLOYER_PRIVATE_KEY}`, `0x${CONTROLLER_PRIVATE_KEY}`], // Using private key instead of mnemonic for vanity deploy
saveDeployments: true,
},
polygonMumbai: {
chainId: CHAIN_IDS.polygonMumbai,
url: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`,
accounts: [`0x${DEPLOYER_PRIVATE_KEY}`, `0x${CONTROLLER_PRIVATE_KEY}`], // Using private key instead of mnemonic for vanity deploy
saveDeployments: true,
},
},
namedAccounts: {
deployer: {
Expand All @@ -90,6 +104,8 @@ export default {
[CHAIN_IDS.ropsten]: 0,
[CHAIN_IDS.goerli]: 0,
[CHAIN_IDS.rinkeby]: 0,
[CHAIN_IDS.polygon]: 0,
[CHAIN_IDS.polygonMumbai]: 0,
[CHAIN_IDS.dockerParity]: 0,
},
admin: {
Expand All @@ -100,6 +116,8 @@ export default {
[CHAIN_IDS.ropsten]: 1,
[CHAIN_IDS.goerli]: 1,
[CHAIN_IDS.rinkeby]: '0x44DDF1D6292F36B25230a72aBdc7159D37d317Cf',
[CHAIN_IDS.polygon]: 1,
[CHAIN_IDS.polygonMumbai]: 1,
[CHAIN_IDS.dockerParity]: 1,
},
},
Expand Down

0 comments on commit 1593076

Please sign in to comment.