diff --git a/.changeset/fluffy-geese-yell.md b/.changeset/fluffy-geese-yell.md deleted file mode 100644 index b88f17394596d..0000000000000 --- a/.changeset/fluffy-geese-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@eth-optimism/atst': minor ---- - -Remove broken allowFailures as option diff --git a/.changeset/metal-feet-give.md b/.changeset/metal-feet-give.md deleted file mode 100644 index d3b64a12708ec..0000000000000 --- a/.changeset/metal-feet-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@eth-optimism/atst': minor ---- - -Move react api to @eth-optimism/atst/react so react isn't required to run the core sdk diff --git a/.changeset/sixty-days-explain.md b/.changeset/sixty-days-explain.md deleted file mode 100644 index f6f621878bfab..0000000000000 --- a/.changeset/sixty-days-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@eth-optimism/atst': patch ---- - -Fixed bug with atst not defaulting to currently connected chain diff --git a/.changeset/slimy-mangos-brake.md b/.changeset/slimy-mangos-brake.md deleted file mode 100644 index 2ec9d8e5c848c..0000000000000 --- a/.changeset/slimy-mangos-brake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@eth-optimism/atst': minor ---- - -Deprecate parseAttestationBytes and createRawKey in favor for createKey, createValue diff --git a/.circleci/config.yml b/.circleci/config.yml index 5546da87a6402..706e5969a4749 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,9 +66,37 @@ jobs: - checkout - check-changed: patterns: op-bindings,op-chain-ops,packages/ + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} - run: name: Install dependencies - command: yarn && git diff --exit-code + command: yarn install && git diff --exit-code + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-v2-{{ checksum "yarn.lock" }} + paths: + - "node_modules" + - "packages/actor-tests/node_modules" + - "packages/atst/node_modules" + - "packages/balance-monitor/node_modules" + - "packages/chain-mon/node_modules" + - "packages/common-ts/node_modules" + - "packages/contracts/node_modules" + - "packages/contracts-bedrock/node_modules" + - "packages/contracts-governance/node_modules" + - "packages/contracts-periphery/node_modules" + - "packages/core-utils/node_modules" + - "packages/data-transport-layer/node_modules" + - "packages/drippie-mon/node_modules" + - "packages/fault-detector/node_modules" + - "packages/hardhat-deploy-config/node_modules" + - "packages/integration-tests-bedrock/node_modules" + - "packages/message-relayer/node_modules" + - "packages/migration-data/node_modules" + - "packages/replica-healthcheck/node_modules" + - "packages/sdk/node_modules" - run: name: print forge version command: forge --version @@ -78,8 +106,6 @@ jobs: - persist_to_workspace: root: "." paths: - - "node_modules" - - "packages/*/node_modules" - "packages/*/dist" - "packages/*/artifacts" - "packages/contracts/src/contract-artifacts.ts" @@ -163,6 +189,10 @@ jobs: description: Docker build context type: string default: "." + docker_target: + description: "target build stage" + type: string + default: "" registry: description: Docker registry type: string @@ -196,7 +226,7 @@ jobs: DOCKER_TAGS=$(echo -ne <> | sed "s/,/\n/g" | sed "s/[^a-zA-Z0-9\n]/-/g" | sed -e "s|^|-t ${IMAGE_BASE}:|") docker context create buildx-build docker buildx create --use buildx-build - docker buildx build --platform=<> --push \ + docker buildx build --platform=<> --target "<>" --push \ $(echo -ne $DOCKER_TAGS | tr '\n' ' ') \ -f <> \ <> @@ -263,18 +293,12 @@ jobs: steps: - checkout - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} - check-changed: patterns: contracts-bedrock,hardhat-deploy-config - - run: - name: lint - command: yarn lint:check - working_directory: packages/contracts-bedrock - - run: - name: slither - command: | - slither --version - yarn slither || exit 0 - working_directory: packages/contracts-bedrock - run: name: print forge version command: forge --version @@ -291,6 +315,29 @@ jobs: command: codecov --verbose --clean --flags contracts-bedrock-tests environment: FOUNDRY_PROFILE: ci + + contracts-bedrock-checks: + docker: + - image: ethereumoptimism/ci-builder:latest + steps: + - checkout + - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} + - check-changed: + patterns: contracts-bedrock,hardhat-deploy-config + - run: + name: lint + command: yarn lint:check + working_directory: packages/contracts-bedrock + - run: + name: slither + command: | + slither --version + yarn slither || exit 0 + working_directory: packages/contracts-bedrock - run: name: gas snapshot command: | @@ -299,10 +346,6 @@ jobs: environment: FOUNDRY_PROFILE: ci working_directory: packages/contracts-bedrock - - run: - name: validate spacers - command: yarn validate-spacers - working_directory: packages/contracts-bedrock - run: name: storage snapshot command: yarn storage-snapshot && git diff --exit-code .storage-layout @@ -312,6 +355,23 @@ jobs: command: yarn autogen:invariant-docs && git diff --exit-code ./invariant-docs/*.md working_directory: packages/contracts-bedrock + contracts-bedrock-validate-spaces: + docker: + - image: ethereumoptimism/ci-builder:latest + steps: + - checkout + - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} + - check-changed: + patterns: contracts-bedrock,hardhat-deploy-config + - run: + name: validate spacers + command: yarn validate-spacers + working_directory: packages/contracts-bedrock + bedrock-echidna-build: docker: - image: ethereumoptimism/ci-builder:latest @@ -345,6 +405,10 @@ jobs: steps: - checkout - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} - check-changed: patterns: contracts-bedrock,contracts - run: @@ -360,6 +424,10 @@ jobs: steps: - checkout - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} - check-changed: patterns: contracts-bedrock,op-bindings - run: @@ -385,6 +453,10 @@ jobs: steps: - checkout - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} - check-changed: patterns: <>,<> - run: @@ -438,6 +510,10 @@ jobs: steps: - checkout - attach_workspace: { at: "." } + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-v2-{{ checksum "yarn.lock" }} - check-changed: patterns: packages # Note: The below needs to be manually configured whenever we @@ -466,10 +542,6 @@ jobs: name: Check integration-tests command: npx depcheck working_directory: integration-tests - - run: - name: Check two-step-monitor - command: npx depcheck - working_directory: packages/two-step-monitor go-lint: parameters: @@ -845,7 +917,7 @@ jobs: ./hive \ -sim=<> \ -sim.loglevel=5 \ - -client=go-ethereum,op-geth_optimism-history,op-proposer_<>,op-batcher_<>,op-node_<> |& tee /tmp/hive.log || echo "failed." + -client=go-ethereum,op-geth_optimism,op-proposer_<>,op-batcher_<>,op-node_<> |& tee /tmp/hive.log || echo "failed." - run: command: | tar -cvf /tmp/workspace.tgz -C /home/circleci/project /home/circleci/project/workspace @@ -889,6 +961,12 @@ workflows: - contracts-bedrock-tests: requires: - yarn-monorepo + - contracts-bedrock-checks: + requires: + - yarn-monorepo + - contracts-bedrock-validate-spaces: + requires: + - yarn-monorepo - op-bindings-build: requires: - yarn-monorepo @@ -1132,6 +1210,14 @@ workflows: docker_tags: <>,<> context: - oplabs-gcr + - docker-publish: + name: chain-mon-docker-publish + docker_file: ./ops/docker/Dockerfile.packages + docker_name: chain-mon + docker_tags: <>,<> + docker_target: wd-mon + context: + - oplabs-gcr - hive-test: name: hive-test-rpc version: <> @@ -1227,4 +1313,4 @@ workflows: context: - oplabs-gcr-release requires: - - hold \ No newline at end of file + - hold diff --git a/LICENSE b/LICENSE index e82529982686e..a19c072c21af7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright 2020-2022 Optimism +Copyright 2020-2023 Optimism Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README.md b/README.md index 3e01556fb21c5..12984d86916f9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ If you want to build Optimism, check out the [Protocol Specs](./specs/). ## Community -General discussion happens most frequently on the [Optimism discord](https://discord.optimism.io). +General discussion happens most frequently on the [Optimism discord](https://discord-gateway.optimism.io). Governance discussion can also be found on the [Optimism Governance Forum](https://gov.optimism.io/). ## Contributing @@ -138,7 +138,7 @@ When merging commits to the `develop` branch you MUST include a changeset file i To add a changeset, run the command `yarn changeset` in the root of this monorepo. You will be presented with a small prompt to select the packages to be released, the scope of the release (major, minor, or patch), and the reason for the release. -Comments with in changeset files will be automatically included in the changelog of the package. +Comments within changeset files will be automatically included in the changelog of the package. ### Triggering Releases diff --git a/bss-core/go.mod b/bss-core/go.mod index 260853e7f42b5..fe0f51bdedc5d 100644 --- a/bss-core/go.mod +++ b/bss-core/go.mod @@ -62,8 +62,8 @@ require ( github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/crypto v0.1.0 // indirect + golang.org/x/sys v0.1.0 // indirect golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect google.golang.org/protobuf v1.27.1 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect diff --git a/bss-core/go.sum b/bss-core/go.sum index 7b4ac6d2946bb..1a27f472dfa02 100644 --- a/bss-core/go.sum +++ b/bss-core/go.sum @@ -631,8 +631,8 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 h1:syTAU9FwmvzEoIYMqcPHOcVm4H3U5u90WsvuYgwpETU= -golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -708,7 +708,7 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -790,8 +790,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -799,8 +799,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/docs/op-stack/README.md b/docs/op-stack/README.md new file mode 100644 index 0000000000000..169f69f314ce3 --- /dev/null +++ b/docs/op-stack/README.md @@ -0,0 +1,43 @@ +# The OP Stack Docs + +[![Discord](https://img.shields.io/discord/667044843901681675.svg?color=768AD4&label=discord&logo=https%3A%2F%2Fdiscordapp.com%2Fassets%2F8c9701b98ad4372b58f13fd9f65f966e.svg)](https://discord-gateway.optimism.io) +[![Twitter Follow](https://img.shields.io/twitter/follow/optimismPBC.svg?label=optimismPBC&style=social)](https://twitter.com/optimismPBC) + +The OP Stack is an open, collectively maintained development stack for blockchain ecosystems. +This repository contains the source code for the [OP Stack Docs](https://stack.optimism.io). + +## Development + +### Serving docs locally + +```sh +yarn dev +``` + +Then navigate to [http://localhost:8080](http://localhost:8080). +If that link doesn't work, double check the output of `yarn dev`. +You might already be serving something on port 8080 and the site may be on another port (e.g., 8081). + +### Building docs for production + +```sh +yarn build +``` + +You probably don't need to run this command, but now you know. + +### Editing docs + +Edit the markdown directly in [src/docs](./src/docs). + +### Adding new docs + +Add your markdown files to [src/docs](./src/docs). +You will also have to update [src/.vuepress/config.js](./src/.vuepress/config.js) if you want these docs to show up in the sidebar. + +### Updating the theme + +We currently use an ejected version of [vuepress-theme-hope](https://vuepress-theme-hope.github.io/). +Since the version we use was ejected from the original theme, you'll see a bunch of compiled JavaScript files instead of the original TypeScript files. +There's not much we can do about that right now, so you'll just need to make do and edit the raw JS if you need to make theme adjustments. +We're planning to move away from VuePress relatively soon anyway so we won't be fixing this. diff --git a/docs/op-stack/package.json b/docs/op-stack/package.json new file mode 100644 index 0000000000000..fe7768c2eeeb5 --- /dev/null +++ b/docs/op-stack/package.json @@ -0,0 +1,22 @@ +{ + "name": "@eth-optimism/op-stack-docs", + "version": "0.0.2", + "description": "The OP Stack Docs", + "main": "index.js", + "scripts": { + "dev": "vuepress dev src", + "build": "vuepress build src" + }, + "license": "MIT", + "devDependencies": { + "@vuepress/plugin-medium-zoom": "^1.8.2", + "@vuepress/plugin-pwa": "^1.9.7", + "vuepress": "^1.8.2", + "vuepress-plugin-plausible-analytics": "^0.2.1", + "vuepress-theme-hope": "^1.22.0" + }, + "dependencies": { + "check-md": "^1.0.2", + "dayjs": "^1.11.7" + } +} diff --git a/docs/op-stack/src/.vuepress/config.js b/docs/op-stack/src/.vuepress/config.js new file mode 100644 index 0000000000000..2c692dcaf43e4 --- /dev/null +++ b/docs/op-stack/src/.vuepress/config.js @@ -0,0 +1,203 @@ +const { description } = require('../../package') +const path = require('path') + +module.exports = { + title: 'OP Stack Docs', + description: description, + head: [ + ['link', { rel: 'manifest', href: '/manifest.json' }], + ['meta', { name: 'theme-color', content: '#3eaf7c' }], + ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], + ['meta', { property: 'og:image', content: 'https://stack.optimism.io/assets/logos/twitter-logo.png' }], + ['meta', { name: 'twitter:image', content: 'https://stack.optimism.io/assets/logos/twitter-logo.png' }], + ['meta', { name: 'twitter:title', content: 'OP Stack Docs' }], + ['meta', { property: 'og:title', content: 'OP Stack Docs' }], + ['meta', { name: 'twitter:card', content: 'summary' } ], + ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/assets/logos/favicon.png"}], + ], + theme: path.resolve(__dirname, './theme'), + themeConfig: { + "twitter:card": "summary", + contributor: false, + hostname: 'https://stack.optimism.io', + logo: '/assets/logos/logo.png', + docsDir: 'src', + docsRepo: 'https://github.com/ethereum-optimism/opstack-docs', + docsBranch: 'main', + lastUpdated: false, + darkmode: 'disable', + themeColor: false, + blog: false, + iconPrefix: 'far fa-', + pageInfo: false, + pwa: { + cacheHTML: false, + }, + activeHash: { + offset: -200, + }, + algolia: { + appId: 'O9WKE9RMCV', + apiKey: '00cf17cba30b374d08d7f7afead974be', + indexName: 'optimism' + }, + nav: [ + { + text: 'Home', + link: 'https://www.optimism.io/' + }, + { + text: 'OP Stack Docs', + link: '/' + }, + { + text: 'Optimism Docs', + link: 'https://community.optimism.io/' + }, + { + text: 'Governance', + link: 'https://community.optimism.io/docs/governance/' + }, + { + text: 'Community', + items: [ + { + icon: 'discord', + iconPrefix: 'fab fa-', + iconClass: 'color-discord', + text: 'Discord', + link: 'https://discord.optimism.io', + }, + { + icon: 'github', + iconPrefix: 'fab fa-', + iconClass: 'color-github', + text: 'GitHub', + link: 'https://github.com/ethereum-optimism/optimism', + }, + { + icon: 'twitter', + iconPrefix: 'fab fa-', + iconClass: 'color-twitter', + text: 'Twitter', + link: 'https://twitter.com/optimismFND', + }, + { + icon: 'twitch', + iconPrefix: 'fab fa-', + iconClass: 'color-twitch', + text: 'Twitch', + link: 'https://www.twitch.tv/optimismpbc' + }, + { + icon: 'medium', + iconPrefix: 'fab fa-', + iconClass: 'color-medium', + text: 'Blog', + link: 'https://optimismpbc.medium.com/' + }, + { + icon: 'computer-classic', + iconClass: 'color-ecosystem', + text: 'Ecosystem', + link: 'https://www.optimism.io/apps/all', + }, + { + icon: 'globe', + iconClass: 'color-optimism', + text: 'optimism.io', + link: 'https://www.optimism.io/', + } + ] + } + ], + searchPlaceholder: 'Search the docs', + sidebar: [ + { + title: "OP Stack", + collapsable: false, + children: [ + '/', + [ + '/docs/understand/design-principles.md', + 'Design Principles' + ], + '/docs/understand/landscape.md', + '/docs/understand/explainer.md' + ] + }, + { + title: "Releases", + collapsable: false, + children: [ + '/docs/releases/', + { + title: "Bedrock", + collapsable: true, + children: [ + '/docs/releases/bedrock/', + '/docs/releases/bedrock/explainer.md', + '/docs/releases/bedrock/differences.md' + ] + } + ] + }, + { + title: "Building OP Stack Rollups", + collapsable: false, + children: [ + '/docs/build/getting-started.md', + '/docs/build/conf.md', + '/docs/build/explorer.md', + { + title: "OP Stack Hacks", + collapsable: true, + children: [ + '/docs/build/hacks.md', + '/docs/build/featured.md', + '/docs/build/data-avail.md', + '/docs/build/derivation.md', + '/docs/build/execution.md', + '/docs/build/settlement.md', + { + title: "Sample Hacks", + children: [ + "/docs/build/tutorials/add-attr.md", + "/docs/build/tutorials/new-precomp.md", + ] + } // End of tutorials + ], + }, // End of OP Stack hacks + ], + }, // End of Building OP Stack Rollups + { + title: "Contributing", + collapsable: false, + children: [ + '/docs/contribute.md', + ] + }, + { + title: "Security", + collapsable: false, + children: [ + '/docs/security/faq.md', + '/docs/security/policy.md', + ] + }, + ], // end of sidebar + plugins: [ + "@vuepress/pwa", + [ + '@vuepress/plugin-medium-zoom', + { + selector: ':not(a) > img' + } + ], + "plausible-analytics" + ] +} +} + +// module.exports.themeConfig.sidebar["/docs/useful-tools/"] = module.exports.themeConfig.sidebar["/docs/developers/"] diff --git a/docs/op-stack/src/.vuepress/enhanceApp.js b/docs/op-stack/src/.vuepress/enhanceApp.js new file mode 100644 index 0000000000000..6e6764caf7988 --- /dev/null +++ b/docs/op-stack/src/.vuepress/enhanceApp.js @@ -0,0 +1,5 @@ +export default ({ router }) => { + router.addRoutes([ + { path: '/docs/', redirect: '/' }, + ]) +} diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/favicon.png b/docs/op-stack/src/.vuepress/public/assets/logos/favicon.png new file mode 100644 index 0000000000000..720c081d791b3 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/favicon.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/header.png b/docs/op-stack/src/.vuepress/public/assets/logos/header.png new file mode 100644 index 0000000000000..b74a60c7f4120 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/header.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/icon-1020x1020.png b/docs/op-stack/src/.vuepress/public/assets/logos/icon-1020x1020.png new file mode 100644 index 0000000000000..edfac6ed37caf Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/icon-1020x1020.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/icon-192x192.png b/docs/op-stack/src/.vuepress/public/assets/logos/icon-192x192.png new file mode 100644 index 0000000000000..077cdc8d8d297 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/icon-192x192.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/icon-256x256.png b/docs/op-stack/src/.vuepress/public/assets/logos/icon-256x256.png new file mode 100644 index 0000000000000..166308a2e333f Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/icon-256x256.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/icon-384x384.png b/docs/op-stack/src/.vuepress/public/assets/logos/icon-384x384.png new file mode 100644 index 0000000000000..d8c5684b2d1a5 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/icon-384x384.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/icon-512x512.png b/docs/op-stack/src/.vuepress/public/assets/logos/icon-512x512.png new file mode 100644 index 0000000000000..77c3a5b87ae4c Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/icon-512x512.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/logo.png b/docs/op-stack/src/.vuepress/public/assets/logos/logo.png new file mode 100644 index 0000000000000..2765b36977857 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/logo.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/twitter-logo.png b/docs/op-stack/src/.vuepress/public/assets/logos/twitter-logo.png new file mode 100644 index 0000000000000..0a88b9197f245 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/twitter-logo.png differ diff --git a/docs/op-stack/src/.vuepress/public/assets/logos/twitter-superchain.png b/docs/op-stack/src/.vuepress/public/assets/logos/twitter-superchain.png new file mode 100644 index 0000000000000..a2a2ac09b6625 Binary files /dev/null and b/docs/op-stack/src/.vuepress/public/assets/logos/twitter-superchain.png differ diff --git a/docs/op-stack/src/.vuepress/public/manifest.json b/docs/op-stack/src/.vuepress/public/manifest.json new file mode 100644 index 0000000000000..9c94acdbef752 --- /dev/null +++ b/docs/op-stack/src/.vuepress/public/manifest.json @@ -0,0 +1,36 @@ +{ + "name": "OP Docs", + "short_name": "OP Docs", + "description": "The official OP Docs", + "icons": [ + { + "src": "/assets/logos/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/assets/logos/icon-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/assets/logos/icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "/assets/logos/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "/assets/logos/icon-1020x1020.png", + "sizes": "any", + "type": "image/png" + } + ], + "start_url": "/index.html", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#ff0420" +} diff --git a/docs/op-stack/src/.vuepress/styles/index.styl b/docs/op-stack/src/.vuepress/styles/index.styl new file mode 100644 index 0000000000000..b4491323149da --- /dev/null +++ b/docs/op-stack/src/.vuepress/styles/index.styl @@ -0,0 +1,315 @@ +@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,600;0,700;1,600;1,700&display=swap'); +@import 'https://pro.fontawesome.com/releases/v5.15.4/css/all.css'; + +main, body, html { + font-family: 'Open Sans', sans-serif; +} + +p { + font-size: 16px; + line-height: 24px; +} + +aside.sidebar { + background-color: #F1F4F9; + border-right: none; +} + +p.sidebar-heading { + color: #323A43 !important; + font-family: 'Open Sans', sans-serif; + font-weight: 600; + font-size: 14px !important; + line-height: 24px !important; + min-height: 36px; + margin-left: 32px; + padding: 8px 16px !important; + width: calc(100% - 64px) !important; + border-radius: 8px; +} + +a.sidebar-link { + font-family: 'Open Sans', sans-serif; + font-size: 14px !important; + line-height: 24px !important; + min-height: 36px; + margin-left: 32px; + padding: 8px 16px !important; + width: calc(100% - 64px) !important; + border-radius: 8px; +} + +section.sidebar-group a.sidebar-link { + margin-left: 44px; + width: calc(100% - 64px) !important; +} + +.sidebar-links:not(.sidebar-group-items) > li > a.sidebar-link { + font-weight: 600 !important; + color: #323A43 !important; +} + +.sidebar-links:not(.sidebar-group-items) > li > a.sidebar-link.active { + border-left-color: #F1F4F9 !important; + background-color: #FFDBDF !important; + color: #FF0420 !important; +} + +a.sidebar-link.active { + border-left-color: #F1F4F9 !important; + background-color: #FFDBDF !important; + color: #FF0420 !important; +} + +h1 { + font-size: 50px; +} + +h2 { + font-size: 40px; +} + +h3 { + font-size: 28px; +} + +h4 { + font-size: 20px; +} + +h1 { + font-family: 'Rubik', sans-serif; + font-weight: 700; + font-style: italic; + border-bottom: none; + color: #202327 !important; +} + +h2, h3, h4 { + font-family: 'Rubik', sans-serif; + border-bottom: none; + font-weight: 400; +} + +#search-form { + @media (min-width $MQNormal) { + margin-left: 2rem; + } +} + +.search-box { + @media (min-width $MQNormal) { + order: 1; + margin-right: 0; + margin-left: 1rem; + + .suggestions { + left: auto !important; + right: 0 !important; + } + } + + input { + border-color: #CBD5E0 !important; + border-radius: 100px !important; + background-color: #FFFFFF !important; + } +} + +header.navbar { + border-bottom: none; + box-shadow: 0px 6px 8px -6px rgba(20, 23, 26, 0.06), 0px 8px 16px -6px rgba(20, 23, 26, 0.04); + --bgcolor-blur: hsla(0,0%,100%,0.9); +} + +span.site-name { + display: none !important; +} + +a.nav-link, +div.nav-item span.title { + font-weight: 600; +} + +a.nav-link:not(.router-link-active), +div.nav-item span.title { + color: #68778D; +} + +.theme-default-content:not(.custom) > p { + text-align: inherit !important; +} + +.sidebar { + box-shadow: none !important; +} + +div.hero-info { + color: white; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; +} + +div.hero-info .description { + display: none; +} + +div.hero-info #main-title { + color: white !important; +} + +header.hero > img { + border-radius: 16px; + max-height: none !important; +} + +header.hero { + margin-top: 20px; + position: relative; + justify-content: space-between !important; +} + +.home .features { + border-top: none !important; + justify-content: space-between !important; + margin: 0 !important; + padding-top: 0.5rem !important; +} + +.home .features h2 { + font-family: 'Open Sans', sans-serif; + font-style: normal; + font-size: 16px !important; + font-weight: 600 !important; + color: #202327 !important; +} + +.home .features p { + font-family: 'Open Sans', sans-serif; + font-size: 14px !important; + color: #68778D !important; +} + +.home .features .icon-container { + height: 44px; + width: 44px; + background-color: #FFF0F1; + border-radius: 8px; + display: flex; + justify-content: center; + align-items: center; + color: #FF0420; +} + +.home .features .feature { + background-color: #FFFFFF !important; + box-shadow: 0px 6px 8px -6px rgba(20, 23, 26, 0.12), 0px 8px 16px -6px rgba(20, 23, 26, 0.08); + border-radius: 16px !important; + margin: 0 !important; + margin-bottom: 2rem !important; + padding: 1.5rem !important; +} + +.features-header { + margin-top: 30px; + margin-bottom: 0px; +} + +div.theme-container:not(.has-sidebar) { + background-color: #F1F4F9; +} + +.anchor-header { + color: #202327; + font-weight: 600; + font-size: 14px; + font-height: 20px; + margin-bottom: 10px; +} + +.anchor-support { + margin-top: 20px; +} + +.anchor-support-links i { + width: 20px; + text-align: center; + margin-right: 5px; +} + +.anchor-support-links a { + color: #68778D; +} + +.anchor-support-links a div { + height: 30px; + font-size: 14px; +} + +.anchor-support-links a:hover { + color: #FF0420; +} + +#anchor { + width: 15rem !important; +} + +#anchor .anchor { + line-height: 27.2px !important; +} + +#anchor .anchor div { + color: #68778D !important; +} + +#anchor .anchor.active div { + font-weight: 600 !important; +} + +.theme-default-content code { + top: 1px; + line-height: 22.4px !important; + vertical-align: middle !important; +} + +.nav-dropdown svg.icon.outbound { + display: none; +} + +.nav-dropdown .dropdown-item i { + width: 20px; +} + +.color-discord { + color: #5865F2; +} + +.color-github { + color: #121212; +} + +.color-twitter { + color: #1DA1F2; +} + +.color-twitch { + color: #6441A5; +} + +.color-medium { + color: #000000; +} + +.color-optimism { + color: #FF0420; +} + +.color-ecosystem { + color: #ea94db; +} diff --git a/docs/op-stack/src/.vuepress/styles/palette.styl b/docs/op-stack/src/.vuepress/styles/palette.styl new file mode 100644 index 0000000000000..8e319b7b9254f --- /dev/null +++ b/docs/op-stack/src/.vuepress/styles/palette.styl @@ -0,0 +1,5 @@ +$textColor = #000000 +$accentColor = #f01a37 +$backgroundColor = #272934 +$lightBackgroundColor = #f3f3f3 +$sidebarWidth = 320px diff --git a/docs/op-stack/src/.vuepress/theme/components/AlgoliaSearch/Dropdown.js b/docs/op-stack/src/.vuepress/theme/components/AlgoliaSearch/Dropdown.js new file mode 100644 index 0000000000000..50cc6a0591b21 --- /dev/null +++ b/docs/op-stack/src/.vuepress/theme/components/AlgoliaSearch/Dropdown.js @@ -0,0 +1,55 @@ +import Vue from "vue"; +export default Vue.extend({ + name: "AlgoliaSearchDropdown", + props: { + options: { type: Object, required: true }, + }, + data: () => ({ + placeholder: "", + }), + watch: { + $lang(newValue) { + this.update(this.options, newValue); + }, + options(newValue) { + this.update(newValue, this.$lang); + }, + }, + mounted() { + this.initialize(this.options, this.$lang); + this.placeholder = + this.$site.themeConfig.searchPlaceholder || ""; + }, + methods: { + initialize(userOptions, lang) { + void Promise.all([ + import( + /* webpackChunkName: "docsearch" */ "docsearch.js/dist/cdn/docsearch.min.js"), + import( + /* webpackChunkName: "docsearch" */ "docsearch.js/dist/cdn/docsearch.min.css"), + ]).then(([docsearch]) => { + // eslint-disable-next-line + docsearch.default(Object.assign(Object.assign({}, userOptions), { inputSelector: "#algolia-search-input", + // #697 Make docsearch work well at i18n mode. + algoliaOptions: { + facetFilters: [`lang:${lang}`].concat( + // eslint-disable-next-line + userOptions.facetFilters || []), + }, handleSelected: (_input, _event, suggestion) => { + const { pathname, hash } = new URL(suggestion.url); + const routepath = pathname.replace(this.$site.base, "/"); + if (this.$router.getRoutes().some((route) => route.path === routepath)) + void this.$router.push(`${routepath}${decodeURIComponent(hash)}`); + else + window.open(suggestion.url); + } })); + }); + }, + update(options, lang) { + this.$el.innerHTML = + ''; + this.initialize(options, lang); + }, + }, +}); +//# sourceMappingURL=Dropdown.js.map \ No newline at end of file diff --git a/docs/op-stack/src/.vuepress/theme/components/AlgoliaSearch/Dropdown.vue b/docs/op-stack/src/.vuepress/theme/components/AlgoliaSearch/Dropdown.vue new file mode 100644 index 0000000000000..79a941f5f4bcf --- /dev/null +++ b/docs/op-stack/src/.vuepress/theme/components/AlgoliaSearch/Dropdown.vue @@ -0,0 +1,130 @@ + + + + + + + + + +