Commit 189ae1e1 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into aj/persist-synchronizer-state

parents 4163278e 4d7798f7
---
'@eth-optimism/fault-detector': minor
---
Remove pre-bedrock support from fault detector.
...@@ -130,8 +130,8 @@ jobs: ...@@ -130,8 +130,8 @@ jobs:
- persist_to_workspace: - persist_to_workspace:
root: "." root: "."
paths: paths:
- "packages/*/dist" - "packages/**/dist"
- "packages/*/artifacts" - "packages/contracts-bedrock/forge-artifacts"
docker-build: docker-build:
environment: environment:
...@@ -574,12 +574,12 @@ jobs: ...@@ -574,12 +574,12 @@ jobs:
steps: steps:
- checkout - checkout
- attach_workspace: { at: "." } - attach_workspace: { at: "." }
- check-changed:
patterns: sdk,contracts-bedrock,contracts
- restore_cache: - restore_cache:
name: Restore Yarn Package Cache name: Restore Yarn Package Cache
keys: keys:
- yarn-packages-v2-{{ checksum "yarn.lock" }} - yarn-packages-v2-{{ checksum "yarn.lock" }}
- check-changed:
patterns: sdk,contracts-bedrock,contracts
- run: - run:
name: anvil-l1 name: anvil-l1
background: true background: true
...@@ -861,8 +861,8 @@ jobs: ...@@ -861,8 +861,8 @@ jobs:
make devnet-up-deploy make devnet-up-deploy
- run: - run:
name: Check L2 config name: Check L2 config
command: npx hardhat check-l2 --network devnetL1 --l2-rpc-url http://localhost:9545 --l1-rpc-url http://localhost:8545 command: go run cmd/check-l2/main.go --l2-rpc-url http://localhost:9545 --l1-rpc-url http://localhost:8545
working_directory: packages/contracts-bedrock working_directory: op-chain-ops
- run: - run:
name: Deposit ERC20 through the bridge name: Deposit ERC20 through the bridge
command: timeout 8m npx hardhat deposit-erc20 --network devnetL1 --l1-contracts-json-path ../../.devnet/sdk-addresses.json command: timeout 8m npx hardhat deposit-erc20 --network devnetL1 --l1-contracts-json-path ../../.devnet/sdk-addresses.json
...@@ -871,10 +871,6 @@ jobs: ...@@ -871,10 +871,6 @@ jobs:
name: Deposit ETH through the bridge name: Deposit ETH through the bridge
command: timeout 8m npx hardhat deposit-eth --network devnetL1 --l1-contracts-json-path ../../.devnet/sdk-addresses.json command: timeout 8m npx hardhat deposit-eth --network devnetL1 --l1-contracts-json-path ../../.devnet/sdk-addresses.json
working_directory: packages/sdk working_directory: packages/sdk
- run:
name: Check the status
command: npx hardhat check-op-node
working_directory: packages/contracts-bedrock
- run: - run:
name: Dump op-node logs name: Dump op-node logs
command: | command: |
...@@ -911,13 +907,8 @@ jobs: ...@@ -911,13 +907,8 @@ jobs:
make devnet-up make devnet-up
- run: - run:
name: Check L2 config name: Check L2 config
command: | command: go run cmd/check-l2/main.go --l2-rpc-url http://localhost:9545 --l1-rpc-url http://localhost:8545
npx hardhat check-l2 \ working_directory: op-chain-ops
--network devnetL1 \
--l2-rpc-url http://localhost:9545 \
--l1-rpc-url http://localhost:8545 \
--l2-output-oracle-address 0x6900000000000000000000000000000000000000
working_directory: packages/contracts-bedrock
- run: - run:
name: Deposit ERC20 through the bridge name: Deposit ERC20 through the bridge
command: timeout 10m npx hardhat deposit-erc20 --network devnetL1 command: timeout 10m npx hardhat deposit-erc20 --network devnetL1
...@@ -926,10 +917,6 @@ jobs: ...@@ -926,10 +917,6 @@ jobs:
name: Deposit ETH through the bridge name: Deposit ETH through the bridge
command: timeout 10m npx hardhat deposit-eth --network devnetL1 command: timeout 10m npx hardhat deposit-eth --network devnetL1
working_directory: packages/sdk working_directory: packages/sdk
- run:
name: Check the status
command: npx hardhat check-op-node
working_directory: packages/contracts-bedrock
- run: - run:
name: Dump op-node logs name: Dump op-node logs
command: | command: |
......
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
yarn lerna run --concurrency 1 --stream pre-commit --since HEAD --exclude-dependents yarn nx affected --target=pre-commit
...@@ -18,5 +18,7 @@ tests/ ...@@ -18,5 +18,7 @@ tests/
# Semgrep-action log folder # Semgrep-action log folder
.semgrep_logs/ .semgrep_logs/
op-bindings/bindings
packages/*/node_modules packages/*/node_modules
packages/*/test packages/*/test
...@@ -8,6 +8,7 @@ import calendar ...@@ -8,6 +8,7 @@ import calendar
import datetime import datetime
import time import time
import shutil import shutil
import http.client
import devnet.log_setup import devnet.log_setup
from devnet.genesis import GENESIS_TMPL from devnet.genesis import GENESIS_TMPL
...@@ -51,6 +52,10 @@ def main(): ...@@ -51,6 +52,10 @@ def main():
os.makedirs(devnet_dir, exist_ok=True) os.makedirs(devnet_dir, exist_ok=True)
run_command(['docker-compose', 'build', '--progress', 'plain'], cwd=paths.ops_bedrock_dir, env={
'PWD': paths.ops_bedrock_dir
})
if args.deploy: if args.deploy:
log.info('Devnet with upcoming smart contract deployments') log.info('Devnet with upcoming smart contract deployments')
devnet_deploy(paths) devnet_deploy(paths)
...@@ -88,12 +93,14 @@ def devnet_prestate(paths): ...@@ -88,12 +93,14 @@ def devnet_prestate(paths):
'PWD': paths.ops_bedrock_dir 'PWD': paths.ops_bedrock_dir
}) })
wait_up(8545) wait_up(8545)
wait_for_rpc_server('127.0.0.1:8545')
log.info('Bringing up L2.') log.info('Bringing up L2.')
run_command(['docker-compose', 'up', '-d', 'l2'], cwd=paths.ops_bedrock_dir, env={ run_command(['docker-compose', 'up', '-d', 'l2'], cwd=paths.ops_bedrock_dir, env={
'PWD': paths.ops_bedrock_dir 'PWD': paths.ops_bedrock_dir
}) })
wait_up(9545) wait_up(9545)
wait_for_rpc_server('127.0.0.1:9545')
log.info('Bringing up the services.') log.info('Bringing up the services.')
run_command(['docker-compose', 'up', '-d', 'op-proposer', 'op-batcher'], cwd=paths.ops_bedrock_dir, env={ run_command(['docker-compose', 'up', '-d', 'op-proposer', 'op-batcher'], cwd=paths.ops_bedrock_dir, env={
...@@ -114,6 +121,7 @@ def devnet_deploy(paths): ...@@ -114,6 +121,7 @@ def devnet_deploy(paths):
'PWD': paths.ops_bedrock_dir 'PWD': paths.ops_bedrock_dir
}) })
wait_up(8545) wait_up(8545)
wait_for_rpc_server('127.0.0.1:8545')
log.info('Generating network config.') log.info('Generating network config.')
devnet_cfg_orig = pjoin(paths.contracts_bedrock_dir, 'deploy-config', 'devnetL1.json') devnet_cfg_orig = pjoin(paths.contracts_bedrock_dir, 'deploy-config', 'devnetL1.json')
...@@ -124,16 +132,24 @@ def devnet_deploy(paths): ...@@ -124,16 +132,24 @@ def devnet_deploy(paths):
deploy_config['l1StartingBlockTag'] = 'earliest' deploy_config['l1StartingBlockTag'] = 'earliest'
write_json(devnet_cfg_orig, deploy_config) write_json(devnet_cfg_orig, deploy_config)
fqn = 'scripts/Deploy.s.sol:Deploy'
private_key = '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
if os.path.exists(paths.addresses_json_path): if os.path.exists(paths.addresses_json_path):
log.info('Contracts already deployed.') log.info('Contracts already deployed.')
addresses = read_json(paths.addresses_json_path) addresses = read_json(paths.addresses_json_path)
else: else:
log.info('Deploying contracts.') log.info('Deploying contracts.')
run_command(['yarn', 'hardhat', '--network', 'devnetL1', 'deploy', '--tags', 'l1'], env={ run_command([
'CHAIN_ID': '900', 'forge', 'script', fqn, '--private-key', private_key,
'L1_RPC': 'http://localhost:8545', '--rpc-url', 'http://127.0.0.1:8545', '--broadcast'
'PRIVATE_KEY_DEPLOYER': 'ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' ], env={}, cwd=paths.contracts_bedrock_dir)
}, cwd=paths.contracts_bedrock_dir)
run_command([
'forge', 'script', fqn, '--private-key', private_key,
'--sig', 'sync()', '--rpc-url', 'http://127.0.0.1:8545', '--broadcast'
], env={}, cwd=paths.contracts_bedrock_dir)
contracts = os.listdir(paths.deployment_dir) contracts = os.listdir(paths.deployment_dir)
addresses = {} addresses = {}
for c in contracts: for c in contracts:
...@@ -148,12 +164,14 @@ def devnet_deploy(paths): ...@@ -148,12 +164,14 @@ def devnet_deploy(paths):
'CanonicalTransactionChain': '0x0000000000000000000000000000000000000000', 'CanonicalTransactionChain': '0x0000000000000000000000000000000000000000',
'BondManager': '0x0000000000000000000000000000000000000000', 'BondManager': '0x0000000000000000000000000000000000000000',
}) })
sdk_addresses['L1CrossDomainMessenger'] = addresses['Proxy__OVM_L1CrossDomainMessenger']
sdk_addresses['L1StandardBridge'] = addresses['Proxy__OVM_L1StandardBridge'] sdk_addresses['L1CrossDomainMessenger'] = addresses['L1CrossDomainMessengerProxy']
sdk_addresses['L1StandardBridge'] = addresses['L1StandardBridgeProxy']
sdk_addresses['OptimismPortal'] = addresses['OptimismPortalProxy'] sdk_addresses['OptimismPortal'] = addresses['OptimismPortalProxy']
sdk_addresses['L2OutputOracle'] = addresses['L2OutputOracleProxy'] sdk_addresses['L2OutputOracle'] = addresses['L2OutputOracleProxy']
write_json(paths.addresses_json_path, addresses) write_json(paths.addresses_json_path, addresses)
write_json(paths.sdk_addresses_json_path, sdk_addresses) write_json(paths.sdk_addresses_json_path, sdk_addresses)
log.info(f'Wrote sdk addresses to {paths.sdk_addresses_json_path}')
if os.path.exists(paths.genesis_l2_path): if os.path.exists(paths.genesis_l2_path):
log.info('L2 genesis and rollup configs already generated.') log.info('L2 genesis and rollup configs already generated.')
...@@ -178,6 +196,7 @@ def devnet_deploy(paths): ...@@ -178,6 +196,7 @@ def devnet_deploy(paths):
'PWD': paths.ops_bedrock_dir 'PWD': paths.ops_bedrock_dir
}) })
wait_up(9545) wait_up(9545)
wait_for_rpc_server('127.0.0.1:9545')
log.info('Bringing up everything else.') log.info('Bringing up everything else.')
run_command(['docker-compose', 'up', '-d', 'op-node', 'op-proposer', 'op-batcher'], cwd=paths.ops_bedrock_dir, env={ run_command(['docker-compose', 'up', '-d', 'op-node', 'op-proposer', 'op-batcher'], cwd=paths.ops_bedrock_dir, env={
...@@ -189,6 +208,26 @@ def devnet_deploy(paths): ...@@ -189,6 +208,26 @@ def devnet_deploy(paths):
log.info('Devnet ready.') log.info('Devnet ready.')
def wait_for_rpc_server(url):
log.info(f'Waiting for RPC server at {url}')
conn = http.client.HTTPConnection(url)
headers = {'Content-type': 'application/json'}
body = '{"id":1, "jsonrpc":"2.0", "method": "eth_chainId", "params":[]}'
while True:
try:
conn.request('POST', '/', body, headers)
response = conn.getresponse()
conn.close()
if response.status < 300:
log.info(f'RPC server at {url} ready')
return
except Exception as e:
log.info(f'Waiting for RPC server at {url}')
time.sleep(1)
def run_command(args, check=True, shell=False, cwd=None, env=None): def run_command(args, check=True, shell=False, cwd=None, env=None):
env = env if env else {} env = env if env else {}
return subprocess.run( return subprocess.run(
......
...@@ -32,9 +32,8 @@ And as it executes each step, it can optionally produce the witness data for the ...@@ -32,9 +32,8 @@ And as it executes each step, it can optionally produce the witness data for the
The Cannon CLI is used to load a program into an initial state, The Cannon CLI is used to load a program into an initial state,
transition it N steps quickly without witness generation, and 1 step while producing a witness. transition it N steps quickly without witness generation, and 1 step while producing a witness.
`mipsevm` is backed by the Unicorn emulator, but instrumented for proof generation, `mipsevm` is instrumented for proof generation and handles delay-slots by isolating each individual instruction
and handles delay-slots by isolating each individual instruction and tracking `nextPC` and tracking `nextPC` to emulate the delayed `PC` changes after delay-slot execution.
to emulate the delayed `PC` changes after delay-slot execution.
## Witness Data ## Witness Data
......
...@@ -108,7 +108,7 @@ func TestEVM(t *testing.T) { ...@@ -108,7 +108,7 @@ func TestEVM(t *testing.T) {
// TODO: maybe more readable to decode the evmPost state, and do attribute-wise comparison. // TODO: maybe more readable to decode the evmPost state, and do attribute-wise comparison.
uniPost := us.state.EncodeWitness() uniPost := us.state.EncodeWitness()
require.Equal(t, hexutil.Bytes(uniPost).String(), hexutil.Bytes(evmPost).String(), require.Equal(t, hexutil.Bytes(uniPost).String(), hexutil.Bytes(evmPost).String(),
"unicorn produced different state than EVM") "mipsevm produced different state than EVM")
} }
require.Equal(t, uint32(endAddr), state.PC, "must reach end") require.Equal(t, uint32(endAddr), state.PC, "must reach end")
// inspect test result // inspect test result
...@@ -175,7 +175,7 @@ func TestHelloEVM(t *testing.T) { ...@@ -175,7 +175,7 @@ func TestHelloEVM(t *testing.T) {
// TODO: maybe more readable to decode the evmPost state, and do attribute-wise comparison. // TODO: maybe more readable to decode the evmPost state, and do attribute-wise comparison.
uniPost := us.state.EncodeWitness() uniPost := us.state.EncodeWitness()
require.Equal(t, hexutil.Bytes(uniPost).String(), hexutil.Bytes(evmPost).String(), require.Equal(t, hexutil.Bytes(uniPost).String(), hexutil.Bytes(evmPost).String(),
"unicorn produced different state than EVM") "mipsevm produced different state than EVM")
} }
end := time.Now() end := time.Now()
delta := end.Sub(start) delta := end.Sub(start)
......
...@@ -11,8 +11,7 @@ import ( ...@@ -11,8 +11,7 @@ import (
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
) )
// Note: 2**12 = 4 KiB, the minimum page-size in Unicorn for mmap // Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
// as well as the Go runtime min phys page size.
const ( const (
PageAddrSize = 12 PageAddrSize = 12
PageKeySize = 32 - PageAddrSize PageKeySize = 32 - PageAddrSize
......
...@@ -56,15 +56,6 @@ func (m *InstrumentedState) handleSyscall() error { ...@@ -56,15 +56,6 @@ func (m *InstrumentedState) handleSyscall() error {
v0 = a0 v0 = a0
//fmt.Printf("mmap hint 0x%x size 0x%x\n", v0, sz) //fmt.Printf("mmap hint 0x%x size 0x%x\n", v0, sz)
} }
// Go does this thing where it first gets memory with PROT_NONE,
// and then mmaps with a hint with prot=3 (PROT_READ|WRITE).
// We can ignore the NONE case, to avoid duplicate/overlapping mmap calls to unicorn.
//prot := a2
//if prot != 0 {
// if err := mu.MemMap(uint64(v0), uint64(sz)); err != nil {
// log.Fatalf("mmap fail: %v", err)
// }
//}
case 4045: // brk case 4045: // brk
v0 = 0x40000000 v0 = 0x40000000
case 4120: // clone (not supported) case 4120: // clone (not supported)
......
...@@ -33,6 +33,8 @@ You’ll need the following software installed to follow this tutorial: ...@@ -33,6 +33,8 @@ You’ll need the following software installed to follow this tutorial:
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/) - [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/)
- [Foundry](https://github.com/foundry-rs/foundry#installation) - [Foundry](https://github.com/foundry-rs/foundry#installation)
- [Make](https://linux.die.net/man/1/make) - [Make](https://linux.die.net/man/1/make)
- [jq](https://github.com/jqlang/jq)
- [direnv](https://direnv.net)
This tutorial was checked on: This tutorial was checked on:
...@@ -126,28 +128,38 @@ You can generate all of these keys with the `rekey` tool in the `contracts-bedro ...@@ -126,28 +128,38 @@ You can generate all of these keys with the `rekey` tool in the `contracts-bedro
cd packages/contracts-bedrock cd packages/contracts-bedrock
``` ```
1. Run the `rekey` command: 1. Use `cast wallet` to generate new accounts
```bash ```bash
npx hardhat rekey echo "Admin:"
cast wallet new
echo "Proposer:"
cast wallet new
echo "Batcher:"
cast wallet new
echo "Sequencer:"
cast wallet new
``` ```
You should get an output like the following: You should get an output like the following:
``` ```
Mnemonic: barely tongue excite actor edge huge lion employ gauge despair this learn Admin:
Successfully created new keypair.
Admin: 0x301c314ca0eedf88a5f7a44680d9dccceb8fcbea Address: 0x9f92bdF0db69264462FC305913960Edfcc7a7c7F
Private Key: ef06ba0291b6e2fa336fd9c06de9c2f18f72ed17cd4fcbda7b376f10592b43d8 Private key: 0x30e66956e1a12b81f0f2cfb982286b2f566eb73649833831d9f80b12f8fa183c
Proposer:
Proposer: 0x54355b7d195fcdea96696a522c444c185afaf1a8 Successfully created new keypair.
Private Key: 8bf67a8cd20087472db00fd869a0ffd7574a4481fb2a07a5f5c6bfb46dcb09ca Address: 0x31dE9B6473fc47af36ec23878bA34824B9F4AB30
Private key: 0x8bd1c8dfffef880f8f9ab8162f97ccd119c1aac28fe00dacf919459f88e0f37d
Batcher: 0x9a686086e3c74ddd5b59b710b26a73407d9c7e97 Batcher:
Private Key: 1533b607f668cce9553cafbfdfe9529eb31d67f1958d4b16fbdf857a8c50dd56 Successfully created new keypair.
Address: 0x6A3DC843843139f17Fcf04C057bb536A421DC9c6
Sequencer: 0x0324a4c8c1955cb8364e8f07558238b3d2aa5f55 Private key: 0x3ce44144b7fde797a28f4e47b210a4d42c3a3b642e538b54458cba2740db5ac2
Private Key: fba31658f320bb8ce1ce39fab3c7c2acea6b4dd69cc8483fd85388a461d8426b Sequencer:
Successfully created new keypair.
Address: 0x98C6cadB1fe77aBB7bD968fC3E9b206111e72848
Private key: 0x3f4241229bb6f155140d98e0f5dd2aad7ae983f5af5d61555d05eb8e5d9514db
``` ```
Save these accounts and their respective private keys somewhere, you’ll need them later. Fund the `Admin` address with a small amount of Goerli ETH as we’ll use that account to deploy our smart contracts. You’ll also need to fund the `Proposer` and `Batcher` address — note that the `Batcher` burns through the most ETH because it publishes transaction data to L1. Save these accounts and their respective private keys somewhere, you’ll need them later. Fund the `Admin` address with a small amount of Goerli ETH as we’ll use that account to deploy our smart contracts. You’ll also need to fund the `Proposer` and `Batcher` address — note that the `Batcher` burns through the most ETH because it publishes transaction data to L1.
...@@ -160,7 +172,7 @@ Recommended funding amounts are as follows: ...@@ -160,7 +172,7 @@ Recommended funding amounts are as follows:
::: danger Not for production deployments ::: danger Not for production deployments
The `rekey` tool is *not* designed for production deployments. If you are deploying an OP Stack based chain into production, you should likely be using a combination of hardware security modules and hardware wallets. The `cast wallet new` tool is *not* designed for production deployments. If you are deploying an OP Stack based chain into production, you should likely be using a combination of hardware security modules and hardware wallets.
::: :::
...@@ -180,10 +192,30 @@ Once you’ve built both repositories, you’ll need head back to the Optimism M ...@@ -180,10 +192,30 @@ Once you’ve built both repositories, you’ll need head back to the Optimism M
cd packages/contracts-bedrock cd packages/contracts-bedrock
``` ```
1. Before we can create our configuration file, we’ll need to pick an L1 block to serve as the starting point for our Rollup. It’s best to use a finalized L1 block as our starting block. You can use the `cast` command provided by Foundry to grab all of the necessary information (replace `<RPC>` with the URL for your L1 Goerli node): 1. Inside of `contracts-bedrock`, copy the environment file
```sh
cp .envrc.example .envrc
```
1. Fill out the environment variables inside of that file:
- `ETH_RPC_URL` — URL for your L1 node.
- `PRIVATE_KEY` — Private key of the `Admin` account.
- `DEPLOYMENT_CONTEXT` - Name of the network, should be "getting-started"
1. Pull the environment variables into context using `direnv`
```bash
direnv allow .
```
If you need to install `direnv`, [make sure you also modify the shell configuration](https://direnv.net/docs/hook.html).
1. Before we can create our configuration file, we’ll need to pick an L1 block to serve as the starting point for our Rollup. It’s best to use a finalized L1 block as our starting block. You can use the `cast` command provided by Foundry to grab all of the necessary information:
```bash ```bash
cast block finalized --rpc-url <RPC> | grep -E "(timestamp|hash|number)" cast block finalized --rpc-url $ETH_RPC_URL | grep -E "(timestamp|hash|number)"
``` ```
You’ll get back something that looks like the following: You’ll get back something that looks like the following:
...@@ -207,21 +239,18 @@ Once you’ve built both repositories, you’ll need head back to the Optimism M ...@@ -207,21 +239,18 @@ Once you’ve built both repositories, you’ll need head back to the Optimism M
Once you’ve configured your network, it’s time to deploy the L1 smart contracts necessary for the functionality of the chain. Once you’ve configured your network, it’s time to deploy the L1 smart contracts necessary for the functionality of the chain.
1. Inside of `contracts-bedrock`, copy `.env.example` to `.env`. 1. Create a `getting-started` deployment directory.
```sh ```bash
cp .env.example .env mkdir deployments/getting-started
``` ```
1. Fill out the two environment variables inside of that file:
- `L1_RPC` — URL for your L1 node.
- `PRIVATE_KEY_DEPLOYER` — Private key of the `Admin` account.
1. Once you’re ready, deploy the L1 smart contracts: 1. Once you’re ready, deploy the L1 smart contracts.
```bash ```bash
npx hardhat deploy --network getting-started --tags l1 forge script scripts/Deploy.s.sol:Deploy --private-key $PRIVATE_KEY --broadcast --rpc-url $ETH_RPC_URL
forge script scripts/Deploy.s.sol:Deploy --sig 'sync()' --private-key $PRIVATE_KEY --broadcast --rpc-url $ETH_RPC_URL
``` ```
Contract deployment can take up to 15 minutes. Please wait for all smart contracts to be fully deployed before continuing to the next step. Contract deployment can take up to 15 minutes. Please wait for all smart contracts to be fully deployed before continuing to the next step.
...@@ -230,7 +259,7 @@ Contract deployment can take up to 15 minutes. Please wait for all smart contrac ...@@ -230,7 +259,7 @@ Contract deployment can take up to 15 minutes. Please wait for all smart contrac
We’ve set up the L1 side of things, but now we need to set up the L2 side of things. We do this by generating three important files, a `genesis.json` file, a `rollup.json` configuration file, and a `jwt.txt` [JSON Web Token](https://jwt.io/introduction) that allows the `op-node` and `op-geth` to communicate securely. We’ve set up the L1 side of things, but now we need to set up the L2 side of things. We do this by generating three important files, a `genesis.json` file, a `rollup.json` configuration file, and a `jwt.txt` [JSON Web Token](https://jwt.io/introduction) that allows the `op-node` and `op-geth` to communicate securely.
1. Head over to the `op-node` package: 1. Head over to the `op-node` package.
```bash ```bash
cd ~/optimism/op-node cd ~/optimism/op-node
...@@ -321,7 +350,7 @@ Set these environment variables for the configuration ...@@ -321,7 +350,7 @@ Set these environment variables for the configuration
| `PROPOSER_KEY` | Private key of the `Proposer` account | `PROPOSER_KEY` | Private key of the `Proposer` account
| `L1_RPC` | URL for the L1 (such as Goerli) you're using | `L1_RPC` | URL for the L1 (such as Goerli) you're using
| `RPC_KIND` | The type of L1 server to which you connect, which can optimize requests. Available options are `alchemy`, `quicknode`, `parity`, `nethermind`, `debug_geth`, `erigon`, `basic`, and `any` | `RPC_KIND` | The type of L1 server to which you connect, which can optimize requests. Available options are `alchemy`, `quicknode`, `parity`, `nethermind`, `debug_geth`, `erigon`, `basic`, and `any`
| `L2OO_ADDR` | The address of the `L2OutputOracleProxy`, available at `~/optimism/packages/contracts-bedrock/deployments/getting-started/L2OutputOracleProxy.json | `L2OO_ADDR` | The address of the `L2OutputOracleProxy`, available at `~/optimism/packages/contracts-bedrock/deployments/getting-started/L2OutputOracleProxy.json`
### `op-geth` ### `op-geth`
...@@ -515,7 +544,7 @@ Once you’ve connected your wallet, you’ll probably notice that you don’t h ...@@ -515,7 +544,7 @@ Once you’ve connected your wallet, you’ll probably notice that you don’t h
1. Grab the address of the proxy to the L1 standard bridge contract: 1. Grab the address of the proxy to the L1 standard bridge contract:
```bash ```bash
cat deployments/getting-started/Proxy__OVM_L1StandardBridge.json | jq -r .address cat deployments/getting-started/L1StandardBridgeProxy.json | jq -r .address
``` ```
1. Grab the L1 bridge proxy contract address and, using the wallet that you want to have ETH on your Rollup, send that address a small amount of ETH on Goerli (0.1 or less is fine). It may take up to 5 minutes for that ETH to appear in your wallet on L2. 1. Grab the L1 bridge proxy contract address and, using the wallet that you want to have ETH on your Rollup, send that address a small amount of ETH on Goerli (0.1 or less is fine). It may take up to 5 minutes for that ETH to appear in your wallet on L2.
......
{
"defaultBase": "develop",
"affected": {
"defaultBase": "develop"
},
"implicitDependencies": {
"nx.json": "*"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": [
"lint",
"build",
"test",
"build:contracts",
"autogen:artifacts"
]
}
}
},
"namedInputs": {
"configsWorkspace": [
"{workspaceRoot}/package.json",
"{workspaceRoot}/tsconfig.json"
],
"configsProject": [
"{projectRoot}/foundry.toml",
"{projectRoot}/tsconfig.json",
"{projectRoot}/package.json"
],
"default": ["{projectRoot}/**/*", "configsWorkspace"],
"srcGenerated": [
"{projectRoot}/src/contract-artifacts.ts",
"{projectRoot}/src/contract-deployed-artifacts.ts"
],
"productionSrc": [
"{projectRoot}/src/**/*",
"!{projectRoot}/src/**/*.spec.ts"
],
"productionContracts": ["{projectRoot}/contracts/**/*"],
"production": ["productionSrc", "productionContracts"],
"testing": ["configsWorkspace", "default"]
},
"targetDefaults": {
"lint": {
"inputs": ["{workspaceRoot}/.markdownlint.json", "default"]
},
"test": {
"inputs": ["default", "testing", "^production"],
"dependsOn": ["^build"]
},
"build:contracts": {
"inputs": [
"configsProject",
"productionContracts",
"^productionContracts"
],
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/artifacts", "{projectRoot}/forge-artifacts"]
},
"build": {
"inputs": [
"configsWorkspace",
"configsProject",
"production",
"^production"
],
"dependsOn": ["^build", "build:contracts"],
"outputs": ["{projectRoot}/dist"]
}
}
}
SHELL := /bin/bash SHELL := /bin/bash
pkg := bindings pkg := bindings
contracts-dir := ../packages/contracts-bedrock
all: version mkdir bindings more all: version mkdir bindings
bindings: l1block-bindings \
l1-blocknumber-bindings \
system-config-bindings \
l1-cross-domain-messenger-bindings \
l1-standard-bridge-bindings \
l2-to-l1-message-passer-bindings \
optimism-portal-bindings \
l2-output-oracle-bindings \
gas-price-oracle-bindings \
legacy-message-passer-bindings \
address-manager-bindings \
l2-cross-domain-messenger-bindings \
l2-standard-bridge-bindings \
sequencer-fee-vault-bindings \
optimism-mintable-erc20-factory-bindings \
optimism-mintable-erc20-bindings \
proxy-bindings \
proxy-admin-bindings \
erc20-bindings \
weth9-bindings \
deployer-whitelist-bindings \
l2-erc721-bridge-bindings \
l1-erc721-bridge-bindings \
optimism-mintable-erc721-factory-bindings \
l1-fee-vault-bindings \
basefee-vault-bindings \
legacy-erc20-eth-bindings \
dispute-game-factory-bindings \
standard-bridge-bindings \
cross-domain-messenger-bindings \
cannon-mips \
cannon-preimage-oracle
version: version:
forge --version forge --version
abigen --version abigen --version
compile: compile:
cd ../packages/contracts-bedrock/ && \ cd $(contracts-dir) && \
yarn clean && \ yarn build
npx hardhat compile
system-config-bindings: compile
./gen_bindings.sh contracts/L1/SystemConfig.sol:SystemConfig $(pkg)
l1-cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger $(pkg)
l1-standard-bridge-bindings: compile
./gen_bindings.sh contracts/L1/L1StandardBridge.sol:L1StandardBridge $(pkg)
optimism-portal-bindings: compile
./gen_bindings.sh contracts/L1/OptimismPortal.sol:OptimismPortal $(pkg)
l2-output-oracle-bindings: compile
./gen_bindings.sh contracts/L1/L2OutputOracle.sol:L2OutputOracle $(pkg)
address-manager-bindings: compile
./gen_bindings.sh contracts/legacy/AddressManager.sol:AddressManager $(pkg)
l1block-bindings: compile
./gen_bindings.sh contracts/L2/L1Block.sol:L1Block $(pkg)
l2-to-l1-message-passer-bindings: compile
./gen_bindings.sh contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser $(pkg)
gas-price-oracle-bindings: compile
./gen_bindings.sh contracts/L2/GasPriceOracle.sol:GasPriceOracle $(pkg)
l2-cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger $(pkg)
l2-standard-bridge-bindings: compile
./gen_bindings.sh contracts/L2/L2StandardBridge.sol:L2StandardBridge $(pkg)
l2-erc721-bridge-bindings:
./gen_bindings.sh contracts/L2/L2ERC721Bridge.sol:L2ERC721Bridge $(pkg)
l1-erc721-bridge-bindings:
./gen_bindings.sh contracts/L1/L1ERC721Bridge.sol:L1ERC721Bridge $(pkg)
optimism-mintable-erc721-factory-bindings:
./gen_bindings.sh contracts/universal/OptimismMintableERC721Factory.sol:OptimismMintableERC721Factory $(pkg)
sequencer-fee-vault-bindings: compile
./gen_bindings.sh contracts/L2/SequencerFeeVault.sol:SequencerFeeVault $(pkg)
basefee-vault-bindings: compile
./gen_bindings.sh contracts/L2/BaseFeeVault.sol:BaseFeeVault $(pkg)
l1-fee-vault-bindings: compile
./gen_bindings.sh contracts/L2/L1FeeVault.sol:L1FeeVault $(pkg)
optimism-mintable-erc20-factory-bindings: compile bindings: compile
./gen_bindings.sh contracts/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory $(pkg)
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)
proxy-admin-bindings: compile
./gen_bindings.sh contracts/universal/ProxyAdmin.sol:ProxyAdmin $(pkg)
legacy-message-passer-bindings: compile
./gen_bindings.sh contracts/legacy/LegacyMessagePasser.sol:LegacyMessagePasser $(pkg)
erc20-bindings: compile
./gen_bindings.sh node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20 $(pkg)
weth9-bindings: compile
./gen_bindings.sh contracts/vendor/WETH9.sol:WETH9 $(pkg)
deployer-whitelist-bindings: compile
./gen_bindings.sh contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist $(pkg)
l1-blocknumber-bindings: compile
./gen_bindings.sh contracts/legacy/L1BlockNumber.sol:L1BlockNumber $(pkg)
dispute-game-factory-bindings: compile
./gen_bindings.sh contracts/dispute/DisputeGameFactory.sol:DisputeGameFactory $(pkg)
standard-bridge-bindings: compile
./gen_bindings.sh contracts/universal/StandardBridge.sol:StandardBridge $(pkg)
cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger $(pkg)
cannon-mips: compile
./gen_bindings.sh contracts/cannon/MIPS.sol:MIPS $(pkg)
cannon-preimage-oracle: compile
./gen_bindings.sh contracts/cannon/PreimageOracle.sol:PreimageOracle $(pkg)
more:
go run ./gen/main.go \ go run ./gen/main.go \
-artifacts ../packages/contracts-bedrock/artifacts \
-forge-artifacts ../packages/contracts-bedrock/forge-artifacts \ -forge-artifacts ../packages/contracts-bedrock/forge-artifacts \
-out ./bindings \ -out ./bindings \
-contracts SystemConfig,OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,LegacyMessagePasser,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,SequencerFeeVault,L1Block,LegacyERC20ETH,WETH9,GovernanceToken,L1CrossDomainMessenger,L2ERC721Bridge,OptimismMintableERC721Factory,ProxyAdmin,MIPS,PreimageOracle \ -contracts ./artifacts.json \
-source-maps MIPS,PreimageOracle \ -source-maps MIPS,PreimageOracle \
-package bindings -package $(pkg)
mkdir: mkdir:
mkdir -p bin $(pkg) mkdir -p $(pkg)
clean-contracts:
cd $(contracts-dir) && \
yarn clean
clean: clean:
rm -rf bin $(pkg) rm -rf $(pkg)
test: test:
go test ./... go test ./...
[
"SystemConfig",
"L1CrossDomainMessenger",
"L1StandardBridge",
"OptimismPortal",
"L2OutputOracle",
"AddressManager",
"L1Block",
"L2ToL1MessagePasser",
"GasPriceOracle",
"L2CrossDomainMessenger",
"L2StandardBridge",
"L2ERC721Bridge",
"L1ERC721Bridge",
"OptimismMintableERC721Factory",
"SequencerFeeVault",
"BaseFeeVault",
"L1FeeVault",
"OptimismMintableERC20Factory",
"OptimismMintableERC20",
"LegacyERC20ETH",
"Proxy",
"ProxyAdmin",
"LegacyMessagePasser",
"ERC20",
"WETH9",
"DeployerWhitelist",
"L1BlockNumber",
"DisputeGameFactory",
"FaultDisputeGame",
"StandardBridge",
"CrossDomainMessenger",
"MIPS",
"PreimageOracle"
]
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const AddressManagerStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/legacy/AddressManager.sol:AddressManager\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"contracts/legacy/AddressManager.sol:AddressManager\",\"label\":\"addresses\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_bytes32,t_address)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_address)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e address)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_address\"}}}"
var AddressManagerStorageLayout = new(solc.StorageLayout)
var AddressManagerDeployedBin = "0x608060405234801561001057600080fd5b50600436106100675760003560e01c80639b2ea4bd116100505780639b2ea4bd146100b9578063bf40fac1146100cc578063f2fde38b146100df57600080fd5b8063715018a61461006c5780638da5cb5b14610076575b600080fd5b6100746100f2565b005b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100746100c73660046104fa565b610106565b6100906100da366004610548565b6101d9565b6100746100ed366004610585565b610215565b6100fa6102d1565b6101046000610352565b565b61010e6102d1565b6000610119836103c7565b60008181526001602052604090819020805473ffffffffffffffffffffffffffffffffffffffff8681167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092559151929350169061017c9085906105a7565b6040805191829003822073ffffffffffffffffffffffffffffffffffffffff808716845284166020840152917f9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c910160405180910390a250505050565b6000600160006101e8846103c7565b815260208101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff1692915050565b61021d6102d1565b73ffffffffffffffffffffffffffffffffffffffff81166102c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102ce81610352565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610104576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102bc565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816040516020016103da91906105a7565b604051602081830303815290604052805190602001209050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261043757600080fd5b813567ffffffffffffffff80821115610452576104526103f7565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610498576104986103f7565b816040528381528660208588010111156104b157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146104f557600080fd5b919050565b6000806040838503121561050d57600080fd5b823567ffffffffffffffff81111561052457600080fd5b61053085828601610426565b92505061053f602084016104d1565b90509250929050565b60006020828403121561055a57600080fd5b813567ffffffffffffffff81111561057157600080fd5b61057d84828501610426565b949350505050565b60006020828403121561059757600080fd5b6105a0826104d1565b9392505050565b6000825160005b818110156105c857602081860181015185830152016105ae565b818111156105d7576000828501525b50919091019291505056fea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(AddressManagerStorageLayoutJSON), AddressManagerStorageLayout); err != nil {
panic(err)
}
layouts["AddressManager"] = AddressManagerStorageLayout
deployedBytecodes["AddressManager"] = AddressManagerDeployedBin
}
This diff is collapsed.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const BaseFeeVaultStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L2/BaseFeeVault.sol:BaseFeeVault\",\"label\":\"totalProcessed\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint256\"}],\"types\":{\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var BaseFeeVaultStorageLayout = new(solc.StorageLayout)
var BaseFeeVaultDeployedBin = "0x6080604052600436106100695760003560e01c806384411d651161004357806384411d651461010c578063d0e12f9014610130578063d3e5792b1461017157600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101a5565b005b3480156100f657600080fd5b506100ff6104ab565b6040516100ca919061071b565b34801561011857600080fd5b5061012260005481565b6040519081526020016100ca565b34801561013c57600080fd5b506101647f000000000000000000000000000000000000000000000000000000000000000081565b6040516100ca919061079f565b34801561017d57600080fd5b506101227f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000047101561027f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40160405180910390fd5b60004790508060008082825461029591906107e2565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a17f38e04cbeb8c10f8f568618aa75be0f10b6729b8b4237743b4de20cbcde2839ee817f0000000000000000000000000000000000000000000000000000000000000000337f000000000000000000000000000000000000000000000000000000000000000060405161038394939291906107fa565b60405180910390a160017f000000000000000000000000000000000000000000000000000000000000000060018111156103bf576103bf610735565b036103f3576103ef7f00000000000000000000000000000000000000000000000000000000000000005a8361054e565b5050565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000109163e11013dd918491610476917f0000000000000000000000000000000000000000000000000000000000000000916188b89160040161083b565b6000604051808303818588803b15801561048f57600080fd5b505af11580156104a3573d6000803e3d6000fd5b505050505050565b60606104d67f0000000000000000000000000000000000000000000000000000000000000000610564565b6104ff7f0000000000000000000000000000000000000000000000000000000000000000610564565b6105287f0000000000000000000000000000000000000000000000000000000000000000610564565b60405160200161053a93929190610876565b604051602081830303815290604052905090565b600080600080600080868989f195945050505050565b6060816000036105a757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156105d157806105bb816108ec565b91506105ca9050600a83610953565b91506105ab565b60008167ffffffffffffffff8111156105ec576105ec610967565b6040519080825280601f01601f191660200182016040528015610616576020820181803683370190505b5090505b84156106995761062b600183610996565b9150610638600a866109ad565b6106439060306107e2565b60f81b818381518110610658576106586109c1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610692600a86610953565b945061061a565b949350505050565b60005b838110156106bc5781810151838201526020016106a4565b838111156106cb576000848401525b50505050565b600081518084526106e98160208601602086016106a1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061072e60208301846106d1565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6002811061079b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b602081016107ad8284610764565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156107f5576107f56107b3565b500190565b84815273ffffffffffffffffffffffffffffffffffffffff848116602083015283166040820152608081016108326060830184610764565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061083260608301846106d1565b600084516108888184602089016106a1565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516108c4816001850160208a016106a1565b600192019182015283516108df8160028401602088016106a1565b0160020195945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361091d5761091d6107b3565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261096257610962610924565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000828210156109a8576109a86107b3565b500390565b6000826109bc576109bc610924565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(BaseFeeVaultStorageLayoutJSON), BaseFeeVaultStorageLayout); err != nil {
panic(err)
}
layouts["BaseFeeVault"] = BaseFeeVaultStorageLayout
deployedBytecodes["BaseFeeVault"] = BaseFeeVaultDeployedBin
}
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const CrossDomainMessengerStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"_initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1002,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"_initializing\",\"offset\":21,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1003,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_1_0_1600\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1019_storage\"},{\"astId\":1004,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_51_0_20\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1005,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_52_0_1568\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1018_storage\"},{\"astId\":1006,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_101_0_1\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":1007,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_102_0_1568\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)1018_storage\"},{\"astId\":1008,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_151_0_32\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_uint256\"},{\"astId\":1009,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_152_0_1568\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_array(t_uint256)1018_storage\"},{\"astId\":1010,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_201_0_32\",\"offset\":0,\"slot\":\"201\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1011,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"spacer_202_0_32\",\"offset\":0,\"slot\":\"202\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1012,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"successfulMessages\",\"offset\":0,\"slot\":\"203\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1013,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"xDomainMsgSender\",\"offset\":0,\"slot\":\"204\",\"type\":\"t_address\"},{\"astId\":1014,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"msgNonce\",\"offset\":0,\"slot\":\"205\",\"type\":\"t_uint240\"},{\"astId\":1015,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"failedMessages\",\"offset\":0,\"slot\":\"206\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1016,\"contract\":\"contracts/universal/CrossDomainMessenger.sol:CrossDomainMessenger\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"207\",\"type\":\"t_array(t_uint256)1017_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)1017_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[42]\",\"numberOfBytes\":\"1344\"},\"t_array(t_uint256)1018_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1019_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_uint240\":{\"encoding\":\"inplace\",\"label\":\"uint240\",\"numberOfBytes\":\"30\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var CrossDomainMessengerStorageLayout = new(solc.StorageLayout)
var CrossDomainMessengerDeployedBin = "0x"
func init() {
if err := json.Unmarshal([]byte(CrossDomainMessengerStorageLayoutJSON), CrossDomainMessengerStorageLayout); err != nil {
panic(err)
}
layouts["CrossDomainMessenger"] = CrossDomainMessengerStorageLayout
deployedBytecodes["CrossDomainMessenger"] = CrossDomainMessengerDeployedBin
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const ERC20StorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20\",\"label\":\"_balances\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1001,\"contract\":\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20\",\"label\":\"_allowances\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":1002,\"contract\":\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20\",\"label\":\"_totalSupply\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1003,\"contract\":\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20\",\"label\":\"_name\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_string_storage\"},{\"astId\":1004,\"contract\":\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20\",\"label\":\"_symbol\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_string_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_string_storage\":{\"encoding\":\"bytes\",\"label\":\"string\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var ERC20StorageLayout = new(solc.StorageLayout)
var ERC20DeployedBin = "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610194578063a9059cbb146101a7578063dd62ed3e146101ba57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461018c57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610200565b6040516100e3919061094a565b60405180910390f35b6100ff6100fa3660046109e6565b610292565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f366004610a10565b6102aa565b604051601281526020016100e3565b6100ff6101513660046109e6565b6102ce565b610113610164366004610a4c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100d661031a565b6100ff6101a23660046109e6565b610329565b6100ff6101b53660046109e6565b6103ff565b6101136101c8366004610a6e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020f90610aa1565b80601f016020809104026020016040519081016040528092919081815260200182805461023b90610aa1565b80156102885780601f1061025d57610100808354040283529160200191610288565b820191906000526020600020905b81548152906001019060200180831161026b57829003601f168201915b5050505050905090565b6000336102a081858561040d565b5060019392505050565b6000336102b88582856105c0565b6102c3858585610697565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906102a09082908690610315908790610af4565b61040d565b60606004805461020f90610aa1565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102c3828686840361040d565b6000336102a0818585610697565b73ffffffffffffffffffffffffffffffffffffffff83166104af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8216610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106915781811015610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103e9565b610691848484840361040d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661073a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff82166107dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103e9565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906108d7908490610af4565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161093d91815260200190565b60405180910390a3610691565b600060208083528351808285015260005b818110156109775785810183015185820160400152820161095b565b81811115610989576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e157600080fd5b919050565b600080604083850312156109f957600080fd5b610a02836109bd565b946020939093013593505050565b600080600060608486031215610a2557600080fd5b610a2e846109bd565b9250610a3c602085016109bd565b9150604084013590509250925092565b600060208284031215610a5e57600080fd5b610a67826109bd565b9392505050565b60008060408385031215610a8157600080fd5b610a8a836109bd565b9150610a98602084016109bd565b90509250929050565b600181811c90821680610ab557607f821691505b602082108103610aee577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008219821115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(ERC20StorageLayoutJSON), ERC20StorageLayout); err != nil {
panic(err)
}
layouts["ERC20"] = ERC20StorageLayout
deployedBytecodes["ERC20"] = ERC20DeployedBin
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const GasPriceOracleStorageLayoutJSON = "{\"storage\":null,\"types\":{}}"
var GasPriceOracleStorageLayout = new(solc.StorageLayout)
var GasPriceOracleDeployedBin = "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806354fd4d5011610076578063de26c4a11161005b578063de26c4a114610123578063f45e65d814610136578063fe173b971461011d57600080fd5b806354fd4d50146101085780636ef25c3a1461011d57600080fd5b8063313ce567116100a7578063313ce567146100e657806349948e0e146100ed578063519b4bd31461010057600080fd5b80630c18c162146100c35780632e0f2625146100de575b600080fd5b6100cb61013e565b6040519081526020015b60405180910390f35b6100cb600681565b60066100cb565b6100cb6100fb3660046105a9565b6101c8565b6100cb610229565b61011061028a565b6040516100d591906106a8565b486100cb565b6100cb6101313660046105a9565b61032d565b6100cb6103dc565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c391906106f9565b905090565b6000806101d48361032d565b905060006101e0610229565b6101ea9083610741565b905060006101fa6006600a6108a0565b905060006102066103dc565b6102109084610741565b9050600061021e83836108e2565b979650505050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019f573d6000803e3d6000fd5b60606102b57f000000000000000000000000000000000000000000000000000000000000000061043d565b6102de7f000000000000000000000000000000000000000000000000000000000000000061043d565b6103077f000000000000000000000000000000000000000000000000000000000000000061043d565b604051602001610319939291906108f6565b604051602081830303815290604052905090565b80516000908190815b818110156103b0578481815181106103505761035061096c565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036103905761038960048461099b565b925061039e565b61039b60108461099b565b92505b806103a8816109b3565b915050610336565b5060006103bb61013e565b6103c5908461099b565b90506103d38161044061099b565b95945050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019f573d6000803e3d6000fd5b60608160000361048057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156104aa5780610494816109b3565b91506104a39050600a836108e2565b9150610484565b60008167ffffffffffffffff8111156104c5576104c561057a565b6040519080825280601f01601f1916602001820160405280156104ef576020820181803683370190505b5090505b8415610572576105046001836109eb565b9150610511600a86610a02565b61051c90603061099b565b60f81b8183815181106105315761053161096c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061056b600a866108e2565b94506104f3565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156105bb57600080fd5b813567ffffffffffffffff808211156105d357600080fd5b818401915084601f8301126105e757600080fd5b8135818111156105f9576105f961057a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561063f5761063f61057a565b8160405282815287602084870101111561065857600080fd5b826020860160208301376000928101602001929092525095945050505050565b60005b8381101561069357818101518382015260200161067b565b838111156106a2576000848401525b50505050565b60208152600082518060208401526106c7816040850160208701610678565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561070b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561077957610779610712565b500290565b600181815b808511156107d757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156107bd576107bd610712565b808516156107ca57918102915b93841c9390800290610783565b509250929050565b6000826107ee5750600161089a565b816107fb5750600061089a565b8160018114610811576002811461081b57610837565b600191505061089a565b60ff84111561082c5761082c610712565b50506001821b61089a565b5060208310610133831016604e8410600b841016171561085a575081810a61089a565b610864838361077e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561089657610896610712565b0290505b92915050565b60006108ac83836107df565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826108f1576108f16108b3565b500490565b60008451610908818460208901610678565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610944816001850160208a01610678565b6001920191820152835161095f816002840160208801610678565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156109ae576109ae610712565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036109e4576109e4610712565b5060010190565b6000828210156109fd576109fd610712565b500390565b600082610a1157610a116108b3565b50069056fea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(GasPriceOracleStorageLayoutJSON), GasPriceOracleStorageLayout); err != nil {
panic(err)
}
layouts["GasPriceOracle"] = GasPriceOracleStorageLayout
deployedBytecodes["GasPriceOracle"] = GasPriceOracleDeployedBin
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -31,7 +31,7 @@ var ( ...@@ -31,7 +31,7 @@ var (
// L1BlockNumberMetaData contains all meta data concerning the L1BlockNumber contract. // L1BlockNumberMetaData contains all meta data concerning the L1BlockNumber contract.
var L1BlockNumberMetaData = &bind.MetaData{ var L1BlockNumberMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"getL1BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"getL1BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
Bin: "0x60e060405234801561001057600080fd5b5060016080819052600060a081905260c08190528061059461004a8239600061018d015260006101640152600061013b01526105946000f3fe60806040526004361061002d5760003560e01c806354fd4d5014610052578063b9b3efe91461007d57610048565b3661004857600061003c6100a0565b90508060005260206000f35b600061003c6100a0565b34801561005e57600080fd5b50610067610134565b6040516100749190610344565b60405180910390f35b34801561008957600080fd5b506100926100a0565b604051908152602001610074565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638381f58a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610101573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101259190610395565b67ffffffffffffffff16905090565b606061015f7f00000000000000000000000000000000000000000000000000000000000000006101d7565b6101887f00000000000000000000000000000000000000000000000000000000000000006101d7565b6101b17f00000000000000000000000000000000000000000000000000000000000000006101d7565b6040516020016101c3939291906103c6565b604051602081830303815290604052905090565b60608160000361021a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610244578061022e8161046b565b915061023d9050600a836104d2565b915061021e565b60008167ffffffffffffffff81111561025f5761025f6104e6565b6040519080825280601f01601f191660200182016040528015610289576020820181803683370190505b5090505b841561030c5761029e600183610515565b91506102ab600a8661052c565b6102b6906030610540565b60f81b8183815181106102cb576102cb610558565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610305600a866104d2565b945061028d565b949350505050565b60005b8381101561032f578181015183820152602001610317565b8381111561033e576000848401525b50505050565b6020815260008251806020840152610363816040850160208701610314565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156103a757600080fd5b815167ffffffffffffffff811681146103bf57600080fd5b9392505050565b600084516103d8818460208901610314565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610414816001850160208a01610314565b6001920191820152835161042f816002840160208801610314565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361049c5761049c61043c565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826104e1576104e16104a3565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000828210156105275761052761043c565b500390565b60008261053b5761053b6104a3565b500690565b600082198211156105535761055361043c565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a", Bin: "0x60e060405234801561001057600080fd5b5060016080819052600060a081905260c08290528161059461004a8339600061018d015260006101640152600061013b01526105946000f3fe60806040526004361061002d5760003560e01c806354fd4d5014610052578063b9b3efe91461007d57610048565b3661004857600061003c6100a0565b90508060005260206000f35b600061003c6100a0565b34801561005e57600080fd5b50610067610134565b6040516100749190610344565b60405180910390f35b34801561008957600080fd5b506100926100a0565b604051908152602001610074565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638381f58a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610101573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101259190610395565b67ffffffffffffffff16905090565b606061015f7f00000000000000000000000000000000000000000000000000000000000000006101d7565b6101887f00000000000000000000000000000000000000000000000000000000000000006101d7565b6101b17f00000000000000000000000000000000000000000000000000000000000000006101d7565b6040516020016101c3939291906103c6565b604051602081830303815290604052905090565b60608160000361021a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610244578061022e8161046b565b915061023d9050600a836104d2565b915061021e565b60008167ffffffffffffffff81111561025f5761025f6104e6565b6040519080825280601f01601f191660200182016040528015610289576020820181803683370190505b5090505b841561030c5761029e600183610515565b91506102ab600a8661052c565b6102b6906030610540565b60f81b8183815181106102cb576102cb610558565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610305600a866104d2565b945061028d565b949350505050565b60005b8381101561032f578181015183820152602001610317565b8381111561033e576000848401525b50505050565b6020815260008251806020840152610363816040850160208701610314565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156103a757600080fd5b815167ffffffffffffffff811681146103bf57600080fd5b9392505050565b600084516103d8818460208901610314565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610414816001850160208a01610314565b6001920191820152835161042f816002840160208801610314565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361049c5761049c61043c565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826104e1576104e16104a3565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000828210156105275761052761043c565b500390565b60008261053b5761053b6104a3565b500690565b600082198211156105535761055361043c565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a",
} }
// L1BlockNumberABI is the input ABI used to generate the binding from. // L1BlockNumberABI is the input ABI used to generate the binding from.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const L1FeeVaultStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L2/L1FeeVault.sol:L1FeeVault\",\"label\":\"totalProcessed\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint256\"}],\"types\":{\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var L1FeeVaultStorageLayout = new(solc.StorageLayout)
var L1FeeVaultDeployedBin = "0x6080604052600436106100695760003560e01c806384411d651161004357806384411d651461010c578063d0e12f9014610130578063d3e5792b1461017157600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101a5565b005b3480156100f657600080fd5b506100ff6104ab565b6040516100ca919061071b565b34801561011857600080fd5b5061012260005481565b6040519081526020016100ca565b34801561013c57600080fd5b506101647f000000000000000000000000000000000000000000000000000000000000000081565b6040516100ca919061079f565b34801561017d57600080fd5b506101227f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000047101561027f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40160405180910390fd5b60004790508060008082825461029591906107e2565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a17f38e04cbeb8c10f8f568618aa75be0f10b6729b8b4237743b4de20cbcde2839ee817f0000000000000000000000000000000000000000000000000000000000000000337f000000000000000000000000000000000000000000000000000000000000000060405161038394939291906107fa565b60405180910390a160017f000000000000000000000000000000000000000000000000000000000000000060018111156103bf576103bf610735565b036103f3576103ef7f00000000000000000000000000000000000000000000000000000000000000005a8361054e565b5050565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081527342000000000000000000000000000000000000109163e11013dd918491610476917f0000000000000000000000000000000000000000000000000000000000000000916188b89160040161083b565b6000604051808303818588803b15801561048f57600080fd5b505af11580156104a3573d6000803e3d6000fd5b505050505050565b60606104d67f0000000000000000000000000000000000000000000000000000000000000000610564565b6104ff7f0000000000000000000000000000000000000000000000000000000000000000610564565b6105287f0000000000000000000000000000000000000000000000000000000000000000610564565b60405160200161053a93929190610876565b604051602081830303815290604052905090565b600080600080600080868989f195945050505050565b6060816000036105a757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156105d157806105bb816108ec565b91506105ca9050600a83610953565b91506105ab565b60008167ffffffffffffffff8111156105ec576105ec610967565b6040519080825280601f01601f191660200182016040528015610616576020820181803683370190505b5090505b84156106995761062b600183610996565b9150610638600a866109ad565b6106439060306107e2565b60f81b818381518110610658576106586109c1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610692600a86610953565b945061061a565b949350505050565b60005b838110156106bc5781810151838201526020016106a4565b838111156106cb576000848401525b50505050565b600081518084526106e98160208601602086016106a1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061072e60208301846106d1565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6002811061079b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b602081016107ad8284610764565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156107f5576107f56107b3565b500190565b84815273ffffffffffffffffffffffffffffffffffffffff848116602083015283166040820152608081016108326060830184610764565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061083260608301846106d1565b600084516108888184602089016106a1565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516108c4816001850160208a016106a1565b600192019182015283516108df8160028401602088016106a1565b0160020195945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361091d5761091d6107b3565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261096257610962610924565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000828210156109a8576109a86107b3565b500390565b6000826109bc576109bc610924565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(L1FeeVaultStorageLayoutJSON), L1FeeVaultStorageLayout); err != nil {
panic(err)
}
layouts["L1FeeVault"] = L1FeeVaultStorageLayout
deployedBytecodes["L1FeeVault"] = L1FeeVaultDeployedBin
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -31,7 +31,7 @@ var ( ...@@ -31,7 +31,7 @@ var (
// LegacyMessagePasserMetaData contains all meta data concerning the LegacyMessagePasser contract. // LegacyMessagePasserMetaData contains all meta data concerning the LegacyMessagePasser contract.
var LegacyMessagePasserMetaData = &bind.MetaData{ var LegacyMessagePasserMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"passMessageToL1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"sentMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"passMessageToL1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"sentMessages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60e060405234801561001057600080fd5b5060016080819052600060a081905260c081905280610698610048823960006101050152600060dc0152600060b301526106986000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806354fd4d501461004657806382e3702d14610064578063cafa81dc14610097575b600080fd5b61004e6100ac565b60405161005b9190610347565b60405180910390f35b610087610072366004610398565b60006020819052908152604090205460ff1681565b604051901515815260200161005b565b6100aa6100a53660046103e0565b61014f565b005b60606100d77f00000000000000000000000000000000000000000000000000000000000000006101da565b6101007f00000000000000000000000000000000000000000000000000000000000000006101da565b6101297f00000000000000000000000000000000000000000000000000000000000000006101da565b60405160200161013b939291906104af565b604051602081830303815290604052905090565b60016000808333604051602001610167929190610525565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301208352908201929092520160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905550565b60608160000361021d57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561024757806102318161059e565b91506102409050600a83610605565b9150610221565b60008167ffffffffffffffff811115610262576102626103b1565b6040519080825280601f01601f19166020018201604052801561028c576020820181803683370190505b5090505b841561030f576102a1600183610619565b91506102ae600a86610630565b6102b9906030610644565b60f81b8183815181106102ce576102ce61065c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610308600a86610605565b9450610290565b949350505050565b60005b8381101561033257818101518382015260200161031a565b83811115610341576000848401525b50505050565b6020815260008251806020840152610366816040850160208701610317565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156103aa57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156103f257600080fd5b813567ffffffffffffffff8082111561040a57600080fd5b818401915084601f83011261041e57600080fd5b813581811115610430576104306103b1565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610476576104766103b1565b8160405282815287602084870101111561048f57600080fd5b826020860160208301376000928101602001929092525095945050505050565b600084516104c1818460208901610317565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516104fd816001850160208a01610317565b60019201918201528351610518816002840160208801610317565b0160020195945050505050565b60008351610537818460208801610317565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036105cf576105cf61056f565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610614576106146105d6565b500490565b60008282101561062b5761062b61056f565b500390565b60008261063f5761063f6105d6565b500690565b600082198211156106575761065761056f565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a", Bin: "0x60e060405234801561001057600080fd5b5060016080819052600060a081905260c082905281610698610048833960006101050152600060dc0152600060b301526106986000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806354fd4d501461004657806382e3702d14610064578063cafa81dc14610097575b600080fd5b61004e6100ac565b60405161005b9190610347565b60405180910390f35b610087610072366004610398565b60006020819052908152604090205460ff1681565b604051901515815260200161005b565b6100aa6100a53660046103e0565b61014f565b005b60606100d77f00000000000000000000000000000000000000000000000000000000000000006101da565b6101007f00000000000000000000000000000000000000000000000000000000000000006101da565b6101297f00000000000000000000000000000000000000000000000000000000000000006101da565b60405160200161013b939291906104af565b604051602081830303815290604052905090565b60016000808333604051602001610167929190610525565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301208352908201929092520160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905550565b60608160000361021d57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561024757806102318161059e565b91506102409050600a83610605565b9150610221565b60008167ffffffffffffffff811115610262576102626103b1565b6040519080825280601f01601f19166020018201604052801561028c576020820181803683370190505b5090505b841561030f576102a1600183610619565b91506102ae600a86610630565b6102b9906030610644565b60f81b8183815181106102ce576102ce61065c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610308600a86610605565b9450610290565b949350505050565b60005b8381101561033257818101518382015260200161031a565b83811115610341576000848401525b50505050565b6020815260008251806020840152610366816040850160208701610317565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156103aa57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156103f257600080fd5b813567ffffffffffffffff8082111561040a57600080fd5b818401915084601f83011261041e57600080fd5b813581811115610430576104306103b1565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610476576104766103b1565b8160405282815287602084870101111561048f57600080fd5b826020860160208301376000928101602001929092525095945050505050565b600084516104c1818460208901610317565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516104fd816001850160208a01610317565b60019201918201528351610518816002840160208801610317565b0160020195945050505050565b60008351610537818460208801610317565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036105cf576105cf61056f565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610614576106146105d6565b500490565b60008282101561062b5761062b61056f565b500390565b60008261063f5761063f6105d6565b500690565b600082198211156106575761065761056f565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a",
} }
// LegacyMessagePasserABI is the input ABI used to generate the binding from. // LegacyMessagePasserABI is the input ABI used to generate the binding from.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/universal/StandardBridge.sol:StandardBridge\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"contracts/universal/StandardBridge.sol:StandardBridge\",\"label\":\"spacer_1_0_20\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_address\"},{\"astId\":1002,\"contract\":\"contracts/universal/StandardBridge.sol:StandardBridge\",\"label\":\"deposits\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":1003,\"contract\":\"contracts/universal/StandardBridge.sol:StandardBridge\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_uint256)1004_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)1004_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[47]\",\"numberOfBytes\":\"1504\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var StandardBridgeStorageLayout = new(solc.StorageLayout)
var StandardBridgeDeployedBin = "0x"
func init() {
if err := json.Unmarshal([]byte(StandardBridgeStorageLayoutJSON), StandardBridgeStorageLayout); err != nil {
panic(err)
}
layouts["StandardBridge"] = StandardBridgeStorageLayout
deployedBytecodes["StandardBridge"] = StandardBridgeDeployedBin
}
This diff is collapsed.
package foundry
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
"github.com/ethereum/go-ethereum/common/hexutil"
)
// Artifact represents a foundry compilation artifact.
// The Abi is specifically left as a json.RawMessage because
// round trip marshaling/unmarshaling of the abi.ABI type
// causes issues.
type Artifact struct {
Abi json.RawMessage `json:"abi"`
StorageLayout solc.StorageLayout `json:"storageLayout"`
DeployedBytecode DeployedBytecode `json:"deployedBytecode"`
Bytecode Bytecode `json:"bytecode"`
}
type DeployedBytecode struct {
SourceMap string `json:"sourceMap"`
Object hexutil.Bytes `json:"object"`
LinkReferences json.RawMessage `json:"linkReferences"`
ImmutableReferences json.RawMessage `json:"immutableReferences"`
}
type Bytecode struct {
SourceMap string `json:"sourceMap"`
Object hexutil.Bytes `json:"object"`
LinkReferences json.RawMessage `json:"linkReferences"`
}
This diff is collapsed.
#/bin/bash
set -eu
CONTRACTS_PATH="../packages/contracts-bedrock/"
if [ "$#" -ne 2 ]; then
echo "This script takes 2 arguments - CONTRACT_NAME PACKAGE"
exit 1
fi
need_cmd() {
if ! command -v "$1" > /dev/null 2>&1; then
echo "need '$1' (command not found)"
exit 1
fi
}
need_cmd forge
need_cmd abigen
NAME=$1
# This can handle both fully qualified syntax or just
# the name of the contract.
# Fully qualified: path-to-contract-file:contract-name
TYPE=$(echo "$NAME" | cut -d ':' -f2)
PACKAGE=$2
# Convert to lower case to respect golang package naming conventions
TYPE_LOWER=$(echo ${TYPE} | tr '[:upper:]' '[:lower:]')
FILENAME="${TYPE_LOWER}_deployed.go"
mkdir -p bin
TEMP=$(mktemp -d)
CWD=$(pwd)
# Build contracts
cd ${CONTRACTS_PATH}
forge inspect ${NAME} abi > ${TEMP}/${TYPE}.abi
forge inspect ${NAME} bytecode > ${TEMP}/${TYPE}.bin
forge inspect ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex
# Run ABIGEN
cd ${CWD}
abigen \
--abi ${TEMP}/${TYPE}.abi \
--bin ${TEMP}/${TYPE}.bin \
--pkg ${PACKAGE} \
--type ${TYPE} \
--out ./${PACKAGE}/${TYPE_LOWER}.go
...@@ -19,7 +19,7 @@ type Deployment struct { ...@@ -19,7 +19,7 @@ type Deployment struct {
DeployedBytecode hexutil.Bytes `json:"deployedBytecode"` DeployedBytecode hexutil.Bytes `json:"deployedBytecode"`
Devdoc json.RawMessage `json:"devdoc"` Devdoc json.RawMessage `json:"devdoc"`
Metadata string `json:"metadata"` Metadata string `json:"metadata"`
Receipt Receipt `json:"receipt"` Receipt json.RawMessage `json:"receipt"`
SolcInputHash string `json:"solcInputHash"` SolcInputHash string `json:"solcInputHash"`
StorageLayout solc.StorageLayout `json:"storageLayout"` StorageLayout solc.StorageLayout `json:"storageLayout"`
TransactionHash common.Hash `json:"transactionHash"` TransactionHash common.Hash `json:"transactionHash"`
......
This diff is collapsed.
...@@ -21,7 +21,7 @@ var ( ...@@ -21,7 +21,7 @@ var (
// l1PredeployNamespace represents the namespace of L1 predeploys // l1PredeployNamespace represents the namespace of L1 predeploys
l1PredeployNamespace = common.HexToAddress("0x6900000000000000000000000000000000000000") l1PredeployNamespace = common.HexToAddress("0x6900000000000000000000000000000000000000")
// bigL2PredeployNamespace represents the predeploy namespace as a big.Int // bigL2PredeployNamespace represents the predeploy namespace as a big.Int
bigL2PredeployNamespace = new(big.Int).SetBytes(l2PredeployNamespace.Bytes()) BigL2PredeployNamespace = new(big.Int).SetBytes(l2PredeployNamespace.Bytes())
// bigL1PredeployNamespace represents the predeploy namespace as a big.Int // bigL1PredeployNamespace represents the predeploy namespace as a big.Int
bigL1PredeployNamespace = new(big.Int).SetBytes(l1PredeployNamespace.Bytes()) bigL1PredeployNamespace = new(big.Int).SetBytes(l1PredeployNamespace.Bytes())
// bigCodeNamespace represents the predeploy namespace as a big.Int // bigCodeNamespace represents the predeploy namespace as a big.Int
......
This diff is collapsed.
...@@ -36,7 +36,7 @@ func BuildL2Genesis(config *DeployConfig, l1StartBlock *types.Block) (*core.Gene ...@@ -36,7 +36,7 @@ func BuildL2Genesis(config *DeployConfig, l1StartBlock *types.Block) (*core.Gene
} }
// Set up the proxies // Set up the proxies
err = setProxies(db, predeploys.ProxyAdminAddr, bigL2PredeployNamespace, 2048) err = setProxies(db, predeploys.ProxyAdminAddr, BigL2PredeployNamespace, 2048)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -35,7 +35,7 @@ type testNodeInfo struct { ...@@ -35,7 +35,7 @@ type testNodeInfo struct {
GIndex uint64 GIndex uint64
Depth int Depth int
IndexAtDepth int IndexAtDepth int
TraceIndex int TraceIndex uint64
} }
var treeNodesMaxDepth4 = []testNodeInfo{ var treeNodesMaxDepth4 = []testNodeInfo{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,6 +2,7 @@ package preimage ...@@ -2,6 +2,7 @@ package preimage
import ( import (
"encoding/binary" "encoding/binary"
"encoding/hex"
"fmt" "fmt"
"io" "io"
) )
...@@ -57,7 +58,7 @@ func (o *OracleServer) NextPreimageRequest(getPreimage PreimageGetter) error { ...@@ -57,7 +58,7 @@ func (o *OracleServer) NextPreimageRequest(getPreimage PreimageGetter) error {
} }
value, err := getPreimage(key) value, err := getPreimage(key)
if err != nil { if err != nil {
return fmt.Errorf("failed to serve pre-image %s request: %w", key, err) return fmt.Errorf("failed to serve pre-image %s request: %w", hex.EncodeToString(key[:]), err)
} }
if err := binary.Write(o.rw, binary.BigEndian, uint64(len(value))); err != nil { if err := binary.Write(o.rw, binary.BigEndian, uint64(len(value))); err != nil {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -17,6 +17,7 @@ services: ...@@ -17,6 +17,7 @@ services:
dockerfile: Dockerfile.l1 dockerfile: Dockerfile.l1
ports: ports:
- "8545:8545" - "8545:8545"
- "8546:8546"
- "7060:6060" - "7060:6060"
volumes: volumes:
- "l1_data:/db" - "l1_data:/db"
......
...@@ -16,7 +16,7 @@ WORKDIR /opt/foundry ...@@ -16,7 +16,7 @@ WORKDIR /opt/foundry
# Only diff from upstream docker image is this clone instead # Only diff from upstream docker image is this clone instead
# of COPY. We select a specific commit to use. # of COPY. We select a specific commit to use.
RUN git clone https://github.com/foundry-rs/foundry.git . \ RUN git clone https://github.com/foundry-rs/foundry.git . \
&& git checkout da2392e58bb8a7fefeba46b40c4df1afad8ccd22 && git checkout 3b1129b5bc43ba22a9bcf4e4323c5a9df0023140
RUN source $HOME/.profile && \ RUN source $HOME/.profile && \
cargo build --release && \ cargo build --release && \
......
This diff is collapsed.
This diff is collapsed.
# RPC for the network to deploy to
export ETH_RPC_URL=
# Sets the deployer's key to match the first default hardhat account
export PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
# Name of the deployed network
export DEPLOYMENT_CONTEXT=getting-started
# Optional Tenderly details for a simulation link during deployment
export TENDERLY_PROJECT=
export TENDERLY_USERNAME=
This diff is collapsed.
...@@ -13,3 +13,9 @@ deploy-config/mainnet-forked.json ...@@ -13,3 +13,9 @@ deploy-config/mainnet-forked.json
test-case-generator/fuzz test-case-generator/fuzz
.resource-metering.csv .resource-metering.csv
scripts/differential-testing/differential-testing scripts/differential-testing/differential-testing
deployments/900
deployments/901
deployments/hardhat
.envrc
!.envrc.example
deployments/getting-started
This diff is collapsed.
...@@ -4,23 +4,19 @@ pragma solidity 0.8.15; ...@@ -4,23 +4,19 @@ pragma solidity 0.8.15;
import { Semver } from "../universal/Semver.sol"; import { Semver } from "../universal/Semver.sol";
import { FeeVault } from "../universal/FeeVault.sol"; import { FeeVault } from "../universal/FeeVault.sol";
/** /// @custom:proxied
* @custom:proxied /// @custom:predeploy 0x4200000000000000000000000000000000000019
* @custom:predeploy 0x4200000000000000000000000000000000000019 /// @title BaseFeeVault
* @title BaseFeeVault /// @notice The BaseFeeVault accumulates the base fee that is paid by transactions.
* @notice The BaseFeeVault accumulates the base fee that is paid by transactions.
*/
contract BaseFeeVault is FeeVault, Semver { contract BaseFeeVault is FeeVault, Semver {
/** /// @custom:semver 1.2.1
* @custom:semver 1.2.0 /// @notice Constructs the BaseFeeVault contract.
* /// @param _recipient Wallet that will receive the fees.
* @param _recipient Wallet that will receive the fees. /// @param _minWithdrawalAmount Minimum balance for withdrawals.
* @param _minWithdrawalAmount Minimum balance for withdrawals. /// @param _withdrawalNetwork Network which the recipient will receive fees on.
* @param _withdrawalNetwork Network which the recipient will receive fees on.
*/
constructor( constructor(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
WithdrawalNetwork _withdrawalNetwork WithdrawalNetwork _withdrawalNetwork
) FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork) Semver(1, 2, 0) {} ) FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork) Semver(1, 2, 1) {}
} }
...@@ -4,18 +4,14 @@ pragma solidity ^0.8.0; ...@@ -4,18 +4,14 @@ pragma solidity ^0.8.0;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol"; import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
/** /// @title CrossDomainOwnable
* @title CrossDomainOwnable /// @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned /// by contracts on L1. Note that this contract is only safe to be used if the
* by contracts on L1. Note that this contract is only safe to be used if the /// CrossDomainMessenger system is bypassed and the caller on L1 is calling the
* CrossDomainMessenger system is bypassed and the caller on L1 is calling the /// OptimismPortal directly.
* OptimismPortal directly.
*/
abstract contract CrossDomainOwnable is Ownable { abstract contract CrossDomainOwnable is Ownable {
/** /// @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased /// `msg.sender` is the owner of the contract.
* `msg.sender` is the owner of the contract.
*/
function _checkOwner() internal view override { function _checkOwner() internal view override {
require( require(
owner() == AddressAliasHelper.undoL1ToL2Alias(msg.sender), owner() == AddressAliasHelper.undoL1ToL2Alias(msg.sender),
......
...@@ -5,19 +5,15 @@ import { Predeploys } from "../libraries/Predeploys.sol"; ...@@ -5,19 +5,15 @@ import { Predeploys } from "../libraries/Predeploys.sol";
import { L2CrossDomainMessenger } from "./L2CrossDomainMessenger.sol"; import { L2CrossDomainMessenger } from "./L2CrossDomainMessenger.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/** /// @title CrossDomainOwnable2
* @title CrossDomainOwnable2 /// @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned /// by contracts on L1. Note that this contract is meant to be used with systems that use
* by contracts on L1. Note that this contract is meant to be used with systems that use /// the CrossDomainMessenger system. It will not work if the OptimismPortal is used
* the CrossDomainMessenger system. It will not work if the OptimismPortal is used /// directly.
* directly.
*/
abstract contract CrossDomainOwnable2 is Ownable { abstract contract CrossDomainOwnable2 is Ownable {
/** /// @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased /// `xDomainMessageSender` is the owner of the contract. This value is set to the caller
* `xDomainMessageSender` is the owner of the contract. This value is set to the caller /// of the L1CrossDomainMessenger.
* of the L1CrossDomainMessenger.
*/
function _checkOwner() internal view override { function _checkOwner() internal view override {
L2CrossDomainMessenger messenger = L2CrossDomainMessenger( L2CrossDomainMessenger messenger = L2CrossDomainMessenger(
Predeploys.L2_CROSS_DOMAIN_MESSENGER Predeploys.L2_CROSS_DOMAIN_MESSENGER
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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