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
Copy file name to clipboardExpand all lines: docs/private-networks/how-to/configure/free-gas.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ When gas is free, limiting block and contract sizes is less important. In free g
34
34
35
35
### 1. Set the block size
36
36
37
-
If you want to remove gas from consideration and don't mind blocks potentially taking longer to create, in the genesis file set the block size limit (measured in gas) to the maximum accepted by Truffle (`0x1fffffffffffff`). In the genesis file, specify `gasLimit` following the `config` key.
37
+
If you want to remove gas from consideration and don't mind blocks potentially taking longer to create, in the genesis file set the block size limit (measured in gas) to the maximum accepted by Hardhat (`0x1fffffffffffff`). In the genesis file, specify `gasLimit` following the `config` key.
38
38
39
39
```json
40
40
{
@@ -107,21 +107,21 @@ If your network is configured to use the `londonBlock` or a later hard fork, the
107
107
}
108
108
```
109
109
110
-
## Configure free gas in Truffle
110
+
## Configure free gas in Hardhat
111
111
112
-
If using Truffle to develop on your free gas network, you also need to configure free gas in Truffle.
112
+
If using Hardhat to develop on your free gas network, you also need to configure free gas in Hardhat.
113
113
114
-
Like setting block and contract size limits to their maximum values for Besu, set the transaction gas limit in Truffle to the maximum possible.
114
+
Like setting block and contract size limits to their maximum values for Besu, set the transaction gas limit in Hardhat to the maximum possible.
115
115
116
116
:::info
117
117
118
-
Besu does not support private key management. To use Besu with Truffle, you must configure a [Truffle wallet](../../../public-networks/how-to/develop/truffle.md).
118
+
Besu does not support private key management. To use Besu with Hardhat, you must configure a [Hardhat wallet](../../../public-networks/how-to/develop/hardhat.md).
Copy file name to clipboardExpand all lines: docs/private-networks/tutorials/permissioning/onchain.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,16 @@ The following steps describe bootstrapping a permissioned network using a Hyperl
12
12
13
13
This tutorial configures permissioning on a [IBFT 2.0 proof of authority (PoA)] network.
14
14
15
+
:::caution Please use this as reference material only!
16
+
17
+
The [permissioning-contract-repo](https://github.com/ConsenSys/permissioning-smart-contracts) has been archived and is intended as reference material only.
18
+
Please update all dependencies in there before proceeding.
19
+
20
+
In addition, we also recommend using [Hardhat](https://hardhat.org/hardhat-runner/docs/guides/deploying) instead of [Truffle](https://trufflesuite.com/),
21
+
as the development environment. Please refer to the [Quorum Dev Quickstart](../../tutorials/quickstart.md) for an example.
22
+
23
+
:::
24
+
15
25
## Prerequisites
16
26
17
27
-[Node.js](https://nodejs.org/en/) v10.16.0 or later
Copy file name to clipboardExpand all lines: docs/private-networks/tutorials/permissioning/upgrade-contracts.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,16 @@ tags:
10
10
11
11
The following tutorial describes the steps to upgrade the onchain permissioning contracts to the latest version.
12
12
13
+
:::caution Please use this as reference material only!
14
+
15
+
The [permissioning-contract-repo](https://github.com/ConsenSys/permissioning-smart-contracts) has been archived and is intended as reference material only.
16
+
Please update all dependencies in there before proceeding.
17
+
18
+
In addition we also recommend using [Hardhat](https://hardhat.org/hardhat-runner/docs/guides/deploying) instead of [Truffle](https://trufflesuite.com/),
19
+
as the development environment. Please refer to the [Quorum Dev Quickstart](../../tutorials/quickstart.md) for an example.
20
+
21
+
:::
22
+
13
23
## Prerequisites
14
24
15
25
<!-- vale off -->
@@ -19,8 +29,10 @@ The following tutorial describes the steps to upgrade the onchain permissioning
19
29
-[Yarn](https://yarnpkg.com/en/) v1.15 or later
20
30
- Browser with [MetaMask installed](https://metamask.io/).
21
31
32
+
22
33
## Steps
23
34
35
+
24
36
### 1. Get the latest contracts and install dependencies
@@ -14,7 +14,7 @@ import Postman from '../../global/postman.md';
14
14
15
15
The Quorum Developer Quickstart uses the Hyperledger Besu Docker image to run a private [IBFT 2.0](../how-to/configure/consensus/ibft.md) network of Besu nodes managed by Docker Compose.
16
16
17
-
:::danger
17
+
:::caution
18
18
19
19
This tutorial runs a private network suitable for education or demonstration purposes and is not intended for running production networks.
20
20
@@ -30,7 +30,7 @@ This tutorial runs a private network suitable for education or demonstration pur
30
30
- Docker desktop configured to use the WSL2-based engine
31
31
-[Docker and Docker Compose](https://docs.docker.com/compose/install/)
32
32
-[Node.js](https://nodejs.org/en/download/) version 12 or higher
You can use a demo dapp called Pet Shop, provided by [Truffle](https://www.trufflesuite.com/tutorial).
289
+
You can use a demo dapp called QuorumToken which uses an ERC20 token that is deployed to the network.
290
290
291
-
The dapp runs a local website using Docker, and uses smart contracts deployed on the network.
291
+
We'll use [Hardhat](https://www.npmjs.com/package/hardhat), [Ethers](https://www.npmjs.com/package/ethers) and [MetaMask](https://metamask.io/) to interact with the network, which involves the following steps:
292
292
293
-
The directory created by `quorum-dev-quickstart` includes a `dapps` directory with a `pet-shop` subdirectory, which contains the source code for the dapp, including the smart contracts, website, and configurations to run this tutorial.
293
+
1. Deploy the contract and **save the contract's address**.
294
+
1. Start the dapp, and read and transact with the deployed token.
294
295
295
-
With the blockchain running and MetaMask connected to `Localhost 8545` via the browser, run the following command to start the Pet Shop dapp:
296
+
The `dapps/quorumToken` directory is this structured in this manner (only relevant paths shown):
296
297
297
298
```bash
298
-
cd dapps/pet-shop
299
-
./run_dapp.sh
299
+
quorumToken
300
+
├── hardhat.config.ts // hardhat network config
301
+
├── contracts // the QuorumToken.sol
302
+
├── scripts // handy scripts eg: to deploy to a chain
303
+
├── test // contract tests
304
+
└── frontend // dapp donein next.js
305
+
├── public
306
+
├── src
307
+
├── styles
308
+
├── tsconfig.json
300
309
```
301
310
302
-
The script:
303
-
304
-
1. Installs the dapp Node dependencies (you may see some warnings here, but it will not prevent the dapp from running).
305
-
1. Compiles the contracts.
306
-
1. Deploys the contracts to the blockchain.
307
-
1. Runs tests.
308
-
1. Builds and runs a Docker image to serve the dapp website.
309
-
310
-
```text './run_dapp.sh' example output
311
-
Compiling your contracts...
312
-
===========================
313
-
> Compiling ./contracts/Adoption.sol
314
-
> Compiling ./contracts/Migrations.sol
315
-
> Artifacts written to /Users/demo/quorum-test-network/dapps/pet-shop/pet-shop-box/build/contracts
This will deploy the contract to the network and return the address. **Please save this address for the next step**.
352
+
353
+
### Run the dapp
354
+
355
+
The dapp runs a local website using Next.js, and uses the contract in the previous step deployed on the network.
356
+
357
+
With the blockchain running, and MetaMask connected to `localhost` on port `8545`, import one of [our test accounts via private key](../reference/accounts-for-testing.md), and run the following command:
358
+
359
+
```bash
360
+
cd frontend
361
+
npm i
362
+
npm run dev
412
363
```
364
+
This starts the dapp, binding it to port `3001` on your machine.
365
+
366
+
```text
413
367
414
-
In the browser where you have MetaMask enabled and one of the test accounts loaded, open a new tab and navigate to [the Pet Shop dapp](http://localhost:3001) where you can adopt lovely pets (sorry, not for real, it's a demo).
When you select **Adopt**, a MetaMask window pops up and requests your permission to continue with the transaction.
371
+
- ready started server on [::]:3001, url: http://localhost:3001
372
+
- event compiled client and server successfully in 270 ms (18 modules)
373
+
- wait compiling...
374
+
- event compiled client and server successfully in 173 ms (18 modules)
375
+
```
417
376
418
-
After the transaction is complete and successful, the status of the pet you adopted shows **Success**.
377
+
In the browser where you have MetaMask enabled and one of the test accounts loaded, open a new tab and navigate to
378
+
[the QuorumToken dapp](http://localhost:3001).
379
+
Connect to MetaMask and input the address from the previous step. Fox example our contract above deployed to `0x5FbDB2315678afecb367f032d93F642f64180aa3`.
419
380
420
-

381
+
The dapp will then read the balance of the account from MetaMask and get details of the contract. You can then send funds
382
+
to another address (any of the other test accounts) on the network, and MetaMask will sign and send the transaction.
421
383
422
384
You can also search for the transaction and view its details in the [Block Explorer](http://localhost:25000/).
423
385
@@ -429,42 +391,41 @@ The MetMask UI also keeps a record of the transaction.
429
391
430
392
### Deploy your own dapp
431
393
432
-
You can deploy your own dapp to the Quorum Developer Quickstart, by configuring your dapp to point to the Quickstart network.
394
+
You can deploy your own dapp to the Quorum Developer Quickstart by configuring your dapp to point to the Quickstart network.
433
395
434
-
If you're using [Truffle](https://trufflesuite.com/truffle/), update the `networks` object in the [Truffle configuration file](https://trufflesuite.com/docs/truffle/reference/configuration#networks) to specify which networks to connect to for deployments and testing. The Quickstart RPC service endpoint is `http://localhost:8545`.
396
+
We recommend using [Hardhat](https://hardhat.org/hardhat-runner/docs/guides/project-setup), and you can use the sample
397
+
`hardhat.config.js` to configure the `networks` object in the [Hardhat configuration file](https://hardhat.org/hardhat-network/docs/reference#config)
398
+
to specify which networks to connect to for deployments and testing. The Quickstart's RPC service endpoint is `http://localhost:8545`.
435
399
436
-
For example, the following is the Truffle configuration file for the Pet Shop dapp used in the Quickstart Besu network:
400
+
For example, the following is the Hardhat configuration file for the QuorumToken dapp used in the Quickstart GoQuorum network:
0 commit comments