Commit 4854ed90 authored by George C. Knee's avatar George C. Knee Committed by GitHub

custom-gas-token: add e2e test (#10440)

* add tests for activating custom gas token and bridging tokens to l2

* update test following concurrent change in SystemConfig ABI

* update systemconfig bindings

steps to reproduce:

git checkout  v1.7.3 -- op-bindings

remove WETH9 from artifacts.json

cd op-bindings

make bindgen-generate-local

select this one file discard the others

* use require.NoError instead of require.Nil

* build: fix

* refactor using setup + subtests

* add assertions for WETH name and symbol getters

* minor changes in response to review

* devnet-allocs: use sender with known private key

some e2e tests require the ability to transact as the system owner safe owner, so we can't use the foundry default sender (private key unknown)

This uses the same address as "Deployer"

* use deployer as Safe owner

* WIP refactor test

* add most of the remaining test assertions

* rename file

* flatten out subtests

we want to specify a strict ordering of operations

* complete checkWithdrawal step

* reorder test steps

* check both ETH and token balances on l1 during withdraw

* simplify callViaSafe helper

* factor out expectations

* add some extra boilerplate to track TransactionDeposited event

and GasPayingTokenSet event on L2

* remove comments

* remove wayward line

* flatten out sub test

* add comment to devnet forge script command

* remove version check on systemConfig

* update systemconfig bindings

steps to reproduce:

git checkout  v1.7.3 -- op-bindings

remove WETH9 from artifacts.json

cd op-bindings

make bindgen-generate-local

select this one file discard the others

* skip TestCustomGasToken when UseFPAC is true

* use differente helper to skip test

* harmonize use of context.Background{}

* tidy up and add comments

* remove cfg.DeployConfig.FinalizationPeriodSeconds = 2

* remove log lines

* use decimal instead of hex

---------
Co-authored-by: default avatarMark Tyneway <mark.tyneway@gmail.com>
parent 1dd35b7c
...@@ -143,7 +143,10 @@ def devnet_l1_allocs(paths): ...@@ -143,7 +143,10 @@ def devnet_l1_allocs(paths):
fqn = 'scripts/Deploy.s.sol:Deploy' fqn = 'scripts/Deploy.s.sol:Deploy'
run_command([ run_command([
'forge', 'script', fqn, "--sig", "runWithStateDump()" # We need to set the sender here to an account we know the private key of,
# because the sender ends up being the owner of the ProxyAdmin SAFE
# (which we need to enable the Custom Gas Token feature).
'forge', 'script', fqn, "--sig", "runWithStateDump()", "--sender", "0x90F79bf6EB2c4f870365E785982E1f101E93b906"
], env={ ], env={
'DEPLOYMENT_OUTFILE': paths.l1_deployments_path, 'DEPLOYMENT_OUTFILE': paths.l1_deployments_path,
'DEPLOY_CONFIG_PATH': paths.devnet_config_path, 'DEPLOY_CONFIG_PATH': paths.devnet_config_path,
......
This diff is collapsed.
...@@ -757,9 +757,9 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi ...@@ -757,9 +757,9 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
L1CrossDomainMessenger: common.Address(list.L1CrossDomainMessengerProxy), L1CrossDomainMessenger: common.Address(list.L1CrossDomainMessengerProxy),
L1ERC721Bridge: common.Address(list.L1ERC721BridgeProxy), L1ERC721Bridge: common.Address(list.L1ERC721BridgeProxy),
L1StandardBridge: common.Address(list.L1StandardBridgeProxy), L1StandardBridge: common.Address(list.L1StandardBridgeProxy),
L2OutputOracle: common.Address(list.L2OutputOracleProxy),
OptimismPortal: common.Address(list.OptimismPortalProxy), OptimismPortal: common.Address(list.OptimismPortalProxy),
OptimismMintableERC20Factory: common.Address(list.OptimismMintableERC20FactoryProxy), OptimismMintableERC20Factory: common.Address(list.OptimismMintableERC20FactoryProxy),
GasPayingToken: common.Address{},
}, },
) )
if err != nil { if err != nil {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment