Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oceanprotocol/keeper-contracts

Package Overview
Dependencies
Maintainers
5
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oceanprotocol/keeper-contracts

Integration of SEAs, DID and OceanToken in Solidity

  • 0.13.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
169
increased by156.06%
Maintainers
5
Weekly downloads
 
Created
Source

banner

keeper-contracts

💧 Integration of SEAs, DID and OceanToken in Solidity oceanprotocol.com

DockerhubTravisCIAscribeGreenkeeper
Docker Build StatusBuild Statusjs ascribeGreenkeeper badge

🐲🦑 THERE BE DRAGONS AND SQUIDS. This is in alpha state and you can expect running into problems. If you run into them, please open up a new issue. 🦑🐲


Table of Contents


Get Started

For local development of keeper-contracts you can either use Docker, or setup the development environment on your machine.

Docker

The simplest way to get started with is barge, a docker compose application to run Ocean Protocol.

Local development

As a pre-requisite, you need:

  • Node.js
  • npm

Note: For MacOS, make sure to have node@10 installed.

Clone the project and install all dependencies:

git clone git@github.com:oceanprotocol/keeper-contracts.git
cd keeper-contracts/

# install dependencies
npm i

# install RPC client globally
npm install -g ganache-cli

Compile the solidity contracts:

npm run compile

In a new terminal, launch an Ethereum RPC client, e.g. ganache-cli:

ganache-cli

Switch back to your other terminal and deploy the contracts:

npm run deploy:development

# for redeployment run this instead
npm run clean
npm run compile
npm run deploy:development

Upgrade contracts [optional]:

npm run upgrade

Testing

Run tests with npm run test, e.g.:

npm run 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.

Networks

Testnets

Duero Testnet

The contract addresses deployed on Ocean's Duero Test Network:

ContractVersionAddress
AccessSecretStoreConditionv0.13.10x38e26f97AcCc0f6f0bA70b6304d89781449BAc11
AgreementStoreManagerv0.13.10x10f763D50600462F7253dc721dC895754b3Aee26
ComputeExecutionConditionv0.13.10x69Cf2ae0148140E0d9Fa0AdC6bA7Fd10989Fe940
ConditionStoreManagerv0.13.10x10083113a47E6689D5C526D9e814bA42752BE09c
DIDRegistryv0.13.10xb1eA341724Fdcd53CA39d7DE3264bB89E6120BE4
DIDRegistryLibraryv0.13.10xcb7D122Af3C861a87C9fBb17F1B52b7C501c1062
Dispenserv0.13.10xe76548A5b24AF890093A4C8423D542bcA1752CB8
EpochLibraryv0.13.10x2B4d53BE84964983932dD6167155052201892c0A
EscrowAccessSecretStoreTemplatev0.12.70xBd7e5fFf4Eb8d67111227C9541080a74c634d643
EscrowComputeExecutionTemplatev0.12.70xe509CE38a1A58195D0257c70DeD536253A4039Fc
EscrowRewardv0.13.10xEb30f990F8F3a784F9eD3A594021D3764af00469
HashLockConditionv0.13.10x4939063413A7a9B79d5437de73ed6d9996F92629
LockRewardConditionv0.13.10x53F89846832a793bF988B604b2489f74E6D22648
OceanTokenv0.13.10xFEBfC7dA1cAf52E4207501ad6df6B19EcDA4614b
SignConditionv0.13.10x127c9A80A61b5BB6b97EE796CACDFbc201969447
TemplateStoreManagerv0.13.10x6d3d30BB9074c1e3013A8b99A2e22a3FF5966EA2
ThresholdConditionv0.13.10xe940DBA354d444aA9Af0723A46a277ea6Ac36DE1
WhitelistingConditionv0.13.10x453c7912d4e33B3348961810296FE55a6adE20B2
Nile Testnet

The contract addresses deployed on Ocean's Nile Test Network:

