-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,339 additions
and
26 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,13 +1,30 @@ | ||
{ | ||
"METISToken": { | ||
"address": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", | ||
"artifact": "@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20" | ||
} | ||
"METISToken": { | ||
"address": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", | ||
"artifact": "@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20" | ||
}, | ||
"METIS_StakingPool": { | ||
"address": "0x19282e0365a5b90c9864446448E29465A9d226Eb", | ||
"artifact": "StakingPool" | ||
}, | ||
"METIS_L2Strategy": { | ||
"address": "0xfb8256CFCeeAcfb4835a3EbF47EBEa2902e30567", | ||
"artifact": "L2Strategy" | ||
}, | ||
"METIS_L2Transmitter": { | ||
"address": "0xc4bAf9Df7Da0dB146D8AeDEe447246ed47b4c2E4", | ||
"artifact": "L2Transmitter" | ||
}, | ||
"METIS_PriorityPool": { | ||
"address": "0xbEF37783DC468050722db5053F19E1cC91C80E3b", | ||
"artifact": "PriorityPool" | ||
}, | ||
"METIS_WithdrawalPool": { | ||
"address": "0xa68285a07F683a447775E19D50a06Cd6748a4fAe", | ||
"artifact": "WithdrawalPool" | ||
}, | ||
"METIS_WrappedSDToken": { | ||
"address": "0x7F89e4A071136f8E3Ec12D8F87793Dc84038C054", | ||
"artifact": "WrappedSDToken" | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
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
24 changes: 24 additions & 0 deletions
24
scripts/prod/1.0.0-metis-staking/99-transfer-ownership-l2.ts
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,24 @@ | ||
import { getContract } from '../../utils/deployment' | ||
|
||
const owner = '0x43975fe745cB4171E15ceEd5d8D05A3502e0e87B' | ||
|
||
async function main() { | ||
const stakingPool = await getContract('METIS_StakingPool') | ||
const l2Strategy = await getContract('METIS_L2Strategy') | ||
const l2Transmitter = await getContract('METIS_L2Transmitter') | ||
const pp = await getContract('METIS_PriorityPool') | ||
const wp = await getContract('METIS_WithdrawalPool') | ||
|
||
await (await stakingPool.transferOwnership(owner)).wait() | ||
await (await l2Strategy.transferOwnership(owner)).wait() | ||
await (await l2Transmitter.transferOwnership(owner)).wait() | ||
await (await pp.transferOwnership(owner)).wait() | ||
await (await wp.transferOwnership(owner)).wait() | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error) | ||
process.exit(1) | ||
}) |
18 changes: 18 additions & 0 deletions
18
scripts/prod/1.0.0-metis-staking/999-transfer-ownership-l1.ts
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,18 @@ | ||
import { getContract } from '../../utils/deployment' | ||
|
||
const owner = '0x43975fe745cB4171E15ceEd5d8D05A3502e0e87B' | ||
|
||
async function main() { | ||
const l1Strategy = await getContract('METIS_L1Strategy') | ||
const l1Transmitter = await getContract('METIS_L1Transmitter') | ||
|
||
await (await l1Strategy.transferOwnership(owner)).wait() | ||
await (await l1Transmitter.transferOwnership(owner)).wait() | ||
} | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { ethers } from 'hardhat' | ||
import { deployUpgradeable } from '../../utils/deployment' | ||
import { toEther } from '../../utils/helpers' | ||
|
||
const L2TransmitterArgs = { | ||
l2StandardBridge: '0x4200000000000000000000000000000000000010', // address of the L2 standard bridge | ||
l2StandardBridgeGasOracle: '0x420000000000000000000000000000000000000F', // address of OVM_GasPriceOracle | ||
minDepositThreshold: toEther(1000), // must exceed this amount of queued tokens to deposit to L1 | ||
minTimeBetweenUpdates: 86400 * 7, // min amount of time between calls to executeUpdate | ||
ccipRouter: '0x7b9FB8717D306e2e08ce2e1Efa81F026bf9AD13c', // address of CCIP router | ||
l1ChainSelector: '5009297550715157269', // CCIP selector for L1 | ||
extraArgs: | ||
'0x97a657c9' + ethers.AbiCoder.defaultAbiCoder().encode(['uint256'], [500000]).slice(2), // extra args for CCIP messaging | ||
} | ||
|
||
const metisToken = '0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000' | ||
const l2Strategy = '0xfb8256CFCeeAcfb4835a3EbF47EBEa2902e30567' | ||
const withdrawalPool = '0xa68285a07F683a447775E19D50a06Cd6748a4fAe' | ||
|
||
const l1Transmitter = '0x5e2A7B992769E43D4E76a4bB92de9c0532F25Cde' | ||
|
||
async function main() { | ||
const l2Transmitter = await deployUpgradeable( | ||
'L2Transmitter', | ||
[ | ||
metisToken, | ||
l2Strategy, | ||
L2TransmitterArgs.l2StandardBridge, | ||
L2TransmitterArgs.l2StandardBridgeGasOracle, | ||
l1Transmitter, | ||
withdrawalPool, | ||
L2TransmitterArgs.minDepositThreshold, | ||
L2TransmitterArgs.minTimeBetweenUpdates, | ||
L2TransmitterArgs.ccipRouter, | ||
L2TransmitterArgs.l1ChainSelector, | ||
L2TransmitterArgs.extraArgs, | ||
], | ||
true | ||
) | ||
console.log('METIS_L2Transmitter deployed: ', l2Transmitter.target) | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error) | ||
process.exit(1) | ||
}) |