Linnia Smart Contracts


5880.1.83 years ago3 years agoMinified + gzip package size for @linniaprotocol/linnia-smart-contracts in KB


Linnia Smart Contracts NPM Package Build Status Coverage Status

:warning: WIP

Smart Contracts for Linnia


All addresses for protocal located: Here


Linnia Users

A contract that keeps a registry of registered users and their provenance.

Linnia Records

A contract that keeps a registry of metadata of uploaded medical records, as well as the IRIS score of those records. The metadata makes records easily searchable.

Recieving Tokens when adding Linnia records

When a person uploads data, 1 Finney LIN token is transferred from the Linnia admin pool/acct to the user’s address. Currently no data validation needed.

1 Finney of LIN tokens per upload for now.

Linnia Permissions

A contract that keeps a registry of permissions. Permissions include who can view what data, and where the permissioned copy is stored on IPFS.

Linnia Overall Architecture

Linnia architecture

Getting started


  • Node.js
  • Node Package Manager

Clone the repository

$ git clone https://github.com/ConsenSys/Linnia-Smart-Contracts.git

Install the dependencies

$ npm install


npm run migrate


To run tests with coverage

npm run coverage

To run tests without coverage

  • First start testrpc with npm start
    • Alternatively you can run Ganache GUI at port 7545 with network id 5777
  • Run npm test

Video to Help You Get Started

Video to Get You Started with Linnia Smart Contract


Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.