Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
adds Atlas to tutorials (#635)
Browse files Browse the repository at this point in the history
* adds Atlas to tutorials

* fix link to atlas

* updates atlas message
  • Loading branch information
uF4No authored Jul 14, 2023
1 parent d1efaf3 commit 9ac45ed
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
4 changes: 4 additions & 0 deletions docs/dev/building-on-zksync/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ This is what we're going to do:

## Build and deploy the Greeter contract

::: info Project available in Atlas IDE
This entire tutorial can be run in under a minute using Atlas. Atlas is a smart contract IDE that lets you write, deploy, and interact with contracts from your browser. [Open this project in Atlas](https://app.atlaszk.com/projects?template=https://github.com/matter-labs/zksync-hardhat-template&open=Greeter.sol&chainId=280).
:::

### Initialize the project

1. Install the [zkSync CLI:](/docs/tools/zksync-cli/)
Expand Down
13 changes: 9 additions & 4 deletions docs/dev/tutorials/aa-daily-spend-limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ The daily limit feature prevents an account from spending more ETH than the limi
- You know how to get your [private key from your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key).
- We encourage you to read [the basics of account abstraction on zkSync Era](../../reference/concepts/account-abstraction.md) and complete the [multisig account tutorial](./custom-aa-tutorial.md) before attempting this tutorial.


## Complete Project

Download the complete project [here](https://github.com/matter-labs/daily-spendlimit-tutorial). Additionally, the repository contains a test folder with more detailed tests for running on a zkSync Era local network.

::: info Project available in Atlas IDE
This entire tutorial can be run in under a minute using Atlas. Atlas is a smart contract IDE that lets you write, deploy, and interact with contracts from your browser. [Open this project in Atlas](https://app.atlaszk.com/projects?template=https://github.com/Atlas-labs-inc/zksync-daily-spend-limit&open=/scripts/main.ts&chainId=280).
:::

## Project set up

We will use the [zkSync Era Hardhat plugins](../../tools/hardhat/) to build, deploy, and interact with the smart contracts in this project.
Expand Down Expand Up @@ -1041,10 +1050,6 @@ To keep this tutorial as simple as possible, we've used `block.timestamp` but we
- Insufficient balance in account contract: transactions may fail due to the lack of balance in the deployed account contract. Please transfer funds to the account using MetaMask or `wallet.sendTransaction()` method used in `deploy/deployFactoryAccount.ts`.
- Transactions submitted in a close range of time will have the same `block.timestamp` as they can be added to the same L1 batch and might cause the spend limit to not work as expected.

## Complete Project

Download the complete project [here](https://github.com/matter-labs/daily-spendlimit-tutorial). Additionally, the repository contains a test folder with more detailed tests for running on a zkSync Era local network.

## Learn more

- To find out more about L1->L2 interaction on zkSync Era, check out the [documentation](../../reference/concepts/l1-l2-interop.md).
Expand Down
8 changes: 6 additions & 2 deletions docs/dev/tutorials/api3-usd-paymaster-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ Within a paymaster, price oracles provide price data on-chain for execution.

For this paymaster tutorial, we use dAPIs to get the price of [ETH/USD](https://market.api3.org/dapis/zksync-goerli-testnet/ETH-USD) and [USDC/USD](https://market.api3.org/dapis/zksync-goerli-testnet/USDC-USD) datafeeds, and then calculate gas in USDC value so that users can pay for their transactions with USDC.

::: note
::: info

- If you want to use an ERC20 token other than USDC, change the dAPIs used in the paymaster.
- For example, if you want to use DAI, use the [DAI/USD](https://market.api3.org/dapis/zksync-goerli-testnet/DAI-USD) dAPI instead of USDC/USD.
:::

## Project repo
## Complete project

The tutorial code is available [here](https://github.com/vanshwassan/zk-paymaster-dapi-poc).

::: info Project available in Atlas IDE
This entire tutorial can be run in under a minute using Atlas. Atlas is a smart contract IDE that lets you write, deploy, and interact with contracts from your browser. [Open this project in Atlas](https://app.atlaszk.com/projects?template=https://github.com/atlas-labs-inc/zksync-usdc-paymaster&open=/scripts/main.ts&chainId=280).
:::

## Set up the project

1. Install the [zkSync CLI](../../tools/zksync-cli/README.md) if you don't have installed it yet:
Expand Down
6 changes: 5 additions & 1 deletion docs/dev/tutorials/custom-aa-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ This tutorial shows you how to build and deploy a 2-of-2 multi-signature account

Download the complete project [here](https://github.com/matter-labs/custom-aa-tutorial).

## Set up
::: info Project available in Atlas IDE
This entire tutorial can be run in under a minute using Atlas. Atlas is a smart contract IDE that lets you write, deploy, and interact with contracts from your browser. [Open this project in Atlas](https://app.atlaszk.com/projects?template=https://github.com/atlas-labs-inc/zksync-aa-multisig&open=/scripts/main.ts&chainId=280).
:::

## Set up

1. If you haven't already, install the [zkSync CLI:](/docs/tools/zksync-cli/)

Expand Down
7 changes: 6 additions & 1 deletion docs/dev/tutorials/custom-paymaster-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ This tutorial shows you how to build a custom paymaster that allows users to pay
- [Gas estimation for transactions](../../reference/concepts/fee-model.md#gas-estimation-for-transactions) guide.
- You should also know [how to get your private key from your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key).

## Project repo
## Complete project

The tutorial code is available [here](https://github.com/matter-labs/custom-paymaster-tutorial).

::: info Project available in Atlas IDE

This entire tutorial can be run in under a minute using Atlas. Atlas is a smart contract IDE that lets you write, deploy, and interact with contracts from your browser. [Open this project in Atlas](https://app.atlaszk.com/projects?template=https://github.com/atlas-labs-inc/zksync-custom-paymaster&open=/scripts/main.ts&chainId=280)
:::

## Set up the project

1. If you haven't already, install the [zkSync CLI:](/docs/tools/zksync-cli/)
Expand Down

0 comments on commit 9ac45ed

Please sign in to comment.