Skip to content

Commit

Permalink
Add second solution
Browse files Browse the repository at this point in the history
  • Loading branch information
karim-en committed Apr 9, 2024
1 parent a404a79 commit 882c7ab
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion eth-custodian/contracts/EthCustodianProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,22 @@ contract EthCustodianProxy is
ethCustodianImpl.withdraw(proofData, proofBlockHeight);
}

function withdraw_pre_migration(
function withdraw_pre_migration_s1(
bytes calldata proofData,
uint64 proofBlockHeight
) external whenNotPaused(PAUSED_WITHDRAW_PRE_MIGRATION) {
require(
proofBlockHeight < maxBlockAcceptanceHeight,
'Proof is from a post merge block'
);

bytes memory postMergeProducer = ethCustodianImpl.nearProofProducerAccount();
ethCustodianImpl.adminSstore(1, uint(bytes32(preMigrationProducerAccount)));
ethCustodianImpl.withdraw(proofData, proofBlockHeight);
ethCustodianImpl.adminSstore(1, uint(bytes32(postMergeProducer)));
}

function withdraw_pre_migration_s2(
bytes calldata proofData,
uint64 proofBlockHeight
) external whenNotPaused(PAUSED_WITHDRAW_PRE_MIGRATION) {
Expand Down

0 comments on commit 882c7ab

Please sign in to comment.