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
@@ -1023,31 +1024,14 @@ Start by cloning the Uniswap V2 project:
1023
1024
npm install
1024
1025
```
1025
1026
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):
1044
1028
1045
1029
```text title=".env"
1046
1030
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
1047
1031
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
1048
1032
```
1049
1033
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).
1051
1035
1052
1036
!!!warning
1053
1037
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:
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.
1070
1054
1071
1055
## Understanding Uniswap V2 Architecture
1072
1056
@@ -1124,13 +1108,7 @@ You can run the provided test suite to ensure the contracts are working as expec
1124
1108
1125
1109
To test it locally, you can run the following commands:
1126
1110
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.
1134
1112
1135
1113
2. In a new terminal, run the tests:
1136
1114
@@ -1195,10 +1173,10 @@ npx hardhat run scripts/deploy.js --network localNode
1195
1173
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:
1196
1174
1197
1175
```bash
1198
-
npx hardhat run scripts/deploy.js --network passetHub
1176
+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
1199
1177
```
1200
1178
1201
-
The command above deploys to the actual Polkadot TestNet. It requires PAStest 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.
1202
1180
1203
1181
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:
@@ -2399,31 +2400,14 @@ Start by cloning the Uniswap V2 project:
2399
2400
npm install
2400
2401
```
2401
2402
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):
2420
2404
2421
2405
```text title=".env"
2422
2406
LOCAL_PRIV_KEY="INSERT_LOCAL_PRIVATE_KEY"
2423
2407
AH_PRIV_KEY="INSERT_AH_PRIVATE_KEY"
2424
2408
```
2425
2409
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).
2427
2411
2428
2412
!!!warning
2429
2413
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:
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.
2446
2430
2447
2431
## Understanding Uniswap V2 Architecture
2448
2432
@@ -2500,13 +2484,7 @@ You can run the provided test suite to ensure the contracts are working as expec
2500
2484
2501
2485
To test it locally, you can run the following commands:
2502
2486
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.
2510
2488
2511
2489
2. In a new terminal, run the tests:
2512
2490
@@ -2571,10 +2549,10 @@ npx hardhat run scripts/deploy.js --network localNode
2571
2549
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:
2572
2550
2573
2551
```bash
2574
-
npx hardhat run scripts/deploy.js --network passetHub
2552
+
npx hardhat run scripts/deploy.js --network polkadotHubTestNet
2575
2553
```
2576
2554
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.
2578
2556
2579
2557
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