Optimism 백서

Optimism

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 10쪽

000000000000000000000000000000000012", "OptimismMintableERC721Factory": "0x4200000000000000000000000000000000000017", "L1BlockInterop": "0x4200000000000000000000000000000000000015", "GasPriceOracle": "0x420000000000000000000000000000000000000F", "ProxyAdmin": "0x4200000000000000000000000000000000000018", "BaseFeeVault": "0x4200000000000000000000000000000000000019", "L1FeeVault": "0x420000000000000000000000000000000000001A", "OperatorFeeVault": "0x420000000000000000000000000000000000001B", "GovernanceToken": "0x4200000000000000000000000000000000000042", "SchemaRegistry": "0x4200000000000000000000000000000000000020", "EAS": "0x4200000000000000000000000000000000000021", "CrossL2Inbox": "0x4200000000000000000000000000000000000022", "L2ToL2CrossDomainMessenger": "0x4200000000000000000000000000000000000023", "SuperchainETHBridge": "0x4200000000000000000000000000000000000024", "SuperchainTokenBridge": "0x4200000000000000000000000000000000000028", // Periphery "L2NativeSuperchainERC20": "0x420beeF000000000000000000000000000000001" } ``` ## Next steps * Learn how to [deposit transactions](/app-developers/tutorials/bridging/deposit-transactions) with Supersim, using a much simpler approach that bypasses the derivation pipeline. - For more info about how OP Stack interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html?utm_source=op-docs\&utm_medium=docs). # OPChainB (chainID 902) Source: https://docs.optimism.io/app-developers/reference/tools/supersim/chain-b Learn network details and contract addresses for OPChainB (chainID 902). This guide provides network details and contract addresses for OPChainB (chainID 902) when running `supersim` vanilla mode. ## Network details | **Parameter** | **Value** | | - | - | | **Name** | OPChainB | | **Chain ID** | 902 | | **RPC URL** | [http://127.0.0.1:9546](http://127.0.0.1:9546) | ## Contract addresses ### L1 contracts ```json theme={null} { "AddressManager": "0xafB51A0f73C8409AeA1207DF7f39885c927BeA46", "AnchorStateRegistry": "0x05493149c84A71063f7948127bb931f8377F779C", "AnchorStateRegistryProxy": "0xfd0269a716A59fF125Bd7eb65Cd3427C8555bab7", "DelayedWETH": "0x49BBFf1629824A1e7993Ab5c17AFa45D24AB28c9", "DelayedWETHProxy": "0xA63353128502269b4A4A4c2677fE316cd9ad4397", "DisputeGameFactory": "0x20B168142354Cee65a32f6D8cf3033E592299765", "DisputeGameFactoryProxy": "0x5F416fEb15c8B382d338FDBDb7D44967ca2b59BC", "L1CrossDomainMessenger": "0x094e6508ba9d9bf1ce421fff3dE06aE56e67901b", "L1CrossDomainMessengerProxy": "0xeCA0f912b4bd255f3851951caE5775CC9400aA3B", "L1ERC721Bridge": "0x5C4F5e749A61a9503c4AAE8a9393e89609a0e804", "L1ERC721BridgeProxy": "0xDCE41E6C0901586EE27Eac329EBD4b5fe5A7170d", "L1StandardBridge": "0xb7900B27Be8f0E0fF65d1C3A4671e1220437dd2b", "L1StandardBridgeProxy": "0x67B2aB287a32bB9ACe84F6a5A30A62597b10AdE9", "L2OutputOracle": "0x19652082F846171168Daf378C4fD3ee85a0D4A60", "L2OutputOracleProxy": "0x006Af3fB62c4BE4fB0393995d364BbFe6b0F3CB2", "Mips": "0xB3A0348310a0ff78E5FbDB7f14BB7d3e02d40773", "OptimismMintableERC20Factory": "0x39Aea2Dd53f2d01c15877aCc2791af6BDD7aD567", "OptimismMintableERC20FactoryProxy": "0x1A2A942d891e525D1Ab192578a378980729fD585", "OptimismPortal": "0x35e67BC631C327b60C6A39Cff6b03a8adBB19c2D", "OptimismPortal2": "0xfcbb237388CaF5b08175C9927a37aB6450acd535", "OptimismPortalProxy": "0xdfC9DEAbEEbDaa7620C71e2E76AEda32919DE5f2", "PreimageOracle": "0x3bd7E801E51d48c5d94Ea68e8B801DFFC275De75", "ProtocolVersions": "0xfbfD64a6C0257F613feFCe050Aa30ecC3E3d7C3F", "ProtocolVersionsProxy": "0xE139cB0CDa5EF722870068ea331d0989776A7aDf", "ProxyAdmin": "0xff5E6C2Af859f70B875BA59B958BEde60E36bf69", "SafeProxyFactory": "0xb68f3B057fE3c6CdDF9DB35837Ea769FCc81978a", "SafeSingleton": "0xeeB44D84d505AbD958d032e90704c56443eB3ED0", "SuperchainConfig": "0x068E44eB31e111028c41598E4535be7468674D0A", "SuperchainConfigProxy": "0x2ED4AA34573c36bF3856e597501aEf9d9Dc1687C", "SystemConfig": "0x6167B477F8d9138aa509f54b2800443857e28c0f", "SystemConfigProxy": "0x2Db03FE998D7c20E4B65afD1f50f04Ec4BfAb694", "SystemOwnerSafe": "0xBF3830711B7c559042453B7546dB4736eFB4245e" } ``` ### L2 contracts ```json theme={null} { // OP Stack predeploys "L2ToL1MessagePasser": "0x4200000000000000000000000000000000000016", "L2CrossDomainMessenger": "0x4200000000000000000000000000000000000007", "L2StandardBridge": "0x4200000000000000000000000000000000000010", "L2ERC721Bridge": "0x4200000000000000000000000000000000000014", "SequencerFeeVault": "0x4200000000000000000000000000000000000011", "OptimismMintableERC20Factory": "0x4200000000000000000000000000000000000012", "OptimismMintableERC721Factory": "0x4200000000000000000000000000000000000017", "L1BlockInterop": "0x4200000000000000000000000000000000000015", "GasPriceOracle": "0x420000000000000000000000000000000000000F", "ProxyAdmin": "0x4200000000000000000000000000000000000018", "BaseFeeVault": "0x4200000000000000000000000000000000000019", "L1FeeVault": "0x420000000000000000000000000000000000001A", "OperatorFeeVault": "0x420000000000000000000000000000000000001B", "GovernanceToken": "0x4200000000000000000000000000000000000042", "SchemaRegistry": "0x4200000000000000000000000000000000000020", "EAS": "0x4200000000000000000000000000000000000021", "CrossL2Inbox": "0x4200000000000000000000000000000000000022", "L2ToL2CrossDomainMessenger": "0x4200000000000000000000000000000000000023", "SuperchainETHBridge": "0x4200000000000000000000000000000000000024", "SuperchainTokenBridge": "0x4200000000000000000000000000000000000028", // Periphery "L2NativeSuperchainERC20": "0x420beeF000000000000000000000000000000001" } ``` ## Next steps * Learn how to [deposit transactions](/app-developers/tutorials/bridging/deposit-transactions) with Supersim, using a much simpler approach that bypasses the derivation pipeline. - For more info about how OP Stack interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html?utm_source=op-docs\&utm_medium=docs). # Fork mode Source: https://docs.optimism.io/app-developers/reference/tools/supersim/fork Learn how to fork Supersim. Supersim fork mode to simulate and interact with the state of the chain without needing to re-deploy or modify the contracts. This is possible if you're relying on contracts already deployed on testnet / mainnet chains. ```sh theme={null} supersim fork ``` ## How it works The `supersim` fork command simplifies the process of forking multiple chains in the OP Stack ecosystem simultaneously. It determines the appropriate block heights for each chain and launches both the L1 and L2 chains based on these values. This allows you to locally fork any chain in a superchain network of the [superchain registry](https://github.com/ethereum-optimism/superchain-registry), default `mainnet` versions. ### Example startup logs ``` Available Accounts ----------------------- (0): 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --- truncated for brevity --- Private Keys ----------------------- (0): 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --- truncated for brevity --- Orchestrator Config: L1: Name: mainnet Chain ID: 1 RPC: http://127.0.0.1:8545 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-1-1521250718 L2: Name: op Chain ID: 10 RPC: http://127.0.0.1:9545 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-10 Name: base Chain ID: 8453 RPC: http://127.0.0.1:9546 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-8453 Name: zora Chain ID: 7777777 RPC: http://127.0.0.1:9547 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-7777777 ``` ## Configuration ``` NAME: supersim fork - Locally fork a network in the superchain registry USAGE: supersim fork [command options] OPTIONS: --l1.fork.height value (default: 0) ($SUPERSIM_L1_FORK_HEIGHT) L1 height to fork the superchain (bounds L2 time). `0` for latest --chains value ($SUPERSIM_CHAINS) chains to fork in the superchain, mainnet options: [arena-z, automata, base, bob, cyber, ethernity, funki, hashkeychain, ink, lisk, lyra, metal, mint, mode, op, orderly, polynomial, race, redstone, shape, soneium, sseed, swan, swell, tbn, unichain, worldchain, xterio-eth, zora]. In order to replace the public rpc endpoint for a chain, specify the ($SUPERSIM_RPC_URL_<CHAIN>) env variable. i.e SUPERSIM_RPC_URL_OP=http://optimism-mainnet.infura.io/v3/<API-KEY> --network value (default: "mainnet") ($SUPERSIM_NETWORK) superchain network. options: mainnet, sepolia, sepolia-dev-0. In order to replace the public rpc endpoint for the network, specify the ($SUPERSIM_RPC_URL_<NETWORK>) env variable. i.e SUPERSIM_RPC_URL_MAINNET=http://mainnet.infura.io/v3/<API-KEY> --interop.enabled (default: true) ($SUPERSIM_INTEROP_ENABLED) enable interop predeploy and functionality --admin.port value (default: 8420) ($SUPERSIM_ADMIN_PORT) Listening port for the admin server --interop.l2tol2cdm.override value ($SUPERSIM_INTEROP_L2TO2CDM_OVERRIDE) Path to the L2ToL2CrossDomainMessenger build artifact that overrides the default implementation --l1.port value (default: 8545) ($SUPERSIM_L1_PORT) Listening port for the L1 instance. `0` binds to any available port --l2.count value (default: 2) ($SUPERSIM_L2_COUNT) Number of L2s. Max of 5 --l2.starting.port value (default: 9545) ($SUPERSIM_L2_STARTING_PORT) Starting port to increment from for L2 chains. `0` binds each chain to any available port --interop.autorelay (default: false) ($SUPERSIM_INTEROP_AUTORELAY) Automatically relay messages sent to the L2ToL2CrossDomainMessenger using account 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 --interop.delay value (default: 0) ($SUPERSIM_INTEROP_DELAY) Delay before relaying messages sent to the L2ToL2CrossDomainMessenger --logs.directory value ($SUPERSIM_LOGS_DIRECTORY) Directory to store logs --l1.host value (default: "127.0.0.1") ($SUPERSIM_L1_HOST) Host address for the L1 instance --l2.host value (default: "127.0.0.1") ($SUPERSIM_L2_HOST) Host address for L2 instances --odyssey.enabled (default: false) ($SUPERSIM_ODYSSEY_ENABLED) Enable odyssey experimental features --dependency.set value ($SUPERSIM_DEPENDENCY_SET) Override local chain IDs in the dependency set.(format: '[901,902]' or '[]') --log.level value (default: INFO) ($SUPERSIM_LOG_LEVEL) The lowest log level that will be output --log.format value (default: text) ($SUPERSIM_LOG_FORMAT) Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty', --log.color (default: false) ($SUPERSIM_LOG_COLOR) Color the log output if in terminal mode --log.pid (default: false) ($SUPERSIM_LOG_PID) Show pid in the log --help, -h (default: false) show help ``` ## Notes ### Fork height The fork height is determined by L1 block height (default `latest`). This is then used to derive the corresponding L2 block to start from. ### Interoperability contracts By default, interop contracts are not deployed on forked networks. To include them, run `supersim` with the `--interop.enabled` flag. ```sh theme={null} supersim fork --chains=op,base,zora --interop.enabled ``` ## Next steps * Explore the Supersim [included contracts](/app-developers/reference/tools/supersim/included-contracts) being used to help replicate the OP Stack environment. - Learn how to [deposit transactions](/app-developers/tutorials/bridging/deposit-transactions) with Supersim, using a much simpler approach that bypasses the derivation pipeline. # Included contracts Source: https://docs.optimism.io/app-developers/reference/tools/supersim/included-contracts Learn about the Supersim included contracts. The `supersim` chain environment includes contracts already deployed to help replicate the OP Stack interop environment. See [OP Chain A](./chain-a) for contract address examples for a L2 system. ## OP Stack system contracts (L1) These are the L1 contracts that are required for a rollup as part of the OP Stack protocol. Examples are the [OptimismPortal](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L1/OptimismPortal2.sol), [L1StandardBridge](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L1/L1StandardBridge.sol), and [L1CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol). For more details, see [example contracts](/op-mainnet/network-information/op-addresses#ethereum-mainnet) or the [source code](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/src/L1). ## OP Stack L2 contracts (L2) The OP Stack system contracts on the L2 are included at the standard addresses by default. * [Standard OP Stack predeploys (L2)](https://specs.optimism.io/protocol/predeploys.html) * [Interoperability predeploys (*experimental*) (L2)](https://specs.optimism.io/interop/predeploys.html?utm_source=op-docs\&utm_medium=docs) * [OP Stack preinstalls (L2)](https://specs.optimism.io/protocol/preinstalls.html?utm_source=op-docs\&utm_medium=docs) ## Periphery contracts (L2) L2 chains running on `supersim` also includes some useful contracts for testing purposes that are not part of the OP Stack by default. ### L2NativeSuperchainERC20 A simple ERC20 included in Supersim for testing cross-chain token transfers. It includes permissionless minting for easy testing. Source: [L2NativeSuperchainERC20.sol](https://github.com/ethereum-optimism/supersim/blob/main/contracts/src/L2NativeSuperchainERC20.sol) Deployed address: `0x420beeF000000000000000000000000000000001` #### Minting new tokens ```bash theme={null} cast send 0x420beeF000000000000000000000000000000001 "mint(address _to, uint256 _amount)" $RECIPIENT_ADDRESS 1ether --rpc-url $L2_RPC_URL ``` ## Next steps * Get network details about the two OP Stack systems spun up in vanilla mode: [OPChainA (chainID 901)](/app-developers/reference/tools/supersim/chain-a) and [OPChainB (chainID 902)](/app-developers/reference/tools/supersim/chain-b). - Learn how to [deposit transactions](/app-developers/tutorials/bridging/deposit-transactions) with Supersim, using a much simpler approach that bypasses the derivation pipeline. # Vanilla mode Source: https://docs.optimism.io/app-developers/reference/tools/supersim/vanilla Learn how to use Supersim in vanilla mode (non-forked). This guide explains how to start `supersim` in vanilla (non-forked) mode. By default, two OP Stack systems will be spun up in vanilla mode: * OPChainA (chainID 901) * OPChainB (chainID 902) Both "roll up" into a single L1 chain (chainID 900). ## How it works ```sh theme={null} supersim ``` Vanilla mode will start 3 chains, with the OP Stack contracts & periphery contracts already deployed. * (1) L1 Chain * Chain 900 * (2) L2 Chains * Chain 901 * Chain 902 ### Example startup logs ``` Available Accounts ----------------------- (0): 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (1): 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (2): 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (3): 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (4): 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (5): 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (6): 0x976EA74026E726554dB657fA54763abd0C3a0aa9 (7): 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 (8): 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f (9): 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 Private Keys ----------------------- (0): 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 (1): 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d (2): 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a (3): 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 (4): 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a (5): 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba (6): 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e (7): 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 (8): 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 (9): 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 Orchestrator Config: L1: Name: L1 Chain ID: 900 RPC: http://127.0.0.1:8545 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-900 L2: Name: OPChainA Chain ID: 901 RPC: http://127.0.0.1:9545 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-901 Name: OPChainB Chain ID: 902 RPC: http://127.0.0.1:9546 LogPath: /var/folders/0w/ethers-phoenix/T/anvil-chain-902 ``` ## Configuration ``` NAME: supersim - Superchain Multi-L2 Simulator USAGE: supersim [global options] command [command options] VERSION: untagged DESCRIPTION: Local multichain optimism development environment COMMANDS: fork Locally fork a network in the superchain registry docs Display available docs links help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --admin.port value (default: 8420) ($SUPERSIM_ADMIN_PORT) Listening port for the admin server --interop.l2tol2cdm.override value ($SUPERSIM_INTEROP_L2TO2CDM_OVERRIDE) Path to the L2ToL2CrossDomainMessenger build artifact that overrides the default implementation --l1.port value (default: 8545) ($SUPERSIM_L1_PORT) Listening port for the L1 instance. `0` binds to any available port --l2.count value (default: 2) ($SUPERSIM_L2_COUNT) Number of L2s. Max of 5 --l2.starting.port value (default: 9545) ($SUPERSIM_L2_STARTING_PORT) Starting port to increment from for L2 chains. `0` binds each chain to any available port --interop.autorelay (default: false) ($SUPERSIM_INTEROP_AUTORELAY) Automatically relay messages sent to the L2ToL2CrossDomainMessenger using account 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 --interop.delay value (default: 0) ($SUPERSIM_INTEROP_DELAY) Delay before relaying messages sent to the L2ToL2CrossDomainMessenger --logs.directory value ($SUPERSIM_LOGS_DIRECTORY) Directory to store logs --l1.host value (default: "127.0.0.1") ($SUPERSIM_L1_HOST) Host address for the L1 instance --l2.host value (default: "127.0.0.1") ($SUPERSIM_L2_HOST) Host address for L2 instances --odyssey.enabled (default: false) ($SUPERSIM_ODYSSEY_ENABLED) Enable odyssey experimental features --dependency.set value ($SUPERSIM_DEPENDENCY_SET) Override local chain IDs in the dependency set.(format: '[901,902]' or '[]') --log.color (default: false) ($SUPERSIM_LOG_COLOR) Color the log output if in terminal mode --log.format value (default: text) ($SUPERSIM_LOG_FORMAT) Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty', --log.level value (default: INFO) ($SUPERSIM_LOG_LEVEL) The lowest log level that will be output --log.pid (default: false) ($SUPERSIM_LOG_PID) Show pid in the log MISC --help, -h (default: false) show help --version, -v (default: false) print the version ``` ## Next steps * Explore the Supersim [included contracts](/app-developers/reference/tools/supersim/included-contracts) being used to help replicate the OP Stack interop environment. * Get network details about the two OP Stack systems spun up in vanilla mode: [OPChainA (chainID 901)](/app-developers/reference/tools/supersim/chain-a) and [OPChainB (chainID 902)](/app-developers/reference/tools/supersim/chain-b). - Learn how to [deposit transactions](/app-developers/tutorials/bridging/deposit-transactions) with Supersim, using a much simpler approach that bypasses the derivation pipeline. # Account abstraction Source: https://docs.optimism.io/app-developers/tools-sdks/account-abstraction This guide explains how to use account abstraction to remove friction from your app experience <Info> This page includes providers that meet specific [inclusion criteria](#inclusion-criteria), as outlined below. Please visit the [community account abstractions page](http
프로젝트로 돌아가기