Skip to content

Commit 1a06dc1

Browse files
committed
fix: llms
1 parent 4177018 commit 1a06dc1

File tree

5 files changed

+40
-106
lines changed

5 files changed

+40
-106
lines changed

.ai/categories/dapps.md

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,8 @@ Before starting, make sure you have:
10021002
10031003
- Node.js (v16.0.0 or later) and npm installed.
10041004
- Basic understanding of Solidity and JavaScript.
1005-
- Familiarity with `hardhat-polkadot` development environment.
1006-
- Some PAS test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}).
1005+
- Familiarity with [`hardhat`](/smart-contracts/dev-environments/hardhat/){target=\_blank} development environment.
1006+
- Some test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}).
10071007
- Basic understanding of how AMMs and liquidity pools work.
10081008
10091009
## Set Up the Project
@@ -1013,7 +1013,8 @@ Start by cloning the Uniswap V2 project:
10131013
1. Clone the Uniswap V2 repository:
10141014
10151015
```
1016-
git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git -b v0.0.6
1016+
git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git
1017+
git checkout hardhat-polkadot-evm
10171018
cd polkavm-hardhat-examples/uniswap-v2-polkadot/
10181019
```
10191020
@@ -1023,31 +1024,14 @@ Start by cloning the Uniswap V2 project:
10231024
npm install
10241025
```
10251026
1026-
3. Update the `hardhat.config.js` file so the paths for the Substrate node and the ETH-RPC adapter match with the paths on your machine:
1027-
1028-
```js title="hardhat.config.js"
1029-
hardhat: {
1030-
polkavm: true,
1031-
nodeConfig: {
1032-
nodeBinaryPath: '../bin/substrate-node',
1033-
rpcPort: 8000,
1034-
dev: true,
1035-
},
1036-
adapterConfig: {
1037-
adapterBinaryPath: '../bin/eth-rpc',
1038-
dev: true,
1039-
},
1040-
},
1041-
```
1042-
1043-
4. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
1027+
3. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
10441028
10451029
```text title=".env"
10461030
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
10471031
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
10481032
```
10491033
1050-
Ensure to replace `"INSERT_LOCAL_PRIVATE_KEY"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L22){target=\_blank}). And `"INSERT_AH_PRIVATE_KEY"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).
1034+
Ensure to replace `"INSERT_LOCAL_PRIVATE_KEY"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L21){target=\_blank}). And `"INSERT_AH_PRIVATE_KEY"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).
10511035
10521036
!!!warning
10531037
Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen.
@@ -1066,7 +1050,7 @@ If the compilation is successful, you should see the following output:
10661050
<span data-ty>Successfully compiled 12 Solidity files</span>
10671051
</div>
10681052
1069-
After running the above command, you should see the compiled contracts in the `artifacts-pvm` directory. This directory contains the ABI and bytecode of your contracts.
1053+
After running the above command, you should see the compiled contracts in the `artifacts` directory. This directory contains the ABI and bytecode of your contracts.
10701054
10711055
## Understanding Uniswap V2 Architecture
10721056
@@ -1124,13 +1108,7 @@ You can run the provided test suite to ensure the contracts are working as expec
11241108
11251109
To test it locally, you can run the following commands:
11261110
1127-
1. Spawn a local node for testing:
1128-
1129-
```bash
1130-
npx hardhat node
1131-
```
1132-
1133-
This command will spawn a local Substrate node along with the ETH-RPC adapter. The node will be available at `ws://127.0.0.1:8000` and the ETH-RPC adapter at `http://localhost:8545`.
1111+
1. Run the local `revive-dev-node`, for this, you can check the [Local Development Node](/smart-contracts/dev-environments/local-dev-node/){target=\_blank} guide.
11341112
11351113
2. In a new terminal, run the tests:
11361114
@@ -1195,10 +1173,10 @@ npx hardhat run scripts/deploy.js --network localNode
11951173
This command deploys the contracts to your local blockchain for development and testing. If you want to deploy to Polkadot Hub, you can use the following command:
11961174
11971175
```bash
1198-
npx hardhat run scripts/deploy.js --network passetHub
1176+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
11991177
```
12001178
1201-
The command above deploys to the actual Polkadot TestNet. It requires PAS test tokens, persists on the network, and operates under real network conditions.
1179+
The command above deploys to the actual Polkadot Hub TestNet. It requires test tokens, persists on the network, and operates under real network conditions.
12021180
12031181
The deployment script will output the addresses of the deployed contracts. Save these addresses, as you will need them to interact with the contracts. For example, the output should look like this:
12041182

.ai/categories/tooling.md

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,8 +2378,8 @@ Before starting, make sure you have:
23782378

