Skip to content

Commit a637a36

Browse files
committed
fixes by nic to make it work
1 parent f1441cb commit a637a36

File tree

4 files changed

+13
-37
lines changed

4 files changed

+13
-37
lines changed

docs/tutorials/marketpulse/backend.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ Follow these steps to set up a Solidity smart contract:
77

88
1. Remove the default Solidity smart contract files `Counter.sol` and `Counter.t.sol` in the `./contracts` folder.
99

10-
1. Create a new file named `Marketpulse.sol` in the `./contracts` folder.
11-
12-
```bash
13-
touch ./contracts/Marketpulse.sol
14-
```
15-
16-
1. Put this code in the file:
10+
1. Create a new file named `./contracts/Marketpulse.sol` with the following content:
1711

1812
```Solidity
1913
// SPDX-License-Identifier: MIT

docs/tutorials/marketpulse/deploy.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ Deploy the contract locally is fine for doing simple tests, but we recommend to
1616
rm ./ignition/modules/Counter.ts
1717
```
1818

19-
1. Create a module to deploy your contract:
20-
21-
```bash
22-
touch ./ignition/modules/Marketpulse.ts
23-
```
24-
25-
1. Put this code in the file:
19+
1. Create a module to deploy your contract named `./ignition/modules/Marketpulse.ts` with the following content:
2620

2721
```TypeScript
2822
// This setup uses Hardhat Ignition to manage smart contract deployments.
@@ -49,7 +43,7 @@ Deploy the contract locally is fine for doing simple tests, but we recommend to
4943
npx hardhat node
5044
```
5145
52-
1. In a different terminal window, deploy the contract using Hardhat ignition:
46+
1. In a different terminal window, within the same directory, deploy the contract using Hardhat ignition:
5347
5448
```bash
5549
npx hardhat ignition deploy ignition/modules/Marketpulse.ts --reset --network localhost
@@ -149,7 +143,7 @@ Deploy the contract locally is fine for doing simple tests, but we recommend to
149143
},
150144
verify: {
151145
blockscout: {
152-
enabled: true,
146+
enabled: false,
153147
},
154148
etherscan: {
155149
apiKey: "DUMMY",

docs/tutorials/marketpulse/frontend.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ dependencies:
55
viem: 2.41.2
66
---
77

8-
`Deno` is not mandatory as you can still use `npm`, but we use it on this tutorial. You can install it with [this link](https://docs.deno.com/runtime/getting_started/installation/)
9-
108
1. Create a frontend app on the same project root directory. Here we use `Vite` and `React` to start a default project;
119

1210
```bash
13-
deno run -A npm:create-vite@latest
11+
npm create vite@latest
1412
```
1513

16-
If you have trouble with Deno, as on some Mac computers, you can create a non-deno project that works in a similar way by running this command: `npm create vite@latest`.
17-
1814
1. Choose a name for the frontend project (such as `app`, which is what the examples later use), select the `React` framework, and select the `Typescript` language.
15+
If prompted, don't use the experimental version of Vite, and choose to not install and run immediately, because we have a few more settings to do below.
1916

2017
1. Run these commands to install the dependencies:
2118

@@ -54,13 +51,7 @@ dependencies:
5451

5552
1. Run `npm i` to call the postinstall script automatically. You should see new files and folders in the `./src` folder of the frontend application.
5653

57-
1. Create an utility file to manage Viem errors. Better than the technical defaults and not helpful ones
58-
59-
```bash
60-
touch src/DecodeEvmTransactionLogsArgs.ts
61-
```
62-
63-
1. Put this code in the `./app/src/DecodeEvmTransactionLogsArgs.ts` file:
54+
1. Create a utility file called `app/src/DecodeEvmTransactionLogsArgs.ts` to manage Viem errors (better than the technical defaults and not helpful ones), with this content:
6455

6556
```Typescript
6657
import {
@@ -145,7 +136,7 @@ dependencies:
145136

146137
```
147138

148-
1. Edit `./app/src/main.tsx` to add a `Thirdweb` provider around your application. In the following example, replace **line 7** `<THIRDWEB_CLIENTID>` with your own `clientId` configured on the [Thirdweb dashboard here](https://portal.thirdweb.com/typescript/v4/getting-started#initialize-the-sdk):
139+
1. Edit `./app/src/main.tsx` to add a `Thirdweb` provider around your application, by replacing its content with the one below. Then, replace on **line 8** the placeholder `<THIRDWEB_CLIENTID>` (including the delimiters `<` and `>`!) with your own `clientId` configured on the [Thirdweb dashboard here](https://portal.thirdweb.com/typescript/v4/getting-started#initialize-the-sdk):
149140

150141
```Typescript
151142
import { createRoot } from "react-dom/client";
@@ -890,9 +881,12 @@ dependencies:
890881
}
891882
```
892883

893-
1. Run the application:
884+
1. Edit the file `app/tsconfig.app.json` to set both "verbatimModuleSyntax" and "erasableSyntaxOnly" to "false".
885+
886+
1. Build and run the application:
894887

895888
```bash
889+
npm run build
896890
npm run dev
897891
```
898892

docs/tutorials/marketpulse/test.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ With blockchain development, testing is very important because you don't have th
1313
rm ./test/Counter.ts
1414
```
1515

16-
1. Create a test file named `./test/Marketpulse.ts`:
17-
18-
```bash
19-
touch ./test/Marketpulse.ts
20-
```
21-
22-
1. Put this code in the `./test/Marketpulse.ts` file:
16+
1. Create a test file named `./test/Marketpulse.ts` with the following content:
2317

2418
```TypeScript
2519
import { expect } from "chai";

0 commit comments

Comments
 (0)