Skip to content
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

OptimismPortal2 set initial _balance through StorageSetter pattern #254

Open
wants to merge 1 commit into
base: celo9
Choose a base branch
from

Conversation

ezdac
Copy link

@ezdac ezdac commented Oct 8, 2024

Fixes #239

The custom gas-token feature adaptation for the fault-proof system using the OptimismPortal2 contract has been merged recently upstream.

We are using the custom-gas-token feature and additionally require a modification of the OptimismPortal's _balance value to be set to the entire allocation of Celo on the L2 - meaning that all L1 token is initially locked in the bridge and only usable on the L2.

Those changes are now adapted also to the OptimismPortal2, which was a requirement to make our custom-gas-token pre-locked balance feature work in conjunction with fault-proofs.

Fixes #239

The custom gas-token feature adaptation for the fault-proof system using
the `OptimismPortal2` contract has been merged recently upstream.

We are using the custom-gas-token feature and additionally require a
modification of the OptimismPortal's `_balance` value to be set
to the entire allocation of Celo on the L2 - meaning that all L1 token is
initially locked in the bridge and only usable on the L2.

Those changes are now adapted also to the `OptimismPortal2`, which
was a requirement to make our custom-gas-token pre-locked balance
feature work in conjunction with fault-proofs.
@@ -412,7 +423,13 @@ library ChainAssertions {
}
// This slot is the custom gas token _balance and this check ensures
// that it stays unset for forwards compatibility with custom gas token.
require(vm.load(address(portal), bytes32(uint256(61))) == bytes32(0));
// if we use the pre-locked storage modification, the comprison

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// if we use the pre-locked storage modification, the comprison
// if we use the pre-locked storage modification, the comparison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port CustomGasToken changes to OptimismPortal2
2 participants