├── .nvmrc ├── .dockerignore ├── .eslintignore ├── src ├── styles │ ├── scss │ │ ├── _hero.scss │ │ ├── styles.scss │ │ ├── _buttons.scss │ │ └── _anchor_underline.scss │ ├── global.css │ ├── fonts.css │ ├── tailwind-preset.css │ ├── language-tabs.css │ └── tailwind-custom.css ├── images │ ├── favicon.png │ ├── docs │ │ ├── runtime │ │ │ ├── frame-arch.png │ │ │ ├── frame-runtime.png │ │ │ ├── benchmarking-on-finalize-blocktime.png │ │ │ └── benchmarking-multi-variables-regression.png │ │ ├── concepts │ │ │ ├── frame-runtime.png │ │ │ ├── off-chain-workers-v2.png │ │ │ └── substrate-runtime-client.png │ │ ├── advanced │ │ │ ├── consensus-ghost.png │ │ │ ├── try-runtime-ext-1.png │ │ │ ├── try-runtime-ext-2.png │ │ │ └── consensus-longest-chain.png │ │ ├── getting-started │ │ │ ├── substrate-arch.png │ │ │ └── technical-freedom.png │ │ └── tools │ │ │ └── mem-profiling-memory-graph.png │ ├── regular │ │ └── playground-hero.png │ ├── backgrounds │ │ ├── backgroundOne.png │ │ └── backgroundTwo.png │ ├── tutorials │ │ ├── 09-cumulus │ │ │ ├── favicon.png │ │ │ ├── forceLease.png │ │ │ ├── parachains.png │ │ │ ├── parachain-bid.png │ │ │ ├── session-keys.png │ │ │ ├── crowdloan-sucess.png │ │ │ ├── paraid-reserve.png │ │ │ ├── crowdloan-success.png │ │ │ ├── crowdloan-contribute.png │ │ │ ├── parachain-crowdloan.png │ │ │ ├── parathread-onboarding.png │ │ │ ├── parathread-register.png │ │ │ ├── polkadot-launch-log.png │ │ │ ├── register-parathread.png │ │ │ ├── parachain-active-lease.png │ │ │ ├── parachain-registration-sudo.png │ │ │ ├── parachain-summary-screenshot.png │ │ │ ├── parathread-register-success.png │ │ │ └── polkadot-apps-with-2-parachains.png │ │ ├── 07-add-a-pallet │ │ │ ├── set-name.png │ │ │ ├── name-of-bob.png │ │ │ ├── name-of-alice.png │ │ │ ├── clear-name-error.png │ │ │ └── kill-name-bad-origin.png │ │ ├── 10-frontier-workshop │ │ │ ├── rpc.png │ │ │ ├── pallet-evm.png │ │ │ ├── block-import.png │ │ │ ├── pallet-ethereum.png │ │ │ └── starting-point.png │ │ ├── tutorial-card-images │ │ │ ├── tuts-3.jpg │ │ │ ├── tuts-4.jpg │ │ │ ├── tuts-1.jpeg │ │ │ ├── tuts-10.jpeg │ │ │ ├── tuts-11.jpeg │ │ │ ├── tuts-12.jpeg │ │ │ ├── tuts-13.jpeg │ │ │ ├── tuts-2.jpeg │ │ │ ├── tuts-5.jpeg │ │ │ ├── tuts-6.jpeg │ │ │ ├── tuts-7.jpeg │ │ │ ├── tuts-8.jpeg │ │ │ └── tuts-9.jpeg │ │ ├── 01-create-your-first-chain │ │ │ ├── forks.png │ │ │ ├── balances.png │ │ │ ├── chain-data.png │ │ │ ├── metadata.png │ │ │ ├── dave-account.png │ │ │ ├── event-panel.png │ │ │ ├── accts-prefunded.png │ │ │ ├── apps-transfer.png │ │ │ ├── balance-result.png │ │ │ ├── blockchain-top.png │ │ │ ├── transfer-filled.png │ │ │ └── interactor-events.png │ │ ├── 02-proof-of-existence │ │ │ ├── file-hash.png │ │ │ ├── poe-claimed.png │ │ │ ├── frame-runtime.png │ │ │ ├── poe-component.png │ │ │ ├── front-end-template.png │ │ │ └── front-end-template-balance-transfer.png │ │ ├── 04-forkless-upgrade │ │ │ ├── node-diagram.png │ │ │ ├── sudo-upgrade.png │ │ │ ├── version-101.png │ │ │ ├── scheduled-upgrade.png │ │ │ └── scheduled-upgrade-success.png │ │ ├── 08-ink-workshop │ │ │ └── Part I │ │ │ │ ├── send-as.png │ │ │ │ ├── flipper-false.png │ │ │ │ ├── flipper-true.png │ │ │ │ ├── flipper-call-page.png │ │ │ │ ├── flipper-code-events.png │ │ │ │ ├── send-as-transaction.png │ │ │ │ ├── start-canvas-node.png │ │ │ │ ├── start-substrate-ui.png │ │ │ │ ├── flipper-upload-events.png │ │ │ │ ├── canvas-connect-to-local.png │ │ │ │ ├── flipper-instantiate-01.png │ │ │ │ ├── flipper-instantiate-02.png │ │ │ │ └── flipper-instantiate-03.png │ │ ├── 06-visualize-node-metrics │ │ │ └── grafana.png │ │ ├── 11-kitties-workshop │ │ │ ├── kitties-tutorial.png │ │ │ └── kitty-transfer-shot.png │ │ ├── 03-permissioned-network │ │ │ ├── dave_claim_node.png │ │ │ ├── add_well_known_node.png │ │ │ ├── dave_add_connections.png │ │ │ ├── get_well_known_nodes.png │ │ │ └── charlie_add_connections.png │ │ └── 05-private-network │ │ │ ├── polkadot-list-networks.png │ │ │ ├── private-network-accounts.png │ │ │ ├── private-network-no-blocks.png │ │ │ ├── private-network-apps-keygen.png │ │ │ ├── private-network-select-network.png │ │ │ ├── private-network-custom-endpoint.png │ │ │ ├── private-network-displays-blocks.png │ │ │ ├── private-network-apps-insert-key-aura.png │ │ │ ├── private-network-apps-insert-key-gran.png │ │ │ └── private-network-top-left-network-icon.png │ ├── photos │ │ └── homepage │ │ │ └── connect-with-the-community.jpg │ └── svgs │ │ ├── arrow-down.svg │ │ ├── flag.svg │ │ ├── diamond-purple.svg │ │ ├── diamond-green.svg │ │ ├── fe-template.svg │ │ ├── note.svg │ │ ├── feedback-icon.svg │ │ ├── diamond-yellow.svg │ │ ├── arrow-more.svg │ │ ├── docs-icon.svg │ │ ├── search.svg │ │ ├── close-icon.svg │ │ ├── stack-overflow-original.svg │ │ ├── advice.svg │ │ ├── stack-overflow-white.svg │ │ ├── external-icon.svg │ │ ├── twitter.svg │ │ ├── node-template.svg │ │ ├── information.svg │ │ ├── tuts.svg │ │ ├── ide-code.svg │ │ ├── calendar.svg │ │ ├── copy-text.svg │ │ ├── grad-hat.svg │ │ ├── htg.svg │ │ ├── element-white.svg │ │ ├── element-original.svg │ │ ├── docs-nav-icon.svg │ │ └── grants-dollar.svg ├── components │ ├── Buttons │ │ ├── index.tsx │ │ ├── SecondaryButton.tsx │ │ ├── PrimaryButton.tsx │ │ ├── PrimaryFixedButton.tsx │ │ └── TextButton.tsx │ ├── search-ui │ │ ├── index.tsx │ │ ├── SearchDocs.tsx │ │ ├── SearchInput.tsx │ │ ├── SearchSectionLabel.tsx │ │ ├── SearchResultsContainer.tsx │ │ └── SearchResult.tsx │ ├── Hooks │ │ ├── use-lunr-index.tsx │ │ ├── use-site-metadata.tsx │ │ ├── use-scroll-listener.tsx │ │ ├── use-active-hash.tsx │ │ └── use-component-visible.tsx │ ├── layout │ │ ├── Section.tsx │ │ └── homepage │ │ │ └── DocCard.tsx │ ├── DocsComponents │ │ ├── index.tsx │ │ ├── RelevantSkills.tsx │ │ ├── ExternalLink.tsx │ │ ├── SkillsYouGain.tsx │ │ ├── DarkButton.tsx │ │ ├── Objectives.tsx │ │ ├── AccentButton.tsx │ │ ├── NextButton.tsx │ │ ├── PreviousButton.tsx │ │ ├── MdxLink.tsx │ │ ├── FeedbackWidget.tsx │ │ ├── RelatedMaterialBlock.tsx │ │ ├── FastTrackPlayground.tsx │ │ ├── BottomButtons.tsx │ │ └── Message.tsx │ ├── MobileMenus │ │ ├── MobileNavItem.tsx │ │ └── MobileDropDown.tsx │ ├── BreadCrumbNav.tsx │ ├── GithubEditButton.tsx │ ├── LastUpdateGithub.tsx │ ├── Header │ │ ├── NavListItem.tsx │ │ └── SubMenuItem.tsx │ ├── Layout.tsx │ ├── DocTag.tsx │ ├── VersionControl.tsx │ ├── SlideDownNav.tsx │ ├── DifficultyMeter.tsx │ ├── site │ │ └── Banner.js │ ├── DocsButton.tsx │ └── ThemeToggle.tsx ├── utils │ └── browser.js ├── hooks │ ├── use-session-storage.js │ └── use-banner.js └── pages │ └── 404.tsx ├── static ├── img │ ├── sub.gif │ └── substrate_og.png ├── fonts │ ├── poppins │ │ └── Poppins-ExtraBold.ttf │ └── karla │ │ ├── Karla-VariableFont_wght.ttf │ │ └── Karla-Italic-VariableFont_wght.ttf ├── assets │ ├── tutorials │ │ ├── ink-workshop │ │ │ ├── send-as.png │ │ │ ├── flipper-false.png │ │ │ ├── flipper-true.png │ │ │ ├── start-canvas-node.png │ │ │ ├── send-as-transaction.png │ │ │ ├── canvas-connect-to-local.png │ │ │ ├── flipper-instantiate-01.png │ │ │ ├── flipper-instantiate-02.png │ │ │ ├── flipper-instantiate-03.png │ │ │ ├── 1.1-finished-code.rs │ │ │ ├── 1.2-finished-code.rs │ │ │ ├── 1.3-finished-code.rs │ │ │ ├── 1.2-template.rs │ │ │ ├── 1.3-template.rs │ │ │ ├── 1.4-finished-code.rs │ │ │ ├── 1.4-template.rs │ │ │ ├── 2.1-finished-code.rs │ │ │ ├── 2.1-template.rs │ │ │ ├── 1.5-finished-code.rs │ │ │ ├── 1.5-template.rs │ │ │ └── 1.6-finished-code.rs │ │ ├── cumulus │ │ │ └── polkadot-launch-config │ │ │ │ └── relay-3-validators--2paras-1collator.json │ │ └── kitties-tutorial │ │ │ ├── 01-basic-setup.rs │ │ │ └── 02-create-kitties.rs │ └── contribute-templates │ │ └── how-to-template.md └── security.txt ├── example.env.development ├── example.env.production ├── postcss.config.js ├── .prettierrc.js ├── .prettierignore ├── .yarnrc.yml ├── decs.d.ts ├── .editorconfig ├── Dockerfile ├── netlify.toml ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── bug-template-code.yaml │ ├── content-template.yaml │ ├── feedback-template.yaml │ ├── bug-template-site.yaml │ └── broken-link.yaml └── workflows │ ├── check-links.yml │ └── codeql-analysis.yml ├── content └── banners │ ├── stack-exchange.md │ └── __readme__.md ├── tsconfig.json ├── gatsby-node ├── on-create-node.js ├── create-resolvers.js └── create-redirects.js ├── gatsby-node.js ├── gatsby-ssr.js ├── tailwind.config.js ├── .gitignore ├── .eslintrc.js ├── lunr └── create-index.js ├── v3 ├── how-to-guides │ ├── 05-storage-migrations │ │ └── b-steps-with-polkadotjs-apps │ │ │ └── index.mdx │ ├── index.mdx │ └── 02-pallet-design │ │ └── f-tight-coupling │ │ └── index.mdx └── docs │ ├── 06-tools │ └── 0-landing-page │ │ └── index.mdx │ ├── 05-integrate │ └── b-client-libraries │ │ └── index.mdx │ └── 01-getting-started │ └── b-architecture │ └── index.mdx └── gatsby-browser.js /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/fermium 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .cache/ 2 | node_modules/ 3 | public/ 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | public/ 3 | .cache/ 4 | -------------------------------------------------------------------------------- /src/styles/scss/_hero.scss: -------------------------------------------------------------------------------- 1 | .doc-hero { 2 | svg { 3 | cursor: default; 4 | } 5 | } -------------------------------------------------------------------------------- /static/img/sub.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/img/sub.gif -------------------------------------------------------------------------------- /src/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/favicon.png -------------------------------------------------------------------------------- /static/img/substrate_og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/img/substrate_og.png -------------------------------------------------------------------------------- /example.env.development: -------------------------------------------------------------------------------- 1 | # GATSBY_IO_URL=http://localhost:8000 2 | # GATSBY_DOCS_URL=http://localhost:8001 3 | -------------------------------------------------------------------------------- /example.env.production: -------------------------------------------------------------------------------- 1 | # GATSBY_IO_URL=https://substrate.io 2 | # GATSBY_DOCS_URL=https://docs.substrate.io 3 | -------------------------------------------------------------------------------- /src/images/docs/runtime/frame-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/runtime/frame-arch.png -------------------------------------------------------------------------------- /src/images/regular/playground-hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/regular/playground-hero.png -------------------------------------------------------------------------------- /src/images/backgrounds/backgroundOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/backgrounds/backgroundOne.png -------------------------------------------------------------------------------- /src/images/backgrounds/backgroundTwo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/backgrounds/backgroundTwo.png -------------------------------------------------------------------------------- /src/images/docs/concepts/frame-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/concepts/frame-runtime.png -------------------------------------------------------------------------------- /src/images/docs/runtime/frame-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/runtime/frame-runtime.png -------------------------------------------------------------------------------- /src/styles/scss/styles.scss: -------------------------------------------------------------------------------- 1 | @import 'aos/dist/aos.css'; 2 | @import 'buttons'; 3 | @import 'anchor_underline'; 4 | @import 'hero'; 5 | -------------------------------------------------------------------------------- /static/fonts/poppins/Poppins-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/fonts/poppins/Poppins-ExtraBold.ttf -------------------------------------------------------------------------------- /src/images/docs/advanced/consensus-ghost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/advanced/consensus-ghost.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/favicon.png -------------------------------------------------------------------------------- /src/images/docs/advanced/try-runtime-ext-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/advanced/try-runtime-ext-1.png -------------------------------------------------------------------------------- /src/images/docs/advanced/try-runtime-ext-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/advanced/try-runtime-ext-2.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/forceLease.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/forceLease.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parachains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parachains.png -------------------------------------------------------------------------------- /static/fonts/karla/Karla-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/fonts/karla/Karla-VariableFont_wght.ttf -------------------------------------------------------------------------------- /src/images/docs/concepts/off-chain-workers-v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/concepts/off-chain-workers-v2.png -------------------------------------------------------------------------------- /src/images/tutorials/07-add-a-pallet/set-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/07-add-a-pallet/set-name.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parachain-bid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parachain-bid.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/session-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/session-keys.png -------------------------------------------------------------------------------- /src/images/tutorials/10-frontier-workshop/rpc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/10-frontier-workshop/rpc.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/send-as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/send-as.png -------------------------------------------------------------------------------- /src/images/docs/advanced/consensus-longest-chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/advanced/consensus-longest-chain.png -------------------------------------------------------------------------------- /src/images/docs/getting-started/substrate-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/getting-started/substrate-arch.png -------------------------------------------------------------------------------- /src/images/docs/tools/mem-profiling-memory-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/tools/mem-profiling-memory-graph.png -------------------------------------------------------------------------------- /src/images/tutorials/07-add-a-pallet/name-of-bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/07-add-a-pallet/name-of-bob.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/crowdloan-sucess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/crowdloan-sucess.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/paraid-reserve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/paraid-reserve.png -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-3.jpg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-4.jpg -------------------------------------------------------------------------------- /src/images/docs/concepts/substrate-runtime-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/concepts/substrate-runtime-client.png -------------------------------------------------------------------------------- /src/images/docs/getting-started/technical-freedom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/getting-started/technical-freedom.png -------------------------------------------------------------------------------- /src/images/tutorials/07-add-a-pallet/name-of-alice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/07-add-a-pallet/name-of-alice.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/crowdloan-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/crowdloan-success.png -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-1.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-10.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-10.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-11.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-11.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-12.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-12.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-13.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-13.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-2.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-5.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-6.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-6.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-7.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-7.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-8.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-8.jpeg -------------------------------------------------------------------------------- /src/images/tutorials/tutorial-card-images/tuts-9.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/tutorial-card-images/tuts-9.jpeg -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/flipper-false.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/flipper-false.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/flipper-true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/flipper-true.png -------------------------------------------------------------------------------- /static/fonts/karla/Karla-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/fonts/karla/Karla-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /src/images/photos/homepage/connect-with-the-community.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/photos/homepage/connect-with-the-community.jpg -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/forks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/forks.png -------------------------------------------------------------------------------- /src/images/tutorials/02-proof-of-existence/file-hash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/02-proof-of-existence/file-hash.png -------------------------------------------------------------------------------- /src/images/tutorials/04-forkless-upgrade/node-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/04-forkless-upgrade/node-diagram.png -------------------------------------------------------------------------------- /src/images/tutorials/04-forkless-upgrade/sudo-upgrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/04-forkless-upgrade/sudo-upgrade.png -------------------------------------------------------------------------------- /src/images/tutorials/04-forkless-upgrade/version-101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/04-forkless-upgrade/version-101.png -------------------------------------------------------------------------------- /src/images/tutorials/07-add-a-pallet/clear-name-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/07-add-a-pallet/clear-name-error.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/send-as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/send-as.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/crowdloan-contribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/crowdloan-contribute.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parachain-crowdloan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parachain-crowdloan.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parathread-onboarding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parathread-onboarding.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parathread-register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parathread-register.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/polkadot-launch-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/polkadot-launch-log.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/register-parathread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/register-parathread.png -------------------------------------------------------------------------------- /src/images/tutorials/10-frontier-workshop/pallet-evm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/10-frontier-workshop/pallet-evm.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-import'), 4 | require('tailwindcss'), 5 | require('autoprefixer'), 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /src/images/tutorials/02-proof-of-existence/poe-claimed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/02-proof-of-existence/poe-claimed.png -------------------------------------------------------------------------------- /src/images/tutorials/06-visualize-node-metrics/grafana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/06-visualize-node-metrics/grafana.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parachain-active-lease.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parachain-active-lease.png -------------------------------------------------------------------------------- /src/images/tutorials/10-frontier-workshop/block-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/10-frontier-workshop/block-import.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/start-canvas-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/start-canvas-node.png -------------------------------------------------------------------------------- /src/images/docs/runtime/benchmarking-on-finalize-blocktime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/runtime/benchmarking-on-finalize-blocktime.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/balances.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/balances.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/chain-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/chain-data.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/metadata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/metadata.png -------------------------------------------------------------------------------- /src/images/tutorials/02-proof-of-existence/frame-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/02-proof-of-existence/frame-runtime.png -------------------------------------------------------------------------------- /src/images/tutorials/02-proof-of-existence/poe-component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/02-proof-of-existence/poe-component.png -------------------------------------------------------------------------------- /src/images/tutorials/04-forkless-upgrade/scheduled-upgrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/04-forkless-upgrade/scheduled-upgrade.png -------------------------------------------------------------------------------- /src/images/tutorials/07-add-a-pallet/kill-name-bad-origin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/07-add-a-pallet/kill-name-bad-origin.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-false.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-false.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-true.png -------------------------------------------------------------------------------- /src/images/tutorials/10-frontier-workshop/pallet-ethereum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/10-frontier-workshop/pallet-ethereum.png -------------------------------------------------------------------------------- /src/images/tutorials/10-frontier-workshop/starting-point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/10-frontier-workshop/starting-point.png -------------------------------------------------------------------------------- /src/images/tutorials/11-kitties-workshop/kitties-tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/11-kitties-workshop/kitties-tutorial.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/send-as-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/send-as-transaction.png -------------------------------------------------------------------------------- /src/components/Buttons/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './PrimaryButton' 2 | export * from './SecondaryButton' 3 | export * from './TextButton' 4 | export * from './PrimaryFixedButton' 5 | -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/dave-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/dave-account.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/event-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/event-panel.png -------------------------------------------------------------------------------- /src/images/tutorials/03-permissioned-network/dave_claim_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/03-permissioned-network/dave_claim_node.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parachain-registration-sudo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parachain-registration-sudo.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parachain-summary-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parachain-summary-screenshot.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/parathread-register-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/parathread-register-success.png -------------------------------------------------------------------------------- /src/images/tutorials/11-kitties-workshop/kitty-transfer-shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/11-kitties-workshop/kitty-transfer-shot.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/canvas-connect-to-local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/canvas-connect-to-local.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/flipper-instantiate-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/flipper-instantiate-01.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/flipper-instantiate-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/flipper-instantiate-02.png -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/flipper-instantiate-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/static/assets/tutorials/ink-workshop/flipper-instantiate-03.png -------------------------------------------------------------------------------- /src/images/docs/runtime/benchmarking-multi-variables-regression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/docs/runtime/benchmarking-multi-variables-regression.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/accts-prefunded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/accts-prefunded.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/apps-transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/apps-transfer.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/balance-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/balance-result.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/blockchain-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/blockchain-top.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/transfer-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/transfer-filled.png -------------------------------------------------------------------------------- /src/images/tutorials/02-proof-of-existence/front-end-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/02-proof-of-existence/front-end-template.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/polkadot-list-networks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/polkadot-list-networks.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-call-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-call-page.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-code-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-code-events.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/send-as-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/send-as-transaction.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/start-canvas-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/start-canvas-node.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/start-substrate-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/start-substrate-ui.png -------------------------------------------------------------------------------- /src/images/tutorials/09-cumulus/polkadot-apps-with-2-parachains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/09-cumulus/polkadot-apps-with-2-parachains.png -------------------------------------------------------------------------------- /src/images/tutorials/01-create-your-first-chain/interactor-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/01-create-your-first-chain/interactor-events.png -------------------------------------------------------------------------------- /src/images/tutorials/03-permissioned-network/add_well_known_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/03-permissioned-network/add_well_known_node.png -------------------------------------------------------------------------------- /src/images/tutorials/03-permissioned-network/dave_add_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/03-permissioned-network/dave_add_connections.png -------------------------------------------------------------------------------- /src/images/tutorials/03-permissioned-network/get_well_known_nodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/03-permissioned-network/get_well_known_nodes.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-accounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-accounts.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-no-blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-no-blocks.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-upload-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-upload-events.png -------------------------------------------------------------------------------- /src/images/tutorials/03-permissioned-network/charlie_add_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/03-permissioned-network/charlie_add_connections.png -------------------------------------------------------------------------------- /src/images/tutorials/04-forkless-upgrade/scheduled-upgrade-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/04-forkless-upgrade/scheduled-upgrade-success.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-apps-keygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-apps-keygen.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/canvas-connect-to-local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/canvas-connect-to-local.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-instantiate-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-instantiate-01.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-instantiate-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-instantiate-02.png -------------------------------------------------------------------------------- /src/images/tutorials/08-ink-workshop/Part I/flipper-instantiate-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/08-ink-workshop/Part I/flipper-instantiate-03.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-select-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-select-network.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-custom-endpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-custom-endpoint.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-displays-blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-displays-blocks.png -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | endOfLine: 'lf', 4 | semi: false, 5 | singleQuote: true, 6 | trailingComma: 'es5', 7 | tabWidth: 2, // 2 spaces, not true tabs 8 | } 9 | -------------------------------------------------------------------------------- /src/images/tutorials/02-proof-of-existence/front-end-template-balance-transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/02-proof-of-existence/front-end-template-balance-transfer.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-apps-insert-key-aura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-apps-insert-key-aura.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-apps-insert-key-gran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-apps-insert-key-gran.png -------------------------------------------------------------------------------- /src/images/tutorials/05-private-network/private-network-top-left-network-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoR/substrate-docs/main/src/images/tutorials/05-private-network/private-network-top-left-network-icon.png -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Ignore build/dev artifacts: 2 | .cache 3 | node_modules 4 | public 5 | package.json 6 | package-lock.json 7 | 8 | # Ignore files that don't need *text* formatting 9 | src/images 10 | static/img -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | plugins: 4 | - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs 5 | spec: "@yarnpkg/plugin-interactive-tools" 6 | 7 | yarnPath: .yarn/releases/yarn-3.0.2.cjs 8 | -------------------------------------------------------------------------------- /static/security.txt: -------------------------------------------------------------------------------- 1 | Contact: bugbounty@parity.io 2 | Preferred-Languages: en 3 | Canonical: https://www.parity.io/.well-known/security.txt 4 | Policy: https://www.parity.io/bug-bounty/ 5 | Hiring: https://www.parity.io/jobs/ -------------------------------------------------------------------------------- /decs.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.png' 2 | declare module '*.svg' 3 | declare module '*.jpg' 4 | declare module '*.jpeg' 5 | declare module 'gatsby-plugin-gdpr-cookies' 6 | declare module 'mdx-utils' 7 | declare module 'prism-react-renderer/prism' 8 | -------------------------------------------------------------------------------- /src/components/search-ui/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './SearchDocs' 2 | export * from './SearchModal' 3 | export * from './SearchSectionLabel' 4 | export * from './SearchResult' 5 | export * from './SearchInput' 6 | export * from './SearchResultsContainer' 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style=space 5 | indent_size=2 6 | tab_width=2 7 | end_of_line=lf 8 | charset=utf-8 9 | insert_final_newline=true 10 | trim_trailing_whitespace=true 11 | 12 | [*.{rs, toml}] 13 | indent_style=tab 14 | indent_size=tab 15 | -------------------------------------------------------------------------------- /src/utils/browser.js: -------------------------------------------------------------------------------- 1 | import { browserName, browserVersion } from 'react-device-detect' 2 | 3 | export const isBrowser = typeof window !== 'undefined' 4 | 5 | export const browser = { name: browserName, version: browserVersion } 6 | 7 | export const isSafari = browserName === 'Safari' 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14 AS builder 2 | EXPOSE 9000 3 | 4 | WORKDIR /app 5 | COPY . . 6 | RUN echo "GATSBY_IO_URL=https://www.substrate.io\nGATSBY_DOCS_URL=http://localhost:9000" \ 7 | > .env.production 8 | RUN yarn install && yarn build 9 | CMD ["yarn", "gatsby", "serve", "-H", "0.0.0.0"] 10 | -------------------------------------------------------------------------------- /src/images/svgs/arrow-down.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /src/images/svgs/flag.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/svgs/diamond-purple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- 1 | /* import fonts locally to remove cross-site dependency */ 2 | @import 'fonts'; 3 | 4 | @import 'tailwindcss/base'; 5 | @import 'tailwindcss/components'; 6 | @import 'tailwindcss/utilities'; 7 | 8 | /* GLOBAL Substrate platform preset */ 9 | @import './tailwind-preset.css'; 10 | /* custom project styles */ 11 | @import './tailwind-custom.css'; 12 | -------------------------------------------------------------------------------- /src/images/svgs/diamond-green.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [context.production] 2 | command = "yarn build && cp .netlify/_redirects public/_redirects" 3 | publish = "public/" 4 | 5 | [context.deploy-preview] 6 | command = "yarn build && cp .netlify/_redirects public/_redirects" 7 | publish = "public/" 8 | 9 | [context.develop] 10 | command = "yarn build && cp .netlify/_redirects public/_redirects" 11 | publish = "public/" 12 | -------------------------------------------------------------------------------- /src/images/svgs/fe-template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/images/svgs/note.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/components/Hooks/use-lunr-index.tsx: -------------------------------------------------------------------------------- 1 | import { graphql, useStaticQuery } from 'gatsby' 2 | import { Index } from 'lunr' 3 | 4 | export const useLunrIndex = () => { 5 | const { LunrIndex } = useStaticQuery( 6 | graphql` 7 | { 8 | LunrIndex 9 | } 10 | ` 11 | ) 12 | const index = Index.load(LunrIndex.index) 13 | const { store } = LunrIndex 14 | return { store, index } 15 | } 16 | -------------------------------------------------------------------------------- /src/components/layout/Section.tsx: -------------------------------------------------------------------------------- 1 | import cx from 'classnames' 2 | import React from 'react' 3 | 4 | interface SectionProps { 5 | children: React.ReactNode 6 | styles?: string 7 | } 8 | 9 | export default function Layout({ children, styles }: SectionProps) { 10 | const sectionClass = 'container mb-20 px-4 lg:px-10' 11 | 12 | return
{children}
13 | } 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: StackOverflow [tagged substrate] 4 | url: https://stackoverflow.com/questions/tagged/substrate 5 | about: Please seek support and ask questions on StackOverflow and tag them `substrate`. 6 | - name: Substrate Community Chat 7 | url: https://matrix.to/#/#substrate-technical:matrix.org 8 | about: Join the community chat! 9 | -------------------------------------------------------------------------------- /content/banners/stack-exchange.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "StackExchange Forum" 3 | active: false 4 | --- 5 | 6 | The Substrate community is campaigning for a dedicated [StackExchange](https://area51.stackexchange.com/proposals/126136/substrate-blockchain-framework) forum! 7 | 8 | **Please help us by following and committing to your desire for it [here.](https://area51.stackexchange.com/proposals/126136/substrate-blockchain-framework)** 9 | -------------------------------------------------------------------------------- /src/images/svgs/feedback-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/images/svgs/diamond-yellow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/images/svgs/arrow-more.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "esnext", 5 | "jsx": "preserve", 6 | "lib": ["dom", "esnext"], 7 | "strict": true, 8 | "noEmit": true, 9 | "isolatedModules": true, 10 | "esModuleInterop": true, 11 | "noUnusedLocals": false, 12 | "strictNullChecks": false, 13 | "resolveJsonModule": true 14 | }, 15 | "include": ["**/*.ts", "**/*.tsx", "decs.d.ts"], 16 | "exclude": ["node_modules", "public", ".cache"] 17 | } 18 | -------------------------------------------------------------------------------- /src/components/DocsComponents/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './Message' 2 | export * from './NextButton' 3 | export * from './PreviousButton' 4 | export * from './RelatedMaterialBlock' 5 | export * from './Objectives' 6 | export * from './TutorialObjective' 7 | export * from './RelevantSkills' 8 | export * from './SkillsYouGain' 9 | export * from './AccentButton' 10 | export * from './DarkButton' 11 | export * from './FastTrackPlayground' 12 | export * from './BottomButtons' 13 | export * from './ExternalLink' 14 | export * from './FeedbackWidget' 15 | export * from './MdxLink' 16 | -------------------------------------------------------------------------------- /src/images/svgs/docs-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/DocsComponents/RelevantSkills.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | interface RelevantSkillsProps { 4 | data: string[] 5 | } 6 | 7 | export function RelevantSkills({ data }: RelevantSkillsProps) { 8 | return ( 9 |
10 | {data.map((str, index) => ( 11 | 17 | ))} 18 |
19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/images/svgs/search.svg: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /src/components/DocsComponents/ExternalLink.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Icon from '../Icon' 3 | 4 | interface ExternalLinkProps { 5 | url: string 6 | children: React.ReactNode 7 | } 8 | 9 | export function ExternalLink(props: ExternalLinkProps) { 10 | return ( 11 | 17 | {props.children} 18 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/styles/fonts.css: -------------------------------------------------------------------------------- 1 | /* using font-display: block; flash of invisible text (FOIT) */ 2 | 3 | @font-face { 4 | font-family: 'Karla'; 5 | src: url('/fonts/karla/Karla-VariableFont_wght.ttf') format('truetype'); 6 | font-display: block; 7 | font-weight: 100 800; 8 | } 9 | 10 | @font-face { 11 | font-family: 'Karla'; 12 | src: url('/fonts/karla/Karla-Italic-VariableFont_wght.ttf') format('truetype'); 13 | font-display: block; 14 | font-style: italic; 15 | } 16 | 17 | @font-face { 18 | font-family: 'Poppins'; 19 | src: url('/fonts/poppins/Poppins-ExtraBold.ttf') format('truetype'); 20 | font-display: block; 21 | font-weight: 800; 22 | } 23 | -------------------------------------------------------------------------------- /src/images/svgs/close-icon.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/components/DocsComponents/SkillsYouGain.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | interface SkillsYouGainProps { 4 | data: string[] 5 | } 6 | 7 | export function SkillsYouGain({ data }: SkillsYouGainProps) { 8 | return ( 9 |
10 |

Skills you will gain:

11 | {data.map((str, index) => ( 12 | 18 | ))} 19 |
20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/hooks/use-session-storage.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | 3 | import { isBrowser } from '../utils/browser' 4 | 5 | function getSessionStorageOrDefault(key, defaultValue) { 6 | const stored = isBrowser && window.sessionStorage.getItem(key) 7 | if (!stored) { 8 | return defaultValue 9 | } 10 | return JSON.parse(stored) 11 | } 12 | 13 | export function useSessionStorage(key, defaultValue) { 14 | const [value, setValue] = useState( 15 | getSessionStorageOrDefault(key, defaultValue) 16 | ) 17 | 18 | useEffect(() => { 19 | window.sessionStorage.setItem(key, JSON.stringify(value)) 20 | }, [key, value]) 21 | 22 | return [value, setValue] 23 | } 24 | -------------------------------------------------------------------------------- /src/components/DocsComponents/DarkButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from '../Link' 3 | 4 | interface DarkButtonProps { 5 | text: string 6 | link: string 7 | } 8 | export function DarkButton({ text, link }: DarkButtonProps) { 9 | return ( 10 | <> 11 | 12 |
13 | 16 |
17 | 18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/images/svgs/stack-overflow-original.svg: -------------------------------------------------------------------------------- 1 | 7 | 11 | 15 | -------------------------------------------------------------------------------- /src/images/svgs/advice.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/svgs/stack-overflow-white.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/1.1-finished-code.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(not(feature = "std"), no_std)] 2 | 3 | use ink_lang as ink; 4 | 5 | #[ink::contract] 6 | mod incrementer { 7 | #[ink(storage)] 8 | pub struct Incrementer { 9 | // Storage Declaration 10 | } 11 | 12 | impl Incrementer { 13 | #[ink(constructor)] 14 | pub fn new(init_value: i32) -> Self { 15 | // Contract Constructor 16 | Self{} 17 | } 18 | 19 | #[ink(message)] 20 | pub fn get(&self) { 21 | // Contract Message 22 | } 23 | } 24 | 25 | #[cfg(test)] 26 | mod tests { 27 | use super::*; 28 | use ink_lang as ink; 29 | 30 | #[ink::test] 31 | fn default_works() { 32 | // Test Your Contract 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /gatsby-node/on-create-node.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const { createFilePath } = require('gatsby-source-filesystem') 3 | 4 | const addSlugFieldToMarkdown = ({ node, getNode, actions }) => { 5 | const { createNodeField } = actions 6 | const filepaths = createFilePath({ node, getNode, basePath: `pages` }) 7 | .split('/') 8 | .filter(pathElement => pathElement) 9 | const slugPath = filepaths[filepaths.length - 1] 10 | const slug = 11 | node.frontmatter && node.frontmatter.slug ? node.frontmatter.slug : slugPath 12 | createNodeField({ 13 | node, 14 | name: `slug`, 15 | value: slug, 16 | }) 17 | } 18 | 19 | module.exports = { 20 | addSlugFieldToMarkdown, 21 | } 22 | -------------------------------------------------------------------------------- /src/components/DocsComponents/Objectives.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactMarkdown from 'react-markdown' 3 | 4 | interface ObjectivesProps { 5 | data: { title: string; description: string }[] 6 | } 7 | 8 | export function Objectives({ data }: ObjectivesProps) { 9 | return ( 10 | <> 11 |
12 | {data.map((item, index) => ( 13 |
14 |
15 |

{item.title}

16 |
17 | {item.description} 18 |
19 | ))} 20 |
21 | 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /src/images/svgs/external-icon.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/svgs/twitter.svg: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /src/images/svgs/node-template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /content/banners/__readme__.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Example Banner Title (optional)" 3 | active: false 4 | --- 5 | 6 | DO NOT delete or rename this readme file and follow the instructions bellow: 7 | 8 | 1. This is a Markdown template you can copy and rename to add a new banner (eg.: "campaign-name.md"). 9 | 10 | 2. Allowed markup is only plain text, **strong** and [link](https://example.com). 11 | 12 | 3. Paragraphs can be used instead of new lines. 13 | 14 | 4. Keep in mind to be short as possible (max 160 characters) as the Banner UI could get quite big. 15 | 16 | 5. One banner is optimal but the UI supports two if really needed. In such a case they will be stacked in the Banner UI in an alphabetical order. 17 | 18 | 6. You can archive banners by setting "active: false" to exclude it from the Banner UI. 19 | -------------------------------------------------------------------------------- /src/hooks/use-banner.js: -------------------------------------------------------------------------------- 1 | import { graphql, useStaticQuery } from 'gatsby' 2 | 3 | export const useBanner = () => { 4 | const { 5 | allMarkdownRemark: { edges: banners }, 6 | } = useStaticQuery( 7 | graphql` 8 | query { 9 | allMarkdownRemark( 10 | filter: { 11 | fileAbsolutePath: { regex: "//(banner)./(?!(__readme__))/" } 12 | frontmatter: { active: { eq: true } } 13 | } 14 | sort: { fields: fields___slug, order: ASC } 15 | limit: 2 16 | ) { 17 | edges { 18 | node { 19 | html 20 | frontmatter { 21 | title 22 | } 23 | } 24 | } 25 | } 26 | } 27 | ` 28 | ) 29 | 30 | return { banners } 31 | } 32 | -------------------------------------------------------------------------------- /src/components/Hooks/use-site-metadata.tsx: -------------------------------------------------------------------------------- 1 | import { graphql, useStaticQuery } from 'gatsby' 2 | 3 | export const useSiteMetadata = () => { 4 | const { 5 | site: { siteMetadata }, 6 | } = useStaticQuery( 7 | graphql` 8 | query { 9 | site { 10 | siteMetadata { 11 | title 12 | description 13 | image_og 14 | siteUrl 15 | author 16 | pressEmail 17 | email 18 | twitter 19 | linkedIn 20 | element 21 | github 22 | telegram 23 | gitter 24 | stackOverflow 25 | keywords 26 | substrateIO 27 | terms 28 | privacy 29 | } 30 | } 31 | } 32 | ` 33 | ) 34 | return { siteMetadata } 35 | } 36 | -------------------------------------------------------------------------------- /src/components/Hooks/use-scroll-listener.tsx: -------------------------------------------------------------------------------- 1 | import { createContext, useState, useEffect } from 'react' 2 | 3 | export default function useScrollListener() { 4 | const [data, setData] = useState({ 5 | x: 0, 6 | y: 0, 7 | lastX: 0, 8 | lastY: 0, 9 | }) 10 | 11 | // set up event listeners 12 | useEffect(() => { 13 | const handleScroll = () => { 14 | setData(last => { 15 | return { 16 | x: window.scrollX, 17 | y: window.scrollY, 18 | lastX: last.x, 19 | lastY: last.y, 20 | } 21 | }) 22 | } 23 | 24 | handleScroll() 25 | window.addEventListener('scroll', handleScroll) 26 | 27 | return () => { 28 | window.removeEventListener('scroll', handleScroll) 29 | } 30 | }, []) 31 | 32 | return data 33 | } 34 | 35 | export const ScrollContext = createContext(null) 36 | -------------------------------------------------------------------------------- /src/images/svgs/information.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/svgs/tuts.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/components/DocsComponents/AccentButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from '../../components/Link' 3 | 4 | interface AccentButtonProps { 5 | text: string 6 | link: string 7 | } 8 | export function AccentButton({ text, link }: AccentButtonProps) { 9 | return ( 10 | <> 11 | 12 |
13 | 16 |
17 | 18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /gatsby-node/create-resolvers.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | /* eslint-disable security/detect-non-literal-require */ 3 | 4 | const { GraphQLJSONObject } = require('graphql-type-json') 5 | const { createIndexLunr } = require(`./../lunr/create-index.js`) 6 | 7 | const createMdxResolvers = props => { 8 | const { cache, createResolvers } = props 9 | 10 | createResolvers({ 11 | Query: { 12 | LunrIndex: { 13 | type: GraphQLJSONObject, 14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 15 | resolve: (source, args, context, info) => { 16 | const docNodes = context.nodeModel.getAllNodes({ 17 | type: `Mdx`, 18 | }) 19 | return createIndexLunr(docNodes, cache) 20 | }, 21 | }, 22 | }, 23 | }) 24 | } 25 | 26 | module.exports = { 27 | createMdxResolvers, 28 | } 29 | -------------------------------------------------------------------------------- /src/images/svgs/ide-code.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/components/MobileMenus/MobileNavItem.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import Link from '../Link' 3 | 4 | interface MobileNavItemProps { 5 | external: boolean 6 | link: string 7 | title: string 8 | } 9 | 10 | export default function MobileNavItem({ link, title }: MobileNavItemProps) { 11 | const [isActive, setIsActive] = useState(false) 12 | useEffect(() => { 13 | if (location.pathname === link) { 14 | setIsActive(true) 15 | } else { 16 | setIsActive(false) 17 | } 18 | }, []) 19 | const styles = 20 | 'text-black dark:text-white hover:no-underline px-6 py-3 text-lg hover:font-bold' 21 | const activeStyles = () => (isActive ? `font-bold` : `font-medium`) 22 | return ( 23 | 24 |
25 | {title} 26 |
27 | 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /src/components/DocsComponents/NextButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from '../Link' 3 | 4 | interface NextButtonProps { 5 | text: string 6 | link: string 7 | } 8 | export function NextButton({ text, link }: NextButtonProps) { 9 | return ( 10 | <> 11 | 12 |
13 |
14 | 17 |
18 |
19 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/components/Hooks/use-active-hash.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | 3 | export const useActiveHash = (itemIds: string[], rootMargin?: string) => { 4 | const [activeHash, setActiveHash] = useState(``) 5 | useEffect(() => { 6 | const observer = new IntersectionObserver( 7 | entries => { 8 | entries.forEach(entry => { 9 | if (entry.isIntersecting) { 10 | setActiveHash(entry.target.id) 11 | } 12 | }) 13 | }, 14 | { rootMargin: rootMargin || `-100px 0px -80% 0px` } 15 | ) 16 | itemIds.forEach((id: string) => { 17 | const el = document.getElementById(id) 18 | el 19 | ? observer.observe(document.getElementById(id)) 20 | : console.warn( 21 | `Unknown ID: ${id}. We don't support h1 tag (#) in markdown article.` 22 | ) 23 | }) 24 | }, []) 25 | return activeHash 26 | } 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-template-code.yaml: -------------------------------------------------------------------------------- 1 | name: Code Bug Report 2 | description: Let us know about an issue you experienced with building based on the Tutorials and 3 | How-to Guides 4 | labels: ['bug 🐛'] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thank you so much for taking the time to report a problem! 10 | - type: textarea 11 | id: bug 12 | attributes: 13 | label: Bug report for compiling, code snippets, templates, etc. 14 | description: What happened? 15 | placeholder: Describe the problem. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: steps 20 | attributes: 21 | label: Steps to reproduce the problem 22 | description: Provide the steps that led to the discovery of the issue. 23 | placeholder: Describe what you were doing so we can reproduce the problem. 24 | validations: 25 | required: false 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/content-template.yaml: -------------------------------------------------------------------------------- 1 | name: Request New or Edited Content 2 | description: Submit your requests and suggestions to help us improve! 3 | labels: ['new content 💡✍️'] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thank you so much for taking the time to request new or modified content! 9 | - type: textarea 10 | id: content 11 | attributes: 12 | label: Content request 13 | description: What lead you to make this request? What action should we take on it? 14 | placeholder: Describe what you would like to see added or changed. 15 | validations: 16 | required: true 17 | - type: dropdown 18 | id: help 19 | attributes: 20 | label: Are you willing to help with this request? 21 | multiple: true 22 | options: 23 | - Yes! 24 | - No. 25 | - Maybe (please elaborate above) 26 | validations: 27 | required: true -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feedback-template.yaml: -------------------------------------------------------------------------------- 1 | name: Feedback Form 2 | description: Submit your feedback to help us improve! 3 | labels: ['feedback 📝'] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thank you so much for taking the time to submit your feedback! 9 | - type: dropdown 10 | id: browsers 11 | attributes: 12 | label: What browsers are you seeing the problem on? 13 | multiple: true 14 | options: 15 | - Firefox 16 | - Chrome 17 | - Safari 18 | - Microsoft Edge 19 | - Other (please write below) 20 | validations: 21 | required: false 22 | - type: textarea 23 | id: feedback 24 | attributes: 25 | label: Feedback 26 | description: Did something go wrong or do you have a suggestion for improving this site? 27 | placeholder: Describe what you would like to see changed. 28 | validations: 29 | required: true 30 | -------------------------------------------------------------------------------- /src/images/svgs/calendar.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /gatsby-node.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const { createPageRedirects } = require('./gatsby-node/create-redirects.js') 3 | 4 | const { 5 | createDocPages, 6 | createHowToGuidePages, 7 | createTutorialPages, 8 | } = require('./gatsby-node/create-pages.js') 9 | 10 | exports.createPages = async props => { 11 | createPageRedirects(props) 12 | await Promise.all([createDocPages(props)]) 13 | await Promise.all([createHowToGuidePages(props)]) 14 | await Promise.all([createTutorialPages(props)]) 15 | } 16 | 17 | const { addSlugFieldToMarkdown } = require('./gatsby-node/on-create-node.js') 18 | 19 | exports.onCreateNode = props => { 20 | const { node } = props 21 | if (node.internal.type === `MarkdownRemark`) { 22 | addSlugFieldToMarkdown(props) 23 | } 24 | } 25 | 26 | const { createMdxResolvers } = require('./gatsby-node/create-resolvers.js') 27 | 28 | exports.createResolvers = props => { 29 | createMdxResolvers(props) 30 | } 31 | -------------------------------------------------------------------------------- /src/components/BreadCrumbNav.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from './Link' 3 | 4 | interface BreadCrumbNavProps { 5 | section: string 6 | sectionURL: string 7 | title: string 8 | } 9 | export default function BreadCrumbNav(props: BreadCrumbNavProps) { 10 | return ( 11 | <> 12 |
13 | Developers Home 14 | » 15 | 16 | {props.section === 'how to guides' 17 | ? 'How-to Guide' 18 | : props.section === 'tutorials' 19 | ? 'Tutorials' 20 | : 'Docs'} 21 | 22 | » 23 | 24 | {props.title} 25 | 26 |
27 | 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /src/images/svgs/copy-text.svg: -------------------------------------------------------------------------------- 1 | 8 | 12 | -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/1.2-finished-code.rs: -------------------------------------------------------------------------------- 1 | 2 | #![cfg_attr(not(feature = "std"), no_std)] 3 | 4 | use ink_lang as ink; 5 | 6 | #[ink::contract] 7 | mod incrementer { 8 | #[ink(storage)] 9 | pub struct Incrementer { 10 | value: i32, 11 | } 12 | 13 | impl Incrementer { 14 | #[ink(constructor)] 15 | pub fn new(init_value: i32) -> Self { 16 | Self { 17 | value: init_value, 18 | } 19 | } 20 | 21 | #[ink(constructor)] 22 | pub fn default() -> Self { 23 | Self { 24 | value: 0, 25 | } 26 | } 27 | 28 | #[ink(message)] 29 | pub fn get(&self) { 30 | // Contract Message 31 | } 32 | } 33 | 34 | #[cfg(test)] 35 | mod tests { 36 | use super::*; 37 | use ink_lang as ink; 38 | 39 | #[ink::test] 40 | fn default_works() { 41 | Incrementer::default(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/components/DocsComponents/PreviousButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from '../Link' 3 | import Icon from '../Icon' 4 | 5 | interface PreviousButtonProps { 6 | text: string 7 | link: string 8 | } 9 | export function PreviousButton({ text, link }: PreviousButtonProps) { 10 | return ( 11 | <> 12 | 13 |
14 |
15 | 19 | 22 |
23 |
24 | 25 | 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /src/components/DocsComponents/MdxLink.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import Link from '../Link' 3 | import { ExternalLink } from '../DocsComponents' 4 | 5 | const isHash = (str: string) => /^#/.test(str) 6 | const isInternal = (to: string) => /^\/(?!\/)/.test(to) 7 | const isFile = (to: string) => /\..+$/.test(to) 8 | const isRustDocs = (to: string) => /rustdocs/.test(to) 9 | 10 | interface MdxLinkProps { 11 | href: string 12 | children: React.ReactNode 13 | props: React.ReactNode 14 | } 15 | 16 | export function MdxLink({ href, children, ...props }: MdxLinkProps) { 17 | if (isRustDocs(href) || isHash(href) || !isInternal(href) || isFile(href)) { 18 | if (isHash(href)) { 19 | return ( 20 | 21 | {children} 22 | 23 | ) 24 | } else { 25 | return {children} 26 | } 27 | } else { 28 | return ( 29 | 30 | {children} 31 | 32 | ) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/1.3-finished-code.rs: -------------------------------------------------------------------------------- 1 | 2 | #![cfg_attr(not(feature = "std"), no_std)] 3 | 4 | use ink_lang as ink; 5 | 6 | #[ink::contract] 7 | mod incrementer { 8 | 9 | #[ink(storage)] 10 | pub struct Incrementer { 11 | value: i32, 12 | } 13 | 14 | impl Incrementer { 15 | #[ink(constructor)] 16 | pub fn new(init_value: i32) -> Self { 17 | Self { 18 | value: init_value 19 | } 20 | } 21 | 22 | #[ink(constructor)] 23 | pub fn default() -> Self { 24 | Self { 25 | value: 0 26 | } 27 | } 28 | 29 | #[ink(message)] 30 | pub fn get(&self) -> i32 { 31 | self.value 32 | } 33 | } 34 | 35 | #[cfg(test)] 36 | mod tests { 37 | use super::*; 38 | use ink_lang as ink; 39 | 40 | #[ink::test] 41 | fn default_works() { 42 | let contract = Incrementer::default(); 43 | assert_eq!(contract.get(), 0); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/components/Hooks/use-component-visible.tsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect, useRef } from 'react' 2 | 3 | function useComponentVisible(initialIsVisible: boolean) { 4 | const [isComponentVisible, setIsComponentVisible] = useState(initialIsVisible) 5 | const ref = useRef(null) 6 | 7 | const handleHideDropdown = (event: KeyboardEvent) => { 8 | if (event.key === 'Escape') { 9 | setIsComponentVisible(false) 10 | } 11 | } 12 | 13 | const handleClickOutside = (event: MouseEvent) => { 14 | if (ref.current && !ref.current.contains(event.target)) { 15 | setIsComponentVisible(false) 16 | } 17 | } 18 | 19 | useEffect(() => { 20 | document.addEventListener('keydown', handleHideDropdown, true) 21 | document.addEventListener('click', handleClickOutside, true) 22 | return () => { 23 | document.removeEventListener('keydown', handleHideDropdown, true) 24 | document.removeEventListener('click', handleClickOutside, true) 25 | } 26 | }) 27 | 28 | return { ref, isComponentVisible, setIsComponentVisible } 29 | } 30 | export default useComponentVisible 31 | -------------------------------------------------------------------------------- /src/images/svgs/grad-hat.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/svgs/htg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/1.2-template.rs: -------------------------------------------------------------------------------- 1 | 2 | #![cfg_attr(not(feature = "std"), no_std)] 3 | 4 | use ink_lang as ink; 5 | 6 | #[ink::contract] 7 | mod incrementer { 8 | 9 | #[ink(storage)] 10 | pub struct Incrementer { 11 | // ACTION: Create a storage value called `value` which holds a `i32` 12 | } 13 | 14 | impl Incrementer { 15 | #[ink(constructor)] 16 | pub fn new(init_value: i32) -> Self { 17 | // ACTION: Create a new `Incrementer` and set its `value` to `init_value` 18 | } 19 | 20 | // ACTION: Create a second constructor function named `default`. 21 | // It has no input, and creates a new `Incrementer` with its `value` 22 | // set to `0`. 23 | 24 | #[ink(message)] 25 | pub fn get(&self) { 26 | // Contract Message 27 | } 28 | } 29 | 30 | #[cfg(test)] 31 | mod tests { 32 | use super::*; 33 | use ink_lang as ink; 34 | 35 | #[ink::test] 36 | fn default_works() { 37 | Incrementer::default(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /static/assets/tutorials/ink-workshop/1.3-template.rs: -------------------------------------------------------------------------------- 1 | 2 | #![cfg_attr(not(feature = "std"), no_std)] 3 | 4 | use ink_lang as ink; 5 | 6 | #[ink::contract] 7 | mod incrementer { 8 | 9 | #[ink(storage)] 10 | pub struct Incrementer { 11 | value: i32, 12 | } 13 | 14 | impl Incrementer { 15 | #[ink(constructor)] 16 | pub fn new(init_value: i32) -> Self { 17 | Self { 18 | value: init_value 19 | } 20 | } 21 | 22 | #[ink(constructor)] 23 | pub fn default() -> Self { 24 | Self { 25 | value: 0 26 | } 27 | } 28 | 29 | #[ink(message)] 30 | // ACTION: Update this function to return an i32. 31 | pub fn get(&self) { 32 | // ACTION: Return the `value`. 33 | } 34 | } 35 | 36 | #[cfg(test)] 37 | mod tests { 38 | use super::*; 39 | use ink_lang as ink; 40 | 41 | #[ink::test] 42 | fn default_works() { 43 | let contract = Incrementer::default(); 44 | assert_eq!(contract.get(), 0); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/images/svgs/element-white.svg: -------------------------------------------------------------------------------- 1 | 8 | 12 | 16 | 20 | 24 | -------------------------------------------------------------------------------- /src/components/GithubEditButton.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import Icon from '../components/Icon' 3 | 4 | interface GithuEditButtonProps { 5 | absolutePath: string 6 | } 7 | export default function GithubEditButton(props: GithuEditButtonProps) { 8 | const githubSlug = 9 | 'https://github.com/substrate-developer-hub/substrate-docs/edit/main' 10 | 11 | const [url, setUrl] = useState('') 12 | useEffect(() => { 13 | setUrl( 14 | `${githubSlug}${props.absolutePath.substr( 15 | props.absolutePath.indexOf('/v') 16 | )}` 17 | ) 18 | }, []) 19 | 20 | return ( 21 |
22 | 28 | |{` `} 29 | 33 | {` `} 34 | Edit 35 | 36 |
37 | ) 38 | } 39 | -------------------------------------------------------------------------------- /src/images/svgs/element-original.svg: -------------------------------------------------------------------------------- 1 | 7 | 11 | 15 | 19 | 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-template-site.yaml: -------------------------------------------------------------------------------- 1 | name: Website Bug Report 2 | description: Let us know about an issue you experienced on https://docs.substrate.io/ 3 | labels: ['bug 🐛', 'web-dev 🕸'] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thank you so much for taking the time to report a problem! 9 | - type: dropdown 10 | id: browsers 11 | attributes: 12 | label: What browsers are you seeing the problem on? 13 | multiple: true 14 | options: 15 | - Firefox 16 | - Chrome 17 | - Safari 18 | - Microsoft Edge 19 | - Other (please write below) 20 | validations: 21 | required: false 22 | - type: textarea 23 | id: bug 24 | attributes: 25 | label: Bug report for the website 26 | description: What happened? 27 | placeholder: Describe the problem. 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: steps 32 | attributes: 33 | label: Steps to reproduce the problem 34 | description: Provide the steps that led to the discovery of the issue. 35 | placeholder: Describe what you were doing so we can reproduce the problem. 36 | validations: 37 | required: false 38 | -------------------------------------------------------------------------------- /src/components/LastUpdateGithub.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import moment from 'moment' 3 | 4 | interface LastUpdateGithubProps { 5 | absolutePath: string 6 | } 7 | export default function LastUpdateGithub({ 8 | absolutePath, 9 | }: LastUpdateGithubProps) { 10 | const githubLink = `https://api.github.com/repos/substrate-developer-hub/substrate-docs/commits?path=${absolutePath.substr( 11 | absolutePath.indexOf('/v') 12 | )}` 13 | const [date, setDate] = useState('') 14 | const [sha, setSHA] = useState('') 15 | const [link, setLink] = useState('') 16 | useEffect(() => { 17 | fetch(githubLink) 18 | .then(response => response.json()) 19 | .then(resultData => { 20 | if (resultData.length > 0) { 21 | setDate( 22 | moment(resultData[0].commit.author.date).format('MMMM DD, YYYY') 23 | ) 24 | setSHA(resultData[0].sha.slice(0, 7)) 25 | setLink(resultData[0].html_url) 26 | } 27 | }) 28 | }, []) 29 | return ( 30 |
31 | Last edit:{` `} 32 | 33 | {sha} 34 | 35 | {` `} 36 | on {date} 37 |
38 | ) 39 | } 40 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/broken-link.yaml: -------------------------------------------------------------------------------- 1 | name: Broken link 2 | description: Report a broken link to help us fix them. 3 | labels: ["broken link ❌"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Found a broken link? Thanks for helping us identify them. Please fill in the sections below and hit the "Submit new issue" button when you're done. 9 | - type: textarea 10 | id: url 11 | attributes: 12 | label: Broken Link 13 | description: What link lead to a 404? 14 | placeholder: The URL that you clicked leading to a 404 or improper page. 15 | validations: 16 | required: true 17 | - type: textarea 18 | id: behavior 19 | attributes: 20 | label: Expected Location 21 | description: Where was the link you clicked supposed to go? 22 | placeholder: The URL of where you expected it to go (if you know it). 23 | validations: 24 | required: false 25 | - type: textarea 26 | id: other 27 | attributes: 28 | label: Context and Origin 29 | description: Was this found in a Google search? Embedded in a blog or other documentation? Other? 30 | placeholder: Help us understand where we should look to fix this outside the devhub. 31 | validations: 32 | required: false 33 | -------------------------------------------------------------------------------- /gatsby-ssr.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import { ThemeProvider } from './src/contexts/ThemeContext' 4 | 5 | const MagicScriptTag = () => { 6 | const codeToRunOnClient = ` 7 | (function() { 8 | function getInitialColorMode() { 9 | const persistedColorPreference = localStorage.theme; 10 | const hasPersistedPreference = typeof persistedColorPreference === 'string'; 11 | 12 | if (hasPersistedPreference) { 13 | return persistedColorPreference; 14 | } 15 | 16 | const mql = window.matchMedia('(prefers-color-scheme: dark)'); 17 | const hasMediaQueryPreference = typeof mql.matches === 'boolean'; 18 | 19 | if (hasMediaQueryPreference) { 20 | return mql.matches ? 'dark' : 'light'; 21 | } 22 | 23 | return 'light'; 24 | } 25 | const colorMode = getInitialColorMode(); 26 | document.documentElement.classList.add(colorMode); 27 | })() 28 | ` 29 | return