Skip to content

Commit

Permalink
chore: update npm ordering and update foundry init step
Browse files Browse the repository at this point in the history
  • Loading branch information
dutterbutter committed Apr 15, 2024
1 parent dc4d1b0 commit bd29f18
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 129 deletions.
5 changes: 4 additions & 1 deletion content/10.quick-start/00.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ yet and may not work as fully intended. It is open-sourced and contributions are
Install `foundry-zksync` with the following command:
<!-- TODO: @dutterbutter this should be a single curl command -->
```bash
curl -L https://foundry-zksync.zksync.io | bash
# TODO: @dutterbutter this should be a single curl command without Rust requirements
git clone [email protected]:matter-labs/foundry-zksync.git
cd foundry-zksync
cargo build --bin forge --bin cast --release
```

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
---
title: Foundry | Deploy Contract Factory
---
<!-- TODO: @dutterbutter update to simplify the project init step -->
Run the following command in your terminal to initialize the Foundry project.

:display-partial{path = "/_partials/_environment-setup-with-foundry"}
```sh
git clone https://github.com/dutterbutter/zksync-foundry-quickstart-guide
cd zksync-foundry-quickstart-guide
git checkout db/deploy-contract-factory
```

## Set up your wallet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Install the dependencies:

::code-group

```bash [npm]
npm install
```

```bash [yarn]
yarn install
```
Expand All @@ -23,10 +27,6 @@ yarn install
pnpm install
```

```bash [npm]
npm install
```

```bash [bun]
bun install
```
Expand Down Expand Up @@ -165,6 +165,12 @@ deploys to the configured network in your Hardhat setup. For local deployment, a

::code-group

```bash [npm]
npm run hardhat deploy-zksync --script deployUsingFactory.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode
```

```bash [yarn]
yarn hardhat deploy-zksync --script deployUsingFactory.ts
# To deploy the contract on local in-memory node:
Expand All @@ -177,12 +183,6 @@ pnpm run hardhat deploy-zksync --script deployUsingFactory.ts
# pnpm run hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode
```

```bash [npm]
npm run hardhat deploy-zksync --script deployUsingFactory.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode
```

```bash [bun]
bun run hardhat deploy-zksync --script deployUsingFactory.ts
# To deploy the contract on local in-memory node:
Expand Down
20 changes: 10 additions & 10 deletions content/10.quick-start/_hello-zksync/_hardhat_deploy_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Install the dependencies:

::code-group

```bash [npm]
npm install
```

```bash [yarn]
yarn install
```
Expand All @@ -24,10 +28,6 @@ yarn install
pnpm install
```

```bash [npm]
npm install
```

```bash [bun]
bun install
```
Expand Down Expand Up @@ -148,6 +148,12 @@ deploys to the configured network in your Hardhat setup. For local deployment, a

::code-group

```bash [npm]
npm run hardhat deploy-zksync --script deploy.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deploy.ts --network inMemoryNode
```

```bash [yarn]
yarn hardhat deploy-zksync --script deploy.ts
# To deploy the contract on local in-memory node:
Expand All @@ -160,12 +166,6 @@ pnpm run hardhat deploy-zksync --script deploy.ts
# pnpm run hardhat deploy-zksync --script deploy.ts --network inMemoryNode
```

```bash [npm]
npm run hardhat deploy-zksync --script deploy.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deploy.ts --network inMemoryNode
```

```bash [bun]
bun run hardhat deploy-zksync --script deploy.ts
# To deploy the contract on local in-memory node:
Expand Down
28 changes: 14 additions & 14 deletions content/10.quick-start/_paymasters/_approval_paymaster_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Install the dependencies:

::code-group

```bash [npm]
npm install
```

```bash [yarn]
yarn install

Expand All @@ -26,10 +30,6 @@ yarn install
pnpm install
```

```bash [npm]
npm install
```

```bash [bun]
bun install
```
Expand Down Expand Up @@ -205,6 +205,12 @@ deploys to the configured network in your Hardhat setup. For local deployment, a

::code-group

```bash [npm]
npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode
```

```bash [yarn]
yarn hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
Expand All @@ -217,12 +223,6 @@ pnpm run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# pnpm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode
```

```bash [npm]
npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode
```

```bash [bun]
bun run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
Expand Down Expand Up @@ -349,6 +349,10 @@ Execute the command corresponding to your package manager:

::code-group

```bash [npm]
npm run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```

```bash [yarn]
yarn hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```
Expand All @@ -357,10 +361,6 @@ yarn hardhat deploy-zksync --script interact/interactWithPaymaster.ts
pnpm run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```

```bash [npm]
npm run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```

```bash [bun]
bun run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```
Expand Down
28 changes: 14 additions & 14 deletions content/10.quick-start/_paymasters/_general_paymaster_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Install the dependencies:

::code-group

```bash [npm]
npm install
```

```bash [yarn]
yarn install
```
Expand All @@ -25,10 +29,6 @@ yarn install
pnpm install
```

```bash [npm]
npm install
```

```bash [bun]
bun install
```
Expand Down Expand Up @@ -208,6 +208,12 @@ deploys to the configured network in your Hardhat setup. For local deployment, a

::code-group

```bash [npm]
npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode
```

```bash [yarn]
yarn hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
Expand All @@ -220,12 +226,6 @@ pnpm run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# pnpm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode
```

```bash [npm]
npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
# npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode
```

```bash [bun]
bun run hardhat deploy-zksync --script deployGaslessPaymaster.ts
# To deploy the contract on local in-memory node:
Expand Down Expand Up @@ -352,6 +352,10 @@ Execute the command corresponding to your package manager:

::code-group

```bash [npm]
npm run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```

```bash [yarn]
yarn hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```
Expand All @@ -360,10 +364,6 @@ yarn hardhat deploy-zksync --script interact/interactWithPaymaster.ts
pnpm run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```

```bash [npm]
npm run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```

```bash [bun]
bun run hardhat deploy-zksync --script interact/interactWithPaymaster.ts
```
Expand Down
9 changes: 8 additions & 1 deletion content/10.quick-start/_testing/_foundry_contract_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
title: Hardhat | Contract Testing
---

:display-partial{path = "/_partials/_environment-setup-with-foundry"}
<!-- TODO: @dutterbutter update to simplify the project init step -->
Run the following command in your terminal to initialize the Foundry project.

```sh
git clone https://github.com/dutterbutter/zksync-foundry-quickstart-guide
cd zksync-foundry-quickstart-guide
git checkout db/contract-testing
```

---

Expand Down
16 changes: 8 additions & 8 deletions content/10.quick-start/_testing/_hardhat_contract_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Run the following command in your terminal to initialize the project.

::code-group

```bash [npm]
npm install
```

```bash [yarn]
yarn install
```
Expand All @@ -23,10 +27,6 @@ Run the following command in your terminal to initialize the project.
pnpm install
```

```bash [npm]
npm install
```

```bash [bun]
bun install
```
Expand Down Expand Up @@ -226,6 +226,10 @@ Execute the test command corresponding to your package manager:

::code-group

```bash [npm]
npm run hardhat test --network hardhat
```

```bash [yarn]
yarn hardhat test --network hardhat
```
Expand All @@ -234,10 +238,6 @@ yarn hardhat test --network hardhat
pnpm run hardhat test --network hardhat
```

```bash [npm]
npm run hardhat test --network hardhat
```

```bash [bun]
bun run hardhat test --network hardhat
```
Expand Down
Loading

0 comments on commit bd29f18

Please sign in to comment.