A smart contract for the coffee supply chain.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Juan Manuel Hébert 889ea7ec56 Rename SiloDequeue to AddInput 7 hours ago
contracts Rename SiloDequeue to AddInput 7 hours ago
migrations Implement entities and custody transfer 1 week ago
test Add enumerated tytpes 3 days ago
.gitignore Add .DS_Store to .gitignore 3 days ago
LICENSE Update 'LICENSE' 1 week ago
README.md Add enumerated tytpes 3 days ago
truffle-config.js Add registration and picture change events 7 hours ago

README.md

Coffeebrain

A smart contract for the coffee supply chain.

Running the tests

This repository’s configuration assumes that there is a Ganache workspace running on localhost at port 7545 with network ID 5777. If everything is configured properly, the tests can be run by invoking the truffle test command in a terminal.

API Documentation

See NatSpec comments in contracts/Coffeebrain.sol.

Integer correspondences

Coffee varieties, product types, certificate types, sustainability practices and currencies are encoded as integers in the API of the contract. Hereafter are the correspondences between those integers and the constants currently supported in this prototype.

Product types (a.k.a kinds)

Type Integer value
Weight loss 0
Wet parchment 1
Dry parchment 2
Green coffee 3
Roasted coffee 4

Coffee varieties

Coffee variety Integer value
Castillo 0
Colombia 1
Caturra 2
Típica 3
Borbón 4
Maragogipe 5
TABI 6
Cenicafé 1 7

Currencies

Currency Integer value
US Dollar (USD) 0
Colombian Peso (COP) 1
Euro (EUR) 2
Danish Krone (DKK) 3
Swedish Krone (SEK) 4

Certificate types

Certificate type Integer value
Fair Trade (FLO) 0
Rainforest Alliance 1
UTZ 2

Sustainability practices

Sustainability practice Integer value
Water treatment system 0
Shade trees 1
Renewable energy 2
Herbicide use 3
Fungicide use 4
Insecticide use 5
No pesticide use 6
Responsible chemical management 7