Skip to content
develop
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
nft
 
 
 
 
 
 
 
 
p2p
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Centrifuge OS node

Tests GoDoc Reference codecov Go Report Card

go-centrifuge is the go implementation of the Centrifuge OS interacting with the peer to peer network, Centrifuge Chain, and our Ethereum smart contracts.

Getting help: Head over to our developer documentation at developer.centrifuge.io to learn how to setup a node and interact with it. If you have any questions, feel free to join our discord

DISCLAIMER: The code released here presents a very early alpha version that should not be used in production and has not been audited. Use this at your own risk.

Pre-requisites

  • Go >= 1.15.x
  • Nodejs 10.x.x
  • Truffle 5.1.29
  • Dapp tools

Running tests

There 4 different flavours of tests in the project

  • Unit tests(unit)
  • Command-line tests(cmd)
  • Integration tests(integration)
  • Environment tests(testworld): spins up multiple go-centrifuge nodes and local ethereum and centrifuge chains

To run all the test flavours: make run-tests

To run specific test flavour: test=unit make run-tests

To force ethereum smart contracts to be deployed again: FORCE_MIGRATE='true' test=cmd make run-tests

Note: unit tests doesn't require any smart contract deployments and when run with only unit flavour, smart contracts are not deployed.

Spin-up local environment:

To spin-up local environment, run make start-local-env This command will start Centrifuge chain node, Geth node, and bridge using docker.

Create config file and Start centrifuge node locally:

To start centrifuge node locally, follow the steps below:

  • Start the local test environment
  • run make start-local-node This will start a local centrifuge node. It will override any previous configs that were created.

Spin-down local environment:

To spin-down local environment, run make stop-local-env This command will stop Centrifuge chain node, Geth node, and bridge if running.

Installation

To install, run make install will compile project to binary centrifuge and be placed under GOBIN.

Ensure GOBIN is under PATH to call the binary globally.

API definitions

Node APIs are published to swagger hub. For the latest APIs, please see here: APIs