23792379
- Node.js (v16.0.0 or later) and npm installed.
23802380
- Basic understanding of Solidity and JavaScript.
2381-
- Familiarity with `hardhat-polkadot` development environment.
2382-
- Some PAS test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}).
2381+
- Familiarity with [`hardhat`](/smart-contracts/dev-environments/hardhat/){target=\_blank} development environment.
2382+
- Some test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}).
23832383
- Basic understanding of how AMMs and liquidity pools work.
23842384

23852385
## Set Up the Project
@@ -2389,7 +2389,8 @@ Start by cloning the Uniswap V2 project:
23892389
1. Clone the Uniswap V2 repository:
23902390

23912391
```
2392-
git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git -b v0.0.6
2392+
git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git
2393+
git checkout hardhat-polkadot-evm
23932394
cd polkavm-hardhat-examples/uniswap-v2-polkadot/
23942395
```
23952396

@@ -2399,31 +2400,14 @@ Start by cloning the Uniswap V2 project:
23992400
npm install
24002401
```
24012402

2402-
3. Update the `hardhat.config.js` file so the paths for the Substrate node and the ETH-RPC adapter match with the paths on your machine:
2403-
2404-
```js title="hardhat.config.js"
2405-
hardhat: {
2406-
polkavm: true,
2407-
nodeConfig: {
2408-
nodeBinaryPath: '../bin/substrate-node',
2409-
rpcPort: 8000,
2410-
dev: true,
2411-
},
2412-
adapterConfig: {
2413-
adapterBinaryPath: '../bin/eth-rpc',
2414-
dev: true,
2415-
},
2416-
},
2417-
```
2418-
2419-
4. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
2403+
3. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
24202404

24212405
```text title=".env"
24222406
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
24232407
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
24242408
```
24252409

2426-
Ensure to replace `"INSERT_LOCAL_PRIVATE_KEY"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L22){target=\_blank}). And `"INSERT_AH_PRIVATE_KEY"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).
2410+
Ensure to replace `"INSERT_LOCAL_PRIVATE_KEY"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L21){target=\_blank}). And `"INSERT_AH_PRIVATE_KEY"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).
24272411

24282412
!!!warning
24292413
Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen.
@@ -2442,7 +2426,7 @@ If the compilation is successful, you should see the following output:
24422426
<span data-ty>Successfully compiled 12 Solidity files</span>
24432427
</div>
24442428

2445-
After running the above command, you should see the compiled contracts in the `artifacts-pvm` directory. This directory contains the ABI and bytecode of your contracts.
2429+
After running the above command, you should see the compiled contracts in the `artifacts` directory. This directory contains the ABI and bytecode of your contracts.
24462430

24472431
## Understanding Uniswap V2 Architecture
24482432

@@ -2500,13 +2484,7 @@ You can run the provided test suite to ensure the contracts are working as expec
25002484

25012485
To test it locally, you can run the following commands:
25022486

2503-
1. Spawn a local node for testing:
2504-
2505-
```bash
2506-
npx hardhat node
2507-
```
2508-
2509-
This command will spawn a local Substrate node along with the ETH-RPC adapter. The node will be available at `ws://127.0.0.1:8000` and the ETH-RPC adapter at `http://localhost:8545`.
2487+
1. Run the local `revive-dev-node`, for this, you can check the [Local Development Node](/smart-contracts/dev-environments/local-dev-node/){target=\_blank} guide.
25102488

25112489
2. In a new terminal, run the tests:
25122490

@@ -2571,10 +2549,10 @@ npx hardhat run scripts/deploy.js --network localNode
25712549
This command deploys the contracts to your local blockchain for development and testing. If you want to deploy to Polkadot Hub, you can use the following command:
25722550

25732551
```bash
2574-
npx hardhat run scripts/deploy.js --network passetHub
2552+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
25752553
```
25762554

2577-
The command above deploys to the actual Polkadot TestNet. It requires PAS test tokens, persists on the network, and operates under real network conditions.
2555+
The command above deploys to the actual Polkadot Hub TestNet. It requires test tokens, persists on the network, and operates under real network conditions.
25782556

25792557
The deployment script will output the addresses of the deployed contracts. Save these addresses, as you will need them to interact with the contracts. For example, the output should look like this:
25802558

.ai/pages/smart-contracts-cookbook-eth-dapps-uniswap-v2.md

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Before starting, make sure you have:
1919

