├── .eslintignore ├── .npmrc ├── pages ├── stack │ ├── transactions │ │ └── _meta.json │ ├── security │ │ ├── _meta.json │ │ └── pause.mdx │ ├── protocol │ │ ├── fault-proofs │ │ │ └── _meta.json │ │ └── _meta.json │ └── _meta.json ├── builders │ ├── chain-operators │ │ ├── features │ │ │ └── _meta.json │ │ ├── tools │ │ │ ├── _meta.json │ │ │ └── explorer.mdx │ │ ├── management │ │ │ ├── _meta.json │ │ │ ├── key-management.mdx │ │ │ ├── snap-sync.mdx │ │ │ └── troubleshooting.mdx │ │ ├── _meta.json │ │ ├── hacks │ │ │ ├── _meta.json │ │ │ ├── featured-hacks.mdx │ │ │ ├── overview.mdx │ │ │ ├── execution.mdx │ │ │ ├── settlement.mdx │ │ │ └── derivation.mdx │ │ └── tutorials │ │ │ └── _meta.json │ ├── tools │ │ ├── monitor │ │ │ ├── _meta.json │ │ │ └── analytics-tools.mdx │ │ ├── connect │ │ │ ├── _meta.json │ │ │ └── networks.mdx │ │ ├── _meta.json │ │ ├── build │ │ │ └── _meta.json │ │ ├── op-tools │ │ │ └── _meta.json │ │ └── overview.mdx │ ├── cex-wallet-developers │ │ ├── _meta.json │ │ ├── wallet-support.mdx │ │ └── cex-support.mdx │ ├── app-developers │ │ ├── transactions │ │ │ ├── fees.mdx │ │ │ └── _meta.json │ │ ├── contracts │ │ │ ├── _meta.json │ │ │ └── compatibility.mdx │ │ ├── bridging │ │ │ ├── _meta.json │ │ │ ├── basics.mdx │ │ │ └── custom-bridge.mdx │ │ ├── tools │ │ │ ├── _meta.json │ │ │ └── ecosystem-overview.mdx │ │ ├── _meta.json │ │ └── tutorials │ │ │ └── _meta.json │ ├── notices │ │ └── _meta.json │ ├── node-operators │ │ ├── _meta.json │ │ ├── management │ │ │ └── _meta.json │ │ ├── tutorials │ │ │ └── _meta.json │ │ └── releases.mdx │ └── _meta.json ├── chain │ ├── testing │ │ ├── _meta.json │ │ └── testing-apps.mdx │ ├── identity │ │ ├── _meta.json │ │ ├── applications.mdx │ │ ├── overview.mdx │ │ ├── contracts-eas.mdx │ │ ├── optimist-profile.mdx │ │ └── schemas.mdx │ ├── security │ │ ├── _meta.json │ │ └── security-policy.mdx │ ├── _meta.json │ ├── tokenlist.mdx │ ├── addresses.mdx │ ├── networks.mdx │ └── getting-started.mdx ├── _app.mdx ├── connect │ ├── contribute │ │ └── _meta.json │ ├── resources │ │ └── _meta.json │ └── _meta.json ├── 404.mdx ├── 500.mdx ├── _meta.json └── index.mdx ├── public ├── logos │ ├── header.png │ ├── favicon.png │ ├── docs-header.png │ ├── icon-192x192.png │ ├── icon-256x256.png │ ├── icon-384x384.png │ ├── icon-512x512.png │ ├── twitter-logo.png │ ├── icon-1020x1020.png │ └── twitter-superchain.png ├── img │ ├── icons │ │ ├── info.png │ │ ├── favicon.ico │ │ ├── profile.png │ │ ├── wallet.png │ │ ├── arrow-up-double.png │ │ ├── government-line.svg │ │ ├── build.svg │ │ ├── book.svg │ │ ├── computer-line.svg │ │ ├── terminal-window-line.svg │ │ ├── news-line.svg │ │ ├── instance-line.svg │ │ ├── question-answer-line.svg │ │ ├── asterisk.svg │ │ ├── file-edit-line.svg │ │ ├── arrow-left-right.svg │ │ ├── shapes.svg │ │ ├── 404-page.svg │ │ ├── wallet.svg │ │ ├── rocket-2-line.svg │ │ ├── tools.svg │ │ ├── person.svg │ │ ├── link.svg │ │ ├── stack-line.svg │ │ ├── stack.svg │ │ ├── 500-page.svg │ │ └── gear.svg │ ├── op-mainnet │ │ ├── tools │ │ │ └── export.png │ │ └── identity │ │ │ ├── profile.png │ │ │ └── atst-logo.png │ ├── guides │ │ ├── nft │ │ │ └── OP-NFT-Ecosystem.jpg │ │ ├── wallet-dev │ │ │ ├── chains-coinbase.png │ │ │ └── chains-metamask.png │ │ ├── app-developers │ │ │ └── OP-NFT-Ecosystem.jpg │ │ └── infra │ │ │ └── Components-Providers.drawio.png │ ├── op-stack │ │ ├── protocol │ │ │ ├── components.png │ │ │ ├── input-data.png │ │ │ ├── superchain-diag.png │ │ │ └── ethereum-optimism-forever.png │ │ ├── releases │ │ │ ├── bedrock-BLUE.jpg │ │ │ ├── bedrock-deployment.png │ │ │ └── two-phase-withdrawals.png │ │ ├── understand │ │ │ ├── landscape.png │ │ │ └── superchain-diag.png │ │ └── tutorials │ │ │ ├── tenderly │ │ │ ├── debugger.png │ │ │ ├── func-trace.png │ │ │ ├── stack-trace.png │ │ │ └── state-changes.png │ │ │ ├── first-contract │ │ │ ├── remix-tx.png │ │ │ ├── remix-query.png │ │ │ ├── remix-console.png │ │ │ ├── remix-query-2.png │ │ │ ├── remix-run-icon.png │ │ │ ├── remix-files-icon.png │ │ │ └── remix-compiler-icon.png │ │ │ └── getting-started │ │ │ ├── remix-tx.png │ │ │ ├── remix-env.png │ │ │ ├── remix-connect.png │ │ │ ├── remix-deploy.png │ │ │ ├── remix-query.png │ │ │ ├── remix-run-icon.png │ │ │ ├── remix-files-icon.png │ │ │ └── remix-upload-icon.png │ └── builders │ │ ├── chain-operators │ │ ├── replica-node.png │ │ ├── sequencer-node.png │ │ ├── sequencer-diagram.png │ │ ├── ingress-traffic-diagram.png │ │ └── replica-node.drawio │ │ ├── app-developers │ │ ├── quick-start │ │ │ ├── scaffold-op.png │ │ │ ├── scaffold-op2.png │ │ │ └── faucet-markup.png │ │ └── tutorials │ │ │ └── first-contract │ │ │ ├── mm-secure.png │ │ │ ├── mm-seed.png │ │ │ ├── mm-start.png │ │ │ ├── mm-confirm.png │ │ │ ├── mm-install.png │ │ │ ├── mm-password.png │ │ │ ├── net-approve.png │ │ │ ├── net-connect.png │ │ │ ├── net-switch.png │ │ │ ├── remix-empty.png │ │ │ ├── remix-compile.png │ │ │ ├── remix-deploy.png │ │ │ ├── remix-deployed.png │ │ │ ├── remix-message.png │ │ │ ├── remix-network.png │ │ │ ├── remix-deploytab.png │ │ │ └── remix-setmessage.png │ │ └── node-operators │ │ └── network-upgrades │ │ └── node-software-release-timeline.png └── tutorials │ ├── first-contract.sol │ ├── standard-bridge-standard-token.sh │ ├── sdk-stack.js │ ├── cross-dom-solidity.js │ ├── cross-dom-solidity.sol │ ├── sdk-estimate-costs.js │ ├── send-tx-from-eth.js │ ├── sdk-view-txns.js │ ├── sdk-trace-txns.js │ ├── cross-dom-bridge-eth.js │ └── standard-bridge-custom-token.sol ├── .gitignore ├── next-env.d.ts ├── utils ├── schemas │ └── page.schema.yaml ├── networks.ts ├── plugins │ └── remark │ │ └── remark-lint-no-blocked-characters.mjs └── constants.ts ├── next-sitemap.config.js ├── notes ├── README.md ├── actions.md ├── nextra.md └── remark.md ├── components ├── L2ContractTable.tsx ├── L1ContractTable.tsx └── AddressTable.tsx ├── next.config.mjs ├── .eslintrc.js ├── .github ├── workflows │ ├── lint.yml │ └── links.yml ├── CODEOWNERS └── ISSUE_TEMPLATE │ ├── general_docs_request.md │ ├── suggest_faq_item.yaml │ ├── suggest_attestation.yaml │ ├── suggest_glossary_term.yaml │ ├── suggest_troubleshooting_item.yaml │ ├── suggest_tutorial.yaml │ ├── suggest_rpc_provider.yaml │ └── suggest_faucet.yaml ├── cspell.json ├── tsconfig.json ├── patches ├── remark-lint-frontmatter-schema@3.15.4.patch ├── nextra@2.13.2.patch └── remark-code-import@1.2.0.patch ├── .remarkrc.mjs ├── .coderabbit.yaml ├── README.md ├── lychee.toml ├── styles └── global.css └── package.json /.eslintignore: -------------------------------------------------------------------------------- 1 | pages/_app.mdx 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true 2 | -------------------------------------------------------------------------------- /pages/stack/transactions/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "fees": "Transaction Fees" 3 | } 4 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/features/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "preinstalls": "Preinstalls" 3 | } -------------------------------------------------------------------------------- /pages/builders/chain-operators/tools/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "explorer": "Block Explorer" 3 | } 4 | -------------------------------------------------------------------------------- /public/logos/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/header.png -------------------------------------------------------------------------------- /pages/stack/security/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "faq": "Security FAQs", 3 | "pause": "Pause and Unpause the Bridge" 4 | } -------------------------------------------------------------------------------- /public/img/icons/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/icons/info.png -------------------------------------------------------------------------------- /public/logos/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/favicon.png -------------------------------------------------------------------------------- /public/img/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/icons/favicon.ico -------------------------------------------------------------------------------- /public/img/icons/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/icons/profile.png -------------------------------------------------------------------------------- /public/img/icons/wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/icons/wallet.png -------------------------------------------------------------------------------- /public/logos/docs-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/docs-header.png -------------------------------------------------------------------------------- /public/logos/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/icon-192x192.png -------------------------------------------------------------------------------- /public/logos/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/icon-256x256.png -------------------------------------------------------------------------------- /public/logos/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/icon-384x384.png -------------------------------------------------------------------------------- /public/logos/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/icon-512x512.png -------------------------------------------------------------------------------- /public/logos/twitter-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/twitter-logo.png -------------------------------------------------------------------------------- /pages/builders/tools/monitor/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "analytics-tools": "Analytics", 3 | "regenesis-history": "Historical Data" 4 | } -------------------------------------------------------------------------------- /public/logos/icon-1020x1020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/icon-1020x1020.png -------------------------------------------------------------------------------- /pages/builders/tools/connect/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "networks": "Networks and RPC Endpoints", 3 | "rpc-providers": "RPC Providers" 4 | } -------------------------------------------------------------------------------- /public/logos/twitter-superchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/logos/twitter-superchain.png -------------------------------------------------------------------------------- /pages/builders/tools/connect/networks.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | import OPNetworks from '@/pages/chain/networks.mdx' 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/img/icons/arrow-up-double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/icons/arrow-up-double.png -------------------------------------------------------------------------------- /public/img/op-mainnet/tools/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-mainnet/tools/export.png -------------------------------------------------------------------------------- /pages/builders/cex-wallet-developers/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cex-support": "Guide for Exchanges", 3 | "wallet-support": "Guide for Wallets" 4 | } 5 | -------------------------------------------------------------------------------- /pages/stack/protocol/fault-proofs/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Overview", 3 | "cannon": "FPVM: Cannon", 4 | "mips": "MIPS.sol" 5 | } -------------------------------------------------------------------------------- /public/img/guides/nft/OP-NFT-Ecosystem.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/guides/nft/OP-NFT-Ecosystem.jpg -------------------------------------------------------------------------------- /public/img/op-mainnet/identity/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-mainnet/identity/profile.png -------------------------------------------------------------------------------- /public/img/op-stack/protocol/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/protocol/components.png -------------------------------------------------------------------------------- /public/img/op-stack/protocol/input-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/protocol/input-data.png -------------------------------------------------------------------------------- /pages/chain/testing/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "dev-node": "Running a Local Development Environment", 3 | "testing-apps": "Testing Apps on OP Mainnet" 4 | } 5 | -------------------------------------------------------------------------------- /public/img/op-mainnet/identity/atst-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-mainnet/identity/atst-logo.png -------------------------------------------------------------------------------- /public/img/op-stack/releases/bedrock-BLUE.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/releases/bedrock-BLUE.jpg -------------------------------------------------------------------------------- /public/img/op-stack/understand/landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/understand/landscape.png -------------------------------------------------------------------------------- /pages/_app.mdx: -------------------------------------------------------------------------------- 1 | import '../styles/global.css' 2 | 3 | export default function App({ Component, pageProps }) { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /public/img/guides/wallet-dev/chains-coinbase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/guides/wallet-dev/chains-coinbase.png -------------------------------------------------------------------------------- /public/img/guides/wallet-dev/chains-metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/guides/wallet-dev/chains-metamask.png -------------------------------------------------------------------------------- /public/img/op-stack/protocol/superchain-diag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/protocol/superchain-diag.png -------------------------------------------------------------------------------- /public/img/op-stack/understand/superchain-diag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/understand/superchain-diag.png -------------------------------------------------------------------------------- /pages/builders/app-developers/transactions/fees.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | import TransactionFees from '@/pages/stack/transactions/fees.mdx' 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/img/builders/chain-operators/replica-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/chain-operators/replica-node.png -------------------------------------------------------------------------------- /public/img/guides/app-developers/OP-NFT-Ecosystem.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/guides/app-developers/OP-NFT-Ecosystem.jpg -------------------------------------------------------------------------------- /public/img/op-stack/releases/bedrock-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/releases/bedrock-deployment.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/tenderly/debugger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/tenderly/debugger.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/tenderly/func-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/tenderly/func-trace.png -------------------------------------------------------------------------------- /pages/builders/notices/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "ecotone-changes": "Preparing for Ecotone Breaking Changes", 3 | "fp-changes": "Preparing for Fault Proofs Breaking Changes" 4 | } 5 | -------------------------------------------------------------------------------- /public/img/builders/chain-operators/sequencer-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/chain-operators/sequencer-node.png -------------------------------------------------------------------------------- /public/img/guides/infra/Components-Providers.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/guides/infra/Components-Providers.drawio.png -------------------------------------------------------------------------------- /public/img/op-stack/releases/two-phase-withdrawals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/releases/two-phase-withdrawals.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/tenderly/stack-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/tenderly/stack-trace.png -------------------------------------------------------------------------------- /public/img/builders/chain-operators/sequencer-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/chain-operators/sequencer-diagram.png -------------------------------------------------------------------------------- /public/img/op-stack/protocol/ethereum-optimism-forever.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/protocol/ethereum-optimism-forever.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-tx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-tx.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-tx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-tx.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/tenderly/state-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/tenderly/state-changes.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-query.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-env.png -------------------------------------------------------------------------------- /pages/builders/tools/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Overview", 3 | "connect": "Connecting", 4 | "build": "Building", 5 | "monitor": "Monitoring", 6 | "op-tools": "OP Tools" 7 | } 8 | -------------------------------------------------------------------------------- /public/img/builders/app-developers/quick-start/scaffold-op.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/quick-start/scaffold-op.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/quick-start/scaffold-op2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/quick-start/scaffold-op2.png -------------------------------------------------------------------------------- /public/img/builders/chain-operators/ingress-traffic-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/chain-operators/ingress-traffic-diagram.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-console.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-query-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-query-2.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-run-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-run-icon.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-connect.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-deploy.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-query.png -------------------------------------------------------------------------------- /pages/connect/contribute/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "docs-contribute": "Contribute to Optimism Docs", 3 | "stack-contribute": "Contribute to OP Stack", 4 | "style-guide": "Docs Style Guide" 5 | } -------------------------------------------------------------------------------- /public/img/builders/app-developers/quick-start/faucet-markup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/quick-start/faucet-markup.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-files-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-files-icon.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-run-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-run-icon.png -------------------------------------------------------------------------------- /pages/builders/app-developers/contracts/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "compatibility": "Solidity Compatibility", 3 | "system-contracts": "System Contracts", 4 | "optimization": "Cost Optimization" 5 | } 6 | -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/first-contract/remix-compiler-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/first-contract/remix-compiler-icon.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-files-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-files-icon.png -------------------------------------------------------------------------------- /public/img/op-stack/tutorials/getting-started/remix-upload-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/op-stack/tutorials/getting-started/remix-upload-icon.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/mm-secure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/mm-secure.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/mm-seed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/mm-seed.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/mm-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/mm-start.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/mm-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/mm-confirm.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/mm-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/mm-install.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/mm-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/mm-password.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/net-approve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/net-approve.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/net-connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/net-connect.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/net-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/net-switch.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-empty.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-compile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-compile.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-deploy.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-deployed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-deployed.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-message.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-network.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-deploytab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-deploytab.png -------------------------------------------------------------------------------- /public/img/builders/app-developers/tutorials/first-contract/remix-setmessage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/app-developers/tutorials/first-contract/remix-setmessage.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # packages 2 | node_modules 3 | 4 | # os specific files 5 | .DS_Store 6 | 7 | # build artifacts 8 | .next 9 | public/robots.txt 10 | public/sitemap-0.xml 11 | public/sitemap.xml 12 | 13 | # log files 14 | *.log 15 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /pages/builders/tools/build/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "faucets": "Faucets", 3 | "oracles": "Oracles", 4 | "nft-tools": "NFT Tools", 5 | "block-explorers": "Block Explorers", 6 | "account-abstraction": "Account Abstraction" 7 | } -------------------------------------------------------------------------------- /public/img/builders/node-operators/network-upgrades/node-software-release-timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artemd24/ethereum-optimism-docs/HEAD/public/img/builders/node-operators/network-upgrades/node-software-release-timeline.png -------------------------------------------------------------------------------- /pages/connect/resources/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelog": { 3 | "title": "Changelog", 4 | "href": "https://github.com/ethereum-optimism/optimism/releases", 5 | "newWindow": true 6 | }, 7 | "glossary": "Glossary" 8 | } -------------------------------------------------------------------------------- /pages/builders/app-developers/bridging/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "basics": "Basics of Bridging", 3 | "standard-bridge": "The Standard Bridge", 4 | "custom-bridge": "Custom Token Bridges", 5 | "messaging": "Sending Data Between L1 and L2" 6 | } 7 | -------------------------------------------------------------------------------- /utils/schemas/page.schema.yaml: -------------------------------------------------------------------------------- 1 | title: Page 2 | 3 | properties: 4 | title: 5 | type: string 6 | lang: 7 | type: string 8 | description: 9 | type: string 10 | 11 | required: 12 | - title 13 | - lang 14 | - description 15 | -------------------------------------------------------------------------------- /pages/builders/app-developers/transactions/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "fees": "Transaction Fees", 3 | "estimates": "Estimating Fees", 4 | "parameters": "Setting Gas Parameters", 5 | "statuses": "Transaction Statuses", 6 | "troubleshooting": "Troubleshooting" 7 | } 8 | -------------------------------------------------------------------------------- /pages/builders/node-operators/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Overview", 3 | "tutorials": "Tutorials", 4 | "management": "Node Management", 5 | "network-upgrades": "Network Upgrades", 6 | "json-rpc": "JSON-RPC API", 7 | "releases": "Software Releases" 8 | } 9 | -------------------------------------------------------------------------------- /pages/chain/identity/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Overview", 3 | "about-attestations": "About Attestations", 4 | "contracts-eas": "Contracts (EAS)", 5 | "schemas": "Schemas", 6 | "optimist-profile": "Optimist Profile", 7 | "applications": "Apps" 8 | } -------------------------------------------------------------------------------- /pages/builders/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "notices": "Notices (README)", 3 | "app-developers": "App Developers", 4 | "chain-operators": "Chain Operators", 5 | "node-operators": "Node Operators", 6 | "cex-wallet-developers": "Wallets & CEXs", 7 | "tools": "Developer Tools" 8 | } 9 | -------------------------------------------------------------------------------- /pages/builders/node-operators/management/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "snapshots": "Snapshot Downloads", 3 | "configuration": "Configuration", 4 | "blobs": "Using Blobs", 5 | "snap-sync": "Using Snap Sync", 6 | "metrics": "Monitoring", 7 | "troubleshooting": "Troubleshooting" 8 | } 9 | -------------------------------------------------------------------------------- /pages/builders/node-operators/tutorials/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "node-from-docker": "Running a Node With Docker", 3 | "node-from-source": "Building a Node from Source", 4 | "mainnet": "Running OP Mainnet from Source", 5 | "testnet": "Running OP Sepolia from Source" 6 | } 7 | -------------------------------------------------------------------------------- /next-sitemap.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next-sitemap').IConfig} */ 2 | module.exports = { 3 | siteUrl: process.env.SITE_URL || 'https://snazzy-hamster-4e1647.netlify.app/', 4 | generateRobotsTxt: true, // (optional) 5 | generateIndexSitemap: true, 6 | // ...other options 7 | } 8 | -------------------------------------------------------------------------------- /pages/builders/app-developers/tools/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "ecosystem-overview": "Open Source Code Repo", 3 | "console": { 4 | "title": "Superchain Dev Console", 5 | "href": "https://console.optimism.io/?utm_source=docs", 6 | "newWindow": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /public/tutorials/first-contract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | 4 | contract MyFirstContract { 5 | string public message; 6 | 7 | function setMessage(string memory _message) public { 8 | message = _message; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/management/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": "Configuration", 3 | "blobs": "Using Blobs", 4 | "snap-sync": "Using Snap Sync", 5 | "operations": "Node Operations", 6 | "key-management": "Key Management", 7 | "troubleshooting": "Troubleshooting" 8 | } 9 | -------------------------------------------------------------------------------- /notes/README.md: -------------------------------------------------------------------------------- 1 | # Optimism Docs Docs 2 | 3 | The Optimism Docs Docs are internal docs to help you understand how the Optimism Docs are built and maintained. 4 | 5 | - [How the Optimism Docs Use Nextra](./nextra.md) 6 | - [How the Optimism Docs Use Remark](./remark.md) 7 | - [GitHub Actions](./actions.md) 8 | -------------------------------------------------------------------------------- /pages/builders/app-developers/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Overview", 3 | "quick-start": "Superchain App Quick Start", 4 | "tutorials": "Tutorials", 5 | "contracts": "Smart Contracts", 6 | "transactions": "Transactions", 7 | "bridging": "Bridging", 8 | "tools": "App Tools" 9 | } 10 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "architecture": "Architecture", 3 | "self-hosted": "Start a Self-Hosted Chain", 4 | "tutorials": "Tutorials", 5 | "management": "Chain Management", 6 | "features": "Chain Features", 7 | "tools": "Chain Tools", 8 | "hacks": "OP Stack Hacks" 9 | } 10 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/hacks/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Intro to OP Stack Hacks", 3 | "featured-hacks": "Featured Hacks", 4 | "data-availability": "Data Availability Hacks", 5 | "derivation": "Derivation Hacks", 6 | "execution": "Execution Hacks", 7 | "settlement": "Settlement Hacks" 8 | } -------------------------------------------------------------------------------- /public/img/icons/government-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/chain/security/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "faq": "Security Model & FAQ", 3 | "privileged-roles": "Privileged Roles", 4 | "security-policy": "Security Policy", 5 | "bug-bounty": { 6 | "title": "Bug Bounty Program", 7 | "href": "https://immunefi.com/bounty/optimism/", 8 | "newWindow": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /pages/stack/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "getting-started": "Getting Started: OP Stack", 3 | "differences": "Differences Between Ethereum and OP Stack Chains", 4 | "explainer": "Superchain Explainer", 5 | "components": "OP Stack Components", 6 | "protocol": "Protocol", 7 | "transactions": "Transactions", 8 | "security": "Security" 9 | } 10 | -------------------------------------------------------------------------------- /public/img/icons/build.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/img/icons/book.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/img/icons/computer-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/icons/terminal-window-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/tutorials/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "create-l2-rollup": "Creating Your Own L2 Rollup Testnet", 3 | "sdk": "Using the Optimism SDK", 4 | "adding-derivation-attributes": "Adding Attributes to the Derivation Function", 5 | "adding-precompiles": "Adding a Precompile", 6 | "modifying-predeploys": "Modifying Predeployed Contracts" 7 | } -------------------------------------------------------------------------------- /public/img/icons/news-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/chain/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "getting-started": "Getting Started: OP Mainnet", 3 | "differences": "Differences Between Ethereum and OP Mainnet", 4 | "networks": "Networks and RPC Endpoints", 5 | "addresses": "Contract Addresses", 6 | "tokenlist": "Bridged Token Addresses", 7 | "identity": "Identity", 8 | "testing": "Testing", 9 | "security": "Security" 10 | } -------------------------------------------------------------------------------- /public/img/icons/instance-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/icons/question-answer-line.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/img/icons/asterisk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pages/stack/protocol/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "overview": "Rollup Protocol Overview", 3 | "design-principles": "Design Philosophy & Principles", 4 | "smart-contracts": "Smart Contract Overview", 5 | "deposit-flow": "Deposit Flow", 6 | "transaction-flow": "Transaction Flow", 7 | "withdrawal-flow": "Withdrawal Flow", 8 | "fault-proofs": "Fault Proofs", 9 | "outages": "Sequencer Outages" 10 | } -------------------------------------------------------------------------------- /public/img/icons/file-edit-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/connect/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "contribute": "Contribute", 3 | "resources": "Resources", 4 | "live-support": { 5 | "title": "Get Launch Support", 6 | "href": "https://share.hsforms.com/1yENj8CV9TzGYBASD0JC8_gqoshb", 7 | "newWindow": true 8 | }, 9 | "governance": { 10 | "title": "Optimism Governance", 11 | "href": "https://community.optimism.io/docs/governance/", 12 | "newWindow": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /public/img/icons/arrow-left-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/L2ContractTable.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react' 2 | import { AddressTable } from '@/components/AddressTable' 3 | import { PREDEPLOYS } from '@/utils/constants' 4 | 5 | export function L2ContractTable({ 6 | chain 7 | }: { 8 | chain: string 9 | }): ReactElement { 10 | return ( 11 | 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /pages/404.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Page Not Found 3 | lang: en-US 4 | description: 404 page not found and directs users to submit an git issue. 5 | --- 6 | 7 | # Page Not Found 8 | 9 | ![404 Error Warning.](/img/icons/404-page.svg) 10 | 11 | ## Let's find our way back.
Visit the [homepage](index) to get started. 12 | 13 | #### Please help by [submitting an issue](https://github.com/ethereum-optimism/docs/issues/new/choose) for the broken link. ❤️ 14 | 15 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | import nextra from 'nextra' 2 | import remarkCodeImport from 'remark-code-import' 3 | 4 | const withNextra = nextra({ 5 | theme: 'nextra-theme-docs', 6 | themeConfig: './theme.config.tsx', 7 | defaultShowCopyCode: true, 8 | mdxOptions: { 9 | remarkPlugins: [ 10 | remarkCodeImport, 11 | ] 12 | } 13 | }) 14 | 15 | export default { 16 | ...withNextra(), 17 | eslint: { 18 | ignoreDuringBuilds: true, 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /pages/500.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Internal Server Error 3 | lang: en-US 4 | description: 500 internal server error and directs users to submit an git issue. 5 | --- 6 | 7 | # Unexpected Error 8 | 9 | ![500 Error Warning.](/img/icons/500-page.svg) 10 | 11 | ## Something isn't quite right. Let's start again on the [homepage](index). 12 | 13 | #### Please help by [submitting an issue](https://github.com/ethereum-optimism/docs/issues/new/choose) about what led you to this page. ❤️ 14 | -------------------------------------------------------------------------------- /public/tutorials/standard-bridge-standard-token.sh: -------------------------------------------------------------------------------- 1 | export TUTORIAL_RPC_URL=https://sepolia.optimism.io 2 | 3 | # Replace this with your L1 ERC-20 token if not using the testing token! 4 | export TUTORIAL_L1_ERC20_ADDRESS=0x5589BB8228C07c4e15558875fAf2B859f678d129 5 | 6 | cast send 0x4200000000000000000000000000000000000012 "createOptimismMintableERC20(address,string,string)" $TUTORIAL_L1_ERC20_ADDRESS "My Standard Demo Token" "L2TKN" --private-key $PRIVATE_KEY --rpc-url $TUTORIAL_RPC_URL --json | jq -r '.logs[0].topics[2]' | cast parse-bytes32-address 7 | -------------------------------------------------------------------------------- /public/img/icons/shapes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/img/icons/404-page.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parserOptions: { 3 | ecmaVersion: 'latest' 4 | }, 5 | extends: [ 6 | 'plugin:mdx/recommended', 7 | ], 8 | rules: { 9 | 'semi': ['error', 'never'] 10 | }, 11 | overrides: [ 12 | { 13 | files: ['pages/**/*.mdx'], 14 | extends: [ 15 | 'plugin:mdx/recommended' 16 | ], 17 | settings: { 18 | 'mdx/code-blocks': true 19 | }, 20 | rules: { 21 | 'no-unused-expressions': 'off', 22 | 'semi': ['error', 'never'] 23 | } 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint Markdown 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | lint: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Check out code 15 | uses: actions/checkout@v2 16 | 17 | - name: Set up Node.js 18 | uses: actions/setup-node@v2 19 | with: 20 | node-version: '20.x' 21 | 22 | - name: Install pnpm 23 | run: npm install -g pnpm 24 | 25 | - name: Install dependencies 26 | run: pnpm install 27 | 28 | - name: Run lint 29 | run: pnpm lint 30 | -------------------------------------------------------------------------------- /public/img/icons/wallet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /components/L1ContractTable.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react' 2 | import * as addresses from 'superchain-registry/superchain/extra/addresses/addresses.json' 3 | import { AddressTable } from '@/components/AddressTable' 4 | 5 | export function L1ContractTable({ 6 | chain, 7 | explorer 8 | }: { 9 | chain: string, 10 | explorer: string, 11 | }): ReactElement { 12 | return ( 13 | { 19 | return chainid === chain 20 | })[1] 21 | } 22 | /> 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-types/cspell.schema.json", 3 | "version": "0.2", 4 | "dictionaryDefinitions": [ 5 | { 6 | "name": "words", 7 | "path": "./words.txt", 8 | "addWords": true 9 | } 10 | ], 11 | "dictionaries": [ 12 | "words" 13 | ], 14 | "ignorePaths": [ 15 | "node_modules", 16 | "./words.txt" 17 | ], 18 | "overrides": [ 19 | { 20 | "filename": "**/*.mdx", 21 | "ignoreRegExpList": [ 22 | "/`[^`]*`/", 23 | "/```[\\s\\S]*?```/", 24 | "/\\([^)]*\\)/" 25 | ] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": false, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "incremental": true, 11 | "esModuleInterop": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "jsx": "preserve", 17 | "baseUrl": "./", 18 | "paths": { 19 | "@/components/*": ["components/*"], 20 | "@/utils/*": ["utils/*"], 21 | "@/pages/*": ["pages/*"], 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /pages/builders/app-developers/tutorials/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "first-contract": "Deploying Your First Contract on OP Mainnet", 3 | "cross-dom-solidity": "Communicating Between Chains in Solidity", 4 | "cross-dom-bridge-eth": "Bridging ETH With the Optimism SDK", 5 | "cross-dom-bridge-erc20": "Bridging ERC-20 Tokens With the Optimism SDK", 6 | "standard-bridge-custom-token": "Bridging Your Custom ERC-20 Token to OP Mainnet", 7 | "standard-bridge-standard-token": "Bridging Your Standard ERC-20 Token to OP Mainnet", 8 | "sdk-view-txns": "Viewing Deposits and Withdrawals by Address", 9 | "sdk-trace-txns": "Tracing Deposits and Withdrawals", 10 | "sdk-estimate-costs": "Estimating Transaction Costs", 11 | "send-tx-from-eth": "Triggering OP Mainnet Transactions From Ethereum" 12 | } 13 | -------------------------------------------------------------------------------- /public/img/icons/rocket-2-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/icons/tools.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @ethereum-optimism/docs-reviewers 2 | 3 | # Giving Node Squad review privileges to the following sections 4 | /pages/builders/chain-operators/ @ethereum-optimism/docs-reviewers @ethereum-optimism/node-squad 5 | /pages/chain/ @ethereum-optimism/docs-reviewers @ethereum-optimism/node-squad 6 | /pages/stack/ @ethereum-optimism/docs-reviewers @ethereum-optimism/node-squad 7 | 8 | # Giving Marine privileges to review RPC providers and block explorers 9 | /pages/builders/tools/connect/rpc-providers.mdx @ethereum-optimism/docs-reviewers @0xmariniere 10 | /pages/builders/tools/build/block-explorers.mdx @ethereum-optimism/docs-reviewers @0xmariniere 11 | 12 | # Giving Binji privileges to review NFT tools 13 | /pages/builders/tools/build/nft-tools.mdx @ethereum-optimism/docs-reviewers @binjix23 14 | -------------------------------------------------------------------------------- /notes/actions.md: -------------------------------------------------------------------------------- 1 | # GitHub Actions 2 | 3 | ## Linting 4 | 5 | The `lint.yml` workflow checks that all Markdown and JavaScript files conform to the linting standards we apply. 6 | Run `pnpm lint` to lint locally and run `pnpm fix` to fix issues that the linter can fix automatically. 7 | All PRs must pass this check. 8 | Also includes spellchecking via [cspell](https://cspell.org/). 9 | 10 | ## Link Checks 11 | 12 | The `links.yml` workflow checks that all links in the docs are available. 13 | Runs once per day. 14 | 15 | ## Tutorial Checks 16 | 17 | The `tutorials.yml` workflow runs several of the tutorials within these docs. 18 | Most tutorials take the form of JavaScript files that are imported within the content of the docs. 19 | Same files can be executed individually to make sure that the tutorial actually works and isn't broken for one reason or another. 20 | -------------------------------------------------------------------------------- /patches/remark-lint-frontmatter-schema@3.15.4.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dist/index.js b/dist/index.js 2 | index 602dc3851aa1c8499a8c5ae2d810d5e4ee8e87a9..5dd03a2ea17272b8779341ecfd73e2dfe0bb6e30 100644 3 | --- a/dist/index.js 4 | +++ b/dist/index.js 5 | @@ -256,6 +256,11 @@ const remarkFrontmatterSchema = lintRule({ 6 | const frontmatter = ast.children.find((child) => child.type === 'yaml'); 7 | if (frontmatter?.type === 'yaml') { 8 | await validateFrontmatter(frontmatter, vFile, settings); 9 | + } else { 10 | + // Specific logic for the ethereum-optimism/docs repository. We 11 | + // always want to have a frontmatter section. Working on getting 12 | + // this fixed in the upstream plugin so we don't need this hack. 13 | + throw new Error('Missing frontmatter') 14 | } 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /public/img/icons/person.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /patches/nextra@2.13.2.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dist/normalize-pages.js b/dist/normalize-pages.js 2 | index db97af203d09cdab91be98d520efa82451b5bfc3..87b36b81df6ea55ca4326c99c927a7ed4e0b2501 100644 3 | --- a/dist/normalize-pages.js 4 | +++ b/dist/normalize-pages.js 5 | @@ -273,8 +273,14 @@ function normalizePages({ 6 | } 7 | if (type === "doc" && display === "children") { 8 | if (docsItem.children) { 9 | - directories.push(...docsItem.children); 10 | - docsDirectories.push(...docsItem.children); 11 | + const children = docsItem.children.map((child) => { 12 | + return { 13 | + ...child, 14 | + name: `${docsItem.name}-${child.name}`, 15 | + } 16 | + }) 17 | + directories.push(...children); 18 | + docsDirectories.push(...children); 19 | } 20 | } else { 21 | directories.push(item); 22 | -------------------------------------------------------------------------------- /.remarkrc.mjs: -------------------------------------------------------------------------------- 1 | import remarkLintNoBlockedCharacters from './utils/plugins/remark/remark-lint-no-blocked-characters.mjs' 2 | 3 | export default { 4 | plugins: [ 5 | remarkLintNoBlockedCharacters, 6 | "remark-gfm", 7 | "remark-frontmatter", 8 | "remark-preset-lint-consistent", 9 | "remark-preset-lint-recommended", 10 | "remark-lint-table-cell-padding", 11 | "remark-lint-table-pipe-alignment", 12 | "remark-lint-table-pipes", 13 | "@double-great/remark-lint-alt-text", 14 | [ 15 | "remark-lint-heading-style", 16 | "atx" 17 | ], 18 | [ 19 | "remark-lint-unordered-list-marker-style", 20 | "*" 21 | ], 22 | [ 23 | "remark-lint-frontmatter-schema", 24 | { 25 | schemas: { 26 | "./utils/schemas/page.schema.yaml": [ 27 | "./pages/**/*.mdx" 28 | ] 29 | } 30 | } 31 | ] 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /public/img/icons/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.coderabbit.yaml: -------------------------------------------------------------------------------- 1 | language: "en" 2 | early_access: false 3 | reviews: 4 | high_level_summary: false 5 | poem: false 6 | review_status: false 7 | collapse_walkthrough: false 8 | path_instructions: 9 | - path: "**/*.mdx" 10 | instructions: | 11 | "ALWAYS review Markdown content THOROUGHLY with the following criteria: 12 | - Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation. 13 | - Avoid gender-specific language and use the imperative form. 14 | - Monitor capitalization for emphasis. Use **bold** for prominence instead of all caps or italics. 15 | - Ensure proper nouns are capitalized in sentences. 16 | - Apply the Oxford comma. 17 | - Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links. 18 | - Use correct spelling and grammar at all times (IMPORTANT). 19 | " 20 | auto_review: 21 | enabled: true 22 | drafts: false 23 | base_branches: 24 | - "main" 25 | chat: 26 | auto_reply: true 27 | -------------------------------------------------------------------------------- /pages/builders/tools/op-tools/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "block-explorer": { 3 | "title": "OP Mainnet Explorer", 4 | "href": "https://optimistic.etherscan.io/", 5 | "newWindow": true 6 | }, 7 | "bridge": { 8 | "title": "OP Mainnet Bridge", 9 | "href": "https://app.optimism.io/bridge/deposit", 10 | "newWindow": true 11 | }, 12 | "sdk": { 13 | "title": "Optimism SDK", 14 | "href": "https://sdk.optimism.io/", 15 | "newWindow": true 16 | }, 17 | "faucet": { 18 | "title": "Superchain Faucet", 19 | "type": "page", 20 | "href": "https://app.optimism.io/faucet?utm_source=docs", 21 | "newWindow": true 22 | }, 23 | "console": { 24 | "title": "Superchain Dev Console", 25 | "href": "https://console.optimism.io/?utm_source=docs", 26 | "newWindow": true 27 | }, 28 | "gas": { 29 | "title": "Gas Tracker", 30 | "type": "page", 31 | "href": "https://optimistic.grafana.net/public-dashboards/c84a5a9924fe4e14b270a42a8651ceb8?orgId=1&refresh=5m", 32 | "newWindow": true 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/img/icons/stack-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notes/nextra.md: -------------------------------------------------------------------------------- 1 | # How the Optimism Docs Use Nextra 2 | 3 | The Optimism Docs use the [Nextra](https://nextra.site/) documentation framework. 4 | Nextra is essentially a combination of [Next.js](https://nextjs.org/) + [MDX](https://mdxjs.com/) and allows you to write React components that can be used within Markdown pages. 5 | Nextra documentation is decent and can explain the basics of how to do most of the things you might want to do. 6 | This page documents all of the things that we do that are currently not made obvious by Nextra's docs. 7 | 8 | ## Remark Plugins 9 | 10 | Nextra uses [Remark](https://github.com/remarkjs/remark) as a markdown processor. 11 | Remark plugins can be injected into Nextra by modifying the `mdxOptions` object inside of [`next.config.mjs`](/next.config.mjs). 12 | 13 | ### Custom Plugins 14 | 15 | #### remarkCodeImport 16 | 17 | Rule is modified via [patch](/patches/remark-code-import@1.2.0.patch) to require that all code imports include a md5 content hash of the imported content. 18 | Requiring this hash means that changes to the underlying content must also come with corresponding changes to the relevant imports and imports cannot silently break. 19 | -------------------------------------------------------------------------------- /pages/chain/tokenlist.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bridged Token Addresses 3 | lang: en-US 4 | description: This reference guide lists the correct bridged token addresses for each token. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | import { TokenListTable } from '@/components/TokenListTable' 9 | 10 | # Bridged Token Addresses 11 | 12 | Various ERC-20 tokens originally deployed to Ethereum also have corresponding "bridged" representations on OP Mainnet. 13 | The [Superchain Token List](https://github.com/ethereum-optimism/ethereum-optimism.github.io) exists to help users discover the correct bridged token addresses for each token. 14 | This page is automatically generated from the Superchain Token List. 15 | 16 | 17 | **Tokens listed on this page are provided for convenience only** and are automatically derived from the [Superchain Token List](https://github.com/ethereum-optimism/ethereum-optimism.github.io). 18 | **The presence of a token on this page does not imply any endorsement of the token or its minter.** 19 | 20 | 21 | ## OP Mainnet 22 | 23 | 24 | 25 | ## OP Sepolia 26 | 27 | 28 | -------------------------------------------------------------------------------- /public/img/icons/stack.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /utils/networks.ts: -------------------------------------------------------------------------------- 1 | interface Chain { 2 | name: string 3 | id: number 4 | explorer: string 5 | } 6 | 7 | interface Network { 8 | mainnet: { 9 | l1: Chain 10 | l2: Chain 11 | } 12 | testnet: { 13 | l1: Chain 14 | l2: Chain 15 | } 16 | } 17 | 18 | const chains: { 19 | [name: string]: Chain 20 | } = { 21 | ethereum: { 22 | name: 'Ethereum', 23 | id: 1, 24 | explorer: 'https://etherscan.io', 25 | }, 26 | opmainnet: { 27 | name: 'OP Mainnet', 28 | id: 10, 29 | explorer: 'https://optimistic.etherscan.io', 30 | }, 31 | sepolia: { 32 | name: 'Sepolia', 33 | id: 11155111, 34 | explorer: 'https://sepolia.etherscan.io', 35 | }, 36 | opsepolia: { 37 | name: 'OP Sepolia', 38 | id: 11155420, 39 | explorer: 'https://sepolia-optimistic.etherscan.io/', 40 | }, 41 | } 42 | 43 | const networks: { 44 | [name: string]: Network 45 | } = { 46 | op: { 47 | mainnet: { 48 | l1: chains.ethereum, 49 | l2: chains.opmainnet, 50 | }, 51 | testnet: { 52 | l1: chains.sepolia, 53 | l2: chains.opsepolia, 54 | }, 55 | } 56 | } 57 | 58 | export const network = networks[process.env.DOCS_NETWORK_NAME || 'op'] 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Optimism Docs 2 | 3 | This repo houses the Optimism Docs located at [docs.optimism.io](https://docs.optimism.io/). All documentation-related updates and new content will be tracked and maintained in this repo. 4 | 5 | ## Local Development 6 | 7 | How to [install pnpm](https://pnpm.io/installation) 8 | 9 | First, run `pnpm i` to install the dependencies. 10 | 11 | Then, run `pnpm dev` to start the development server and visit localhost:3000. 12 | 13 | ## Contributions 14 | 15 | Please see the [CONTRIBUTING.md](CONTRIBUTING.md) page for specifics on how to write PRs, use the linter, run spellcheck, add dictionary terms, etc. You should also review the [Optimism Documentation Style Guide](/pages/connect/contribute/style-guide.mdx) for additional guidelines, especially if you are writing entirely brand new pages to the developer docs, as opposed to smaller edits and/or revisions. 16 | 17 | ## Project Board 18 | 19 | You can track documentation [issues](https://github.com/ethereum-optimism/docs/issues) or submit documentation [requests](https://github.com/ethereum-optimism/docs/issues/new/choose) directly from this repo. 20 | 21 | ## License 22 | 23 | This project is licensed under the MIT License. 24 | 25 | -------------------------------------------------------------------------------- /pages/chain/addresses.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contract Addresses 3 | lang: en-US 4 | description: This reference guide lists all the contract addresses for Mainnet and Testnet. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | import { L1ContractTable } from '@/components/L1ContractTable' 9 | import { L2ContractTable } from '@/components/L2ContractTable' 10 | 11 | # Contract Addresses 12 | 13 | This reference guide lists all the contract addresses for Mainnet and Testnet, as found on the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/tree/main). 14 | See the [Smart Contracts Overview](/stack/protocol/smart-contracts) for high-level details and access to the source code. 15 | 16 | 17 | This page is automatically generated from packages in the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/tree/main) which keeps the content synched and up-to-date. 18 | 19 | 20 | ## Mainnet 21 | 22 | ### Ethereum (L1) 23 | 24 | 25 | 26 | ### OP Mainnet (L2) 27 | 28 | 29 | 30 | ## Testnet (Sepolia) 31 | 32 | ### Sepolia (L1) 33 | 34 | 35 | 36 | ### OP Sepolia (L2) 37 | 38 | 39 | -------------------------------------------------------------------------------- /lychee.toml: -------------------------------------------------------------------------------- 1 | ############################# Display ############################# 2 | 3 | # Verbose program output 4 | verbose = "info" 5 | 6 | # Don't show interactive progress bar while checking links. 7 | no_progress = true 8 | 9 | ############################# Requests ############################ 10 | 11 | # URL remapping rules. 12 | remap = [ 13 | "file:///(.*?)/pages/img/(.*) file:///$1/public/img/$2", 14 | "file:///([^#.?]+)(#.*)?$ file:///$1.mdx$2", 15 | "\\\\& &" 16 | ] 17 | 18 | # Base URL or website root directory to check relative URLs. 19 | base = "./pages" 20 | 21 | ############################# Exclusions ########################## 22 | 23 | # Exclude loopback IP address range and localhost from checking. 24 | exclude_loopback = true 25 | 26 | # Exclude all mail addresses from checking. 27 | exclude_mail = true 28 | 29 | # Exclude RPC URLs from checking. 30 | exclude = [ 31 | 'https://mainnet.optimism.io', 32 | 'https://mainnet-sequencer.optimism.io', 33 | 'https://sepolia.optimism.io', 34 | 'https://sepolia-sequencer.optimism.io', 35 | 'https://archive.org', 36 | 'https://web.archive.org', 37 | 'https://mainnet.base.org', 38 | 'https://sepolia.base.org' 39 | ] 40 | 41 | # Accept these status codes 42 | accept = ["100..=103", "200..=299", "403..=403", "502..=502"] 43 | -------------------------------------------------------------------------------- /pages/chain/identity/applications.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Attestation Apps 3 | lang: en-US 4 | description: Learn some of the applications that use attestations. 5 | --- 6 | 7 | # Attestation Apps 8 | 9 | This guide lists some of the applications that use attestations. 10 | 11 | ## Ethereum Attestation Service 12 | 13 | These are some of the applications that use the attestations: 14 | 15 | * [EAS Scan](https://optimism.easscan.org/): This no-code interface lets you build schemas, query, and submit attestations. 16 | * [Citizen Attestations](https://citizen-attestations.xyz/): An attestation explorer for Optimism focusing on attestations that are relevant for the OP Citizens eligibility process. 17 | * [Attest Fest](https://attest-fest.party/): Create multiple EAS attestations using the power of CSV and Safe multisig wallets. It's an attest fest, yay! 18 | * [Optimist Profile](https://app.optimism.io/retropgf-signup): The Optimist Profile allows contributors to share the contributions and impact they've made to the Optimism Collective. 19 | 20 | ## Building with Attestations 21 | 22 | Are you building with attestations? Feel free to add your app to this page using the [attestation GitHub issue template](https://github.com/ethereum-optimism/docs/issues/new?assignees=\&labels=documentation%2Cattestation%2Ccommunity-request\&projects=\&template=suggest_attestation.yaml\&title=%5BATT%5D+Add+PR+title). 23 | -------------------------------------------------------------------------------- /public/tutorials/sdk-stack.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const optimism = require("@eth-optimism/sdk") 4 | const ethers = require("ethers") 5 | 6 | const l1Provider = new ethers.providers.StaticJsonRpcProvider("https://rpc.ankr.com/eth_sepolia") 7 | const l2Provider = new ethers.providers.StaticJsonRpcProvider("https://sepolia.optimism.io") 8 | 9 | const AddressManager = '0x...' 10 | const L1CrossDomainMessenger = '0x...' 11 | const L1StandardBridge = '0x...' 12 | const OptimismPortal = '0x...' 13 | const L2OutputOracle = '0x...' 14 | 15 | const l1ChainId = await l1Provider.getNetwork().then(network => network.chainId) 16 | const l2ChainId = await l2Provider.getNetwork().then(network => network.chainId) 17 | 18 | const messenger = new optimism.CrossChainMessenger({ 19 | l1SignerOrProvider: l1Provider, 20 | l2SignerOrProvider: l2Provider, 21 | l1ChainId, 22 | l2ChainId, 23 | 24 | // This is the only part that differs from natively included chains. 25 | contracts: { 26 | l1: { 27 | AddressManager, 28 | L1CrossDomainMessenger, 29 | L1StandardBridge, 30 | OptimismPortal, 31 | L2OutputOracle, 32 | 33 | // Need to be set to zero for this version of the SDK. 34 | StateCommitmentChain: ethers.constants.AddressZero, 35 | CanonicalTransactionChain: ethers.constants.AddressZero, 36 | BondManager: ethers.constants.AddressZero, 37 | } 38 | } 39 | }) 40 | 41 | })() 42 | -------------------------------------------------------------------------------- /utils/plugins/remark/remark-lint-no-blocked-characters.mjs: -------------------------------------------------------------------------------- 1 | import { visit } from 'unist-util-visit' 2 | import { lintRule } from 'unified-lint-rule' 3 | 4 | /** 5 | * Custom remark lint rule that blocks certain characters (smart quotes, 6 | * invisible spaces, etc.) from being used in the docs. Helps make the docs 7 | * more consistent and avoids characters that might cause issues on certain 8 | * platforms. 9 | */ 10 | const remarkLintNoBlockedCharacters = lintRule( 11 | { 12 | url: 'https://github.com/ethereum-optimism/docs', 13 | origin: 'remark-lint:no-blocked-characters' 14 | }, 15 | (tree, file) => { 16 | visit(tree, 'text', (node) => { 17 | const characterRegex = /[“”‘’ ]/g 18 | const replacements = { 19 | '“': '"', 20 | '”': '"', 21 | '‘': "'", 22 | '’': "'", 23 | ' ': " " 24 | } 25 | 26 | let match 27 | while ((match = characterRegex.exec(node.value)) !== null) { 28 | file.message( 29 | `Blocked character found: (${match[0]}) at index ${match.index}`, 30 | node 31 | ) 32 | 33 | node.value = node.value.substring(0, match.index) + replacements[match[0]] + node.value.substring(match.index + 1) 34 | file.messages[file.messages.length - 1].fix = { 35 | range: [node.position.start.offset, node.position.end.offset], 36 | text: node.value 37 | } 38 | } 39 | }) 40 | } 41 | ) 42 | 43 | export default remarkLintNoBlockedCharacters 44 | -------------------------------------------------------------------------------- /styles/global.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400..700&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400..700&display=swap'); 3 | @import url("colors.css"); 4 | @import url("theme.css"); 5 | 6 | /* Override Nextra so content gets more breathing room */ 7 | .nextra-content h2 ~ p, 8 | .nextra-content h3 ~ p { 9 | margin-top: 1.0rem; 10 | } 11 | 12 | /* Custom div that can contain Nextra images */ 13 | div.md-img p { 14 | height: 100%; 15 | } 16 | div.md-img img { 17 | max-height: 100%; 18 | width: auto; 19 | display: block; 20 | margin: 0 auto; 21 | } 22 | 23 | /* Sidebar links being bold can cause word wrap when selected */ 24 | .nextra-sidebar-container li.active > a { 25 | font-weight: normal; 26 | } 27 | 28 | /* Give sidebar separators a little less room */ 29 | .nextra-sidebar-container li.nx-my-4 { 30 | margin-bottom: 0; 31 | } 32 | 33 | /* Nextra logic for removing footer isn't working right now */ 34 | footer { 35 | display: none; 36 | } 37 | 38 | /* Make shasums actually legible */ 39 | span.shasum { 40 | display: block; 41 | max-width: 300px; 42 | background-color: var(--op-neutral-100) !important; 43 | border-radius: 4px; 44 | padding: 0.5rem; 45 | } 46 | html.dark span.shasum { 47 | background-color: var(--op-neutral-700) !important; 48 | } 49 | span.shasum code { 50 | padding-left: 0; 51 | padding-right: 0; 52 | border: none; 53 | background-color: transparent !important; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/general_docs_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General docs request 3 | about: Template for general documentation requests from the Optimism Collective 4 | title: "[DOCS] Add PR title" 5 | labels: 'community-request,documentation' 6 | 7 | --- 8 | 9 | 10 | 11 | ## Brief Description of the Docs Request 12 | Write a clear and concise description of the docs request. For example, is the request related to an existing page or are you suggesting a brand new docs page? 13 | 14 | ## Description of the Documentation You'd Like 15 | Explain what the final documentation page or pages should look like. Do you need a guide, tutorial, FAQ, troubleshooting page or more than one page? Do you have any source/content information to provide for the requested page(s)? 16 | 17 | ## Links to Related Pages 18 | Provide links to any related content pages for this documentation request. This will help us to determine where the page(s) from your docs request should live 19 | (e.g. a new node operators resource will likely link to other pages in the node operators section of the docs). 20 | 21 | ## Additional Context 22 | Provide any additional context about this documentation request. What problems did you run into that caused you to make this request? 23 | Which existing documentation pages did you already try as a solution to your problem? Why do you think the requested page(s) will be beneficial to developers in the Optimism Collective? 24 | -------------------------------------------------------------------------------- /pages/builders/app-developers/contracts/compatibility.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Solidity Compatibility 3 | lang: en-US 4 | description: Learn about the differences between OP Mainnet and Ethereum when building Solidity contracts. 5 | --- 6 | 7 | # Solidity Compatibility 8 | 9 | OP Mainnet is designed to be [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), which means OP Mainnet looks exactly like Ethereum in every way possible. 10 | Almost all Ethereum tooling works out of the box on OP Mainnet, including the [Solidity](https://soliditylang.org/) smart contract language. 11 | However, there are a few minor differences between OP Mainnet and Ethereum that you should be aware of when building Solidity contracts. 12 | 13 | ## EVM/Opcode Differences 14 | 15 | Most smart contracts will work on OP Mainnet without any changes. 16 | Check out the [Differences Between Ethereum and OP Mainnet](/chain/differences#opcodes) page for a detailed list of the few differences you should know about. 17 | 18 | ## Gas Differences 19 | 20 | OP Mainnet uses the same gas costs as Ethereum. 21 | However, OP Mainnet also charges an [L1 Data Fee](/stack/transactions/fees#l1-data-fee) for the cost of publishing an L2 transaction to L1. 22 | This fee is charged based on the size of a transaction in bytes. 23 | As a result, smart contract optimization techniques can differ slightly on OP Mainnet. 24 | Refer to the [Contract Optimization guide](./optimization) for more information. 25 | -------------------------------------------------------------------------------- /notes/remark.md: -------------------------------------------------------------------------------- 1 | # How the Optimism Docs Use Remark 2 | 3 | The Optimism Docs use [Nextra](https://nextra.site) as a documentation framework which uses [Remark](https://github.com/remarkjs/remark) as a markdown processor under the hood. 4 | This repository also uses [ESLint](https://eslint.org) in combination with [`eslint-plugin-mdx`](https://www.npmjs.com/package/eslint-plugin-mdx) as this plugin also uses Remark under the hood. 5 | Remark is a flexible Markdown processor with a [vibrant plugin ecosystem](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins). 6 | 7 | ## Linting 8 | 9 | ### Adding Rules 10 | 11 | To add a linting rule, simply install your desired linting rule via `pnpm` and add the rule to the [`.remarkrc.mjs`](/.remarkrc.mjs) configuration file at the root of this repository. 12 | You can find a list of rules maintained by the Remark team on the [`remark-lint`](https://github.com/remarkjs/remark-lint#rules) repository. 13 | If you need to write your own custom plugin, place the plugin inside of [`utils/plugins/remark`](/utils/plugins/remark/) 14 | 15 | ### Custom Rules 16 | 17 | #### remarkLintNoBlockedCharacters 18 | 19 | Custom rule to prevent the use of certain characters like zero-width spaces or smartquotes. 20 | 21 | #### remarkLintFrontmatterSchema 22 | 23 | Rule is modified via [patch](/patches/remark-lint-frontmatter-schema@3.15.4.patch) to block MDX files from including no frontmatter at all. 24 | Pending [this issue](https://github.com/JulianCataldo/remark-lint-frontmatter-schema/issues/28) on GitHub. 25 | -------------------------------------------------------------------------------- /public/tutorials/cross-dom-solidity.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const optimism = require("@eth-optimism/sdk") 4 | const ethers = require("ethers") 5 | 6 | const privateKey = process.env.TUTORIAL_PRIVATE_KEY 7 | 8 | const transactionHash = process.env.TUTORIAL_TRANSACTION_HASH 9 | 10 | const l1Provider = new ethers.providers.StaticJsonRpcProvider("https://rpc.ankr.com/eth_sepolia") 11 | const l2Provider = new ethers.providers.StaticJsonRpcProvider("https://sepolia.optimism.io") 12 | const l1Wallet = new ethers.Wallet(privateKey, l1Provider) 13 | const l2Wallet = new ethers.Wallet(privateKey, l2Provider) 14 | 15 | const messenger = new optimism.CrossChainMessenger({ 16 | l1ChainId: 11155111, // 11155111 for Sepolia, 1 for Ethereum 17 | l2ChainId: 11155420, // 11155420 for OP Sepolia, 10 for OP Mainnet 18 | l1SignerOrProvider: l1Wallet, 19 | l2SignerOrProvider: l2Wallet, 20 | }) 21 | 22 | console.log('Waiting for message to be provable...') 23 | await messenger.waitForMessageStatus(transactionHash, optimism.MessageStatus.READY_TO_PROVE) 24 | 25 | console.log('Proving message...') 26 | await messenger.proveMessage(transactionHash) 27 | 28 | console.log('Waiting for message to be relayable...') 29 | await messenger.waitForMessageStatus(transactionHash, optimism.MessageStatus.READY_FOR_RELAY) 30 | 31 | console.log('Relaying message...') 32 | await messenger.finalizeMessage(transactionHash) 33 | 34 | console.log('Waiting for message to be relayed...') 35 | await messenger.waitForMessageStatus(transactionHash, optimism.MessageStatus.RELAYED) 36 | 37 | })() 38 | -------------------------------------------------------------------------------- /pages/chain/identity/overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Identity Overview 3 | lang: en-US 4 | description: Learn about the basics of decentralized identity solutions. 5 | --- 6 | 7 | ## Introduction 8 | 9 | Decentralized identity is an essential component of a more democratic, secure, and accessible web. 10 | 11 | Decentralized identity solutions empower individuals to customize their identity according to their preferences, move it seamlessly across services, and regain control of their personal information from centralized platforms. These solutions are designed to enable users to prove specific attributes about themselves in a trustworthy and verifiable way, without compromising their privacy or security. 12 | 13 | The Optimism Collective is **[building a better economic engine that fuels positive-sum games](https://www.optimism.io/vision)** and decentralized identity is central to that mission. For example, the two-house governance system of the Optimism Collective is composed of token holders and community members who participate in a one-person-one-vote system based on reputation and community contributions. 14 | 15 | In addition to democratic governance, decentralized identity expands the design space for innovation and gives individuals greater control over their finances, and enables them to participate in the global economy on their own terms. 16 | 17 | ## Next Steps 18 | 19 | Attestations serve as a key component in achieving the vision of decentralized identity. For more information, see [Build Decentralized Identity Apps with Attestations](about-attestations). 20 | -------------------------------------------------------------------------------- /pages/builders/node-operators/releases.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Node Software Releases 3 | lang: en-US 4 | description: This page lists required versions of the node software and how to stay up to date. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Node Software Releases 10 | 11 | This page lists required versions of the node software. 12 | 13 | 14 | Our latest releases, notes, and changelogs can be found on GitHub. `op-node` releases can be found [here](https://github.com/ethereum-optimism/optimism/releases) 15 | and `op-geth` releases can be found [here](https://github.com/ethereum-optimism/op-geth/releases). 16 | 17 | 18 | ## Minimum Required Version by Network 19 | 20 | These are the minimal required versions for the `op-node` and `op-geth` by network. It is always 21 | recommended to run the latest stable releases found on the GitHub release pages. 22 | 23 | | Network | op-node | op-geth | 24 | | ---------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | 25 | | OP Mainnet | [v1.7.3](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.3) | [v1.101311.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101311.0) | 26 | | OP Sepolia | [v1.7.3](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.3) | [v1.101311.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101311.0) | 27 | -------------------------------------------------------------------------------- /public/tutorials/cross-dom-solidity.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | 4 | interface ICrossDomainMessenger { 5 | function xDomainMessageSender() external view returns (address); 6 | function sendMessage( 7 | address _target, 8 | bytes calldata _message, 9 | uint32 _gasLimit 10 | ) external; 11 | } 12 | 13 | contract Greeter { 14 | ICrossDomainMessenger public immutable MESSENGER; 15 | Greeter public immutable OTHER_GREETER; 16 | mapping (address => string) public greetings; 17 | 18 | constructor( 19 | ICrossDomainMessenger _messenger, 20 | Greeter _otherGreeter 21 | ) { 22 | MESSENGER = _messenger; 23 | OTHER_GREETER = _otherGreeter; 24 | } 25 | 26 | function sendGreeting(string memory _greeting) public { 27 | MESSENGER.sendMessage( 28 | address(OTHER_GREETER), 29 | abi.encodeCall( 30 | this.setGreeting, 31 | ( 32 | msg.sender, 33 | _greeting 34 | ) 35 | ), 36 | 200000 37 | ); 38 | } 39 | 40 | function setGreeting(address _sender, string memory _greeting) public { 41 | require( 42 | msg.sender == address(MESSENGER), 43 | "Greeter: Direct sender must be the CrossDomainMessenger" 44 | ); 45 | 46 | require( 47 | MESSENGER.xDomainMessageSender() == address(OTHER_GREETER), 48 | "Greeter: Remote sender must be the other Greeter contract" 49 | ); 50 | 51 | greetings[_sender] = _greeting; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /.github/workflows/links.yml: -------------------------------------------------------------------------------- 1 | name: Check Links 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build-and-run-lychee: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout ethereum-optimism/docs 15 | uses: actions/checkout@v2 16 | with: 17 | repository: 'ethereum-optimism/docs' 18 | path: 'docs' 19 | 20 | - name: Checkout lycheeverse/lychee 21 | uses: actions/checkout@v2 22 | with: 23 | repository: 'lycheeverse/lychee' 24 | path: 'lychee' 25 | 26 | - name: Set up Rust 27 | uses: actions-rs/toolchain@v1 28 | with: 29 | toolchain: stable 30 | profile: minimal 31 | 32 | - name: Cache Rust dependencies 33 | uses: Swatinem/rust-cache@v2 34 | with: 35 | save-if: ${{ github.ref == 'refs/heads/main' }} 36 | 37 | - name: Build Lychee 38 | run: | 39 | cd lychee 40 | cargo build --release 41 | 42 | - name: Add Lychee to PATH 43 | run: echo "$GITHUB_WORKSPACE/lychee/target/release" >> $GITHUB_PATH 44 | 45 | - name: Run Lychee 46 | run: | 47 | cd docs 48 | lychee --config ./lychee.toml --quiet "./pages" 49 | 50 | - name: Notify Slack on failure 51 | uses: ravsamhq/notify-slack-action@v2 52 | if: always() 53 | with: 54 | status: ${{ job.status }} 55 | notify_when: "failure" 56 | notification_title: "{workflow} has {status_message} (<{run_url}|view errors>)" 57 | message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>" 58 | footer: "<{run_url}|View Run>" 59 | mention_users_when: "failure,warnings" 60 | env: 61 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 62 | -------------------------------------------------------------------------------- /public/tutorials/sdk-estimate-costs.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const optimism = require("@eth-optimism/sdk") 4 | const ethers = require("ethers") 5 | 6 | const privateKey = process.env.TUTORIAL_PRIVATE_KEY 7 | 8 | const provider = optimism.asL2Provider(new ethers.providers.StaticJsonRpcProvider("https://sepolia.optimism.io")) 9 | const wallet = new ethers.Wallet(privateKey, provider) 10 | 11 | const tx = await wallet.populateTransaction({ 12 | to: '0x1000000000000000000000000000000000000000', 13 | value: ethers.utils.parseEther('0.00069420'), 14 | gasPrice: await provider.getGasPrice(), 15 | }) 16 | 17 | console.log('Estimating L2 cost...') 18 | const gasLimit = tx.gasLimit 19 | const gasPrice = tx.maxFeePerGas 20 | const l2CostEstimate = gasLimit.mul(gasPrice) 21 | console.log(ethers.utils.formatEther(l2CostEstimate)) 22 | 23 | console.log('Estimating L1 cost...') 24 | const l1CostEstimate = await provider.estimateL1GasCost(tx) 25 | console.log(ethers.utils.formatEther(l1CostEstimate)) 26 | 27 | console.log('Summing total cost...') 28 | const totalSum = l2CostEstimate.add(l1CostEstimate) 29 | console.log(ethers.utils.formatEther(totalSum)) 30 | 31 | console.log('Sending transaction...') 32 | const res = await wallet.sendTransaction(tx) 33 | const receipt = await res.wait() 34 | console.log(receipt.transactionHash) 35 | 36 | console.log('Actual L2 cost:') 37 | const l2CostActual = receipt.gasUsed.mul(receipt.effectiveGasPrice) 38 | console.log(ethers.utils.formatEther(l2CostActual)) 39 | 40 | console.log('Actual L1 cost:') 41 | const l1CostActual = receipt.l1Fee 42 | console.log(ethers.utils.formatEther(l1CostActual)) 43 | 44 | console.log('Actual total cost:') 45 | const totalActual = l2CostActual.add(l1CostActual) 46 | console.log(ethers.utils.formatEther(totalActual)) 47 | 48 | console.log('Difference:') 49 | const difference = totalActual.sub(totalSum).abs() 50 | console.log(ethers.utils.formatEther(difference)) 51 | 52 | })() 53 | -------------------------------------------------------------------------------- /utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const PREDEPLOYS = { 2 | 'L2ToL1MessagePasser': '0x4200000000000000000000000000000000000016', 3 | 'L2CrossDomainMessenger': '0x4200000000000000000000000000000000000007', 4 | 'L2StandardBridge': '0x4200000000000000000000000000000000000010', 5 | 'L2ERC721Bridge': '0x4200000000000000000000000000000000000014', 6 | 'SequencerFeeVault': '0x4200000000000000000000000000000000000011', 7 | 'OptimismMintableERC20Factory': '0x4200000000000000000000000000000000000012', 8 | 'OptimismMintableERC721Factory': '0x4200000000000000000000000000000000000017', 9 | 'L1Block': '0x4200000000000000000000000000000000000015', 10 | 'GasPriceOracle': '0x420000000000000000000000000000000000000F', 11 | 'L1MessageSender': '0x4200000000000000000000000000000000000001', 12 | 'DeployerWhitelist': '0x4200000000000000000000000000000000000002', 13 | 'LegacyERC20ETH': '0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000', 14 | 'L1BlockNumber': '0x4200000000000000000000000000000000000013', 15 | 'LegacyMessagePasser': '0x4200000000000000000000000000000000000000', 16 | 'ProxyAdmin': '0x4200000000000000000000000000000000000018', 17 | 'BaseFeeVault': '0x4200000000000000000000000000000000000019', 18 | 'L1FeeVault': '0x420000000000000000000000000000000000001A', 19 | 'GovernanceToken': '0x4200000000000000000000000000000000000042', 20 | 'SchemaRegistry': '0x4200000000000000000000000000000000000020', 21 | 'EAS': '0x4200000000000000000000000000000000000021' 22 | } 23 | 24 | export const CHAIN_CONSTANTS = { 25 | 1: { 26 | explorer: 'https://etherscan.io', 27 | }, 28 | 5: { 29 | explorer: 'https://goerli.etherscan.io', 30 | }, 31 | 10: { 32 | explorer: 'https://optimistic.etherscan.io', 33 | }, 34 | 420: { 35 | explorer: 'https://goerli-optimism.etherscan.io', 36 | }, 37 | 11155111: { 38 | explorer: 'https://sepolia.etherscan.io', 39 | }, 40 | 11155420: { 41 | explorer: 'https://sepolia-optimism.etherscan.io', 42 | }, 43 | } 44 | -------------------------------------------------------------------------------- /pages/builders/app-developers/bridging/basics.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bridging Basics 3 | lang: en-US 4 | description: Learn about the fundamentals of sending data and tokens between Ethereum and OP Mainnet. 5 | --- 6 | 7 | # Bridging Basics 8 | 9 | OP Mainnet is a "Layer 2" system and is fundamentally connected to Ethereum. 10 | However, OP Mainnet is also a distinct blockchain with its own blocks and transactions. 11 | App developers commonly need to move data and tokens between OP Mainnet and Ethereum. 12 | This process of moving data and tokens between the two networks is called "bridging". 13 | 14 | ## Sending Tokens 15 | 16 | One of the most common use cases for bridging is the need to send ETH or ERC-20 tokens between OP Mainnet and Ethereum. 17 | OP Mainnet has a system called the [Standard Bridge](./standard-bridge) that makes it easy to move tokens in both directions. 18 | If you mostly need to bridge tokens, make sure to check out the [Standard Bridge](./standard-bridge) guide. 19 | 20 | ## Sending Data 21 | 22 | Under the hood, the Standard Bridge is just an application that uses the OP Mainnet [message passing system to send arbitrary data between Ethereum and OP Mainnet](./messaging). 23 | Applications can use this system to have a contract on Ethereum interact with a contract on OP Mainnet, and vice versa. 24 | All of this is easily accessible with a simple, clean API. 25 | 26 | ## Next Steps 27 | 28 | Ready to start bridging? 29 | Check out these tutorials to get up to speed fast. 30 | 31 | * [Learn how to bridge ERC-20 tokens with the Optimism SDK](/builders/app-developers/tutorials/cross-dom-bridge-erc20) 32 | * [Learn how to bridge ETH with the Optimism SDK](/builders/app-developers/tutorials/cross-dom-bridge-eth) 33 | * [Learn how to create a standard bridged token](/builders/app-developers/tutorials/standard-bridge-standard-token) 34 | * [Learn how to create a custom bridged token](/builders/app-developers/tutorials/standard-bridge-custom-token) 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_faq_item.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest an FAQ item 2 | description: Suggest a FAQ question+answer to help developers when building with Optimism 3 | title: "[FAQ] Add PR title" 4 | labels: ["documentation,faq,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before submitting this suggestion, be sure to read our expectations for [FAQ content](https://docs.optimism.io/contribute/style-guide#faqs).
For an example FAQ guide with question+answer pairs, see [Security Model FAQ](https://docs.optimism.io/security/faq#security-model-faq). 10 | - type: markdown 11 | id: project_info 12 | attributes: 13 | value: "## Project Info" 14 | - type: dropdown 15 | id: faq_category 16 | attributes: 17 | label: FAQ Category 18 | description: let us know if you plan to add a new FAQ item (question + answer) or revise an existing item 19 | options: 20 | - "Add faq item to an existing page" 21 | - "Add faq item to a brand new page" 22 | - "Revise an existing faq item" 23 | validations: 24 | required: true 25 | - type: input 26 | id: faq_where_should_it_live 27 | attributes: 28 | label: What page will this FAQ item live? 29 | description: list the page where the FAQ (question + answer) would be most relevant on docs.optimism.io 30 | validations: 31 | required: true 32 | - type: textarea 33 | id: faq_problem 34 | attributes: 35 | label: write the question from a developer's perspective 36 | validations: 37 | required: true 38 | - type: textarea 39 | id: faq_solution 40 | attributes: 41 | label: answer the question identified above as best as possible 42 | validations: 43 | required: true 44 | - type: textarea 45 | id: faq_additional_context 46 | attributes: 47 | label: Additional context 48 | description: Add any additional info or context for the FAQ here 49 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/management/key-management.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Key Management 3 | lang: en-US 4 | description: A guide for chain operators on managing private keys on their chain, covering hot and cold wallets, and the use of a HSM. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Managing Your Keys 10 | 11 | This guide informs chain operators on important key management considerations. 12 | There are certain [privileged roles](/chain/security/privileged-roles) that 13 | need careful consideration. The privileged roles are categorized as hot wallets 14 | or cold wallets. 15 | 16 | ## Hot Wallets 17 | 18 | The addresses for the `Batcher` and the `Proposer` need to have their private 19 | keys online somewhere for a component of the system to work. If these addresses 20 | are compromised, the system can be exploited. 21 | 22 | It is up to the chain operator to make the decision on how they want to manage 23 | these keys. One suggestion is to use a Hardware Security Module (HSM) to provide 24 | a safer environment for key management. Cloud providers often times provide 25 | Key Management Systems (KMS) that can work with your developer operations 26 | configurations. This can be used in conjunction with the `eth_signTransaction` 27 | RPC method. 28 | 29 | 30 | You can take a look at the signer client [source code](https://github.com/ethereum-optimism/optimism/blob/develop/op-service/signer/client.go) 31 | if you're interested in whats happening under the hood. 32 | 33 | 34 | ## Cold Wallets 35 | 36 | The addresses for the cold wallets cannot be used without human intervention. 37 | These can be setup as multisig contracts, so they can be controlled by groups 38 | of community members and avoid a single point of failure. 39 | 40 | 41 | Refer to the [privileged roles](/chain/security/privileged-roles) documentation 42 | for more information about these different addresses and their security concerns. 43 | 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_attestation.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest an attestation app 2 | description: Suggest an attestation app for developers to use when building with Optimism 3 | title: "[ATT] Add PR title" 4 | labels: ["documentation,attestation,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before submitting this suggestion, be sure to read the [listing of current attestation apps](https://docs.optimism.io/identity/applications). 10 | - type: markdown 11 | id: project_info 12 | attributes: 13 | value: "## Project Info" 14 | - type: input 15 | id: att_name 16 | attributes: 17 | label: Attestation App Name 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: att_description 22 | attributes: 23 | label: Attestation App Description 24 | validations: 25 | required: true 26 | - type: input 27 | id: att_URL 28 | attributes: 29 | label: Attestation App URL 30 | description: Please provide the URL for us to link in the project description above. 31 | validations: 32 | required: true 33 | - type: input 34 | id: att_live_date 35 | attributes: 36 | label: When did the product go live? 37 | description: We prioritize products that are battle-tested. 38 | validations: 39 | required: true 40 | - type: dropdown 41 | id: att_open_source 42 | attributes: 43 | label: Is the product open source? 44 | description: We prioritize open source projects when possible. 45 | options: 46 | - "Yes" 47 | - "No" 48 | validations: 49 | required: true 50 | - type: input 51 | id: att_github 52 | attributes: 53 | label: GitHub URL 54 | description: If the project is open source, please provide a link to the product's repo. 55 | - type: textarea 56 | id: att_additional_context 57 | attributes: 58 | label: Additional context 59 | description: Add any other context or screenshots about the product here. 60 | -------------------------------------------------------------------------------- /public/tutorials/send-tx-from-eth.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const contracts = require("@eth-optimism/contracts-ts") 4 | const utils = require("@eth-optimism/core-utils") 5 | const ethers = require("ethers") 6 | 7 | const privateKey = process.env.TUTORIAL_PRIVATE_KEY 8 | 9 | const l1Provider = new ethers.providers.StaticJsonRpcProvider("https://rpc.ankr.com/eth_sepolia") 10 | const l2Provider = new ethers.providers.StaticJsonRpcProvider("https://sepolia.optimism.io") 11 | const l1Wallet = new ethers.Wallet(privateKey, l1Provider) 12 | const l2Wallet = new ethers.Wallet(privateKey, l2Provider) 13 | 14 | console.log('Initial balance:') 15 | const initialBalance = await l2Wallet.getBalance() 16 | console.log(ethers.utils.formatEther(initialBalance)) 17 | 18 | const OptimismPortal = new ethers.Contract( 19 | '0x16Fc5058F25648194471939df75CF27A2fdC48BC', 20 | contracts.optimismPortalABI, 21 | l1Wallet, 22 | ) 23 | 24 | console.log('Estimating L1 transaction gas...') 25 | const gas = await OptimismPortal.estimateGas.depositTransaction( 26 | '0x1000000000000000000000000000000000000000', // _to 27 | ethers.utils.parseEther('0.000069420'), // _value 28 | 1e6, // _gasLimit 29 | false, // _isCreation 30 | '0x', // _data 31 | ) 32 | 33 | console.log('Sending L1 transaction...') 34 | const tx = await OptimismPortal.depositTransaction( 35 | '0x1000000000000000000000000000000000000000', // _to 36 | ethers.utils.parseEther('0.000069420'), // _value 37 | 1e6, // _gasLimit 38 | false, // _isCreation 39 | '0x', // _data 40 | { 41 | gasLimit: gas.mul(120).div(100) // Add 20% buffer 42 | } 43 | ) 44 | 45 | console.log('Waiting for L1 transaction...') 46 | const receipt = await tx.wait() 47 | 48 | console.log('Waiting for L2 transaction to be relayed...') 49 | const deposit = utils.DepositTx.fromL1Receipt(receipt, 0) 50 | await l2Provider.waitForTransaction(deposit.hash()) 51 | 52 | console.log('Final balance:') 53 | const finalBalance = await l2Wallet.getBalance() 54 | console.log(ethers.utils.formatEther(finalBalance)) 55 | 56 | console.log('Difference:') 57 | const difference = initialBalance.sub(finalBalance) 58 | console.log(ethers.utils.formatEther(difference)) 59 | 60 | })() 61 | -------------------------------------------------------------------------------- /public/tutorials/sdk-view-txns.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const optimism = require("@eth-optimism/sdk") 4 | const ethers = require("ethers") 5 | 6 | // Need to use Alchemy or something here because the getDepositsByAddress and 7 | // getWithdrawalsByAddress functions use a large block range that the public RPC doesn't support 8 | // because it uses Ankr. Maybe the SDK should be updated to use smaller block ranges depending 9 | // on the RPC but that's a separate issue. 10 | const l1RpcUrl = process.env.L1_RPC_URL 11 | const l2RpcUrl = process.env.L2_RPC_URL 12 | 13 | // Docs CI wallet, will have deposits and withdrawals. 14 | const address = '0x5A07785F07D8ba8a9e5323181fBDab51FE9a36c3' 15 | 16 | const l1Provider = new ethers.providers.StaticJsonRpcProvider(l1RpcUrl) 17 | const l2Provider = new ethers.providers.StaticJsonRpcProvider(l2RpcUrl) 18 | 19 | const messenger = new optimism.CrossChainMessenger({ 20 | l1ChainId: 11155111, // 11155111 for Sepolia, 1 for Ethereum 21 | l2ChainId: 11155420, // 11155420 for OP Sepolia, 10 for OP Mainnet 22 | l1SignerOrProvider: l1Provider, 23 | l2SignerOrProvider: l2Provider, 24 | }) 25 | 26 | console.log('Grabbing deposits...') 27 | const deposits = await messenger.getDepositsByAddress(address) 28 | 29 | console.log('Grabbed deposits:') 30 | for (const deposit of deposits) { 31 | console.log('----------------------------------------------------') 32 | console.log('From: ', deposit.from) 33 | console.log('To: ', deposit.to) 34 | console.log('L1 Token:', deposit.l1Token) 35 | console.log('L2 Token:', deposit.l2Token) 36 | console.log('Amount: ', deposit.amount.toString()) 37 | } 38 | 39 | console.log('Grabbing withdrawals...') 40 | const withdrawals = await messenger.getWithdrawalsByAddress(address) 41 | 42 | console.log('Grabbed withdrawals:') 43 | for (const withdrawal of withdrawals) { 44 | console.log('----------------------------------------------------') 45 | console.log('From: ', withdrawal.from) 46 | console.log('To: ', withdrawal.to) 47 | console.log('L1 Token:', withdrawal.l1Token) 48 | console.log('L2 Token:', withdrawal.l2Token) 49 | console.log('Amount: ', withdrawal.amount.toString()) 50 | } 51 | 52 | })() 53 | -------------------------------------------------------------------------------- /public/tutorials/sdk-trace-txns.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const optimism = require("@eth-optimism/sdk") 4 | const ethers = require("ethers") 5 | 6 | // Need to use Alchemy or something here because the getDepositsByAddress and 7 | // getWithdrawalsByAddress functions use a large block range that the public RPC doesn't support 8 | // because it uses Ankr. Maybe the SDK should be updated to use smaller block ranges depending 9 | // on the RPC but that's a separate issue. 10 | const l1RpcUrl = process.env.L1_RPC_URL 11 | const l2RpcUrl = process.env.L2_RPC_URL 12 | 13 | // Docs CI wallet, will have deposits and withdrawals. 14 | const deposit = '0x5896d6e4a47b465e0d925723bab838c62ef53468139a5e9ba501efd70f90cccb' 15 | const withdrawal = '0x18b8b4022b8d9e380fd89417a2e897adadf31e4f41ca17442870bf89ad024f42' 16 | 17 | const l1Provider = new ethers.providers.StaticJsonRpcProvider(l1RpcUrl) 18 | const l2Provider = new ethers.providers.StaticJsonRpcProvider(l2RpcUrl) 19 | 20 | const messenger = new optimism.CrossChainMessenger({ 21 | l1ChainId: 11155111, // 11155111 for Sepolia, 1 for Ethereum 22 | l2ChainId: 11155420, // 11155420 for OP Sepolia, 10 for OP Mainnet 23 | l1SignerOrProvider: l1Provider, 24 | l2SignerOrProvider: l2Provider, 25 | }) 26 | 27 | console.log('Grabbing deposit status...') 28 | const depositStatus = await messenger.getMessageStatus(deposit) 29 | console.log(depositStatus) 30 | 31 | console.log('Grabbing deposit receipt...') 32 | const depositReceipt = await messenger.getMessageReceipt(deposit) 33 | console.log(depositReceipt) 34 | 35 | console.log('Grabbing deposit txn...') 36 | const depositTx = await l2Provider.getTransaction(depositReceipt.transactionReceipt.transactionHash) 37 | console.log(depositTx) 38 | 39 | console.log('Grabbing withdrawal status...') 40 | const withdrawalStatus = await messenger.getMessageStatus(withdrawal) 41 | console.log(withdrawalStatus) 42 | 43 | console.log('Grabbing withdrawal receipt...') 44 | const withdrawalReceipt = await messenger.getMessageReceipt(withdrawal) 45 | console.log(withdrawalReceipt) 46 | 47 | console.log('Grabbing withdrawal txn...') 48 | const withdrawalTx = await l1Provider.getTransaction(withdrawalReceipt.transactionReceipt.transactionHash) 49 | console.log(withdrawalTx) 50 | 51 | })() 52 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_glossary_term.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest a glossary term 2 | description: Suggest a new optimism.io glossary term 3 | title: "[GLOSSARY] Add PR title" 4 | labels: ["glossary,documentation,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before suggesting a new glossary term or glossary term update, make sure you've read [glossary page](https://docs.optimism.io/resources/glossary). 10 | - type: markdown 11 | attributes: 12 | value: | 13 | If you still think a new term or update is needed, complete the following information which we need to accurately update the glossary page. 14 | - type: checkboxes 15 | id: glossary_checklist 16 | attributes: 17 | label: Checklist 18 | options: 19 | - label: This is a term not already found in the glossary (for similar terms, please consider the benefits of a new term vs updating an existing term) 20 | required: true 21 | - label: This term/definition is not a product advertisement or contain other promotional content 22 | required: true 23 | - label: This term/definition is directly relevant to Optimism 24 | required: true 25 | validations: 26 | required: true 27 | - type: input 28 | id: glossary_term_name 29 | attributes: 30 | label: Term name 31 | validations: 32 | required: true 33 | - type: textarea 34 | id: glossary_term_definition 35 | attributes: 36 | label: Term definition 37 | validations: 38 | required: true 39 | - type: textarea 40 | id: glossary_term_sources 41 | attributes: 42 | label: Sources, if any (please do not submit copywrited content without appropriate approval) 43 | description: Please list any sources utilized 44 | validations: 45 | required: false 46 | - type: textarea 47 | id: glossary_terms_optimismdotio_links 48 | attributes: 49 | label: Optimism.io links 50 | description: If appropriate/available, please suggest an internal optimism.io link that would expand someones learning of this term 51 | - type: textarea 52 | id: glossary_term_additional_context 53 | attributes: 54 | label: Additional context 55 | description: Add any other context or screenshots about the feature request here 56 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_troubleshooting_item.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest a troubleshooting item 2 | description: Suggest a troubleshooting problem+solution to help developers when building with Optimism 3 | title: "[TROUBLESHOOTING] Add PR title" 4 | labels: ["documentation,troubleshooting,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before submitting this suggestion, be sure to read our expectations for [troubleshooting content](https://docs.optimism.io/contribute/style-guide#troubleshooting-guides).
For an example troubleshooting guide with problem+solution pairs, see [Troubleshooting: L2 Rollup](https://docs.optimism.io/builders/chain-operators/management/troubleshooting). 10 | - type: markdown 11 | id: project_info 12 | attributes: 13 | value: "## Project Info" 14 | - type: dropdown 15 | id: troubleshooting_category 16 | attributes: 17 | label: Troubleshooting Category 18 | description: let us know if you plan to add a new troubleshooting item (problem + solution) or revise an existing item 19 | options: 20 | - "Add troubleshooting item to an existing page" 21 | - "Add troubleshooting item to a brand new page" 22 | - "Revise an existing troubleshooting item" 23 | validations: 24 | required: true 25 | - type: input 26 | id: troubleshooting_where_should_it_live 27 | attributes: 28 | label: What page will this troubleshooting item live? 29 | description: list the page where the troubleshooting (problem + solution) would be most relevant on docs.optimism.io 30 | validations: 31 | required: true 32 | - type: textarea 33 | id: troubleshooting_problem 34 | attributes: 35 | label: describe the problem from a developer's perspective, including any error message received 36 | validations: 37 | required: true 38 | - type: textarea 39 | id: troubleshooting_solution 40 | attributes: 41 | label: explain the solution to the problem identified above, use step-by-step instructions when possible 42 | validations: 43 | required: true 44 | - type: textarea 45 | id: troubleshooting_additional_context 46 | attributes: 47 | label: Additional context 48 | description: Add additional context or screenshots of the reported troubleshooting problem here 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "op-docs", 3 | "version": "0.0.1", 4 | "description": "Optimism Docs", 5 | "scripts": { 6 | "lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint", 7 | "fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix", 8 | "spellcheck:lint": "cspell lint \"**/*.mdx\"", 9 | "spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt", 10 | "linkcheck": "lychee --config ./lychee.toml --quiet \"./pages\"", 11 | "dev": "next dev", 12 | "build": "next build", 13 | "start": "next start", 14 | "postbuild": "next-sitemap" 15 | }, 16 | "dependencies": { 17 | "@eth-optimism/contracts-ts": "^0.17.0", 18 | "@eth-optimism/tokenlist": "^9.0.9", 19 | "@feelback/react": "^0.3.4", 20 | "next": "13.5.1", 21 | "next-sitemap": "^4.2.3", 22 | "nextra": "2.13.2", 23 | "nextra-theme-docs": "2.13.2", 24 | "react": "^18.2.0", 25 | "react-dom": "^18.2.0", 26 | "superchain-registry": "github:ethereum-optimism/superchain-registry#main" 27 | }, 28 | "devDependencies": { 29 | "@double-great/remark-lint-alt-text": "^1.0.0", 30 | "@eth-optimism/core-utils": "^0.13.1", 31 | "@eth-optimism/sdk": "^3.1.6", 32 | "@types/node": "18.11.10", 33 | "cspell": "^8.1.3", 34 | "eslint": "^8.53.0", 35 | "eslint-plugin-mdx": "^2.2.0", 36 | "ethers": "^5", 37 | "remark": "^15.0.1", 38 | "remark-code-import": "^1.2.0", 39 | "remark-frontmatter": "^5.0.0", 40 | "remark-gfm": "^3.0.1", 41 | "remark-lint-frontmatter-schema": "^3.15.4", 42 | "remark-lint-heading-style": "^3.1.2", 43 | "remark-lint-list-item-indent": "^3.1.2", 44 | "remark-lint-table-cell-padding": "^4.1.3", 45 | "remark-lint-table-pipe-alignment": "^3.1.3", 46 | "remark-lint-table-pipes": "^4.1.2", 47 | "remark-lint-unordered-list-marker-style": "^3.1.2", 48 | "remark-preset-lint-consistent": "^5.1.2", 49 | "remark-preset-lint-recommended": "^6.1.3", 50 | "typescript": "^5.2.2", 51 | "unified-lint-rule": "^2.1.2", 52 | "unist-util-visit": "^5.0.0" 53 | }, 54 | "pnpm": { 55 | "patchedDependencies": { 56 | "remark-lint-frontmatter-schema@3.15.4": "patches/remark-lint-frontmatter-schema@3.15.4.patch", 57 | "remark-code-import@1.2.0": "patches/remark-code-import@1.2.0.patch", 58 | "nextra@2.13.2": "patches/nextra@2.13.2.patch" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /public/img/icons/500-page.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/tools/explorer.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Block Explorer 3 | lang: en-US 4 | description: Learn how to deploy a Blockscout block explorer for your OP Stack chain. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Deploying a Block Explorer 10 | 11 | [Blockscout](https://www.blockscout.com/) is an open source block explorer that supports OP Stack chains. 12 | Keep reading for a quick overview on how to deploy Blockscout for your OP Stack chain. 13 | 14 | 15 | Check out the [Blockscout documentation](https://docs.blockscout.com) for up-to-date information on how to deploy and maintain a Blockscout instance. 16 | 17 | 18 | ## Dependencies 19 | 20 | * [Docker](https://docs.docker.com/get-docker/) 21 | 22 | ## Create an Archive Node 23 | 24 | Blockscout needs access to an [archive node](https://www.alchemy.com/overviews/archive-nodes#archive-nodes) for your OP Stack chain to properly index transactions, blocks, and internal interactions. 25 | If using `op-geth`, you can run a node in archive mode with the `--gcmode=archive` flag. 26 | 27 | 28 | Archive nodes take up significantly more disk space than full nodes. 29 | You may need to have 2-4 terabytes of disk space available (ideally SSD) if you intend to run an archive node for a production OP Stack chain. 30 | 1-200 gigabytes of disk space may be sufficient for a development chain. 31 | 32 | 33 | ## Installation 34 | 35 | Blockscout can be started from its source code on GitHub. 36 | 37 | ```sh 38 | git clone https://github.com/blockscout/blockscout.git -b production-optimism 39 | cd blockscout/docker-compose 40 | ``` 41 | 42 | ## Configuration 43 | 44 | Review the configuration files within the `envs` directory and make any necessary changes. 45 | In particular, make sure to review `envs/common-blockscout.env` and `envs/common-frontend.env`. 46 | 47 | ## Starting Blockscout 48 | 49 | Start Blockscout with the following command: 50 | 51 | ```sh 52 | DOCKER_REPO=blockscout-optimism docker compose -f geth.yml up 53 | ``` 54 | 55 | ## Usage 56 | 57 | ### Explorer 58 | 59 | After Blockscout is started, browse to [http://localhost](http://localhost) to view the user interface. 60 | Note that this URL may differ if you have changed the Blockscout configuration. 61 | 62 | ### API 63 | 64 | Blockscout provides both a REST API and a GraphQL API. 65 | Refer to the [API documentation](https://docs.blockscout.com/for-users/api) for more information. 66 | -------------------------------------------------------------------------------- /pages/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": { 3 | "title": "Getting Started", 4 | "display": "hidden", 5 | "theme": { 6 | "breadcrumb": false, 7 | "footer": true, 8 | "sidebar": true, 9 | "toc": true, 10 | "pagination": false 11 | } 12 | }, 13 | 14 | "404": { 15 | "title": "404", 16 | "display": "hidden", 17 | "theme": { 18 | "layout": "full", 19 | "breadcrumb": false, 20 | "footer": true, 21 | "sidebar": true, 22 | "toc": false, 23 | "pagination": false 24 | } 25 | }, 26 | 27 | "500": { 28 | "title": "500", 29 | "display": "hidden", 30 | "theme": { 31 | "layout": "full", 32 | "breadcrumb": false, 33 | "footer": true, 34 | "sidebar": true, 35 | "toc": false, 36 | "pagination": false 37 | } 38 | }, 39 | 40 | "faucet": { 41 | "title": "Superchain Faucet", 42 | "type": "page", 43 | "href": "https://app.optimism.io/faucet?utm_source=docs", 44 | "newWindow": true 45 | }, 46 | "gas": { 47 | "title": "Gas Tracker", 48 | "type": "page", 49 | "href": "https://optimistic.grafana.net/public-dashboards/c84a5a9924fe4e14b270a42a8651ceb8?orgId=1&refresh=5m", 50 | "newWindow": true 51 | }, 52 | "status": { 53 | "title": "Status", 54 | "type": "page", 55 | "href": "https://status.optimism.io/", 56 | "newWindow": true 57 | }, 58 | 59 | "--- BUILDERS": { 60 | "title": "BUILDERS", 61 | "type": "separator" 62 | }, 63 | "builders": { 64 | "title": "Builders", 65 | "display": "children" 66 | }, 67 | 68 | "+++ OP MAINNET": { 69 | "title": "", 70 | "type": "separator" 71 | }, 72 | "--- OP MAINNET": { 73 | "title": "OP MAINNET", 74 | "type": "separator" 75 | }, 76 | "chain": { 77 | "title": "OP Mainnet", 78 | "display": "children" 79 | }, 80 | 81 | "+++ OP STACK": { 82 | "title": "", 83 | "type": "separator" 84 | }, 85 | "--- OP STACK": { 86 | "title": "OP STACK", 87 | "type": "separator" 88 | }, 89 | "stack": { 90 | "title": "OP Stack", 91 | "display": "children" 92 | }, 93 | 94 | "+++ CONNECT": { 95 | "title": "", 96 | "type": "separator" 97 | }, 98 | "--- CONNECT": { 99 | "title": "CONNECT", 100 | "type": "separator" 101 | }, 102 | "connect": { 103 | "title": "Connect", 104 | "display": "children" 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/hacks/featured-hacks.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Featured Hacks 3 | lang: en-US 4 | description: Learn about some of the customizations stack developers have made for an OP Stack chain. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Featured Hacks 10 | 11 | 12 | OP Stack Hacks are explicitly things that you can do with the OP Stack that are *not* currently intended for production use. 13 | 14 | OP Stack Hacks are not for the faint of heart. You will not be able to receive significant developer support for OP Stack Hacks — be prepared to get your hands dirty and to work without support. 15 | 16 | 17 | ## Overview 18 | 19 | Featured Hacks is a compilation of some of the cool stuff people are building on top of the OP Stack! 20 | 21 | ## OPCraft 22 | 23 | ### Author 24 | 25 | [Lattice](https://lattice.xyz/) 26 | 27 | ### Description 28 | 29 | OPCraft was an OP Stack chain that ran a modified EVM as the backend for a fully onchain 3D voxel game built with [MUD](https://mud.dev/). 30 | 31 | ### OP Stack Configuration 32 | 33 | * Data Availability: Ethereum DA (Goerli) 34 | * Sequencer: Single Sequencer 35 | * Derivation: Standard Rollup 36 | * Execution: Modified Rollup EVM 37 | 38 | ### Links 39 | 40 | * [Announcing OPCraft: an Autonomous World built on the OP Stack](https://web.archive.org/web/20231004175307/https://blog.oplabs.co/opcraft-autonomous-world//) 41 | * [OPCraft Explorer](https://opcraft.mud.dev/) 42 | * [OPCraft on GitHub](https://github.com/latticexyz/opcraft) 43 | * [MUD](https://mud.dev/) 44 | 45 | ## Ticking Optimism 46 | 47 | ### Author 48 | 49 | [@therealbytes](https://twitter.com/therealbytes) 50 | 51 | ### Description 52 | 53 | Ticking Optimism is a proof-of-concept implementation of an OP Stack chain that calls a `tick` function every block. By using the OP Stack, Ticking Optimism avoids the need for off-chain infrastructure to execute a function on a regular basis. Ticking Conway is a system that uses Ticking Optimism to build [Conway's Game of Life](https://conwaylife.com/) onchain. 54 | 55 | ### OP Stack Configuration 56 | 57 | * Data Availability: Ethereum DA (any) 58 | * Sequencer: Single Sequencer 59 | * Derivation: Standard Rollup with custom `tick` function 60 | * Execution: Rollup EVM 61 | 62 | ### Links 63 | 64 | * [Ticking Optimism on GitHub](https://github.com/therealbytes/ticking-optimism) 65 | * [Ticking Conway on GitHub](https://github.com/therealbytes/ticking-conway) 66 | -------------------------------------------------------------------------------- /pages/builders/app-developers/tools/ecosystem-overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Open Source Code Repo 3 | lang: en-US 4 | description: Learn about an ecosystem of libraries and utilities tailored to help you deploy applications on the OP Stack. 5 | --- 6 | 7 | import { Cards, Card } from 'nextra/components' 8 | 9 | # Open Source Code Repo for OP Stack Builders 10 | 11 | The [ecosystem repository](https://github.com/ethereum-optimism/ecosystem) is a comprehensive resource of libraries, utilities, and forkable code examples specifically tailored for builders deploying applications on the OP stack. 12 | The ecosystem repository was developed to help ease and expedite the development process for all builders working on the OP stack, helping them deliver value to the community without the necessity of mastering every detail of how the protocol itself operates. 13 | 14 | ## Getting Started 15 | 16 | Our initial launch includes an example [bridge application](https://github.com/ethereum-optimism/ecosystem/tree/main/apps/bridge-app) that demonstrates how to bridge ETH and any ERC20 tokens listed in the [Superchain Token List](/chain/tokenlist). 17 | This application serves as a reference for anyone looking to build their own bridge, offering a clearer understanding of how to interact with the protocol on both the L1 and L2 sides. 18 | 19 | Additionally, we provide a package containing common utilities essential for developers interacting with both L1 and L2. For instance, it includes features for tracking [network pairs](https://github.com/ethereum-optimism/ecosystem/blob/main/packages/op-app/src/configs/networkPairs.ts) and [deployment addresses](https://github.com/ethereum-optimism/ecosystem/blob/main/packages/op-app/src/configs/deploymentAddresses.ts) of smart contracts. 20 | 21 | 22 | } /> 23 | 24 | } /> 25 | 26 | } /> 27 | 28 | 29 | ## Contribute 30 | 31 | If you would like to see more examples related to the OP stack, feel free to [leave an issue](https://github.com/ethereum-optimism/ecosystem/issues). 32 | -------------------------------------------------------------------------------- /pages/chain/testing/testing-apps.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Testing Apps for OP Mainnet 3 | lang: en-US 4 | description: Learn best practices for OP Mainnet testing. 5 | --- 6 | 7 | # Testing Apps for OP Mainnet 8 | 9 | For the most part, running applications on OP Mainnet is identical to running them on Ethereum, so the testing is identical too. 10 | In this guide, you learn the best practices for OP Mainnet testing where there are differences. 11 | 12 | ## Unit tests and single layer integration tests 13 | 14 | The vast majority of tests do not involve any OP Mainnet-specific features. 15 | In those cases, while you *could* test everything on OP Mainnet or a test network, that would normally be inefficient. 16 | Most Ethereum development stacks include features that make testing easier, which normal Ethereum clients, such as geth (and our modified version, `op-geth`) don't support. 17 | Therefore, it is a good idea to run the majority of tests, which do not rely on OP Mainnet-specific features, in the development stack. 18 | It is a lot faster. 19 | 20 | It is a best practice to design and run thorough tests across an OP test network, either in your [local development environment](dev-node) or on [the test network](/chain/networks#op-sepolia), depending on your use case. 21 | Running proper testing is key to identifying fringe cases where the equivalence between OP Mainnet and Ethereum breaks down (or where Ethereum mainnet itself and the development stack may be non-equivalent in a production environment). 22 | 23 | ## Multilayer integration tests 24 | 25 | Some apps need OP Mainnet-specific features that aren't available as part of the development stack. 26 | For example, if your decentralized application relies on [inter-domain communication](/builders/app-developers/bridging/messaging), the effort of developing a stub to let you debug it in a development stack is probably greater than the hassle of having the automated test go to [a local development environment](dev-node) each time. 27 | 28 | ## Integration with other products 29 | 30 | In many cases a decentralized application requires the services of other contracts. 31 | For example, [Perpetual v. 2](https://medium.com/p/88a7b231eb94) cannot function without [Uniswap v. 3](https://uniswap.org/blog/uniswap-v3). 32 | 33 | If that is the case you can use [mainnet forking](https://hardhat.org/hardhat-network/guides/mainnet-forking.html). 34 | It works with OP Mainnet. 35 | Alternatively, you can connect to our [test network](/chain/networks#op-sepolia) if those contracts are also deployed there (in many cases they are). 36 | -------------------------------------------------------------------------------- /components/AddressTable.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react' 2 | import { CHAIN_CONSTANTS } from '@/utils/constants' 3 | 4 | export function AddressTable({ 5 | chain, 6 | explorer, 7 | addresses 8 | }: { 9 | chain: string, 10 | explorer: string, 11 | addresses: { [contract: string]: string } 12 | }): ReactElement { 13 | return ( 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | { 23 | Object.entries(addresses) 24 | .map(([contract, address]) => { 25 | return ( 26 | 27 | 32 | 40 | 41 | ) 42 | }) 43 | } 44 | 45 |
Contract NameContract Address
28 | 29 | {contract} 30 | 31 | 33 | 34 | 35 | {address} 36 | 37 | (opens in a new tab) 38 | 39 |
46 | ) 47 | } 48 | -------------------------------------------------------------------------------- /pages/builders/tools/overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Developer Tools 3 | lang: en-US 4 | description: Learn about different developer tools you can use to help you build on Optimism. 5 | --- 6 | 7 | import { Cards, Card } from 'nextra/components' 8 | 9 | # Developer Tools 10 | 11 | Welcome to the Optimism developer tools! 12 | 13 | If you are already familiar with [building on OP Mainnet](/chain/getting-started) and just need the tools to get cracking, you are in the right place! 14 | 15 | ## Connecting 16 | 17 | 18 | } /> 19 | 20 | } /> 21 | 22 | 23 | 24 | ## Building 25 | 26 | 27 | } /> 28 | 29 | } /> 30 | 31 | } /> 32 | 33 | } /> 34 | 35 | } /> 36 | 37 | 38 | ## Monitoring 39 | 40 | 41 | } /> 42 | 43 | } /> 44 | 45 | 46 | ## OP Tools 47 | 48 | 49 | } /> 50 | 51 | } /> 52 | 53 | } /> 54 | 55 | } /> 56 | 57 | } /> 58 | 59 | } /> 60 | 61 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_tutorial.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest a tutorial 2 | description: Suggest a tutorial to our developers platform 3 | title: "[TUTORIAL] Add PR title" 4 | labels: ["tutorial,documentation,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | We'll consider [our defined content types](https://docs.optimism.io/contribute/style-guide#content-types/) when reviewing the tutorial, so please take a look there first. 10 | - type: markdown 11 | id: tutorial_info 12 | attributes: 13 | value: "## Tutorial info" 14 | - type: input 15 | id: tutorial_title 16 | attributes: 17 | label: Tutorial title 18 | description: What is the title of your tutorial? 19 | validations: 20 | required: true 21 | - type: textarea 22 | id: tutorial_description 23 | attributes: 24 | label: Tutorial description 25 | description: Summarize what the user should be able to accomplish by following tutorial 26 | validations: 27 | required: true 28 | - type: input 29 | id: tutorial_tags 30 | attributes: 31 | label: Tutorial tags 32 | description: What topics are covered in your tutorial? Some examples include 'frontend', 'backend', 'nft', 'security', 'nodes', but feel free to add new ones. 33 | validations: 34 | required: true 35 | - type: dropdown 36 | id: tutorial_skill_level 37 | attributes: 38 | label: Skill level 39 | options: 40 | - "Beginner" 41 | - "Intermediate" 42 | - "Advanced" 43 | validations: 44 | required: true 45 | - type: dropdown 46 | id: tutorial_hosted 47 | attributes: 48 | label: Hosted on Optimism.io or hosted elsewhere? 49 | description: Let us know if you want your tutorial to be hosted on the docs.optimism.io website or if it is published elsewhere and you want us to link out to the tutorial 50 | options: 51 | - "Hosted on optimism.io" 52 | - "Hosted elsewhere" 53 | validations: 54 | required: true 55 | - type: textarea 56 | id: tutorial_content 57 | attributes: 58 | label: "For tutorials to be hosted on Optimism.io: Tutorial Content" 59 | description: Please provide a detailed outline of the content for the tutorial 60 | - type: input 61 | id: tutorial_url 62 | attributes: 63 | label: "For tutorials hosted elsewhere: URL to tutorial" 64 | description: Please paste the URL to your tutorial 65 | - type: textarea 66 | id: tutorial_additional_context 67 | attributes: 68 | label: Additional context 69 | description: Add additional context or screenshots of the tutorial steps here 70 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/hacks/overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to OP Stack Hacks 3 | lang: en-US 4 | description: Learn general information on how to experiment and customize an OP Stack chain. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Introduction to OP Stack Hacks 10 | 11 | Welcome to OP Stack Hacks, the **highly experimental** region of the OP Stack docs. OP Stack Hacks are an unofficial guide for messing around with the OP Stack. Here you'll find information about ways that the OP Stack can be modified in interesting ways. 12 | 13 | OP Stack Hacks create blockchains that aren't exactly OP Stack, and may be insecure. Hacked OP Stack chains can break key invariants that are required to interoperate with [the Optimism Superchain](/stack/explainer). **Developers of chains that wish to interoperate with [the Optimism Superchain](/stack/explainer) should *not* include any hacks**. When in doubt, stick with the official components within [the current release of the OP Stack](/stack/getting-started#the-op-stack-today). 14 | 15 | 16 | OP Stack Hacks are explicitly things that you can do with the OP Stack that are *not* currently intended for production use. 17 | 18 | OP Stack Hacks are not for the faint of heart. You will not be able to receive significant developer support for OP Stack Hacks — be prepared to get your hands dirty and to work without support. 19 | 20 | 21 | ## OP Stack Hack Guides 22 | 23 | We have curated a list of guides to walk you through different OP stack modules that you can customize as a developer. 24 | 25 | * [Data Availability Hacks](data-availability) 26 | * [Derivation Hacks](derivation) 27 | * [Execution Hacks](execution) 28 | * [Settlement Hacks](settlement) 29 | * [Featured Hacks](featured-hacks) 30 | 31 | ## OP Stack Hack Tutorials 32 | 33 | We also have a handful of tutorials offering step-by-step instructions on how to make customizations to an OP Stack chain. **As a reminder, you will not be able to receive significant developer support for OP Stack Hacks — be prepared to get your hands dirty and to work without support.** 34 | 35 | * [Adding Attributes to the Derivation Function](../tutorials/adding-derivation-attributes) 36 | * [Adding A Precompile](../tutorials/adding-precompiles) 37 | * [Modifying Predeployed Contracts](../tutorials/modifying-predeploys) 38 | 39 | ## Conclusion 40 | 41 | Have an OP Stack hack you'd like to share? Want to write an OP stack hack tutorial? Submit your request in our [docs repo](https://github.com/ethereum-optimism/docs/issues/new?assignees=\&labels=tutorial%2Cdocumentation%2Ccommunity-request\&projects=\&template=suggest_tutorial.yaml\&title=%5BTUTORIAL%5D+Add+PR+title). 42 | -------------------------------------------------------------------------------- /public/img/builders/chain-operators/replica-node.drawio: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/management/snap-sync.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using Snap Sync for Chain Operators 3 | lang: en-US 4 | description: Learn how to use and enable snap sync on your OP chain. 5 | --- 6 | 7 | import { Callout, Steps } from 'nextra/components' 8 | 9 | # Using Snap Sync for Chain Operators 10 | 11 | This guide reviews the optional feature of Snap Sync for OP chains, including benefits and how to enable the feature. 12 | 13 | Snap Sync significantly improves the experience of syncing an OP Stack node. Snap Sync is a native feature of go-ethereum that is now optionally enabled on `op-node` & `op-geth`. 14 | Snap Sync works by downloading a snapshot of the state from other nodes on the network and is then able to start executing blocks from the completed state rather than having to re-execute every single block. 15 | This means that performing a Snap Sync is significantly faster than performing a full sync. 16 | 17 | * Snap sync enables node operators on your network to sync faster. 18 | * Snap sync removes the need for nodes on your post Ecotone network to run a [blob archiver](/builders/node-operators/management/blobs). 19 | 20 | ## Enable Snap Sync for Chains 21 | 22 | To enable snap sync, chain operators need to spin up a node which is exposed to the network and has transaction gossip disabled. 23 | 24 | 25 | For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UDP to easily find other op-geth nodes to sync from. 26 | * If you set the port with [`--discovery.port`](/builders/node-operators/management/configuration#discoveryport), then you must open the port specified for UDP. 27 | * If you set [`--port`](/builders/node-operators/management/configuration#port), then you must open the port specified for TCP. 28 | * The only exception is for sequencers and transaction ingress nodes. 29 | 30 | 31 | 32 | ### Setup a Snap Sync Node 33 | 34 | * Expose port `30303` (`op-geth`'s default discovery port) to the internet on TCP and UDP. 35 | * Disable transaction gossip with the [`--rollup.disabletxpoolgossip`](/builders/node-operators/management/configuration#rollupdisabletxpoolgossip) flag 36 | 37 | ### Enable Snap Sync on Your Network 38 | 39 | * Follow the [Node Operator Snap Sync Guide](/builders/node-operators/management/snap-sync#enable-snap-sync-for-your-node) to enable snap sync for your chain network. 40 | 41 | 42 | ## Next Steps 43 | 44 | * See the [Node Configuration](/builders/node-operators/management/configuration#configuration) guide for additional explanation or customization. 45 | * If you experience difficulty at any stage of this process, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). 46 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_rpc_provider.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest an RPC provider 2 | description: Suggest an RPC provider for developers to use when building with Optimism 3 | title: "[RPC PROVIDER] Add PR title" 4 | labels: ["documentation,rpc-provider,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before submitting this suggestion, be sure to read the [listing of current RPC and Node Providers](https://github.com/ethereum-optimism/developers/blob/main/community/tools/node-providers.md). 10 | - type: markdown 11 | id: project_info 12 | attributes: 13 | value: "## Project Info" 14 | - type: input 15 | id: rpc_provider_name 16 | attributes: 17 | label: RPC Provider Name 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: rpc_provider_description 22 | attributes: 23 | label: RPC Provider Description & Pricing 24 | validations: 25 | required: true 26 | - type: input 27 | id: rpc_provider_URL 28 | attributes: 29 | label: RPC Provider URL 30 | description: Please provide the URL for us to link in the project description above. 31 | validations: 32 | required: true 33 | - type: checkboxes 34 | id: rpc_provider_networks 35 | attributes: 36 | label: Supported Networks 37 | options: 38 | - label: "OP Mainnet" 39 | required: false 40 | - label: "OP Goerli" 41 | required: false 42 | - label: "OP Sepolia" 43 | required: false 44 | validations: 45 | required: true 46 | - type: input 47 | id: rpc_provider_live_date 48 | attributes: 49 | label: When did the product go live? 50 | description: We prioritize products that are battle-tested. 51 | validations: 52 | required: true 53 | - type: dropdown 54 | id: rpc_provider_open_source 55 | attributes: 56 | label: Is the product open source? 57 | description: We prioritize open source projects when possible. 58 | options: 59 | - "Yes" 60 | - "No" 61 | validations: 62 | required: true 63 | - type: input 64 | id: rpc_provider_github 65 | attributes: 66 | label: GitHub URL 67 | description: If the project is open source, please provide a link to the product's repo. 68 | - type: input 69 | id: rpc_provider_docs 70 | attributes: 71 | label: Documentation URL 72 | description: Please provide a link to the product's technical documentation. 73 | validations: 74 | required: true 75 | - type: textarea 76 | id: rpc_provider_additional_context 77 | attributes: 78 | label: Additional context 79 | description: Add any other context or screenshots about the product here. 80 | -------------------------------------------------------------------------------- /public/img/icons/gear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pages/chain/identity/contracts-eas.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contracts (EAS) 3 | lang: en-US 4 | description: Learn the basics of contracts for EAS, EAS contract addresses, and how to read and write attestations. 5 | --- 6 | 7 | # EAS Contracts 8 | 9 | This guide covers [Ethereum Attestation Service ("EAS")](https://attest.sh/), an open-source public good that is included as a predeploy in the OP Stack. 10 | It also covers EAS contract addresses, how to read and write attestations, and indexing. 11 | 12 | ## EAS Contract Addresses 13 | 14 | The [Ethereum Attestation Service](https://docs.attest.sh/docs/welcome) is deployed on these addresses: 15 | 16 | | Network | Attestation Contract | Schema Registry Contract | 17 | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | 18 | | OP Sepolia | [0x4200000000000000000000000000000000000021](https://sepolia-optimism.etherscan.io/address/0x4200000000000000000000000000000000000021) | [0x4200000000000000000000000000000000000020](https://sepolia-optimism.etherscan.io/address/0x4200000000000000000000000000000000000020) | 19 | | OP Mainnet | [0x4200000000000000000000000000000000000021](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000021) | [0x4200000000000000000000000000000000000020](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000020) | 20 | 21 | ## How to Read and Write Attestations 22 | 23 | You can read and write attestations in several ways: 24 | 25 | * [EAS scan user interface (OP Mainnet)](https://optimism.easscan.org/) 26 | * [EAS scan user interface (OP Sepolia)](https://optimism-sepolia.easscan.org/) 27 | * [JavaScript SDK](https://docs.attest.sh/docs/developer-tools/eas-sdk) 28 | * [Access directly onchain](https://github.com/ethereum-attestation-service/eas-contracts/blob/master/contracts/EAS.sol) (if you need to attest from a smart contract) 29 | 30 | ## Indexing 31 | 32 | Indexing is available via: 33 | 34 | * [GraphQL endpoint](https://docs.attest.sh/docs/developer-tools/api) 35 | * [Ponder graph](https://github.com/ethereum-attestation-service/eas-ponder-graph) 36 | * [Open source indexer](https://github.com/ethereum-attestation-service/eas-indexing-service) 37 | 38 | ## Next Steps 39 | 40 | For more information on working with attestations, see [Build Decentralized Identity Apps with Attestations](about-attestations). 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest_faucet.yaml: -------------------------------------------------------------------------------- 1 | name: Suggest a faucet 2 | description: Suggest a faucet for developers to use when building with Optimism 3 | title: "[FAUCET] Add PR title" 4 | labels: ["documentation,faucet,community-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before submitting this suggestion, be sure to read the [listing of current Faucets](https://github.com/ethereum-optimism/developers/blob/main/community/tools/faucets.md). 10 | - type: markdown 11 | id: project_info 12 | attributes: 13 | value: "## Project Info" 14 | - type: input 15 | id: faucet_name 16 | attributes: 17 | label: Faucet Name 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: faucet_description 22 | attributes: 23 | label: Faucet Description 24 | validations: 25 | required: true 26 | - type: input 27 | id: faucet_URL 28 | attributes: 29 | label: Faucet URL 30 | description: Please provide the URL for us to link in the project description above. 31 | validations: 32 | required: true 33 | - type: checkboxes 34 | id: faucet_networks 35 | attributes: 36 | label: Supported Networks 37 | options: 38 | - label: "OP Goerli" 39 | required: false 40 | - label: "OP Sepolia" 41 | required: false 42 | - label: "Base Goerli" 43 | required: false 44 | - label: "Base Sepolia" 45 | required: false 46 | - label: "Lyra Sepolia" 47 | required: false 48 | - label: "Mode Sepolia" 49 | required: false 50 | - label: "Orderly Sepolia" 51 | required: false 52 | - label: "PGN Sepolia" 53 | required: false 54 | - label: "Zora Sepolia" 55 | required: false 56 | validations: 57 | required: true 58 | - type: input 59 | id: faucet_live_date 60 | attributes: 61 | label: When did the product go live? 62 | description: We prioritize products that are battle-tested. 63 | validations: 64 | required: true 65 | - type: dropdown 66 | id: faucet_open_source 67 | attributes: 68 | label: Is the product open source? 69 | description: We prioritize open source projects when possible. 70 | options: 71 | - "Yes" 72 | - "No" 73 | validations: 74 | required: true 75 | - type: input 76 | id: faucet_github 77 | attributes: 78 | label: GitHub URL 79 | description: If the project is open source, please provide a link to the product's repo. 80 | - type: textarea 81 | id: faucet_additional_context 82 | attributes: 83 | label: Additional context 84 | description: Add any other context or screenshots about the product here. 85 | -------------------------------------------------------------------------------- /pages/chain/identity/optimist-profile.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Optimist Profile 3 | lang: en-US 4 | description: Learn how to share the contributions and impact they've made to the Optimism Collective. 5 | --- 6 | 7 | # Optimist Profile 8 | 9 | The Optimist Profile allows contributors to share the contributions and impact they've made to the Optimism Collective. Anyone can create an Optimist Profile and anyone is able to use the Optimist Profile in onchain identity use cases. 10 | 11 | ## Overview 12 | 13 | The Optimist Profile is built using the variety of onchain reputation data on OP Mainnet and has the following elements: 14 | 15 | * **Profile Schema:** An onchain self-attestation using the profile schema that represents an individual or organization. 16 | * **Contributions:** Each Optimist Profile can create onchain attestations about their contributions to the Optimism Collective. Optimist Profiles can also be used to create onchain peer-to-peer (p2p) attestations about the contributions of other contributors. Peer to peer attestations help the Optimism Collective create a contribution web of trust. 17 | 18 | ## Technical Details 19 | 20 | The Optimist Profile is built on attestations using the [Ethereum Attestation Service](https://docs.attest.sh/docs/welcome). 21 | 22 | ![Identity Profile Logo.](/img/op-mainnet/identity/profile.png) 23 | 24 | * **[Profile schema UID](https://optimism.easscan.org/schema/view/0xac4c92fc5c7babed88f78a917cdbcdc1c496a8f4ab2d5b2ec29402736b2cf929):** `​​0xac4c92fc5c7babed88f78a917cdbcdc1c496a8f4ab2d5b2ec29402736b2cf929` 25 | * name: name of the profile 26 | * profileMetadataPtrType: used to determine the protocol 27 | * profileMetadataPtr: can be a URI, ipfs hash, etc. that points to any type of blob storage that stores the metadata of type shown below 28 | 29 | * **[RetroPGF 3 Application schema UID](https://optimism.easscan.org/schema/view/0x76e98cce95f3ba992c2ee25cef25f756495147608a3da3aa2e5ca43109fe77cc):** `0x76e98cce95f3ba992c2ee25cef25f756495147608a3da3aa2e5ca43109fe77cc` 30 | * displayName: name of the application 31 | * applicationMetadataPtrType: used to determine the protocol 32 | * applicationMetadataPtr: can be a URI, ipfs hash, etc. that points to any type of blob storage that stores the metadata of type shown below 33 | 34 | ## Common Questions 35 | 36 | **Q: How do I get the addresses for RetroPGF badgeholders?** 37 | 38 | **A:** Use the EAS SDK `getAttestation` function to retrieve the onchain attestation where Schema UID: `0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b`. 39 | Remember to verify the attester address is `0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9`. 40 | 41 | **Q: How do I get the addresses for Optimist Profiles?** 42 | 43 | **A:** Use the EAS SDK `getAttestation` function to retrieve the onchain attestation where Schema UID: `0xac4c92fc5c7babed88f78a917cdbcdc1c496a8f4ab2d5b2ec29402736b2cf929`. 44 | 45 | **Q: What other schemas are being used?** 46 | 47 | **A:** Check the [schemas](schemas) page for a list of other schemas being used. 48 | -------------------------------------------------------------------------------- /pages/builders/tools/monitor/analytics-tools.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Analytics Tools 3 | lang: en-US 4 | description: Learn about platforms you can use to gather analytics and setup customizations about OP Mainnet. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Analytics Tools 10 | 11 | The following guide lists platforms you can use to gather analytics and setup customizations about OP Mainnet. 12 | 13 | ## Tenderly 14 | 15 | [Tenderly](https://tenderly.co/) monitoring stack lets you [inspect any transaction execution on OP Mainnet or OP Sepolia](https://docs.tenderly.co/debugger#how-to-use-tenderly-debugger). 16 | 17 | You can inspect the state of your verified contract in any step of the transaction's execution, as well as step into or over function calls. 18 | The level of detail the Tenderly dashboard presents will reduce your development time as well as help you understand the execution flow of transactions. 19 | It helps you to inspect states at every instance of transaction and gives a platform to trace transactions. You can also simulate pending (or any other historical) transactions and see their exact outcomes. 20 | 21 | * [monitor wallets](https://blog.tenderly.co/how-to-monitor-ethereum-wallets/) 22 | * [setup real-time alerts for smart contracts](https://blog.tenderly.co/how-to-set-up-real-time-alerting-for-smart-contracts-with-tenderly/) 23 | * [automate your responses to alert triggers](https://blog.tenderly.co/tenderly-alert-webhooks/) with custom webhooks 24 | 25 | ## Dune Analytics 26 | 27 | [Dune Analytics](https://dune.com) allows anyone to create dashboards that present information about OP Chains (OP Mainnet, Base, and Zora are available). See [Dune Docs](https://dune.com/docs/) for more info. 28 | You can find a list of community created dashboards for OP Chains [here](https://dune.com/browse/dashboards?q=tags%3Aop%2Coptimism%2Csuperchain&order=trending&time_range=24h), or [create your own](https://docs.dune.com/#queries) dashboard. 29 | 30 | Here are some of our favorite dashboards so far: 31 | 32 | * [OP Chains / Superchain - L2 Activity, Chain Economics](https://dune.com/oplabspbc/op-stack-chains-l1-activity) 33 | * [OP Chains / Superchain - Popular Apps & Project Usage Trends](https://dune.com/oplabspbc/superchain-op-chains-apps-and-project-usage-trends) 34 | * [By OP Chain - L2/L1 Chain Economics](https://dune.com/oplabspbc/optimism-l2-l1-economics) 35 | * [OP Token House Delegates](https://dune.com/optimismfnd/optimism-op-token-house) 36 | * [Superchain NFTs](https://dune.com/oplabspbc/superchain-nfts) 37 | 38 | ## Additional Tools and Resources 39 | 40 | Here are some additional tools and resources for OP Mainnet analytics and development: 41 | 42 | * DeFi Stats: [OP Mainnet's DeFiLlama Page](https://defillama.com/chain/Optimism/) 43 | * L2 Usage and Comparison: [growthepie](https://www.growthepie.xyz/) 44 | * OP Analytics (Incentive Tracking, Helper Functions, Public Analysis): [OP Analytics on GitHub](https://github.com/ethereum-optimism/op-analytics) 45 | * Contribute to NumbaNERDs: [Issues on GitHub](https://github.com/ethereum-optimism/op-analytics/issues) 46 | -------------------------------------------------------------------------------- /pages/builders/app-developers/bridging/custom-bridge.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Custom Bridges 3 | lang: en-US 4 | description: Important considerations when building custom bridges for OP Mainnet. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Custom Bridges 10 | 11 | Custom token bridges are any bridges other than the [Standard Bridge](./standard-bridge). 12 | You may find yourself in a position where you need to build a custom token bridge because the Standard Bridge doesn't completely support your use case. 13 | This guide provides important information you should be aware of when building a custom bridge. 14 | 15 | 16 | Custom bridges can bring a significant amount of complexity and risk to any project. 17 | Before you commit to a custom bridge, be sure that the [Standard Bridge](./standard-bridge) definitely does not support your use case. 18 | [Building a custom bridged token](/builders/app-developers/tutorials/standard-bridge-custom-token) is often sufficient for projects that need more flexibility. 19 | 20 | 21 | ## Guidelines 22 | 23 | Custom bridges can use any design pattern you can think of. 24 | However, with increased complexity comes increased risk. 25 | Consider directly extending or modifying the [`StandardBridge`](https://github.com/ethereum-optimism/optimism/blob/87dd5a4743380b717dac44a4e55c5e6e60e32684/packages/contracts-bedrock/src/universal/StandardBridge.sol) contract before building your own bridge contracts from scratch. 26 | Doing so will provide you with an audited foundation upon which you can add extra logic. 27 | 28 | If you choose not to extend the `StandardBridge` contract, you may still want to follow the interface that the `StandardBridge` provides. 29 | Bridges that extend this interface will be compatible with the [OP Mainnet Bridge UI](https://app.optimism.io/bridge). 30 | You can read more about the design of the Standard Bridge in the guide on [Using the Standard Bridge](./standard-bridge). 31 | 32 | ## The Superchain Token List 33 | 34 | The [Superchain Token List](/chain/tokenlist) exists to help users and developers find the right bridged representations of tokens native to another blockchain. 35 | Once you've built and tested your custom bridge, make sure to register any tokens meant to flow through this bridge by [making a pull request against the Superchain Token List repository](https://github.com/ethereum-optimism/ethereum-optimism.github.io#adding-a-token-to-the-list). 36 | You **must** deploy your bridge to OP Sepolia before it can be added to the Superchain Token List. 37 | 38 | ## Next Steps 39 | 40 | You can explore several examples of custom bridges for OP Mainnet: 41 | 42 | * [NFT Bridge](https://github.com/ethereum-optimism/optimism/blob/v1.1.4/packages/contracts-bedrock/src/L1/L1ERC721Bridge.sol) 43 | * [L2 DAI Token Bridge](https://optimistic.etherscan.io/address/0x467194771dae2967aef3ecbedd3bf9a310c76c65#code) and [deployed addresses](https://github.com/ethereum-optimism/ethereum-optimism.github.io/blob/master/data/DAI/data.json) 44 | * [SNX Bridge](https://github.com/ethereum-optimism/ethereum-optimism.github.io/blob/master/data/SNX/data.json) 45 | -------------------------------------------------------------------------------- /public/tutorials/cross-dom-bridge-eth.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | 3 | const optimism = require("@eth-optimism/sdk") 4 | const ethers = require("ethers") 5 | 6 | const privateKey = process.env.TUTORIAL_PRIVATE_KEY 7 | 8 | const l1Provider = new ethers.providers.StaticJsonRpcProvider("https://rpc.ankr.com/eth_sepolia") 9 | const l2Provider = new ethers.providers.StaticJsonRpcProvider("https://sepolia.optimism.io") 10 | const l1Wallet = new ethers.Wallet(privateKey, l1Provider) 11 | const l2Wallet = new ethers.Wallet(privateKey, l2Provider) 12 | 13 | console.log('L1 balance:') 14 | console.log((await l1Wallet.getBalance()).toString()) 15 | 16 | const messenger = new optimism.CrossChainMessenger({ 17 | l1ChainId: 11155111, // 11155111 for Sepolia, 1 for Ethereum 18 | l2ChainId: 11155420, // 11155420 for OP Sepolia, 10 for OP Mainnet 19 | l1SignerOrProvider: l1Wallet, 20 | l2SignerOrProvider: l2Wallet, 21 | }) 22 | 23 | console.log('Depositing ETH...') 24 | tx = await messenger.depositETH(ethers.utils.parseEther('0.006942')) 25 | await tx.wait() 26 | 27 | console.log('Waiting for deposit to be relayed...') 28 | await messenger.waitForMessageStatus(tx.hash, optimism.MessageStatus.RELAYED) 29 | 30 | console.log('L1 balance:') 31 | console.log((await l1Wallet.getBalance()).toString()) 32 | 33 | console.log('L2 balance:') 34 | console.log((await l2Wallet.getBalance()).toString()) 35 | 36 | console.log('Withdrawing ETH...') 37 | const withdrawal = await messenger.withdrawETH(ethers.utils.parseEther('0.004269')) 38 | await withdrawal.wait() 39 | 40 | console.log('L2 balance:') 41 | console.log((await l2Wallet.getBalance()).toString()) 42 | 43 | console.log('Waiting for withdrawal to be provable...') 44 | await messenger.waitForMessageStatus(withdrawal.hash, optimism.MessageStatus.READY_TO_PROVE) 45 | 46 | console.log('Proving withdrawal...') 47 | await messenger.proveMessage(withdrawal.hash) 48 | 49 | console.log('Waiting for withdrawal to be relayable...') 50 | await messenger.waitForMessageStatus(withdrawal.hash, optimism.MessageStatus.READY_FOR_RELAY) 51 | 52 | // Wait for the next block to be produced, only necessary for CI because messenger can return 53 | // READY_FOR_RELAY before the RPC we're using is caught up to the latest block. Waiting for an 54 | // additional block ensures that the RPC is caught up and the message can be relayed. Users 55 | // should not need to do this when running the tutorial. 56 | const maxWaitTime = Date.now() + 120000 // 2 minutes in milliseconds 57 | const currentBlock = await l1Provider.getBlockNumber() 58 | while (await l1Provider.getBlockNumber() < currentBlock + 1) { 59 | if (Date.now() > maxWaitTime) { 60 | throw new Error('Timed out waiting for block to be produced') 61 | } 62 | await new Promise(resolve => setTimeout(resolve, 1000)) 63 | } 64 | 65 | console.log('Relaying withdrawal...') 66 | await messenger.finalizeMessage(withdrawal.hash) 67 | 68 | console.log('Waiting for withdrawal to be relayed...') 69 | await messenger.waitForMessageStatus(withdrawal.hash, optimism.MessageStatus.RELAYED) 70 | 71 | console.log('L1 balance:') 72 | console.log((await l1Wallet.getBalance()).toString()) 73 | 74 | })() 75 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/hacks/execution.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Execution Hacks 3 | lang: en-US 4 | description: Learn how to modify the default Execution Layer module for an OP Stack chain. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Execution Hacks 10 | 11 | 12 | OP Stack Hacks are explicitly things that you can do with the OP Stack that are *not* currently intended for production use. 13 | 14 | OP Stack Hacks are not for the faint of heart. You will not be able to receive significant developer support for OP Stack Hacks — be prepared to get your hands dirty and to work without support. 15 | 16 | 17 | ## Overview 18 | 19 | This guide teaches you how to modify the default Execution Layer module for an OP Stack chain. The Execution Layer is responsible for defining the format of the state and the state transition function on L2. It is expected to trigger the state transition function when it receives a payload via the [Engine API](https://github.com/ethereum/execution-apis/tree/main/src/engine). Although the default Execution Layer module is the EVM, you can replace the EVM with any alternative VM as long as it sits behind the Engine API. 20 | 21 | ## Default 22 | 23 | The default Execution Layer module is the Rollup EVM module. The Rollup EVM module utilizes a very lightly modified EVM that adds support for transactions that are triggered by smart contracts on L1 and introduces an L1 data fee to each transaction that accounts for the cost of publishing user transactions to L1. You can find the full set of differences between the standard EVM and the Rollup EVM [on this page](https://op-geth.optimism.io/). 24 | 25 | ## Security 26 | 27 | As with modifications to the Derivation Layer, modifications to the Execution Layer can have unintended consequences. For instance, modifications to the EVM may break existing tooling or may open the door to denial of service attacks. Consider the impact of each modification carefully on a case-by-case basis. 28 | 29 | ## Modding 30 | 31 | ### EVM Tweaks 32 | 33 | The default Execution Layer module is the EVM. It's possible to modify the EVM in many different ways like adding new precompiles or inserting predeployed smart contracts into the genesis state. Precompiles can help make common smart contract operations cheaper and can therefore further reduce the cost of execution for your specific use-case. These modifications should be made directly to [the execution client](https://github.com/ethereum-optimism/op-geth). 34 | 35 | It's also possible to create alternative execution client implementations to improve the security properties of your chain. Note that if you modify the EVM, you must apply the same modifications to every execution client that you would like to support. 36 | 37 | ### Alternative VMs 38 | 39 | The OP Stack allows you to replace the EVM with *any* state transition function, as long as the transition can be triggered via the Engine API. This has, for example, been used to implement an OP Stack chain that runs a GameBoy emulator rather than the EVM. 40 | 41 | [Tutorial: Adding a precompile](/builders/chain-operators/tutorials/adding-precompiles). 42 | -------------------------------------------------------------------------------- /pages/stack/security/pause.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pausing the Bridge 3 | lang: en-US 4 | description: Learn how the OP Stack bridge can be paused as backup safety mechanism. 5 | --- 6 | 7 | # Pausing the Bridge 8 | 9 | The [`OptimismPortal`](https://github.com/ethereum-optimism/optimism/blob/v1.1.4/packages/contracts-bedrock/src/L1/OptimismPortal.sol) is the low-level L1 message passing contract present on all standard OP Stack chains. 10 | This contract handles the L1 side of the communication channel between an OP Stack chain and its L1 parent chain. 11 | 12 | As a safety mechanism, the `OptimismPortal` contract can be configured to be pausable by a specific `GUARDIAN` address. 13 | When paused, the `OptimismPortal` contract will prevent L2-to-L1 transactions from being executed. 14 | This is a backup safety mechanism that can be used to help mitigate potential active security concerns. 15 | 16 | Pause functionality and [two-step withdrawals](https://web.archive.org/web/20230608050641/https://blog.oplabs.co/two-step-withdrawals/) were introduced to the OP Stack to mitigate the risk of withdrawal bugs that have led to exploits in other bridging systems. 17 | 18 | ## Pause Functionality 19 | 20 | The `OptimismPortal` can be configured to allow a `GUARDIAN` address to pause and unpause L2-to-L1 transactions from being executed. 21 | L2-to-L1 transactions allow users and smart contracts on the OP Stack chain to send messages to the L1 parent chain. 22 | Pause functionality allows a `GUARDIAN` to halt L2-to-L1 transaction execution for the OP Stack chain in question. 23 | L1-to-L2 tranasctions are not affected by pause functionality. 24 | 25 | Pauses by the `GUARDIAN` impact all L2-to-L1 transactions for the OP Stack chain in question and cannot be targeted to specific users, smart contracts, or transactions. 26 | Pauses are designed to be a backup safety mechanism and are expected to be used only in the event of an active pressing security concern. 27 | 28 | ## Pause and Unpause Functions 29 | 30 | The `GUARDIAN` can pause and unpause L2-to-L1 transactions at any time by calling the [`pause`](https://github.com/ethereum-optimism/optimism/blob/v1.1.4/packages/contracts-bedrock/src/L1/OptimismPortal.sol#L151-L156) and [`unpause`](https://github.com/ethereum-optimism/optimism/blob/v1.1.4/packages/contracts-bedrock/src/L1/OptimismPortal.sol#L158-L163) functions on the `OptimismPortal` contract. 31 | Additional controls on the `GUARDIAN` address can be implemented by configuring the `GUARDIAN` as a smart contract. 32 | 33 | ## Guardian Address 34 | 35 | The `GUARDIAN` address is initially configured when the OP Stack chain is deployed and can be modified by the network's administrative address or smart contract. 36 | A chain can choose to remove the `GUARDIAN` role by configuring the `GUARDIAN` to be an inaccessible address such as the [zero address](https://etherscan.io/address/0x0000000000000000000000000000000000000000). 37 | 38 | The `GUARDIAN` address is set as an `immutable` variable inside of the `OptimismPortal` contract. 39 | To change the `GUARDIAN` address, the `OptimismPortal` proxy contract must be upgraded to a new implementation contract that has a different `GUARDIAN` address. 40 | -------------------------------------------------------------------------------- /pages/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Welcome to the Optimism Docs 3 | lang: en-US 4 | description: Learn about the Optimism Collective, the Optimism Docs, and how to get started building with Optimism. 5 | --- 6 | 7 | import { Cards, Card } from 'nextra/components' 8 | 9 | # Welcome to the Optimism Docs 10 | 11 | Welcome to the Optimism Docs, the unified home of the [Optimism Collective's](/connect/resources/glossary#optimism-collective) technical documentation and information about the [OP Stack](/stack/getting-started). 12 | Information about the Optimism Collective's governance, community, and mission can be found on the [Optimism Community Hub](https://community.optimism.io/docs/governance/). 13 | 14 | ## Guides for Builders 15 | 16 | Whether you're a developer building a app on OP Mainnet, a node operator running an OP Mainnet node, or a chain operator launching your own OP Stack chain, you'll find everything you need to get started right here. 17 | 18 | 19 | } /> 20 | 21 | } /> 22 | 23 | } /> 24 | 25 | } /> 26 | 27 | } /> 28 | 29 | 30 | ## Featured Tools 31 | 32 | Check out these amazing tools, so you can get building with Optimism. 33 | 34 | 35 | } /> 36 | 37 | } /> 38 | 39 | } /> 40 | 41 | } /> 42 | 43 | 44 | ## Learn About Optimism 45 | 46 | OP Mainnet is an [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306) Layer 2 blockchain connected to Ethereum. 47 | The OP Stack is the standardized, shared, and open-source development stack that makes it easy to spin up your own production-ready Layer 2 blockchain just like OP Mainnet. 48 | The Superchain is a network of OP Stack chains that share a bridging protocol, governance system, and more. 49 | We've got you covered with these detailed guides to help you learn all about Optimism's tech stack. 50 | 51 | 52 | } /> 53 | 54 | } /> 55 | 56 | } /> 57 | 58 | -------------------------------------------------------------------------------- /patches/remark-code-import@1.2.0.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dist/index.js b/dist/index.js 2 | index f936fe717f14005071748776347002a8e6bd366b..0af1a1f8035f0e9a3ac049631f30ea184c57b383 100644 3 | --- a/dist/index.js 4 | +++ b/dist/index.js 5 | @@ -1,3 +1,4 @@ 6 | +import crypto from 'node:crypto'; 7 | import fs from 'node:fs'; 8 | import path from 'node:path'; 9 | import { EOL } from 'node:os'; 10 | @@ -40,6 +41,18 @@ function codeImport(options = {}) { 11 | if (!fileMeta) { 12 | continue; 13 | } 14 | + const hashMeta = (node.meta || '') 15 | + // Allow escaping hashes 16 | + .split(/(? meta.startsWith('hash=')); 18 | + let providedHash; 19 | + if (hashMeta) { 20 | + const hashres = /^hash=(?.+)$/.exec(hashMeta); 21 | + if (!hashres || !hashres.groups || !hashres.groups.hash) { 22 | + throw new Error(`Unable to parse hash ${hashMeta}`); 23 | + } 24 | + providedHash = hashres.groups.hash; 25 | + } 26 | if (!file.dirname) { 27 | throw new Error('"file" should be an instance of VFile'); 28 | } 29 | @@ -76,6 +89,13 @@ function codeImport(options = {}) { 30 | if (options.removeRedundantIndentations) { 31 | node.value = stripIndent(node.value); 32 | } 33 | + const actualHash = crypto.createHash('md5').update(node.value).digest('hex'); 34 | + if (!providedHash) { 35 | + reject(new Error(`Content hash not provided for ${fileAbsPath}#L${fromLine}${toLine ? `-L${toLine}` : ''}. Make sure to include the following content hash: hash=${actualHash} .`)); 36 | + } else if (actualHash !== providedHash) { 37 | + reject(new Error(`Content hash mismatch for ${fileAbsPath}#L${fromLine}${toLine ? `-L${toLine}` : ''}. Provided hash was ${providedHash}, actual hash is ${actualHash}. Check if your source content changed.`)); 38 | + return; 39 | + } 40 | resolve(); 41 | }); 42 | })); 43 | @@ -86,6 +106,13 @@ function codeImport(options = {}) { 44 | if (options.removeRedundantIndentations) { 45 | node.value = stripIndent(node.value); 46 | } 47 | + const actualHash = crypto.createHash('md5').update(node.value).digest('hex'); 48 | + if (!providedHash) { 49 | + throw new Error(`Content hash not provided for ${fileAbsPath}#L${fromLine}${toLine ? `-L${toLine}` : ''}. Make sure to include the following content hash: hash=${actualHash} .`); 50 | + } else if (actualHash !== providedHash) { 51 | + throw new Error(`Content hash mismatch for ${fileAbsPath}#L${fromLine}${toLine ? `-L${toLine}` : ''}. Provided hash was ${providedHash}, actual hash is ${actualHash}. Check if your source content changed.`); 52 | + return; 53 | + } 54 | } 55 | } 56 | if (promises.length) { 57 | -------------------------------------------------------------------------------- /pages/builders/cex-wallet-developers/wallet-support.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Supporting OP Mainnet in Your Wallet 3 | lang: en-US 4 | description: Learn how to support OP Mainnet in your wallet. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Supporting OP Mainnet in Your Wallet 10 | 11 | Check out this guide to get an overview of everything you need to know to properly support OP Mainnet within your wallet. 12 | 13 | ## Connecting to OP Mainnet 14 | 15 | OP Mainnet is designed to be [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306) and supports all of the same tooling as Ethereum. 16 | You can use your favorite Ethereum libraries and tools to work with OP Mainnet. 17 | Head over to the [Networks and RPC Endpoints](/chain/networks) page for network connection details and check out the [RPC Providers](/builders/tools/connect/rpc-providers) page for an updated list of RPC providers that support OP Mainnet. 18 | If you need to run your own OP Mainnet node, head over to the [Node Operator Overview](/builders/node-operators/overview) page. 19 | 20 | ## Native Gas Token (ETH) 21 | 22 | OP Mainnet uses ETH as its native gas token. 23 | Transactions are paid for in ETH and account balances are denominated in ETH. 24 | 25 | ## Transaction Fees 26 | 27 | OP Mainnet charges the standard gas fee for transactions, but also charges an additional L1 data fee for the cost of publishing transaction data to Ethereum. 28 | Check out the [Transaction Fees](/stack/transactions/fees) page for more information about how transaction fees work on OP Mainnet. 29 | 30 | 31 | Transactions on OP Mainnet must pay for an additional "L1 data fee" that often heavily outweighs the standard gas fee. 32 | Make sure that your wallet is configured to display this fee to your users so that they are aware of the total cost of their transaction. 33 | 34 | 35 | ## Smart Contracts 36 | 37 | Smart contracts on OP Mainnet function the same way they do on Ethereum. 38 | You can use your favorite Ethereum libraries and tools to interact with smart contracts on OP Mainnet. 39 | 40 | ## Token Addresses 41 | 42 | The ERC-20 contract address for a token on OP Mainnet may differ from the address for the same token on Ethereum. 43 | Addresses for many common tokens will differ between OP Mainnet and Ethereum. 44 | Make sure to reference the [Bridged Token Addresses](/chain/tokenlist) to confirm that you are using the correct token addresses in your application. 45 | 46 | ## Bridging ETH and ERC-20s 47 | 48 | You may need to transfer ETH or ERC-20 tokens between OP Mainnet and Ethereum. 49 | This is a useful feature for users who want to move tokens between the two networks. 50 | Refer to the [Basics of Bridging](/builders/app-developers/bridging/basics) and the [Standard Bridge](/builders/app-developers/bridging/standard-bridge) guides for more information about how to bridge ETH and ERC-20 tokens between OP Mainnet and Ethereum. 51 | 52 | ## Transaction Statuses 53 | 54 | OP Mainnet transactions have a number of different statuses during the transaction lifecycle. 55 | The status of a transaction can be useful for users. 56 | Refer to the [Transaction Statuses](/builders/app-developers/transactions/statuses) page for more information about the different transaction statuses and how to handle them in your application. 57 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/management/troubleshooting.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Troubleshooting Chain Operations 3 | lang: en-US 4 | description: Learn solutions to common problems when troubleshooting chain operations. 5 | --- 6 | 7 | # Troubleshooting: Chain Operations 8 | 9 | This page lists common troubleshooting scenarios and solutions for chain operators. 10 | 11 | ## EvmError in Contract Deployment 12 | 13 | L1 smart contract deployment fails with the following error: 14 | 15 | ```text 16 | EvmError: Revert 17 | ``` 18 | 19 | ### Solution 20 | 21 | The OP Stack uses deterministic smart contract deployments to guarantee that all contract addresses can be computed ahead of time based on a "salt" value that is provided at deployment time. 22 | Each OP Stack chain must have a unique salt value to ensure that the contract addresses do not collide with other OP Stack chains. 23 | 24 | You can avoid this error by changing the salt used when deploying the L1 smart contracts. 25 | The salt value is set by the `IMPL_SALT` environment variable when deploying the contracts. 26 | The `IMPL_SALT` value must be a 32 byte hex string. 27 | 28 | You can generate a random salt value using the following command: 29 | 30 | ```bash 31 | export IMPL_SALT=$(openssl rand -hex 32) 32 | ``` 33 | 34 | ## Failed to Find the L2 Heads to Start From 35 | 36 | `op-node` fails to execute the derviation process with the following error: 37 | 38 | ```text 39 | WARN [02-16|21:22:02.868] Derivation process temporary error attempts=14 err="stage 0 failed resetting: temp: failed to find the L2 Heads to start from: failed to fetch L2 block by hash 0x0000000000000000000000000000000000000000000000000000000000000000: failed to determine block-hash of hash 0x0000000000000000000000000000000000000000000000000000000000000000, could not get payload: not found" 40 | ``` 41 | 42 | ### Solution 43 | 44 | This error can occur when the data directory for `op-geth` becomes corrupted (for example, as a result of a computer crash). 45 | You will need to reinitialize the data directory. 46 | 47 | If you are following the tutorial for [Creating Your Own L2 Rollup](../tutorials/create-l2-rollup), make sure to rerun the commands within the [Initialize `op-geth`](../tutorials/create-l2-rollup#initialize-op-geth) section. 48 | 49 | If you are not following the tutorial, make sure to take the following steps: 50 | 51 | 1. Stop `op-node` and `op-geth`. 52 | 2. Delete the corresponding `op-geth` data directory. 53 | 3. If running a Sequencer node, import the Sequencer key into the `op-geth` keychain. 54 | 4. Reinitialize `op-geth` with the `genesis.json` file. 55 | 5. Restart `op-geth` and `op-node`. 56 | 57 | ## Batcher Unable to Publish Transaction 58 | 59 | `op-batcher` fails to publish transactions with the following error: 60 | 61 | ```text 62 | INFO [03-21|14:22:32.754] publishing transaction service=batcher txHash=2ace6d..7eb248 nonce=2516 gasTipCap=2,340,741 gasFeeCap=172,028,434,515 63 | ERROR[03-21|14:22:32.844] unable to publish transaction service=batcher txHash=2ace6d..7eb248 nonce=2516 gasTipCap=2,340,741 gasFeeCap=172,028,434,515 err="insufficient funds for gas * price + value" 64 | ``` 65 | 66 | ### Solution 67 | 68 | You will observe this error if the `op-batcher` runs out of ETH to publish transactions to L1. 69 | This problem can be resolved by sending additional ETH to the `op-batcher` address. 70 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/hacks/settlement.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Settlement Hacks 3 | lang: en-US 4 | description: Learn how to modify the default Settlement Layer module for an OP Stack chain. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Settlement Hacks 10 | 11 | 12 | OP Stack Hacks are explicitly things that you can do with the OP Stack that are *not* currently intended for production use. 13 | 14 | OP Stack Hacks are not for the faint of heart. You will not be able to receive significant developer support for OP Stack Hacks — be prepared to get your hands dirty and to work without support. 15 | 16 | 17 | # Overview 18 | 19 | This guide teaches you how to modify the default Settlement Layer module for an OP Stack chain. The Settlement Layer includes modules that are used by third-party chains to establish a *view* of the state of your OP Stack chain. This view can then be used by applications on those chains to make decisions based on the state of your OP Stack chain. Third-party chains can be any other blockchain, including other OP Stack chains. One common Settlement Layer mechanism is a withdrawal system that allows users to send state from your OP Stack chain to the third-party chain. Modifications to this layer typically involve introducing new modules or tweaking the security model of existing modules. 20 | 21 | ## Default 22 | 23 | The default Settlement Layer module is currently the Attestation Proof Optimistic Settlement module. This module allows a third-party chain to become aware of the state of an OP Stack chain through an Optimistic protocol where challenges can be executed alongside a threshold of attestations from a pre-defined set of addresses over a state that differs from the proposed state. With a Cannon fault proof shipped to production, this default module can be replaced with a module that allows anyone to challenge proposals by playing the Cannon dispute game. 24 | 25 | ## Security 26 | 27 | Modifications to the Settlement Layer can strongly impact the security of common mechanisms like user withdrawals. A decreased withdrawal delay can, for instance, open the door to gas spam attacks that make challenges exceedingly expensive. It is generally not recommended to modify the Settlement Layer unless you know what you're doing. 28 | 29 | ## Modding 30 | 31 | ### Tweaked parameters 32 | 33 | One simple modification to the Settlement Layer is to tweak the parameters of the default Optimistic state withdrawal mechanism. For example, the withdrawal period can be reduced if a smaller withdrawal period would be sufficient to secure your system. 34 | 35 | ### Custom proofs 36 | 37 | Settlement Layer modules use a proof system to verify the correctness of the state of your OP Stack chain as proposed on the third-party chain. In general, these proofs are either Optimistic proofs that require a withdrawal delay or Validity proofs that use a mathematical proof system to assert the validity of the proposal. The current Attestation Proof Optimistic Settlement module could be replaced with a fault proof system. 38 | 39 | ### Multiple modules 40 | 41 | There is no requirement that a system only have one Settlement Layer module. It is possible to use one or more Settlement Layer modules on one or more third-party chains. A system that aims to bridge state between two chains will likely need to use one Data Availability Layer module and one Settlement Layer module per chain. 42 | -------------------------------------------------------------------------------- /pages/chain/identity/schemas.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Schemas 3 | lang: en-US 4 | description: Learn about schema structures and the type of data that can be included in attestations. 5 | --- 6 | 7 | # Schemas 8 | 9 | Schemas define the structure and type of data that can be included in an attestation. 10 | 11 | Below you will find a list of relevant schemas that are being used on OP Mainnet. Schemas are built using the [Ethereum Attestation Service](https://docs.attest.sh/docs/welcome). 12 | 13 | ## General Schemas 14 | 15 | * **[Optimist Profile schema UID](https://optimism.easscan.org/schema/view/0xac4c92fc5c7babed88f78a917cdbcdc1c496a8f4ab2d5b2ec29402736b2cf929):** `​​0xac4c92fc5c7babed88f78a917cdbcdc1c496a8f4ab2d5b2ec29402736b2cf929` 16 | * **[Gitcoin Passport V1 scores schema UID](https://optimism.easscan.org/schema/view/0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89):** `0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89` 17 | 18 | ## Developer schemas 19 | 20 | * **[Superchain Faucet schema UID](https://optimism.easscan.org/schema/view/0x98ef220cd2f94de79fbc343ef982bfa8f5b315dec6a08f413680ecb7085624d7):** `0x98ef220cd2f94de79fbc343ef982bfa8f5b315dec6a08f413680ecb7085624d7` 21 | 22 | ## Governance schemas 23 | * **[Season 4 Co-grant participant schema UID](https://optimism.easscan.org/schema/view/0x401a80196f3805c57b00482ae2b575a9f270562b6b6de7711af9837f08fa0faf):** `0x401a80196f3805c57b00482ae2b575a9f270562b6b6de7711af9837f08fa0faf` Important: Remember to verify the attester address is `0x3C7820f2874b665AC7471f84f5cbd6E12871F4cC` or `0x2a0eB7cAE52B68e94FF6ab0bFcf0dF8EeEB624be` 24 | * **[Governance contribution schema UID](https://optimism.easscan.org/schema/view/0xef874554718a2afc254b064e5ce9c58c9082fb9f770250499bf406fc112bd315):** `0xef874554718a2afc254b064e5ce9c58c9082fb9f770250499bf406fc112bd315`. Important: Remember to verify the attester address is `0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9` 25 | 26 | ## RetroPGF Schemas 27 | * **[RetroPGF Badgeholders schema UID](https://optimism.easscan.org/schema/view/0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b):**`0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b`. Important: Remember to verify the attester address is `0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9` 28 | * **[RetroPGF Governance contributor schema UID](https://optimism.easscan.org/schema/view/0x3743be2afa818ee40304516c153427be55931f238d961af5d98653a93192cdb3):**`0x3743be2afa818ee40304516c153427be55931f238d961af5d98653a93192cdb3`. Important: Remember to verify the attester address is `0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9` 29 | * **[RetroPGF 3 Approved Application schema UID](https://optimism.easscan.org/schema/view/0xebbf697d5d3ca4b53579917ffc3597fb8d1a85b8c6ca10ec10039709903b9277):**`0xebbf697d5d3ca4b53579917ffc3597fb8d1a85b8c6ca10ec10039709903b9277`. Important: Remember to verify the attester address is `0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9` 30 | * **[RetroPGF 3 Application schema UID](https://optimism.easscan.org/schema/view/0x76e98cce95f3ba992c2ee25cef25f756495147608a3da3aa2e5ca43109fe77cc):** `0x76e98cce95f3ba992c2ee25cef25f756495147608a3da3aa2e5ca43109fe77cc` 31 | * **[RetroPGF 3 Lists schema UID](https://optimism.easscan.org/schema/view/0x3e3e2172aebb902cf7aa6e1820809c5b469af139e7a4265442b1c22b97c6b2a5):** `0x3e3e2172aebb902cf7aa6e1820809c5b469af139e7a4265442b1c22b97c6b2a5` 32 | 33 | ## Next Steps 34 | 35 | For detailed instructions, see [Optimist Profile](optimist-profile#common-questions). 36 | -------------------------------------------------------------------------------- /pages/chain/networks.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: OP Networks and Public RPC Endpoints 3 | lang: en-US 4 | description: Learn about the different OP networks and public RPC endpoints. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # OP Networks and Public RPC Endpoints 10 | 11 | This reference guide provides a listing of the different OP networks and public RPC endpoints. 12 | 13 | 14 | The public RPC URLs provided below are rate limited and do not support websocket connections. 15 | If you are experiencing rate limiting issues or need websocket functionality, consider [running your own node](/builders/node-operators/overview) or signing up for a [third-party RPC provider](/builders/tools/connect/rpc-providers). 16 | 17 | 18 | ## OP Mainnet 19 | 20 | | Parameter | Value | 21 | | --------------------------- | ---------------------------------------------------------------------------------------- | 22 | | Network Name | `OP Mainnet` | 23 | | Chain ID | `10` | 24 | | Currency Symbol1 | ETH | 25 | | Explorer | [https://explorer.optimism.io](https://explorer.optimism.io) | 26 | | Public RPC URL | [https://mainnet.optimism.io](https://mainnet.optimism.io) | 27 | | Sequencer URL2 | [https://mainnet-sequencer.optimism.io](https://mainnet-sequencer.optimism.io) | 28 | | Contract Addresses | Refer to the [Contract Addresses page](/chain/addresses#mainnet) | 29 | | Connect Wallet | [Click here to connect your wallet to OP Mainnet](https://chainid.link?network=optimism) | 30 | 31 | 1. The "currency symbol" is required by some wallets like MetaMask. 32 | 2. The sequencer URL is write only. 33 | 34 | ## OP Sepolia 35 | 36 | | Parameter | Value | 37 | | --------------------------- | ------------------------------------------------------------------------------------------ | 38 | | Network Name | `OP Sepolia` | 39 | | Chain ID | `11155420` | 40 | | Currency Symbol1 | ETH | 41 | | Explorer | [https://sepolia-optimistic.etherscan.io](https://sepolia-optimistic.etherscan.io) | 42 | | Public RPC URL | [https://sepolia.optimism.io](https://sepolia.optimism.io) | 43 | | Sequencer URL2 | [https://sepolia-sequencer.optimism.io](https://sepolia-sequencer.optimism.io) | 44 | | Contract Addresses | Refer to the [Contract Addresses page](/chain/addresses#testnet-sepolia) | 45 | | Connect Wallet | [Click here to connect your wallet to OP Sepolia](https://chainid.link?network=op-sepolia) | 46 | 47 | 1. The "currency symbol" is required by some wallets like MetaMask. 48 | 2. The sequencer URL is write only. 49 | -------------------------------------------------------------------------------- /pages/chain/getting-started.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Getting Started Developing for OP Mainnet 3 | lang: en-US 4 | description: Learn the basics of OP Mainnet development. 5 | --- 6 | 7 | import { Steps } from 'nextra/components' 8 | 9 | # Getting Started Developing for OP Mainnet 10 | 11 | This guide explains the basics of OP Mainnet development. 12 | OP Mainnet is [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), meaning we run a slightly modified version of the same `geth` you run on mainnet. 13 | Therefore, the differences between OP Mainnet development and Ethereum development are minor. 14 | But a few differences [do exist](/chain/differences). 15 | 16 | ## OP Mainnet and OP Sepolia Endpoint URLs 17 | 18 | To access any Ethereum type network you need an endpoint. [These providers](/builders/tools/connect/rpc-providers) support our networks. 19 | 20 | ### Network Choice 21 | 22 | For development purposes we recommend you use either a local development node or [OP Sepolia](https://sepolia-optimism.etherscan.io). 23 | That way you don't need to spend real money. 24 | If you need ETH on OP Sepolia for testing purposes, [you can use this faucet](https://app.optimism.io/faucet?utm_source=docs). 25 | 26 | ## Interacting with Contracts on OP Mainnet or OP Sepolia 27 | 28 | We have Hardhat's Greeter contract on OP Sepolia at address [0x9d334aFBa83865E67a9219830ADA57aaA9406681](https://sepolia-optimism.etherscan.io/address/0x9d334aFBa83865E67a9219830ADA57aaA9406681#code). 29 | You can verify your development stack configuration by interacting with it. 30 | 31 | ## Development Stacks 32 | 33 | As you can see in the different development stacks below, the way you deploy contracts and interact with them on OP Mainnet or OP Sepolia is almost identical to the way you do it with L1 Ethereum. 34 | The most visible difference is that you have to specify a different endpoint (of course). 35 | The list of other differences is [here](differences). 36 | 37 | * [Apeworx](https://www.apeworx.io/) 38 | * [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html) 39 | * [Foundry](https://getfoundry.sh/) 40 | * [Hardhat](https://hardhat.org/) 41 | * [Remix](https://remix.ethereum.org) 42 | * [Truffle](https://trufflesuite.com/) 43 | * [Waffle](https://getwaffle.io/) 44 | 45 | ## Best Practices 46 | 47 | ### Use Provided EVM 48 | 49 | It is best to start development with the EVM provided by the development stack. 50 | Not only is it faster, but such EVMs often have extra features, such as the [ability to log messages from Solidity](https://hardhat.org/tutorial/debugging-with-hardhat-network.html) or a [graphical user interface](https://trufflesuite.com/ganache/). 51 | 52 | ### Debug Before Deploying 53 | 54 | After you are done with that development, debug your decentralized application using either a [development node](/chain/testing/dev-node) or the [Sepolia test network](/chain/networks). 55 | This lets you debug parts that are OP Mainnet specific such as calls to bridges to transfer ETH or tokens between layers. 56 | 57 | Only when you have a version that works well on a test network should you deploy to the production network, where every transaction has a cost. 58 | 59 | ### Contract Source Verification 60 | 61 | You don't have to upload your source code to [block explorers](/builders/tools/build/block-explorers), but it is a good idea. 62 | On the test network, it lets you issue queries and transactions from the explorer's user interface. 63 | On the production network, it lets users know exactly what your contract does, which is conducive to trust. 64 | 65 | Just remember, if you use [the Etherscan API](https://explorer.optimism.io/apis), you need one API key for OP Mainnet and a separate one for OP Sepolia. 66 | -------------------------------------------------------------------------------- /public/tutorials/standard-bridge-custom-token.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | 4 | import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; 6 | import { IOptimismMintableERC20 } from "https://github.com/ethereum-optimism/optimism/blob/v1.1.4/packages/contracts-bedrock/src/universal/IOptimismMintableERC20.sol"; 7 | 8 | contract MyCustomL2Token is IOptimismMintableERC20, ERC20 { 9 | /// @notice Address of the corresponding version of this token on the remote chain. 10 | address public immutable REMOTE_TOKEN; 11 | 12 | /// @notice Address of the StandardBridge on this network. 13 | address public immutable BRIDGE; 14 | 15 | /// @notice Emitted whenever tokens are minted for an account. 16 | /// @param account Address of the account tokens are being minted for. 17 | /// @param amount Amount of tokens minted. 18 | event Mint(address indexed account, uint256 amount); 19 | 20 | /// @notice Emitted whenever tokens are burned from an account. 21 | /// @param account Address of the account tokens are being burned from. 22 | /// @param amount Amount of tokens burned. 23 | event Burn(address indexed account, uint256 amount); 24 | 25 | /// @notice A modifier that only allows the bridge to call. 26 | modifier onlyBridge() { 27 | require(msg.sender == BRIDGE, "MyCustomL2Token: only bridge can mint and burn"); 28 | _; 29 | } 30 | 31 | /// @param _bridge Address of the L2 standard bridge. 32 | /// @param _remoteToken Address of the corresponding L1 token. 33 | /// @param _name ERC20 name. 34 | /// @param _symbol ERC20 symbol. 35 | constructor( 36 | address _bridge, 37 | address _remoteToken, 38 | string memory _name, 39 | string memory _symbol 40 | ) 41 | ERC20(_name, _symbol) 42 | { 43 | REMOTE_TOKEN = _remoteToken; 44 | BRIDGE = _bridge; 45 | } 46 | 47 | /// @custom:legacy 48 | /// @notice Legacy getter for REMOTE_TOKEN. 49 | function remoteToken() public view returns (address) { 50 | return REMOTE_TOKEN; 51 | } 52 | 53 | /// @custom:legacy 54 | /// @notice Legacy getter for BRIDGE. 55 | function bridge() public view returns (address) { 56 | return BRIDGE; 57 | } 58 | 59 | /// @notice ERC165 interface check function. 60 | /// @param _interfaceId Interface ID to check. 61 | /// @return Whether or not the interface is supported by this contract. 62 | function supportsInterface(bytes4 _interfaceId) external pure virtual returns (bool) { 63 | bytes4 iface1 = type(IERC165).interfaceId; 64 | // Interface corresponding to the updated OptimismMintableERC20 (this contract). 65 | bytes4 iface2 = type(IOptimismMintableERC20).interfaceId; 66 | return _interfaceId == iface1 || _interfaceId == iface2; 67 | } 68 | 69 | /// @notice Allows the StandardBridge on this network to mint tokens. 70 | /// @param _to Address to mint tokens to. 71 | /// @param _amount Amount of tokens to mint. 72 | function mint( 73 | address _to, 74 | uint256 _amount 75 | ) 76 | external 77 | virtual 78 | override(IOptimismMintableERC20) 79 | onlyBridge 80 | { 81 | _mint(_to, _amount); 82 | emit Mint(_to, _amount); 83 | } 84 | 85 | /// @notice Prevents tokens from being withdrawn to L1. 86 | function burn( 87 | address, 88 | uint256 89 | ) 90 | external 91 | virtual 92 | override(IOptimismMintableERC20) 93 | onlyBridge 94 | { 95 | revert("MyCustomL2Token cannot be withdrawn"); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /pages/builders/cex-wallet-developers/cex-support.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Supporting OP Mainnet in Your Exchange 3 | lang: en-US 4 | description: Learn how to support OP Mainnet in your exchange. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Supporting OP Mainnet in Your Exchange 10 | 11 | Check out this guide to get an overview of everything you need to know to properly support OP Mainnet within your exchange. 12 | 13 | ## Connecting to OP Mainnet 14 | 15 | OP Mainnet is designed to be [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306) and supports all of the same tooling as Ethereum. 16 | You can use your favorite Ethereum libraries and tools to work with OP Mainnet. 17 | Head over to the [Networks and RPC Endpoints](/chain/networks) page for network connection details and check out the [RPC Providers](/builders/tools/connect/rpc-providers) page for an updated list of RPC providers that support OP Mainnet. 18 | If you need to run your own OP Mainnet node, head over to the [Node Operator Overview](/builders/node-operators/overview) page. 19 | 20 | ## Native Gas Token (ETH) 21 | 22 | OP Mainnet uses ETH as its native gas token. 23 | Transactions are paid for in ETH and account balances are denominated in ETH. 24 | 25 | ## Transaction Fees 26 | 27 | OP Mainnet charges the standard gas fee for transactions, but also charges an additional L1 data fee for the cost of publishing transaction data to Ethereum. 28 | Check out the [Transaction Fees](/stack/transactions/fees) page for more information about how transaction fees work on OP Mainnet. 29 | 30 | ## Smart Contracts 31 | 32 | Smart contracts on OP Mainnet function the same way they do on Ethereum. 33 | This includes ERC-20 token contracts. 34 | You can use your existing logic for managing withdrawals and deposits of ERC-20 tokens. 35 | 36 | ## Token Addresses 37 | 38 | The ERC-20 contract address for a token on OP Mainnet may differ from the address for the same token on Ethereum. 39 | Make sure to reference the [Bridged Token Addresses](/chain/tokenlist) to confirm that you are using the correct token addresses in your application. 40 | 41 | ## Bridging ETH and ERC-20s 42 | 43 | You may need to transfer ETH or ERC-20 tokens between OP Mainnet and Ethereum. 44 | For instance, you may need to use this functionality to balance the supply of ETH on OP Mainnet and Ethereum depending on the demand for withdrawals and deposits on the two networks. 45 | Refer to the [Basics of Bridging](/builders/app-developers/bridging/basics) and the [Standard Bridge](/builders/app-developers/bridging/standard-bridge) guides for more information about how to bridge ETH and ERC-20 tokens between OP Mainnet and Ethereum. 46 | 47 | ## Transaction Statuses 48 | 49 | OP Mainnet transactions have a number of different statuses during the transaction lifecycle. 50 | Refer to the [Transaction Statuses](/builders/app-developers/transactions/statuses) page for more information about the different transaction statuses and how to handle them in your application. 51 | 52 | 53 | Transaction statuses can be critical for the security of your application. 54 | For instance, you may only want to credit a deposit if the transaction is finalized. 55 | Make sure to understand the various transaction statuses to avoid security issues in your application. 56 | 57 | 58 | ## Audits and Security Reviews 59 | 60 | The OP Stack codebase upon which OP Mainnet is built has undergone a number of security reviews. 61 | Visit [GitHub](https://github.com/ethereum-optimism/optimism/tree/develop/docs/security-reviews) for a full list of the most recent reports. 62 | Additionally, refer to the [Security Model & FAQ](/chain/security/faq) page for more information about the security model of OP Mainnet. 63 | -------------------------------------------------------------------------------- /pages/chain/security/security-policy.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Security Policy and Bug Bounty Program 3 | lang: en-US 4 | description: Learn about the bug bounty program and best practices for reporting bugs in OP Stack and OP Mainnet codebase. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Security Policy and Bug Bounty Program 10 | 11 | This page describes general best practices for reporting bugs and provides specific reporting guidelines for OP Stack and OP Mainnet code contained within the [ethereum-optimism](https://github.com/ethereum-optimism) GitHub organization. 12 | 13 | 14 | **Do not** disclose vulnerabilities publicly or by executing them against a production network. If you do, will you not only be putting users at risk, but you will forfeit your right to a reward. Always follow the appropriate reporting pathways as described below. 15 | 16 | * **Do not** disclose the vulnerability publicly, for example by filing a public ticket. 17 | * **Do not** test the vulnerability on a publicly available network, either the testnet or the mainnet. 18 | 19 | 20 | ## Optimism Bug Bounty Program 21 | 22 | The Optimism Bug Bounty Program offers up to [$2,000,042](https://immunefi.com/bounty/optimism/) for critical vulnerabilities found in the OP Mainnet codebase. 23 | Below you can find information about the various available bug bounty programs and how to report bugs that are not covered by an existing bounty. 24 | 25 | ### Main Bounty Page 26 | 27 | Optimism has a very detailed [Bug Bounty Page on Immunefi](https://immunefi.com/bounty/optimism/). In the listing you can find all the information relating to components in scope, reporting, and the payout process. 28 | 29 | ### Unscoped Bugs 30 | 31 | If you think you have found a significant bug or vulnerabilities in OP Stack smart contracts, infrastructure, etc., even if that component is not covered by an existing bug bounty, please report it to via the [OP Mainnet Immunefi program](https://immunefi.com/bounty/optimism/). The impact of any and all reported issues will be considered and the program has previously rewarded security researchers for bugs not within its stated scope. 32 | 33 | ## Reporting Other Vulnerabilities 34 | 35 | For vulnerabilities in any websites, email servers, or other non-critical infrastructure within the OP Stack, please contact the Foundation's service provider at [security@oplabs.co](mailto:security@oplabs.co) and include detailed instructions for confirming and reproducing the vulnerability. 36 | 37 | ### Vulnerability Disclosure 38 | 39 | Each OP Stack component maintainer may determine its own process for vulnerability disclosure. However, the following describes a recommended process for disclosure. 40 | 41 | In the event that an OP Stack component maintainer learns of a critical security vulnerability, the maintainer reserves the right to silently fix it without immediately publicly disclosing the existence or nature of the vulnerability. 42 | 43 | In such a scenario, the disclosure process used is as follows: 44 | 45 | 1. Silently fix the vulnerability and include the fix in release X. 46 | 2. After 4-8 weeks, disclose that release X contained a security fix. 47 | 3. After an additional 4-8 weeks, publish details of the vulnerability, along with credit to the reporter (with express permission from the reporter). 48 | 49 | ### Rights of Maintainers 50 | 51 | Alongside this policy, maintainers also reserve the right to: 52 | 53 | * Bypass this policy and publish details on a shorter timeline. 54 | * Directly notify a subset of downstream users prior to making a public announcement. 55 | 56 | This policy is based the [Geth](https://geth.ethereum.org/) team's [silent patch policy](https://geth.ethereum.org/docs/developers/geth-developer/disclosures#why-silent-patches). 57 | -------------------------------------------------------------------------------- /pages/builders/chain-operators/hacks/derivation.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Derivation Hacks 3 | lang: en-US 4 | description: Learn how to modify the default Derivation layer module for an OP Stack chain. 5 | --- 6 | 7 | import { Callout } from 'nextra/components' 8 | 9 | # Derivation Hacks 10 | 11 | 12 | OP Stack Hacks are explicitly things that you can do with the OP Stack that are *not* currently intended for production use. 13 | 14 | OP Stack Hacks are not for the faint of heart. You will not be able to receive significant developer support for OP Stack Hacks — be prepared to get your hands dirty and to work without support. 15 | 16 | 17 | ## Overview 18 | 19 | This guide teaches you how to modify the default Derivation layer module for an OP Stack chain. The Derivation layer is responsible for parsing the raw inputs from the Data Availability layer and converting them into [Engine API](https://github.com/ethereum/execution-apis/tree/main/src/engine) payloads to be sent to the Execution layer. The Derivation Layer is generally tightly coupled to the Data Availability layer because it must understand both the APIs for the Data Availability layer module(s) of choice and the format of the raw data published to the chosen module(s). 20 | 21 | ## Default 22 | 23 | The default Derivation layer module is the Rollup module. This module derives transactions from three sources: Sequencer transactions, user deposits, and L1 blocks. The Rollup module also enforces certain ordering properties that, for example, guarantee that user deposits are always included in the L2 chain within a certain configurable amount of time. 24 | 25 | ## Security 26 | 27 | Modifying the Derivation layer can have unintended consequences. For example, removing or extending the time window in which user deposits must be included can allow a Sequencer to censor the L2 chain. Because of the flexibility of the Derivation layer, the exact impact of any change is likely to be unique to the specifics of the change. The negative impacts of any modifications should be carefully considered on a case-by-case basis. 28 | 29 | ## Modding 30 | 31 | ### EVM Event-Triggered Transactions 32 | 33 | The default Rollup configuration of the OP Stack includes "deposited"transactions that are triggered whenever a specific event is emitted by the `OptimismPortal` contract on L1. Using the same principle, an OP Stack chain can derive transactions from events emitted by *any* contract on an EVM-based DA. Refer to [attributes.go](https://github.com/ethereum-optimism/optimism/blob/e468b66efedc5f47f4e04dc1acc803d4db2ce383/op-node/rollup/derive/attributes.go#L70) to understand how deposited transactions are derived and how custom transactions can be created. 34 | 35 | ### EVM Block-Triggered Transactions 36 | 37 | Like with events, transactions on an OP Stack chain can be triggered whenever a new block is published on an EVM-based DA. The default Rollup configuration of the OP Stack already includes a block-triggered transaction in the form of [the "L1 info"transaction](https://github.com/ethereum-optimism/optimism/blob/e468b66efedc5f47f4e04dc1acc803d4db2ce383/op-node/rollup/derive/attributes.go#L103) that relays information like the latest block hash, timestamp, and base fee into L2. The Getting Started guide demonstrates the addition of a new block-triggered transaction in the form of a new transaction that reports the amount of gas burned via the base fee on L1. 38 | 39 | ### And much, much more… 40 | 41 | The Derivation layer is one of the most flexible layers of the stack. Transactions can be generated from all sorts of raw input data and can be triggered from all sorts of conditions. You can derive transactions from any piece of data that can be found in the Data Availability layer modules! 42 | 43 | [Tutorial: Adding attributes to the derivation function](/builders/chain-operators/tutorials/adding-derivation-attributes). 44 | --------------------------------------------------------------------------------