-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* multi-chain deploy for pool, registry; ownership helper; add base * polygon deploy for registry * swap, swap-erc20, wrapper deploys * remaining rsk; wrapper on base * bump package versions for publishing * update pool, registry on goerli * bump constants and utils
- Loading branch information
Showing
38 changed files
with
512 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
1: 18262813, | ||
5: 9774330, | ||
5: 9838499, | ||
30: 5709706, | ||
31: 4368347, | ||
56: 32421270, | ||
97: 34021042, | ||
137: 48475105, | ||
8453: 4991925, | ||
42161: 138719068, | ||
43113: 26588390, | ||
43114: 36195383, | ||
59140: 1680152, | ||
59144: 588294, | ||
80001: 40970461, | ||
84531: 10788756, | ||
421613: 46251592, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
1: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
5: '0xa55CDCe4F6300D57831b2792c45E55a899D8e2a4', | ||
5: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
30: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
31: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
56: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
97: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
137: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
8453: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
42161: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
43113: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
43114: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
59140: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
59144: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
80001: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
84531: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
421613: '0xEEcD248D977Fd4D392915b4AdeF8154BA3aE9c02', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* eslint-disable no-console */ | ||
const Confirm = require('prompt-confirm') | ||
const { ethers } = require('hardhat') | ||
const { Pool__factory } = require('@airswap/pool/typechain/factories/contracts') | ||
const { chainNames, ChainIds, ownerAddresses } = require('@airswap/constants') | ||
const { getReceiptUrl } = require('@airswap/utils') | ||
const poolDeploys = require('../deploys.js') | ||
|
||
async function main() { | ||
const [deployer] = await ethers.getSigners() | ||
const gasPrice = await deployer.getGasPrice() | ||
const chainId = await deployer.getChainId() | ||
if (chainId === ChainIds.HARDHAT) { | ||
console.log('Value for --network flag is required') | ||
return | ||
} | ||
console.log(`Deployer: ${deployer.address}`) | ||
console.log(`Network: ${chainNames[chainId].toUpperCase()}\n`) | ||
|
||
if (!poolDeploys[chainId]) { | ||
console.log(`✘ No deploy found for selected network.\n`) | ||
process.exit(0) | ||
} | ||
|
||
const contract = Pool__factory.connect(poolDeploys[chainId], deployer) | ||
const currentOwner = await contract.owner() | ||
|
||
console.log(`Current owner: ${currentOwner}`) | ||
console.log(`Intended owner: ${ownerAddresses[chainId] || 'Not set'}`) | ||
|
||
if (currentOwner === ownerAddresses[chainId]) { | ||
console.log(`\n✔ Owner matches intended owner.\n`) | ||
} else if (!ownerAddresses[chainId]) { | ||
console.log(`\n✘ Intended owner must be set.\n`) | ||
} else if (deployer.address !== currentOwner) { | ||
console.log(`\n✘ Deployer does not match current owner.\n`) | ||
} else { | ||
console.log(`\n✘ Current owner does not match intended owner.\n`) | ||
console.log(`Gas price: ${gasPrice / 10 ** 9} gwei\n`) | ||
const prompt = new Confirm(`Update owner to intended?`) | ||
if (await prompt.run()) { | ||
const tx = contract.transferOwnership(ownerAddresses[chainId]) | ||
console.log('Updating...', getReceiptUrl(chainId, tx.hash)) | ||
} | ||
} | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error) | ||
process.exit(1) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
1: 18262901, | ||
5: 9774339, | ||
5: 9838505, | ||
30: 5709710, | ||
31: 4368351, | ||
56: 32426789, | ||
97: 34026519, | ||
137: 48480674, | ||
8453: 4993843, | ||
42161: 138763545, | ||
43113: 26588430, | ||
43114: 36195417, | ||
59140: 1681257, | ||
59144: 589314, | ||
80001: 40977305, | ||
84531: 10791692, | ||
421613: 46289808, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
1: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
5: '0x33Cded9D1C082AA57439FB7a6784913321e17316', | ||
5: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
30: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
31: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
56: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
97: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
137: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
8453: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
42161: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
43113: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
43114: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
59140: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
59144: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
80001: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
84531: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
421613: '0x339Eb75235CBf823C6352D529A258226ecF59cfF', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
1: 18262981, | ||
5: 9775062, | ||
1: 18313788, | ||
5: 9836907, | ||
30: 5709868, | ||
31: 4368360, | ||
56: 32456402, | ||
97: 34057585, | ||
137: 48518111, | ||
8453: 5043516, | ||
42161: 139083040, | ||
43113: 26625815, | ||
43114: 36240432, | ||
59140: 1688890, | ||
59144: 596970, | ||
80001: 41015710, | ||
84531: 10838615, | ||
421613: 46573263, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
1: '0x0A655E762238Fee539338F433087A3B9dAdD798b', | ||
5: '0x1E6EBD18B5Ee1C31DcB3fc6AD23f32a35a8FF8e4', | ||
1: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
5: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
30: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
31: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
56: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
97: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
137: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
8453: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
42161: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
43113: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
43114: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
59140: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
59144: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
80001: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
84531: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
421613: '0xE2d2e134d61Cd1e7338ea184FB5c1224a23F5A56', | ||
} |
Oops, something went wrong.