Skip to content

Commit

Permalink
Itsacoyote quick fixes (#83)
Browse files Browse the repository at this point in the history
Resolves DEVRL-690, DEVRL-691, DEVRL-627, DEVRL-649, DEVRL-692

-
https://linear.app/matterlabs/issue/DEVRL-692/fix-improperly-formatted-links
- https://linear.app/matterlabs/issue/DEVRL-649/small-ify-buttons
-
https://linear.app/matterlabs/issue/DEVRL-627/change-url-for-dev-updates-card
-
https://linear.app/matterlabs/issue/DEVRL-691/remove-a-link-to-zksync-erareleases-see-whats-new-in-2420-from-docs
-
https://linear.app/matterlabs/issue/DEVRL-690/move-cards-on-build-to-bottom-of-the-page

## List of changes
- added links to breadcrumbs
  - added redirects for certain paths that don't have an index page
- fixed links that were improperly formatted for Nuxt Content
- adjusted some buttons that were too large
- update Dev Updates card on landing page to point to zksyncDevs twitter
account
- remove the version update link in the hero section of the landing page
- moved cards on the Build index page down to the bottom of the page
  • Loading branch information
itsacoyote authored May 23, 2024
1 parent aeb3869 commit 606e617
Show file tree
Hide file tree
Showing 58 changed files with 201 additions and 187 deletions.
13 changes: 10 additions & 3 deletions components/layout/DocsBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,16 @@ defineOgImage({
description: page.value.description,
});
const breadcrumb = computed(() =>
mapContentNavigation(findPageBreadcrumb(navigation!.value, page.value)).map(({ label }) => ({ label }))
);
const breadcrumb = computed(() => {
const crumbs = mapContentNavigation(findPageBreadcrumb(navigation!.value, page.value)).map(({ label, to }) => ({
label,
to,
}));
// removes the link to the current page, unnecessary
delete crumbs[crumbs.length - 1].to;
return crumbs;
});
</script>

<template>
Expand Down
57 changes: 28 additions & 29 deletions content/00.build/00.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,6 @@ other EVM-compatible chains.
You don't need to register a separate private key before using it;
zkSync supports existing Ethereum wallets out of the box.

::callout{icon="i-heroicons-cube-transparent-solid" color="blue"}
If you have not connected to zkSync Era before, you will need to
configure your wallet with the network. To add zkSync Era, see [Connect to zkSync Era](/build/connect-to-zksync).
::

::card-group
::card
---
title: Quickstart
icon: i-heroicons-rocket-launch-solid
to: /build/quick-start
---
Experience a quick tutorial on building and deploying smart contracts on zkSync Era.
::
::card
---
title: zkSync 101
icon: i-heroicons-academic-cap-solid
to: /build/zksync-101
---
Learn to build projects locally for zkSync Era using zksync-cli.
::
::

## Main features
:check-icon Security inherited from Ethereum, with zero reliance on 3rd parties.

Expand All @@ -65,7 +41,7 @@ zkSync Era was built to provide a similar developer experience as Ethereum.
:check-icon Smart contracts can be written in Solidity or Vyper.

:check-icon Smart contracts are compiled with custom compilers: **[zksolc and
zkvyper](/zk-stack/components/compiler/toolchain/overview)**.
zkvyper](/zk-stack/components/compiler/toolchain)**.

:check-icon Most contracts work out of the box so migrating projects is seamless.

Expand All @@ -86,8 +62,31 @@ locally](/build/test-and-debug/)**.
Interacting with applications built on zkSync Era is seamless, cheap and fast.

