Development environment for Solidity smart contracts with Hyperledger Besu networks.
This project includes a Makefile for easy management of the Besu test network. The following commands are available:
Start a Besu test network with debug logging enabled:
make devThis command runs ./startBesu.sh --debug in the besu directory, creating a 4-node QBFT network with verbose logging.
Add new validator nodes to the existing network:
make add_node N=2This command runs ./addNewNode.sh -n 2 --debug, adding 2 new validator nodes with debug logging. Replace N=2 with the desired number of nodes to add.
Examples:
make add_node N=1- Add 1 new nodemake add_node N=3- Add 3 new nodes
Stop and clean up the entire Besu network:
make stopThis command runs ./stopBesu.sh, removing all containers, networks, and temporary files.
For more advanced usage and additional options, you can run the scripts directly. See the besu/README.md file for detailed documentation of all available parameters and examples.
The repository also carries a tokenization example used in a Hyperledger Besu
webinar: hardhat/contracts/ReceivableToken.sol represents a trade receivable
with the controls a consortium usually requires — issuer role, compliance
allowlist, account freezing, issuance capped by the face value, settlement by
burn and an audit trail of events.
Run the full lifecycle against a running network:
make dev # start the 4-node QBFT network
cd hardhat && npm install # install the contract tooling
npm test # 25 tests on the local Hardhat network
npm run demo-besu # deploy, issue, trade, freeze and settle on BesuAdd DEMO_PAUSE=1 to stop between steps, which is useful when presenting.
The webinar slides are available in webinar-tokenizacao-besu.pdf.