2020
- Node.js (v16.0.0 or later) and npm installed.
2121
- Basic understanding of Solidity and JavaScript.
22-
- Familiarity with `hardhat-polkadot` development environment.
23-
- Some PAS test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}).
22+
- Familiarity with [`hardhat`](/smart-contracts/dev-environments/hardhat/){target=\_blank} development environment.
23+
- Some test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}).
2424
- Basic understanding of how AMMs and liquidity pools work.
2525

2626
## Set Up the Project
@@ -30,7 +30,8 @@ Start by cloning the Uniswap V2 project:
3030
1. Clone the Uniswap V2 repository:
3131

3232
```
33-
git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git -b v0.0.6
33+
git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git
34+
git checkout hardhat-polkadot-evm
3435
cd polkavm-hardhat-examples/uniswap-v2-polkadot/
3536
```
3637
@@ -40,31 +41,14 @@ Start by cloning the Uniswap V2 project:
4041
npm install
4142
```
4243
43-
3. Update the `hardhat.config.js` file so the paths for the Substrate node and the ETH-RPC adapter match with the paths on your machine:
44-
45-
```js title="hardhat.config.js"
46-
hardhat: {
47-
polkavm: true,
48-
nodeConfig: {
49-
nodeBinaryPath: '../bin/substrate-node',
50-
rpcPort: 8000,
51-
dev: true,
52-
},
53-
adapterConfig: {
54-
adapterBinaryPath: '../bin/eth-rpc',
55-
dev: true,
56-
},
57-
},
58-
```
59-
60-
4. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
44+
3. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
6145
6246
```text title=".env"
6347
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
6448
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
6549
```
6650
67-
Ensure to replace `"INSERT_LOCAL_PRIVATE_KEY"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L22){target=\_blank}). And `"INSERT_AH_PRIVATE_KEY"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).
51+
Ensure to replace `"INSERT_LOCAL_PRIVATE_KEY"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L21){target=\_blank}). And `"INSERT_AH_PRIVATE_KEY"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).
6852
6953
!!!warning
7054
Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen.
@@ -83,7 +67,7 @@ If the compilation is successful, you should see the following output:
8367
<span data-ty>Successfully compiled 12 Solidity files</span>
8468
</div>
8569
86-
After running the above command, you should see the compiled contracts in the `artifacts-pvm` directory. This directory contains the ABI and bytecode of your contracts.
70+
After running the above command, you should see the compiled contracts in the `artifacts` directory. This directory contains the ABI and bytecode of your contracts.
8771
8872
## Understanding Uniswap V2 Architecture
8973
@@ -141,13 +125,7 @@ You can run the provided test suite to ensure the contracts are working as expec
141125

142126
To test it locally, you can run the following commands:
143127

144-
1. Spawn a local node for testing:
145-
146-
```bash
147-
npx hardhat node
148-
```
149-
150-
This command will spawn a local Substrate node along with the ETH-RPC adapter. The node will be available at `ws://127.0.0.1:8000` and the ETH-RPC adapter at `http://localhost:8545`.
128+
1. Run the local `revive-dev-node`, for this, you can check the [Local Development Node](/smart-contracts/dev-environments/local-dev-node/){target=\_blank} guide.
151129

152130
2. In a new terminal, run the tests:
153131

@@ -212,10 +190,10 @@ npx hardhat run scripts/deploy.js --network localNode
212190
This command deploys the contracts to your local blockchain for development and testing. If you want to deploy to Polkadot Hub, you can use the following command:
213191

214192
```bash
215-
npx hardhat run scripts/deploy.js --network passetHub
193+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
216194
```
217195

218-
The command above deploys to the actual Polkadot TestNet. It requires PAS test tokens, persists on the network, and operates under real network conditions.
196+
The command above deploys to the actual Polkadot Hub TestNet. It requires test tokens, persists on the network, and operates under real network conditions.
219197

220198
The deployment script will output the addresses of the deployed contracts. Save these addresses, as you will need them to interact with the contracts. For example, the output should look like this:
221199

.ai/site-index.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3147,12 +3147,12 @@
31473147
}
31483148
],
31493149
"stats": {
3150-
"chars": 10874,
3151-
"words": 1505,
3150+
"chars": 10412,
3151+
"words": 1440,
31523152
"headings": 7,
3153-
"estimated_token_count_total": 2601
3153+
"estimated_token_count_total": 2488
31543154
},
3155-
"hash": "sha256:264252e73c47c4d1ca86f3070c4c63051cdba4acff3839e67387df9be13b428e",
3155+
"hash": "sha256:4d675f3716bda0a1e352724d5fd6801abb8421d5bad2ab6f3d33370d12dfc6d1",
31563156
"token_estimator": "heuristic-v1"
31573157
},
31583158
{

0 commit comments

Comments
 (0)