- Transactions have instant confirmations and fast finality on L1.
- Transaction fees are extremely low ([average transaction costs
](https://www.growthepie.xyz/fundamentals/transaction-costs)).
- Transaction fees can be conveniently paid with ERC20 tokens (e.g. USDC) thanks to **[native account abstraction and
paymasters](/build/developer-reference/account-abstraction/introduction)**.
- Transaction fees are extremely low ([average transaction costs](https://www.growthepie.xyz/fundamentals/transaction-costs)).
- Transaction fees can be conveniently paid with ERC20 tokens (e.g. USDC) thanks to
**[native account abstraction and paymasters](/build/developer-reference/account-abstraction)**.
- Support for existing Ethereum-based wallets like Metamask, TrustWallet, Zerion, Rabby, etc.

::callout{icon="i-heroicons-cube-transparent-solid" color="blue"}
If you have not connected to zkSync Era before, you will need to
configure your wallet with the network. To add zkSync Era, see [Connect to zkSync Era](/build/connect-to-zksync).
::

::card-group
::card
---
title: Quickstart
icon: i-heroicons-rocket-launch-solid
to: /build/quick-start
---
Experience a quick tutorial on building and deploying smart contracts on zkSync Era.
::
::card
---
title: zkSync 101
icon: i-heroicons-academic-cap-solid
to: /build/zksync-101
---
Learn to build projects locally for zkSync Era using zksync-cli.
::
::
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Quickstart with Atlas
Atlas is a browser-based IDE with an integrated AI assistant that allows you to write, test and deploy smart contracts
directly from your browser. Click the button below to open the project in Atlas.

:u-button{ icon="i-heroicons-code-bracket" size="xl" color="primary" variant="solid" :trailing="false"
:u-button{ icon="i-heroicons-code-bracket" size="lg" color="primary" variant="solid" :trailing="false"
to="https://app.atlaszk.com/projects?template=https://github.com/zkSync-Community-Hub/zksync-quickstart-atlas&open=/contracts/ZeekSecretMessages.sol&chainId=%%zk_testnet_chain_id%%"
target="_blank" label="Open smart contract in Atlas"}

Expand All @@ -18,7 +18,7 @@ and click on **“Deploy”** to trigger the smart contract compilation and depl

::callout{icon="i-heroicons-light-bulb"}
Behind the scenes, Atlas is using the zkSync Era custom solidity compiler
(named `zksolc` ) to generate ZKEVM compatible bytecode. [Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain/overview).
(named `zksolc` ) to generate ZKEVM compatible bytecode. [Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain).
::

Once compiled sign the transaction with your wallet and wait until it's processed. You’ll see the contract in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ compatible protocols.

Click the button below to open the project in Remix and see the contract in the Remix code editor.

:u-button{ icon="i-heroicons-code-bracket" size="xl" color="primary" variant="solid" :trailing="false"
:u-button{ icon="i-heroicons-code-bracket" size="lg" color="primary" variant="solid" :trailing="false"
to="https://remix.ethereum.org/#url=https://github.com/zkSync-Community-Hub/zksync-quickstart-remix/blob/master/contracts/ZeekSecretMessages.sol"
target="_blank" label="Open smart contract in Remix"}

Expand All @@ -29,7 +29,7 @@ access **`ACCESS TO "WRITEFILE" OF "FILE MANAGER"`,** click on "Accept".

::callout{icon="i-heroicons-light-bulb"}
Behind the scenes, Remix is using the zkSync Era custom solidity compiler
(named `zksolc`) to generate zkSync VM compatible bytecode. [Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain/overview).
(named `zksolc`) to generate zkSync VM compatible bytecode. [Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain).
::

### Deploy the contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The most important features are:
Atlas is a browser-based IDE with an integrated AI assistant that allows you to write, test and deploy smart contracts
directly from your browser. Click the button below to open the project in Atlas.

:u-button{ icon="i-heroicons-code-bracket" size="xl" color="primary" variant="solid" :trailing="false"
:u-button{ icon="i-heroicons-code-bracket" size="lg" color="primary" variant="solid" :trailing="false"
to="https://app.atlaszk.com/projects?template=https://github.com/zkSync-Community-Hub/zksync-quickstart-atlas&open=/contracts/TestToken.sol&chainId=%%zk_testnet_chain_id%%"
target="_blank" label="Open smart contract in Atlas"}

Expand All @@ -58,7 +58,7 @@ and click on **"Deploy"** to trigger the smart contract compilation and deployme

::callout{icon="i-heroicons-light-bulb"}
Behind the scenes, Atlas is using the zkSync Era custom solidity compiler
(named `zksolc` ) to generate ZKEVM compatible bytecode. [Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain/overview).
(named `zksolc` ) to generate ZKEVM compatible bytecode. [Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain).
::

![ERC20 interact script in Atlas](/images/101-erc20/atlas-deploy-erc20.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ plugin on the left menu and then "Compile TestToken.sol". If you get a popup mes
::callout{icon="i-heroicons-light-bulb"}
Behind the scenes, Remix is using the zkSync Era custom Solidity compiler (named `zksolc` ) to generate ZKEVM compatible
bytecode.
[Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain/overview).
[Learn more about zkSync custom compilers](/zk-stack/components/compiler/toolchain).
::

We will use our wallet’s configured network to connect and deploy our smart contract so make sure your wallet is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Paymaster with Atlas

Click the following button to open the project in Atlas:

:u-button{ icon="i-heroicons-code-bracket" size="xl" color="primary" variant="solid" :trailing="false"
:u-button{ icon="i-heroicons-code-bracket" size="lg" color="primary" variant="solid" :trailing="false"
to="https://app.atlaszk.com/projects?template=https://github.com/zkSync-Community-Hub/zksync-quickstart-atlas&open=/scripts/paymaster-transaction.ts&chainId=%%zk_testnet_chain_id%%"
target="_blank" label="Open script in Atlas"}

Expand Down
20 changes: 10 additions & 10 deletions content/00.build/40.tooling/20.hardhat/10.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ One of its most prominent features is extendability: you can easily add new plug

zkSync Era has the following official plugins for Hardhat:

- [@matterlabs/hardhat-zksync](./hardhat-zksync.md) - used to access to all of the supported plugins and to use them
- [@matterlabs/hardhat-zksync](hardhat-zksync) - used to access to all of the supported plugins and to use them
as needed in your project. This should be the primary plugin most developers will need to use.
- [@matterlabs/hardhat-zksync-solc](./hardhat-zksync-solc.md) - used to compile contracts written in Solidity.
- [@matterlabs/hardhat-zksync-vyper](./hardhat-zksync-vyper.md) - used to compile contracts written in Vyper.
- [@matterlabs/hardhat-zksync-deploy](./hardhat-zksync-deploy.md) - used to deploy smart contracts.
- [@matterlabs/hardhat-zksync-verify](./hardhat-zksync-verify.md) - used to verify smart contracts.
- [@matterlabs/hardhat-zksync-verify-vyper](./hardhat-zksync-verify-vyper.md) - used to verify vyper smart contracts.
- [@matterlabs/hardhat-zksync-upgradable](./hardhat-zksync-upgradable.md) - used to deploy, update, and verify proxy smart contracts.
- [@matterlabs/hardhat-zksync-ethers](./hardhat-zksync-ethers.md) - wrapper around zksync-ethers with some extra Hardhat-specific functionality.
- [@matterlabs/hardhat-zksync-node](./hardhat-zksync-node.md) - used to run the zkSync era-test-node locally.
- [@matterlabs/hardhat-zksync-solc](hardhat-zksync-solc) - used to compile contracts written in Solidity.
- [@matterlabs/hardhat-zksync-vyper](hardhat-zksync-vyper) - used to compile contracts written in Vyper.
- [@matterlabs/hardhat-zksync-deploy](hardhat-zksync-deploy) - used to deploy smart contracts.
- [@matterlabs/hardhat-zksync-verify](hardhat-zksync-verify) - used to verify smart contracts.
- [@matterlabs/hardhat-zksync-verify-vyper](hardhat-zksync-verify-vyper) - used to verify vyper smart contracts.
- [@matterlabs/hardhat-zksync-upgradable](hardhat-zksync-upgradable) - used to deploy, update, and verify proxy smart contracts.
- [@matterlabs/hardhat-zksync-ethers](hardhat-zksync-ethers) - wrapper around zksync-ethers with some extra Hardhat-specific functionality.
- [@matterlabs/hardhat-zksync-node](hardhat-zksync-node) - used to run the zkSync era-test-node locally.

Along with the official plugins, there are [other plugins from the community](/build/tooling/hardhat/other-plugins) that you can use with zkSync Era.

Expand Down Expand Up @@ -55,7 +55,7 @@ This method allows you to test contracts without requesting external testnet fun
::callout{icon="i-heroicons-exclamation-triangle" color="amber"}

- Contracts must be compiled using the
[official zkSync Era compilers](/zk-stack/components/compiler/toolchain/overview), with their respective Hardhat plugins.
[official zkSync Era compilers](/zk-stack/components/compiler/toolchain), with their respective Hardhat plugins.

- Contracts compiled with other compilers will fail to deploy to zkSync Era.
::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ and address of deployed contract
- `loadArtifact(name: string)` - load `ZkSyncArtifact` from contract name
- `extractFactoryDeps(artifact: ZkSyncArtifact)` - extracts factory deps from artifact
<!-- markdownlint-disable-next-line MD013 -->
- `deployContract(artifact: ZkSyncArtifact, constructorArguments: any[], wallet?: zk.Wallet, overrides?: ethers.Overrides, additionalFactoryDeps?: ethers.BytesLike[])` - deploys contract, for more details check out the [deployment section of the quickstart](./getting-started.md#compile-and-deploy-a-contract).
- `deployContract(artifact: ZkSyncArtifact, constructorArguments: any[], wallet?: zk.Wallet, overrides?: ethers.Overrides, additionalFactoryDeps?: ethers.BytesLike[])` - deploys contract, for more details check out the [deployment section of the quickstart](getting-started#compile-and-deploy-a-contract).

::callout{icon="i-heroicons-information-circle" color="blue"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Automatically generate TypeScript bindings for smart contracts.
### openzeppelin/hardhat-upgrades

Plugin used to deploy and update upgradable smart contracts (proxies).
Use the [hardhat-zksync-upgradable plugin](./hardhat-zksync-upgradable) which provides an easy-to-use interface
Use the [hardhat-zksync-upgradable plugin](hardhat-zksync-upgradable) which provides an easy-to-use interface
for interacting with the OpenZeppelin Upgrades Plugins within a Hardhat environment on zkSync.

### hardhat-chai-matchers
Expand Down Expand Up @@ -66,7 +66,7 @@ This plugin enables the pre-processing of contract source code prior to compilat
**CACHE_BREAKER Field Issue**:

The hardhat-preprocessor plugin adds the CACHE_BREAKER field to the list of libraries,
which can lead to failed verification when using [hardhat-zksync-verify](./hardhat-zksync-verify) plugin.
which can lead to failed verification when using [hardhat-zksync-verify](hardhat-zksync-verify) plugin.
To prevent this, please include the `--no-compile` flag: `yarn hardhat verify --no-compile`.

::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Version 0.4.2 introduced a mode that detects non-inlinable libraries that are mi
::

If you try to create a project with these two files following the guidelines from the
[getting started](./getting-started) guide, the `yarn hardhat compile` command will fail.
[getting started](getting-started) guide, the `yarn hardhat compile` command will fail.

#### Using hardhat-zksync-solc version >= 0.4.2

Expand Down Expand Up @@ -98,15 +98,15 @@ Vyper does not support automatic deployment of missing libraries, and the proces
::

`hardhat-zksync-deploy` plugin has the capability to automatically deploy all missing libraries generated by compiler.
For additional information, you may refer to the [documentation](./hardhat-zksync-deploy#compilation-and-deployment-support-for-missing-libraries).
For additional information, you may refer to the [documentation](hardhat-zksync-deploy#compilation-and-deployment-support-for-missing-libraries).
This documentation provides details on how the tool handles the compilation and deployment of libraries that are currently missing.

### Manual deployment

To resolve the issue, you need to create _a separate project_, where only the library file will be located.
After deploying _only_ the library to zkSync Era, you should get the address of the deployed library and pass it to the compiler settings.
The process of deploying the library is the same as deploying a smart contract.
You can learn how to deploy smart contracts on zkSync Era in the [getting started](./getting-started#compile-and-deploy-a-contract) guide.
You can learn how to deploy smart contracts on zkSync Era in the [getting started](getting-started#compile-and-deploy-a-contract) guide.

Let's say that the address of the deployed library is `0xF9702469Dfb84A9aC171E284F71615bd3D3f1EdC`.
To pass this address to the compiler parameters, open the `hardhat.config.ts` file of the project where the `Main` contract is located
Expand Down
18 changes: 9 additions & 9 deletions content/00.build/40.tooling/20.hardhat/35.hardhat-zksync.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ This approach simplifies the process of utilizing these plugins and promotes eas

List of contained plugins:

- [hardhat-zksync-solc](./hardhat-zksync-solc.md)
- [hardhat-zksync-deploy](./hardhat-zksync-deploy.md)
- [hardhat-zksync-upgradable](./hardhat-zksync-upgradable.md)
- [hardhat-zksync-verify](./hardhat-zksync-verify.md)
- [hardhat-zksync-node](./hardhat-zksync-node.md)
- [hardhat-zksync-ethers](./hardhat-zksync-ethers.md)
- [hardhat-zksync-solc](hardhat-zksync-solc)
- [hardhat-zksync-deploy](hardhat-zksync-deploy)
- [hardhat-zksync-upgradable](hardhat-zksync-upgradable)
- [hardhat-zksync-verify](hardhat-zksync-verify)
- [hardhat-zksync-node](hardhat-zksync-node)
- [hardhat-zksync-ethers](hardhat-zksync-ethers)

::callout{icon="i-heroicons-information-circle" color="blue"}
**Popular Hardhat plugins**:
You can find a list of all official plugins [here](./getting-started).
Also, zkSync supports some other [popular plugins](./other-plugins) that can be used.
You can find a list of all official plugins [here](getting-started).
Also, zkSync supports some other [popular plugins](other-plugins) that can be used.
::

### Installation
Expand Down Expand Up @@ -70,4 +70,4 @@ Here is a list of overriden tasks where this plugin adds new optional parameter

The `--verify` parameter allow the task to immediately verify all deployed and upgraded contracts when task is called.

To check other parameters present in these tasks, please check the documentation pages for [hardhat-zksync-deploy](./hardhat-zksync-deploy) and [hardhat-zksync-upgradable](./hardhat-zksync-upgradable).
To check other parameters present in these tasks, please check the documentation pages for [hardhat-zksync-deploy](hardhat-zksync-deploy) and [hardhat-zksync-upgradable](hardhat-zksync-upgradable).
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Compilers are no longer released as Docker images and its usage is no longer rec
If there isn't a compiler binary already installed, the plugin will automatically download it.
- `compilerPath` (optional) is a field with the path to the `zksolc` binary. By default, the binary in `$PATH` is used.
- `libraries` if your contract uses non-inlinable libraries as dependencies, they have to be defined here.
Learn more about [compiling libraries here](./compiling-libraries)
Learn more about [compiling libraries here](compiling-libraries)
- `missingLibrariesPath` (optional) serves as a cache that stores all the libraries that are missing or have dependencies on other libraries.
A `hardhat-zksync-deploy` plugin uses this cache later to compile and deploy the libraries,
especially when the `deploy-zksync:libraries` task is executed.
Expand Down Expand Up @@ -228,4 +228,4 @@ This is an error that is usually thrown when compiling a large smart contract co
If you encounter such an error, please do the following:

- Update the `@matterlabs/hardhat-zksync-solc` library and try to re-compile the smart contracts afterwards.
- If after the recompilation you get the `Library not found` error, then you should follow the instructions from [here](./compiling-libraries).
- If after the recompilation you get the `Library not found` error, then you should follow the instructions from [here](compiling-libraries).
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If there is no previous installation, the plugin automatically downloads one.
- `mode`: `3` (default) recommended for most projects. Mode `z` reduces bytecode size for large projects that make heavy use of `keccak` and far calls.
- `fallback_to_optimizing_for_size` (optional) indicates that the compiler will try to recompile with optimizer mode "z" if the bytecode is too large.
- `compilerPath`: Optional field with the path to the `zkvyper` binary. By default, the binary in `$PATH` is used.
- `libraries`: Define any non-inlinable libraries your contracts use as dependencies here. Learn more about [compiling libraries](./compiling-libraries).
- `libraries`: Define any non-inlinable libraries your contracts use as dependencies here. Learn more about [compiling libraries](compiling-libraries).

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
`fallback_to_optimizing_for_size` option is supported for zkvyper compiler version 1.3.15 or higher.
Expand Down
Loading

0 comments on commit 606e617

Please sign in to comment.