This repository provides the chaincode and go-perun backend implementation for Hyperledger Fabric.
adjudicator/
: On-chain logic. Memory implementations for off-chain testing.chaincode/
: Chaincode endpoint, ledger and asset implementation.channel/
: Off-chain logic. Channel interface implementations.binding/
Chaincode bindings.
client/
: Helper functions for setting up a go-perun client.test/
End-2-end tests.
pkg/
: 3rd-party helpers.scripts/
: Test environment setup.wallet/
: Wallet interface implementations.
If you want to locally develop with this project:
- Setup the fabric-samples test environment and add its directory as
FABRIC_SAMPLES_DIR
to your path.
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/v2.4.6/scripts/bootstrap.sh | bash -s
FABRIC_SAMPLES_DIR=$(pwd)/fabric-samples/
- Clone this repo.
git clone https://github.com/perun-network/perun-fabric.git
cd perun-fabric
- Start the test chain and deploy the chaincode. This step needs a working Docker instance running in the background.
./scripts/deployCC.sh
- Run the tests. This step needs a working Go distribution, see go.mod for the required version. Always ensure that
FABRIC_SAMPLES_DIR
is set.
go test ./... -p 1
Further, you can shut down the test environment.
./scripts/network.sh down
Or start the test environment without chaincode deployment.
./scripts/network.sh up
This software is still under development. The authors take no responsibility for any loss of digital assets or other damage caused by the use of it.
Copyright 2022 - See NOTICE file for copyright holders. Use of the source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
Contact us at info@perun.network.