ContractVersionAddress
AccessSecretStoreConditionv0.13.20x45DE141F8Efc355F1451a102FB6225F1EDd2921d
AgreementStoreManagerv0.13.20x62f84700b1A0ea6Bfb505aDC3c0286B7944D247C
ComputeExecutionConditionv0.13.20xc63c6DA8Cfa99927E48B5d7784758fef4e5e1D6d
ConditionStoreManagerv0.13.20x39b0AA775496C5ebf26f3B81C9ed1843f09eE466
DIDRegistryv0.13.20x4A0f7F763B1A7937aED21D63b2A78adc89c5Db23
DIDRegistryLibraryv0.13.20x82281775C6AB73E85b7a7e0CEe62910729d1cF95
Dispenserv0.13.20x865396b7ddc58C693db7FCAD1168E3BD95Fe3368
EpochLibraryv0.13.20x787Cf4627F3F2bf5B8e9Da619aba59CB997A19B4
EscrowAccessSecretStoreTemplatev0.12.70xfA16d26e9F4fffC6e40963B281a0bB08C31ed40C
EscrowComputeExecutionTemplatev0.12.70x4dc980aA0786Dc3B5FC76BDb5C9c42cac796e68B
EscrowRewardv0.13.20xeD4Ef53376C6f103d2d7029D7E702e082767C6ff
HashLockConditionv0.13.20xB5f2e45e8aD4a1339D542f2defd5095B98054590
LockRewardConditionv0.13.20xE30FC30c678437e0e8F78C52dE9db8E2752781a0
OceanTokenv0.13.20x9861Da395d7da984D5E8C712c2EDE44b41F777Ad
SignConditionv0.13.20x5a4301F8a7a8A13485621b9B4C82B1E66c112ee2
TemplateStoreManagerv0.13.20x9768c8ae44f1dc81cAA98F48792aA5730cAd2F73
ThresholdConditionv0.13.20xf29a50080163Fb2938E2024f19681Ac2FB8745De
WhitelistingConditionv0.13.20x9Db7fE5A18Ff4fb1746c290192EDE67a64EB4385
Kovan Testnet

Deprecated: The kovan network is deprecated and will be removed in the next version.


The contract addresses deployed on Kovan testnet:

ContractVersionAddress
AccessSecretStoreConditionv0.10.30x9Ee06Ac392FE11f1933a51B48D1d07dd97f1dec7
AgreementStoreManagerv0.10.30x412d4F57425b41FE027e06b9f37D569dcAE2eAa4
ConditionStoreManagerv0.10.30xA5f5BaB34DE3782A71D37d0B334217Ded341cd64
DIDRegistryv0.10.30x9254f7c8f1176C685871E7A8A99E11e96775F488
DIDRegistryLibraryv0.10.30xf22aEF1421CCd4f0A0D0BB1f7fe03233384c69B4
Dispenserv0.10.30x5B92243133094210F504dF6B9D54fD70E7B281DC
EpochLibraryv0.10.30x44Ca6882823a2d7864376893A4BCF3eB377693e4
EscrowAccessSecretStoreTemplatev0.10.30xe0Afe9a948f9Fa39524c8d29a98d75409018ABf0
EscrowRewardv0.10.30xa182ff844c71803Bf767c3AB4180B3bfFADa6B2B
HashLockConditionv0.10.30x11ef2D50868c1f1063ba0141aCD53691A0293c25
LockRewardConditionv0.10.30x2a2A2C5fF51C5f1c84547FC7a194c00F82763432
OceanTokenv0.10.30xB57C4D626548eB8AC0B82b086721516493E2908d
SignConditionv0.10.30x7B8B2756de9Ab474ddbCc87047117a2A16419194
TemplateStoreManagerv0.10.30xD20307e2620Bb8a60991f43c52b64f981103A829

Mainnets

Pacific Mainnet

The contract addresses deployed on Pacific Mainnet:

ContractVersionAddress
AccessSecretStoreConditionv0.13.20x7FC6520Af3F0800d76A3e2FfE7b838c945ADBFE4
AgreementStoreManagerv0.13.20x44665ee68779eC83202702C091279661336F5F8a
ComputeExecutionConditionv0.13.20xBbaCeaA102e62fEeE89eAF935aD757CD5aac844a
ConditionStoreManagerv0.13.20xbD1dEd7ef05c31F81C54e913a23Da69E77d3e0EE
DIDRegistryv0.13.20x1f0E059a50356D8617980F8fa21a53F723072712
DIDRegistryLibraryv0.13.20x2eBD03c446e11EA4eC58eC092b3906a816828D2f
EpochLibraryv0.13.20xBCc5b375AB7ca0AB45b00F3dA24eC8b3b5aEe031
EscrowAccessSecretStoreTemplatev0.12.70x9BF43606d833489fbD568ace13f535fC41130c28
EscrowComputeExecutionTemplatev0.12.70x04D939Bbe37de1Aa0261F523EdB7654613dfB97F
EscrowRewardv0.13.20x656Aa3D9b37A6eA770701ae2c612f760d9254A66
HashLockConditionv0.13.20x5Eef92d570996ED20Cb60fE41475f594299Ec21C
LockRewardConditionv0.13.20x7bf64DaCc7929A1e5466f7d9E575128abf1875f8
OceanTokenv0.13.20x012578f9381e876A9E2a9111Dfd436FF91A451ae
SignConditionv0.13.20xB74172078ABb029FaD809335d82241371b998708
TemplateStoreManagerv0.13.20xF2Cf3761c166c6D85d07299427821D18A4329cd1
ThresholdConditionv0.13.20xeD2A0787885f4ef781E35c5808F3C786fc8C1817
WhitelistingConditionv0.13.20x5b4c3B48062bDCa9DaA5441c5F5A9D557bFE3356

