-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add BalanceClaimer and contracts update #3
Conversation
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments from trying to get up to speed on the project!
packages/contracts-bedrock/contracts/L1/winddown/BalanceClaimer.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/L1/winddown/BalanceClaimer.sol
Outdated
Show resolved
Hide resolved
|
||
contract WinddownUpgrade is Script { | ||
function run() public { | ||
uint256 _deployerPk = vm.envUint("PRIVATE_KEY_PROXY_ADMIN"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have we considered using keystores like we do in the boilerplate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you provide the reference?, I can check if we can use it
packages/contracts-bedrock/contracts/L1/winddown/BalanceClaimer.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/scripts/winddown-upgrade/WinddownConstants.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/scripts/winddown-upgrade/WinddownConstants.sol
Show resolved
Hide resolved
@@ -8,6 +8,10 @@ PRIVATE_KEY_DEPLOYER= | |||
TENDERLY_PROJECT= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we check
/packages/contracts-bedrock/README.md
?
Specifically that is mandatory to use foundry version:
foundryup -C da2392e58bb8a7fefeba46b40c4df1afad8ccd22
packages/contracts-bedrock/contracts/L1/interfaces/winddown/IBalanceClaimer.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/L1/interfaces/winddown/IErc20BalanceWithdrawer.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/L1/interfaces/winddown/IEthBalanceWithdrawer.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/L1/winddown/BalanceClaimer.sol
Outdated
Show resolved
Hide resolved
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
Signed-off-by: 0xRaccoon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The purpose is to allow users to claim their balances of
eth
andERC20
tokens with a prior snapshot of their balances.Currently, the assets to be claimed by the users are located in 2 contracts in
mainnet
:A snapshot of the users'
eth
balance ofOptimismPortal
and snapshot of the users'ERC20
balances ofL1StandardBridge
will be taken and the Merkle tree, root, and proofs for users will be generated off-chain.The approach consists of a contract
BalanceClaimer
that contains thebytes32
merkle root value, all the Merkle verification logic, and claims methods. To achieve this approach, it is be necessary to updateL1StandardBridge
and theOptimisimPotal
contracts and add the following methods:withdrawErc20Balance
only called byBalanceClaimer
contract after claim verification to send the user token balances.withdrawEthBalance
only called byBalanceClaimer
contract after claim verification to send the usereth
balance.The
claim
method is permissionless and can be called by any address.Wind Down Deploy and upgrade scripts:
Local test:
yarn upgrade-local:winddown
Prod:
yarn upgrade-prod:winddown