Commit db8bf1e6 authored by Mark Tyneway's avatar Mark Tyneway

all: cleanup deployment process

The `LegacyERC20ETH` needed some cleanup because
it extended the `OptimismMintableERC20` which had
its interface changed such that the remote token
and bridge are immutables instead of being held in
storage. Changing these values to immutables will
make interactions for mint/burn much cheaper.
parent 04c70178
......@@ -12,7 +12,7 @@ bindings: l1block-bindings \
optimism-portal-bindings \
l2-output-oracle-bindings \
gas-price-oracle-bindings \
legacy-message-passer-bindings \
legacy-message-passer-bindings \
address-manager-bindings \
l2-cross-domain-messenger-bindings \
l2-standard-bridge-bindings \
......@@ -28,7 +28,8 @@ bindings: l1block-bindings \
l1-erc721-bridge-bindings \
optimism-mintable-erc721-factory-bindings \
l1-fee-vault-bindings \
basefee-vault-bindings
basefee-vault-bindings \
legacy-erc20-eth-bindings
version:
forge --version
......@@ -95,6 +96,9 @@ optimism-mintable-erc20-factory-bindings: compile
optimism-mintable-erc20-bindings: compile
./gen_bindings.sh contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 $(pkg)
legacy-erc20-eth-bindings: compile
./gen_bindings.sh contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH $(pkg)
proxy-bindings: compile
./gen_bindings.sh contracts/universal/Proxy.sol:Proxy $(pkg)
......
This diff is collapsed.
......@@ -350,10 +350,8 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage
"l1FeeScalar": config.GasPriceOracleScalar,
}
storage["LegacyERC20ETH"] = state.StorageValues{
"bridge": predeploys.L2StandardBridge,
"remoteToken": common.Address{},
"_name": "Ether",
"_symbol": "ETH",
"_name": "Ether",
"_symbol": "ETH",
}
storage["WETH9"] = state.StorageValues{
"name": "Wrapped Ether",
......
......@@ -97,6 +97,9 @@ func BuildOptimism(immutable ImmutableConfig) (DeploymentResults, error) {
immutable["OptimismMintableERC721Factory"]["remoteChainId"],
},
},
{
Name: "LegacyERC20ETH",
},
}
return BuildL2(deployments)
}
......@@ -187,6 +190,8 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep
return nil, fmt.Errorf("invalid type for remoteChainId")
}
_, tx, _, err = bindings.DeployOptimismMintableERC721Factory(opts, backend, bridge, remoteChainId)
case "LegacyERC20ETH":
_, tx, _, err = bindings.DeployLegacyERC20ETH(opts, backend)
default:
return tx, fmt.Errorf("unknown contract: %s", deployment.Name)
}
......
......@@ -51,6 +51,7 @@ func TestBuildOptimism(t *testing.T) {
"L1BlockNumber": true,
"L2ERC721Bridge": true,
"OptimismMintableERC721Factory": true,
"LegacyERC20ETH": true,
}
// Only the exact contracts that we care about are being
......
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