Ethereum Mainnet


Deprecated: The ethereum mainnet network is deprecated and will be removed in the next version.


The contract addresses deployed on Ethereum Mainnet:

ContractVersionAddress
AccessSecretStoreConditionv0.10.30x57e299517B6E5637cE9da15E4372f42a63c7e099
AgreementStoreManagerv0.10.30x5E98B9EfABe192aB02a9B39D9B44A22C88A625BD
ConditionStoreManagerv0.10.30x031A0B2FE74086e5963CD5Ac27Bd1451A40Fe593
DIDRegistryv0.10.30xC4A1D6d4778C9A17D5e37797dA2FaB48FA9d01f6
DIDRegistryLibraryv0.10.30xFb4231AF132A8E160292022eBd8ea4292104B1Da
EpochLibraryv0.10.30xb5096b69638689eE2dC7CA56Babaf7d8521a7Abb
EscrowAccessSecretStoreTemplatev0.10.30xa713D8F4791512a599A98f5DcaCC6401D6c76e5f
EscrowRewardv0.10.30xB950FE753871dc8b79284d76EA4A213db4697578
HashLockConditionv0.10.30x860761Dbbe9b8377A2933a1093B39167B907befF
LockRewardConditionv0.10.30xD41161D8f2CE5Ec95465F4b2fBD00Cfea186204C
SignConditionv0.10.30xEE33DCDBE6aF6197dD01907cfc4296BFC0448B16
TemplateStoreManagerv0.10.30x04DD5364b12131ae870Ec54bd539b5Cb94B9DC36

xDai

The contract addresses deployed on xDai Mainnet:

ContractVersionAddress
AccessSecretStoreConditionv0.13.20x2EadA723f7C631284B299E5BfB724B2153D4c1d7
AgreementStoreManagerv0.13.20x5E12966F910A819a84D359383F0B2777Af04B664
ComputeExecutionConditionv0.13.20x0233d73aFf3030FE26a53F363217c84DF25638E9
ConditionStoreManagerv0.13.20xBe3419C1E4764BeF16A272A45865c1C1072Bf8AB
DIDRegistryv0.13.20x99ae43155D8Fa205b5CEE705aD8ab1a1A92B904E
DIDRegistryLibraryv0.13.20x304AA20E6D04B18221D7a1d971ff4C245039486D
EpochLibraryv0.13.20xa1BC282eAc22092C0D9344aba38F65aDA6200242
EscrowAccessSecretStoreTemplatev0.12.70xCD3a33379DBDc6Cb14C3bf8eAb594e5ae1317BB1
EscrowComputeExecutionTemplatev0.12.70xbb3B88589902eFF97d3E6Af2757f83c66a9FE2Ac
EscrowRewardv0.13.20x9C71Ac20Ef2178bD6f9d927a601985f9983b1E8E
HashLockConditionv0.13.20x6a9C322ADE3c58b6D83DA1cB4A687D834872BFc8
LockRewardConditionv0.13.20x3857986E111d78E1bD4017Efe620e05e3cb9376b
OceanTokenv0.13.20x83180c00B360B17b7d2158bfeFD32D17F01695b3
SignConditionv0.13.20x547A4BA7Bec2AE45393D07AF9E0F53aEA50aD968
TemplateStoreManagerv0.13.20xD2f1Ccb9E51659f1bAC7EF3e6cD713b536C1BDa4
ThresholdConditionv0.13.20xeED6Bf968e5808f6Ba0d284475f437aa93997aC4
WhitelistingConditionv0.13.20xA9c8Ae2784BF0FdB56004BE0D46dE1BeE15Fe421

Packages

To facilitate the integration of the Ocean Protocol's keeper-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 keeper-contracts npm package.

npm install @oceanprotocol/keeper-contracts

Load the ABI of the OceanToken contract on the nile network:

const OceanToken = require('@oceanprotocol/keeper-contracts/artifacts/OceanToken.nile.json')

The structure of the artifacts is:

{
  "abi": "...",
  "bytecode": "0x60806040523...",
  "address": "0x45DE141F8Efc355F1451a102FB6225F1EDd2921d",
  "version": "v0.9.1"
}

Documentation

Contributing

See the page titled "Ways to Contribute" in the Ocean Protocol documentation.

Prior Art

This project builds on top of the work done in open source projects:

License

Copyright 2018 Ocean Protocol Foundation

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.

FAQs

Package last updated on 10 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc