Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into zksync-101-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed Aug 19, 2024
2 parents 4e4b404 + cd33a91 commit 3a8144f
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://github.com/ZKsync-Community-Hub/zkync-developers/discussions
about: Please provide feedback, and ask questions here.
- name: ZKsync CLI documentation page
url: https://era.zksync.io/docs/tools/zksync-cli
url: https://docs.zksync.io/build/zksync-cli
about: Please refer to the documentation for immediate answers.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,27 @@ Currently, the repository offers specific templates for Hardhat, an Ethereum dev
- Ethers v6 (latest)
- [Solidity Template](./templates/hardhat/solidity/)
- [Vyper Template](./templates/hardhat/vyper/)
- Ethers v5
- Ethers v5
- [Solidity Template](./templates/hardhat_ethers5/solidity/)
- [Vyper Template](./templates/hardhat_ethers5/vyper/)

## 🚀 Using Templates

To create a project using a template, first install the zksync-cli package globally by running:

```
npm install -g zksync-cli
```
Once the package is installed, you can create a project using the following command and follow the prompts to select your desired template category and specific framework or tool:

```
zksync-cli create
```

When prompted, select the **Contracts** option to use the templates in this repository.

For detailed instructions and additional resources, please refer to the [official documentation](https://docs.zksync.io/build/zksync-cli).

## 🤝 Contribution

Your contributions are always welcome! Whether it's submitting PRs, suggesting improvements, or reporting issues, your feedback is invaluable in refining these templates.
Expand Down
6 changes: 3 additions & 3 deletions templates/hardhat/solidity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ WALLET_PRIVATE_KEY=your_private_key_here...

### Local Tests

Running `npm run test` by default runs the [ZKsync In-memory Node](https://era.zksync.io/docs/tools/testing/era-test-node.html) provided by the [@matterlabs/hardhat-zksync-node](https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-node.html) tool.
Running `npm run test` by default runs the [ZKsync In-memory Node](https://docs.zksync.io/build/test-and-debug/in-memory-node) provided by the [@matterlabs/hardhat-zksync-node](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-node) tool.

Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://era.zksync.io/docs/tools/testing/) for details.
Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://docs.zksync.io/build/test-and-debug) for details.

## Useful Links

- [Docs](https://era.zksync.io/docs/dev/)
- [Docs](https://docs.zksync.io/build)
- [Official Site](https://zksync.io/)
- [GitHub](https://github.com/matter-labs)
- [Twitter](https://twitter.com/zksync)
Expand Down
2 changes: 1 addition & 1 deletion templates/hardhat/solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down
6 changes: 3 additions & 3 deletions templates/hardhat/vyper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ WALLET_PRIVATE_KEY=your_private_key_here...

### Local Tests

Running `npm run test` by default runs the [ZKsync In-memory Node](https://era.zksync.io/docs/tools/testing/era-test-node.html) provided by the [@matterlabs/hardhat-zksync-node](https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-node.html) tool.
Running `npm run test` by default runs the [ZKsync In-memory Node](https://docs.zksync.io/build/test-and-debug/in-memory-node) provided by the [@matterlabs/hardhat-zksync-node](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-node) tool.

Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://era.zksync.io/docs/tools/testing/) for details.
Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://docs.zksync.io/build/test-and-debug) for details.

## Useful Links

- [Docs](https://era.zksync.io/docs/dev/)
- [Docs](https://docs.zksync.io/build)
- [Official Site](https://zksync.io/)
- [GitHub](https://github.com/matter-labs)
- [Twitter](https://twitter.com/zksync)
Expand Down
2 changes: 1 addition & 1 deletion templates/hardhat/vyper/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-vyper.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-vyper#configuration
},
},
// Currently, only Vyper 0.3.3 or 0.3.9 are supported.
Expand Down
6 changes: 3 additions & 3 deletions templates/hardhat_ethers5/solidity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ WALLET_PRIVATE_KEY=your_private_key_here...

### Local Tests

Running `npm run test` by default runs the [ZKsync In-memory Node](https://era.zksync.io/docs/tools/testing/era-test-node.html) provided by the [@matterlabs/hardhat-zksync-node](https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-node.html) tool.
Running `npm run test` by default runs the [ZKsync In-memory Node](https://docs.zksync.io/build/test-and-debug/in-memory-node) provided by the [@matterlabs/hardhat-zksync-node](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-node) tool.

Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://era.zksync.io/docs/tools/testing/) for details.
Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://docs.zksync.io/build/test-and-debug) for details.

## Useful Links

- [Docs](https://era.zksync.io/docs/dev/)
- [Docs](https://docs.zksync.io/build)
- [Official Site](https://zksync.io/)
- [GitHub](https://github.com/matter-labs)
- [Twitter](https://twitter.com/zksync)
Expand Down
2 changes: 1 addition & 1 deletion templates/hardhat_ethers5/solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down
6 changes: 3 additions & 3 deletions templates/hardhat_ethers5/vyper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ WALLET_PRIVATE_KEY=your_private_key_here...

### Local Tests

Running `npm run test` by default runs the [ZKsync In-memory Node](https://era.zksync.io/docs/tools/testing/era-test-node.html) provided by the [@matterlabs/hardhat-zksync-node](https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-node.html) tool.
Running `npm run test` by default runs the [ZKsync In-memory Node](https://docs.zksync.io/build/test-and-debug/in-memory-node) provided by the [@matterlabs/hardhat-zksync-node](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-node) tool.

Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://era.zksync.io/docs/tools/testing/) for details.
Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to [test documentation](https://docs.zksync.io/build/test-and-debug) for details.

## Useful Links

- [Docs](https://era.zksync.io/docs/dev/)
- [Docs](https://docs.zksync.io/build)
- [Official Site](https://zksync.io/)
- [GitHub](https://github.com/matter-labs)
- [Twitter](https://twitter.com/zksync)
Expand Down
2 changes: 1 addition & 1 deletion templates/hardhat_ethers5/vyper/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-vyper.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-vyper#configuration
},
},
// Currently, only Vyper 0.3.3 or 0.3.9 are supported.
Expand Down
4 changes: 2 additions & 2 deletions templates/quickstart/foundry/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ To use for ZKsync environments, include `--zksync` when running `forge` or `vm.z
While `foundry-zksync` is **alpha stage**, there are some limitations to be aware of:

- **Compile Time**: Some users may experience slower compile times.
- **Compiling Libraries**: Compiling non-inlinable libraries requires deployment and adding to configuration. For more information please refer to [official docs](https://era.zksync.io/docs/tools/hardhat/compiling-libraries.html).
- **Compiling Libraries**: Compiling non-inlinable libraries requires deployment and adding to configuration. For more information please refer to [official docs](https://docs.zksync.io/build/tooling/hardhat/compiling-libraries).

```toml
libraries = [
"src/MyLibrary.sol:MyLibrary:0xfD88CeE74f7D78697775aBDAE53f9Da1559728E4"
]
```

- **Create2 Address Derivation**: There are differences in Create2 Address derivation compared to Ethereum. [Read the details](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#create-create2).
- **Create2 Address Derivation**: There are differences in Create2 Address derivation compared to Ethereum. [Read the details](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#create-create2).
- **Contract Verification**: Currently contract verification via the `--verify` flag do not work as expected but will be added shortly.
- **Specific Foundry Features**: Currently features such as `--gas-report`, `--coverage` may not work as intended. We are actively working on providing support for these feature types.

Expand Down
2 changes: 1 addition & 1 deletion templates/quickstart/hardhat/factory/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down
2 changes: 1 addition & 1 deletion templates/quickstart/hardhat/paymaster/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down
2 changes: 1 addition & 1 deletion templates/quickstart/hardhat/testing/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: HardhatUserConfig = {
version: "latest",
settings: {
// find all available options in the official documentation
// https://era.zksync.io/docs/tools/hardhat/hardhat-zksync-solc.html#configuration
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
Expand Down

0 comments on commit 3a8144f

Please sign in to comment.