Skip to content

Holds the smart contracts used in the Food Supply Chain SOFIE pilot in the consortium ledger

License

Notifications You must be signed in to change notification settings

SOFIE-project/fsc-consortium-smart-contracts

Repository files navigation

SOFIE foodchain smart contracts

The following project contains the smart contracts used for the SOFIE foodchain pilot.

Installation

To install the necessary node packages execute:

npm install

Compiling the smart contracts

To compile the smart contracts, execute:

npm run compile

Running the unit tests

To run the smart contract unit test(s), execute:

npm run test

Running a development blockhain

To run a development blockhain via ganache-cli and deploy the smart contracts, in one terminal window, execute:

npm run dev-blockchain

In the other terminal, run:

npm run deploy-local

You should see a summary as output containing information about the deployment.

Deploying to staging

Staging settings are define in truffle-config.js file in object networks.staging.

If the node is locked, unlock it and deploy by running:

ACCOUNT_PASSWORD=<password> npm run deploy-staging

where <password> is the account password of the node

Deploying via docker image

You can build a docker image to use to deploy the contract. To build the image run:

docker build -t fsc-consortium-smart-contracts-deployer .

Afterwards, you can use it to deploy contracts and extract the smart contract addresses. Please see Dockerfile for more details.

About

Holds the smart contracts used in the Food Supply Chain SOFIE pilot in the consortium ledger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published