From 4e79f81c6e9016b2992c8459c28f7a1aefb5c75d Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Fri, 5 Apr 2024 15:12:46 -0500 Subject: [PATCH] feat: Add initial draft of dev onbaording material * Hello zkSync * Contract factories * Testing * Upgrades * Paymaster - wip --- app.config.ts | 30 +- components/content/ContentSwitcher.vue | 6 +- content/10.quick-start/1.index.md | 52 +++ content/10.quick-start/2.deploy_factory.md | 68 +++ content/10.quick-start/3.testing.md | 60 +++ content/10.quick-start/4.upgrading.md | 61 +++ content/10.quick-start/5.paymaster.md | 85 ++++ content/10.quick-start/6.smart-account.md | 155 +++++++ .../_foundry_deploy_contract_factory.md | 163 +++++++ .../_hardhat_deploy_contract_factory.md | 221 +++++++++ content/10.quick-start/_dir.yml | 2 + .../_index/_foundry_deploy_contract.md | 174 +++++++ .../_index/_hardhat_deploy_contract.md | 202 +++++++++ .../_paymasters/_approval_paymaster_flow.md | 22 + .../_general_paymaster_flow copy.md | 0 .../_paymasters/_general_paymaster_flow.md | 22 + .../_testing/_foundry_contract_testing.md | 215 +++++++++ .../_testing/_hardhat_contract_testing.md | 263 +++++++++++ .../_foundry_beacon_contract_upgradability.md | 5 + .../_hardhat_beacon_contract_upgradability.md | 429 ++++++++++++++++++ .../_beacon_proxy_contract_upgradability.md | 32 ++ ...ndry_transparent_contract_upgradability.md | 5 + ...dhat_transparent_contract_upgradability.md | 410 +++++++++++++++++ ...ransparent_proxy_contract_upgradability.md | 35 ++ .../_foundry_uups_contract_upgradability.md | 5 + .../_hardhat_uups_contract_upgradability.md | 410 +++++++++++++++++ .../_uups_contract_upgradability.md | 33 ++ .../30.documentation-styleguide.md | 10 +- .../_partials/_compile-solidity-contracts.md | 28 ++ content/_partials/_deploy-contract.md | 19 + .../_environment-setup-with-foundry.md | 43 ++ .../_environment-setup-with-zksync-cli.md | 47 ++ content/_partials/_setting-up-your-wallet.md | 40 ++ content/_partials/setting-up-your-wallet.md | 54 --- content/index.yml | 2 +- cspell-config/cspell-blockchain.txt | 7 + cspell-config/cspell-dev.txt | 15 + cspell-config/cspell-zksync.txt | 5 + nuxt.config.ts | 10 +- package.json | 1 + 40 files changed, 3365 insertions(+), 81 deletions(-) create mode 100644 content/10.quick-start/1.index.md create mode 100644 content/10.quick-start/2.deploy_factory.md create mode 100644 content/10.quick-start/3.testing.md create mode 100644 content/10.quick-start/4.upgrading.md create mode 100644 content/10.quick-start/5.paymaster.md create mode 100644 content/10.quick-start/6.smart-account.md create mode 100644 content/10.quick-start/_deploy_factory/_foundry_deploy_contract_factory.md create mode 100644 content/10.quick-start/_deploy_factory/_hardhat_deploy_contract_factory.md create mode 100644 content/10.quick-start/_dir.yml create mode 100644 content/10.quick-start/_index/_foundry_deploy_contract.md create mode 100644 content/10.quick-start/_index/_hardhat_deploy_contract.md create mode 100644 content/10.quick-start/_paymasters/_approval_paymaster_flow.md create mode 100644 content/10.quick-start/_paymasters/_general_paymaster_flow copy.md create mode 100644 content/10.quick-start/_paymasters/_general_paymaster_flow.md create mode 100644 content/10.quick-start/_testing/_foundry_contract_testing.md create mode 100644 content/10.quick-start/_testing/_hardhat_contract_testing.md create mode 100644 content/10.quick-start/_upgrading/_beacon/_foundry_beacon_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_beacon/_hardhat_beacon_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_beacon_proxy_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_transparent/_foundry_transparent_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_transparent/_hardhat_transparent_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_transparent_proxy_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_uups/_foundry_uups_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_uups/_hardhat_uups_contract_upgradability.md create mode 100644 content/10.quick-start/_upgrading/_uups_contract_upgradability.md create mode 100644 content/_partials/_compile-solidity-contracts.md create mode 100644 content/_partials/_deploy-contract.md create mode 100644 content/_partials/_environment-setup-with-foundry.md create mode 100644 content/_partials/_environment-setup-with-zksync-cli.md create mode 100644 content/_partials/_setting-up-your-wallet.md delete mode 100644 content/_partials/setting-up-your-wallet.md diff --git a/app.config.ts b/app.config.ts index 38d99c76..79fc0f17 100644 --- a/app.config.ts +++ b/app.config.ts @@ -102,24 +102,18 @@ export default defineAppConfig({ edit: 'https://github.com/matter-labs/zksync-docs/edit/staging/content', feedback: 'https://github.com/matter-labs/zksync-docs/issues/new?labels=documentation', links: [ - // { - // icon: 'i-heroicons-star', - // label: 'Star on GitHub', - // to: 'https://github.com/nuxt/ui', - // target: '_blank', - // }, - // { - // icon: 'i-heroicons-book-open', - // label: 'Nuxt UI Pro docs', - // to: 'https://ui.nuxt.com/pro/guide', - // target: '_blank', - // }, - // { - // icon: 'i-simple-icons-nuxtdotjs', - // label: 'Purchase a license', - // to: 'https://ui.nuxt.com/pro/purchase', - // target: '_blank', - // }, + { + icon: 'i-heroicons-chat-bubble-oval-left-ellipsis-16-solid', + label: 'Chat on Discord', + to: 'https://join.zksync.dev/', + target: '_blank', + }, + { + icon: 'i-heroicons-user-group-20-solid', + label: 'Developer Forum', + to: 'https://github.com/zkSync-Community-Hub/zkync-developers/discussions', + target: '_blank', + }, ], }, }, diff --git a/components/content/ContentSwitcher.vue b/components/content/ContentSwitcher.vue index 21dd8de6..6e23d6c3 100644 --- a/components/content/ContentSwitcher.vue +++ b/components/content/ContentSwitcher.vue @@ -2,13 +2,15 @@ defineProps<{ items: ContentSwitcherItem[]; }>(); - const selectedIndex = ref(0); function onTabChange(index: number) { selectedIndex.value = index; } const route = useRoute(); +// This splits the path into segments and takes the first one +// TODO: This is a temporary solution, we need to find a better way to get the base path +const basePath = route.path.split('/')[1];