
Nevermined Smart Contracts
đź’§ Smart Contracts implementation of Nevermined in Solidity
nevermined.io

Table of Contents
Get Started
For local development of nevermined-contracts you can either use Docker, or setup the development environment on your machine.
Docker
The simplest way to get started with is using the Nevermined Tools,
a docker compose application to run all the Nevermined stack.
Local development
As a pre-requisite, you need:
Note: For MacOS, make sure to have node@10 installed.
Clone the project and install all dependencies:
git clone git@github.com:keyko-io/nevermined-contracts.git
cd nevermined-contracts/
Install dependencies:
```bash
yarn
Compile the solidity contracts:
yarn compile
In a new terminal, launch an Ethereum RPC client, e.g. ganache-cli:
npx ganache-cli@~6.9.1 > ganache-cli.log &
Switch back to your other terminal and deploy the contracts:
yarn test:fast
For redeployment run this instead
yarn clean
yarn compile
yarn test:fast
Upgrade contracts [optional]:
yarn upgrade
Testing
Run tests with yarn test, e.g.:
yarn test test/unit/agreements/AgreementStoreManager.Test.js
Code Linting
Linting is setup for JavaScript with ESLint & Solidity with Ethlint.
Code style is enforced through the CI test process, builds will fail if there're any linting errors.
yarn lint
Networks
Testnets
Rinkeby Testnet
The contract addresses deployed on Nevermined Rinkeby Test Network:
| AccessSecretStoreCondition | v0.4.1 | 0x3f558204fA288286C3Ce8cb3C4900Fd675fCeaF7 |
| AgreementStoreManager | v0.4.1 | 0x1A3bafbC27F6290C4Fd99F80c0C48D6fFbbE7407 |
| ComputeExecutionCondition | v0.4.1 | 0x9Ee494Ee11Fded1B7cF915cfF92Db4E3E2F9fDd6 |
| ConditionStoreManager | v0.4.1 | 0x31Ea71619B2E8683E13093E93212AACA84238c38 |
| DIDRegistry | v0.4.1 | 0x3262b3292eda1b5c68a3687EF7D9daF7899075E8 |
| DIDRegistryLibrary | v0.4.1 | 0x49bE8829eeC5f29262b31e25B6372E4b004a2e30 |
| EpochLibrary | v0.4.1 | 0x750c547485AeE3774AA1B9919c06ad9833D9d01B |
| EscrowAccessSecretStoreTemplate | v0.4.1 | 0x25340D7Db40e31a5ccA3fEB61329A332f3b043dD |
| EscrowComputeExecutionTemplate | v0.4.1 | 0x25649De77C125b9cF1EcD0f07A652676d590Ec5a |
| EscrowReward | v0.4.1 | 0x4bc44f922B45008cb4977da9eDEc83D30a40F259 |
| HashLockCondition | v0.4.1 | 0xAD762e16445aeA6E71b2fc112c5Ef14F40B67d8E |
| LockRewardCondition | v0.4.1 | 0xF4193bb555F79b8B3C0e78E1E8caC7b5a1763C4a |
| SignCondition | v0.4.1 | 0xe4486F92Bd2BD7e9757E184A5385006324352024 |
| TemplateStoreManager | v0.4.1 | 0x3749aF0feCC396310AE03457c51C7bE04850ECdb |
| ThresholdCondition | v0.4.1 | 0xfAFa8e939937e7531B896Db9F9B66F935408626C |
| WhitelistingCondition | v0.4.1 | 0xa7570Fa3A53337ABfeeE785017C5Eaa5dC84dE36 |
Integration Testnet
The contract addresses deployed on Nevermined Integration Test Network:
Staging Testnet
The contract addresses deployed on Nevermined Staging Test Network:
Mainnets
Production Mainnet
The contract addresses deployed on Production Mainnet:
Packages
To facilitate the integration of nevermined-contracts there are Python, JavaScript and Java packages ready to be integrated. Those libraries include the Smart Contract ABI's.
Using these packages helps to avoid compiling the Smart Contracts and copying the ABI's manually to your project. In that way the integration is cleaner and easier.
The packages provided currently are:
The packages contains all the content from the doc/ and artifacts/ folders.
In JavaScript they can be used like this:
Install the nevermined-contracts npm package.
npm install @keyko-io/nevermined-contracts
Load the ABI of the NeverminedToken contract on the staging network:
const NeverminedToken = require('@keyko-io/nevermined-contracts/artifacts/NeverminedToken.staging.json')
The structure of the artifacts is:
{
"abi": "...",
"bytecode": "0x60806040523...",
"address": "0x45DE141F8Efc355F1451a102FB6225F1EDd2921d",
"version": "v0.9.1"
}
Documentation
Prior Art
This project builds on top of the work done in open source projects:
Attribution
This project is based in the Ocean Protocol Keeper Contracts.
It keeps the same Apache v2 License and adds some improvements. See NOTICE file.
License
Copyright 2020 Keyko GmbH
This product includes software developed at
BigchainDB GmbH and Ocean Protocol (https://www.oceanprotocol.com/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.