Package: keeper-contracts
keeper-contracts💧 Integration of SEAs, DID and OceanToken in Solidityoceanprotocol.comDockerhubTravisCIAscribeGreenkeeper🐲🦑 THERE BE DRAGONS AND SQUIDS. This is in alpha state and you can expect running into problems. If you run into them, please open upa new issue. 🦑🐲Table of ContentsGet StartedDockerLocal developmentTestingCode LintingNetworksTestnetsDuero TestnetNile TestnetKovan TestnetMainnetsEthereum MainnetPacific MainnetxDaiPackagesDocumentationContributingPrior ArtLicenseGet StartedFor local development ofkeeper-contractsyou can either use Docker, or setup the development environment on your machine.DockerThe simplest way to get started with isbarge, a docker compose application to run Ocean Protocol.Local developmentAs a pre-requisite, you need:Node.jsnpmNote: For MacOS, make sure to havenode@10installed.Clone the project and install all dependencies:gitclonegit@github.com:oceanprotocol/keeper-contracts.gitcdkeeper-contracts/# install dependenciesnpmi# install RPC client globallynpminstall-gganache-cliCompile the solidity contracts:npmruncompileIn a new terminal, launch an Ethereum RPC client, e.g.ganache-cli:ganache-cliSwitch back to your other terminal and deploy the contracts:npmrundeploy:development# for redeployment run this insteadnpmrunclean
npmruncompile
npmrundeploy:developmentUpgrade contracts [optional]:npmrunupgradeTestingRun tests withnpm run test, e.g.:npmruntest--test/unit/agreements/AgreementStoreManager.Test.jsCode LintingLinting is setup forJavaScriptwithESLint& Solidity withEthlint.Code style is enforced through the CI test process, builds will fail if there're any linting errors.NetworksTestnetsDuero TestnetThe contract addresses deployed on Ocean'sDueroTest Network:ContractVersionAddressAccessSecretStoreConditionv0.13.10x38e26f97AcCc0f6f0bA70b6304d89781449BAc11AgreementStoreManagerv0.13.10x10f763D50600462F7253dc721dC895754b3Aee26ComputeExecutionConditionv0.13.10x69Cf2ae0148140E0d9Fa0AdC6bA7Fd10989Fe940ConditionStoreManagerv0.13.10x10083113a47E6689D5C526D9e814bA42752BE09cDIDRegistryv0.13.10xb1eA341724Fdcd53CA39d7DE3264bB89E6120BE4DIDRegistryLibraryv0.13.10xcb7D122Af3C861a87C9fBb17F1B52b7C501c1062Dispenserv0.13.10xe76548A5b24AF890093A4C8423D542bcA1752CB8EpochLibraryv0.13.10x2B4d53BE84964983932dD6167155052201892c0AEscrowAccessSecretStoreTemplatev0.12.70xBd7e5fFf4Eb8d67111227C9541080a74c634d643EscrowComputeExecutionTemplatev0.12.70xe509CE38a1A58195D0257c70DeD536253A4039FcEscrowRewardv0.13.10xEb30f990F8F3a784F9eD3A594021D3764af00469HashLockConditionv0.13.10x4939063413A7a9B79d5437de73ed6d9996F92629LockRewardConditionv0.13.10x53F89846832a793bF988B604b2489f74E6D22648OceanTokenv0.13.10xFEBfC7dA1cAf52E4207501ad6df6B19EcDA4614bSignConditionv0.13.10x127c9A80A61b5BB6b97EE796CACDFbc201969447TemplateStoreManagerv0.13.10x6d3d30BB9074c1e3013A8b99A2e22a3FF5966EA2ThresholdConditionv0.13.10xe940DBA354d444aA9Af0723A46a277ea6Ac36DE1WhitelistingConditionv0.13.10x453c7912d4e33B3348961810296FE55a6adE20B2Nile TestnetThe contract addresses deployed on Ocean'sNileTest Network:ContractVersionAddressAccessSecretStoreConditionv0.13.20x45DE141F8Efc355F1451a102FB6225F1EDd2921dAgreementStoreManagerv0.13.20x62f84700b1A0ea6Bfb505aDC3c0286B7944D247CComputeExecutionConditionv0.13.20xc63c6DA8Cfa99927E48B5d7784758fef4e5e1D6dConditionStoreManagerv0.13.20x39b0AA775496C5ebf26f3B81C9ed1843f09eE466DIDRegistryv0.13.20x4A0f7F763B1A7937aED21D63b2A78adc89c5Db23DIDRegistryLibraryv0.13.20x82281775C6AB73E85b7a7e0CEe62910729d1cF95Dispenserv0.13.20x865396b7ddc58C693db7FCAD1168E3BD95Fe3368EpochLibraryv0.13.20x787Cf4627F3F2bf5B8e9Da619aba59CB997A19B4EscrowAccessSecretStoreTemplatev0.12.70xfA16d26e9F4fffC6e40963B281a0bB08C31ed40CEscrowComputeExecutionTemplatev0.12.70x4dc980aA0786Dc3B5FC76BDb5C9c42cac796e68BEscrowRewardv0.13.20xeD4Ef53376C6f103d2d7029D7E702e082767C6ffHashLockConditionv0.13.20xB5f2e45e8aD4a1339D542f2defd5095B98054590LockRewardConditionv0.13.20xE30FC30c678437e0e8F78C52dE9db8E2752781a0OceanTokenv0.13.20x9861Da395d7da984D5E8C712c2EDE44b41F777AdSignConditionv0.13.20x5a4301F8a7a8A13485621b9B4C82B1E66c112ee2TemplateStoreManagerv0.13.20x9768c8ae44f1dc81cAA98F48792aA5730cAd2F73ThresholdConditionv0.13.20xf29a50080163Fb2938E2024f19681Ac2FB8745DeWhitelistingConditionv0.13.20x9Db7fE5A18Ff4fb1746c290192EDE67a64EB4385Kovan TestnetDeprecated: Thekovannetwork is deprecated and will be removed in the next version.The contract addresses deployed on Kovan testnet:ContractVersionAddressAccessSecretStoreConditionv0.10.30x9Ee06Ac392FE11f1933a51B48D1d07dd97f1dec7AgreementStoreManagerv0.10.30x412d4F57425b41FE027e06b9f37D569dcAE2eAa4ConditionStoreManagerv0.10.30xA5f5BaB34DE3782A71D37d0B334217Ded341cd64DIDRegistryv0.10.30x9254f7c8f1176C685871E7A8A99E11e96775F488DIDRegistryLibraryv0.10.30xf22aEF1421CCd4f0A0D0BB1f7fe03233384c69B4Dispenserv0.10.30x5B92243133094210F504dF6B9D54fD70E7B281DCEpochLibraryv0.10.30x44Ca6882823a2d7864376893A4BCF3eB377693e4EscrowAccessSecretStoreTemplatev0.10.30xe0Afe9a948f9Fa39524c8d29a98d75409018ABf0EscrowRewardv0.10.30xa182ff844c71803Bf767c3AB4180B3bfFADa6B2BHashLockConditionv0.10.30x11ef2D50868c1f1063ba0141aCD53691A0293c25LockRewardConditionv0.10.30x2a2A2C5fF51C5f1c84547FC7a194c00F82763432OceanTokenv0.10.30xB57C4D626548eB8AC0B82b086721516493E2908dSignConditionv0.10.30x7B8B2756de9Ab474ddbCc87047117a2A16419194TemplateStoreManagerv0.10.30xD20307e2620Bb8a60991f43c52b64f981103A829MainnetsPacific MainnetThe contract addresses deployed onPacificMainnet:ContractVersionAddressAccessSecretStoreConditionv0.13.20x7FC6520Af3F0800d76A3e2FfE7b838c945ADBFE4AgreementStoreManagerv0.13.20x44665ee68779eC83202702C091279661336F5F8aComputeExecutionConditionv0.13.20xBbaCeaA102e62fEeE89eAF935aD757CD5aac844aConditionStoreManagerv0.13.20xbD1dEd7ef05c31F81C54e913a23Da69E77d3e0EEDIDRegistryv0.13.20x1f0E059a50356D8617980F8fa21a53F723072712DIDRegistryLibraryv0.13.20x2eBD03c446e11EA4eC58eC092b3906a816828D2fEpochLibraryv0.13.20xBCc5b375AB7ca0AB45b00F3dA24eC8b3b5aEe031EscrowAccessSecretStoreTemplatev0.12.70x9BF43606d833489fbD568ace13f535fC41130c28EscrowComputeExecutionTemplatev0.12.70x04D939Bbe37de1Aa0261F523EdB7654613dfB97FEscrowRewardv0.13.20x656Aa3D9b37A6eA770701ae2c612f760d9254A66HashLockConditionv0.13.20x5Eef92d570996ED20Cb60fE41475f594299Ec21CLockRewardConditionv0.13.20x7bf64DaCc7929A1e5466f7d9E575128abf1875f8OceanTokenv0.13.20x012578f9381e876A9E2a9111Dfd436FF91A451aeSignConditionv0.13.20xB74172078ABb029FaD809335d82241371b998708TemplateStoreManagerv0.13.20xF2Cf3761c166c6D85d07299427821D18A4329cd1ThresholdConditionv0.13.20xeD2A0787885f4ef781E35c5808F3C786fc8C1817WhitelistingConditionv0.13.20x5b4c3B48062bDCa9DaA5441c5F5A9D557bFE3356Ethereum MainnetDeprecated: Theethereum mainnetnetwork is deprecated and will be removed in the next version.The contract addresses deployed on Ethereum Mainnet:ContractVersionAddressAccessSecretStoreConditionv0.10.30x57e299517B6E5637cE9da15E4372f42a63c7e099AgreementStoreManagerv0.10.30x5E98B9EfABe192aB02a9B39D9B44A22C88A625BDConditionStoreManagerv0.10.30x031A0B2FE74086e5963CD5Ac27Bd1451A40Fe593DIDRegistryv0.10.30xC4A1D6d4778C9A17D5e37797dA2FaB48FA9d01f6DIDRegistryLibraryv0.10.30xFb4231AF132A8E160292022eBd8ea4292104B1DaEpochLibraryv0.10.30xb5096b69638689eE2dC7CA56Babaf7d8521a7AbbEscrowAccessSecretStoreTemplatev0.10.30xa713D8F4791512a599A98f5DcaCC6401D6c76e5fEscrowRewardv0.10.30xB950FE753871dc8b79284d76EA4A213db4697578HashLockConditionv0.10.30x860761Dbbe9b8377A2933a1093B39167B907befFLockRewardConditionv0.10.30xD41161D8f2CE5Ec95465F4b2fBD00Cfea186204CSignConditionv0.10.30xEE33DCDBE6aF6197dD01907cfc4296BFC0448B16TemplateStoreManagerv0.10.30x04DD5364b12131ae870Ec54bd539b5Cb94B9DC36xDaiThe contract addresses deployed onxDaiMainnet:ContractVersionAddressAccessSecretStoreConditionv0.13.20x2EadA723f7C631284B299E5BfB724B2153D4c1d7AgreementStoreManagerv0.13.20x5E12966F910A819a84D359383F0B2777Af04B664ComputeExecutionConditionv0.13.20x0233d73aFf3030FE26a53F363217c84DF25638E9ConditionStoreManagerv0.13.20xBe3419C1E4764BeF16A272A45865c1C1072Bf8ABDIDRegistryv0.13.20x99ae43155D8Fa205b5CEE705aD8ab1a1A92B904EDIDRegistryLibraryv0.13.20x304AA20E6D04B18221D7a1d971ff4C245039486DEpochLibraryv0.13.20xa1BC282eAc22092C0D9344aba38F65aDA6200242EscrowAccessSecretStoreTemplatev0.12.70xCD3a33379DBDc6Cb14C3bf8eAb594e5ae1317BB1EscrowComputeExecutionTemplatev0.12.70xbb3B88589902eFF97d3E6Af2757f83c66a9FE2AcEscrowRewardv0.13.20x9C71Ac20Ef2178bD6f9d927a601985f9983b1E8EHashLockConditionv0.13.20x6a9C322ADE3c58b6D83DA1cB4A687D834872BFc8LockRewardConditionv0.13.20x3857986E111d78E1bD4017Efe620e05e3cb9376bOceanTokenv0.13.20x83180c00B360B17b7d2158bfeFD32D17F01695b3SignConditionv0.13.20x547A4BA7Bec2AE45393D07AF9E0F53aEA50aD968TemplateStoreManagerv0.13.20xD2f1Ccb9E51659f1bAC7EF3e6cD713b536C1BDa4ThresholdConditionv0.13.20xeED6Bf968e5808f6Ba0d284475f437aa93997aC4WhitelistingConditionv0.13.20xA9c8Ae2784BF0FdB56004BE0D46dE1BeE15Fe421PackagesTo facilitate the integration of the Ocean Protocol'skeeper-contractsthere arePython,JavaScriptandJavapackages 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:JavaScriptnpmpackage - As part of the@oceanprotocol npm organization, thenpm keeper-contracts packageprovides the ABI's to be imported from yourJavaScriptcode.PythonPypipackage - ThePypi keeper-contracts packageprovides the same ABI's to be used fromPython.JavaMavenpackage - TheMaven keeper-contracts packageprovides the same ABI's to be used fromJava.The packages contains all the content from thedoc/andartifacts/folders.InJavaScriptthey can be used like this:Install thekeeper-contractsnpmpackage.npminstall@oceanprotocol/keeper-contractsLoad the ABI of theOceanTokencontract on thenilenetwork:constOceanToken=require('@oceanprotocol/keeper-contracts/artifacts/OceanToken.nile.json')The structure of theartifactsis:{"abi":"...","bytecode":"0x60806040523...","address":"0x45DE141F8Efc355F1451a102FB6225F1EDd2921d","version":"v0.9.1"}DocumentationContracts DocumentationRelease processPackaging of librariesUpgrading of contractsTemplate lifecycleContributingSee the page titled "Ways to Contribute" in the Ocean Protocol documentation.Prior ArtThis project builds on top of the work done in open source projects:zeppelinos/zosOpenZeppelin/openzeppelin-ethLicenseCopyright 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.