Skip to main content

Local ISBE Network

Before deploying to PRE or PRO, it is recommended to validate contracts on a local network. ISBE provides a ready-to-use template that spins up a QBFT Besu network in Docker, reproducing the real USE-CASE network environment.

The reference repository is isbe-clients-template, which includes:

  • Scripts to start and stop the local network (startNetwork.sh / stopNetwork.sh)
  • A contract template adapted to the ISBE Diamond pattern
  • A complete, working example (HashTimestamp) ready to run
  • A three-step deployment script (bytecode registration, configuration, and proxy deployment)

Prerequisites

  • Node.js >= 18
  • Docker installed and running
  • jq (brew install jq on macOS, apt-get install jq on Ubuntu/Debian)

Basic flow

1. Clone the repository and install dependencies

git clone https://github.com/red-isbe/isbe-clients-template.git
cd isbe-clients-template
npm install

2. Configure environment variables

cp .env_sample .env

Edit .env with the private key of one of the accounts available on the local network (documented in isbe-network-case/):

ACCOUNT_PRIVATE_KEY=0xyour_private_key
LOCALHOST_URL=http://localhost:8545

3. Start the network

cd isbe-network-case
./startNetwork.sh

This starts 4 Besu nodes. To verify they are running: docker ps.

4. Compile and deploy

npx hardhat compile
npx hardhat run scripts/hashtimestamp/deployHashTimestamp.ts --network isbe

To stop the network:

./stopNetwork.sh

Adapting the template to your project

The repository explains in detail how to replace the example contracts with your own, define your project namespace (storage slots, roles, config IDs), and calculate the hashes required for the deployment script.

See the isbe-clients-template README for the full adaptation guide.