You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1018,31 +1019,14 @@ Start by cloning the Uniswap V2 project:
1018
1019
npm install
1019
1020
```
1020
1021
1021
-
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:
1022
-
1023
-
```js title="hardhat.config.js"
1024
-
hardhat: {
1025
-
polkavm: true,
1026
-
nodeConfig: {
1027
-
nodeBinaryPath: '../bin/substrate-node',
1028
-
rpcPort: 8000,
1029
-
dev: true,
1030
-
},
1031
-
adapterConfig: {
1032
-
adapterBinaryPath: '../bin/eth-rpc',
1033
-
dev: true,
1034
-
},
1035
-
},
1036
-
```
1037
-
1038
-
4. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
1022
+
3. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
1039
1023
1040
1024
```text title=".env"
1041
1025
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
1042
1026
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
1043
1027
```
1044
1028
1045
-
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).
1029
+
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).
1046
1030
1047
1031
!!!warning
1048
1032
Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen.
@@ -1061,7 +1045,7 @@ If the compilation is successful, you should see the following output:
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.
1048
+
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.
1065
1049
1066
1050
## Understanding Uniswap V2 Architecture
1067
1051
@@ -1119,13 +1103,7 @@ You can run the provided test suite to ensure the contracts are working as expec
1119
1103
1120
1104
To test it locally, you can run the following commands:
1121
1105
1122
-
1. Spawn a local node for testing:
1123
-
1124
-
```bash
1125
-
npx hardhat node
1126
-
```
1127
-
1128
-
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`.
1106
+
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.
1129
1107
1130
1108
2. In a new terminal, run the tests:
1131
1109
@@ -1190,10 +1168,10 @@ npx hardhat run scripts/deploy.js --network localNode
1190
1168
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:
1191
1169
1192
1170
```bash
1193
-
npx hardhat run scripts/deploy.js --network passetHub
1171
+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
1194
1172
```
1195
1173
1196
-
The command above deploys to the actual Polkadot TestNet. It requires PAStest tokens, persists on the network, and operates under real network conditions.
1174
+
The command above deploys to the actual Polkadot Hub TestNet. It requires test tokens, persists on the network, and operates under real network conditions.
1197
1175
1198
1176
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:
@@ -2308,31 +2309,14 @@ Start by cloning the Uniswap V2 project:
2308
2309
npm install
2309
2310
```
2310
2311
2311
-
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:
2312
-
2313
-
```js title="hardhat.config.js"
2314
-
hardhat: {
2315
-
polkavm: true,
2316
-
nodeConfig: {
2317
-
nodeBinaryPath: '../bin/substrate-node',
2318
-
rpcPort: 8000,
2319
-
dev: true,
2320
-
},
2321
-
adapterConfig: {
2322
-
adapterBinaryPath: '../bin/eth-rpc',
2323
-
dev: true,
2324
-
},
2325
-
},
2326
-
```
2327
-
2328
-
4. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
2312
+
3. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):
2329
2313
2330
2314
```text title=".env"
2331
2315
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
2332
2316
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
2333
2317
```
2334
2318
2335
-
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).
2319
+
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).
2336
2320
2337
2321
!!!warning
2338
2322
Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen.
@@ -2351,7 +2335,7 @@ If the compilation is successful, you should see the following output:
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.
2338
+
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.
2355
2339
2356
2340
## Understanding Uniswap V2 Architecture
2357
2341
@@ -2409,13 +2393,7 @@ You can run the provided test suite to ensure the contracts are working as expec
2409
2393
2410
2394
To test it locally, you can run the following commands:
2411
2395
2412
-
1. Spawn a local node for testing:
2413
-
2414
-
```bash
2415
-
npx hardhat node
2416
-
```
2417
-
2418
-
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`.
2396
+
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.
2419
2397
2420
2398
2. In a new terminal, run the tests:
2421
2399
@@ -2480,10 +2458,10 @@ npx hardhat run scripts/deploy.js --network localNode
2480
2458
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:
2481
2459
2482
2460
```bash
2483
-
npx hardhat run scripts/deploy.js --network passetHub
2461
+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
2484
2462
```
2485
2463
2486
-
The command above deploys to the actual Polkadot TestNet. It requires PAS test tokens, persists on the network, and operates under real network conditions.
2464
+
The command above deploys to the actual Polkadot Hub TestNet. It requires test tokens, persists on the network, and operates under real network conditions.
2487
2465
2488
2466
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:
@@ -40,31 +41,14 @@ Start by cloning the Uniswap V2 project:
40
41
npm install
41
42
```
42
43
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):
61
45
62
46
```text title=".env"
63
47
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
64
48
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
65
49
```
66
50
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).
68
52
69
53
!!!warning
70
54
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:
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.
87
71
88
72
## Understanding Uniswap V2 Architecture
89
73
@@ -141,13 +125,7 @@ You can run the provided test suite to ensure the contracts are working as expec
141
125
142
126
To test it locally, you can run the following commands:
143
127
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.
151
129
152
130
2. In a new terminal, run the tests:
153
131
@@ -212,10 +190,10 @@ npx hardhat run scripts/deploy.js --network localNode
212
190
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:
213
191
214
192
```bash
215
-
npx hardhat run scripts/deploy.js --network passetHub
193
+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
216
194
```
217
195
218
-
The command above deploys to the actual Polkadot TestNet. It requires PAStest 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.
219
197
220
198
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:
0 commit comments