整合TCR、CPM和海洋代币

keeper-contracts的Python项目详细描述


banner

保管人合同

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

DockerhubTravisCIAscribeGreenkeeper
Docker Build StatusBuild Statusjs ascribeGreenkeeper badge

有龙和乌贼。这是在alpha状态,你可以预期会遇到问题。如果你碰到他们,请打开a new issue。_


目录


开始

对于keeper-contracts的本地开发,可以使用Docker,也可以在计算机上设置开发环境。

Docker

最简单的入门方法是barge,一个docker组合应用程序来运行海洋协议。

地方发展

作为先决条件,您需要:

  • node.js
  • 净现值

克隆项目并安装所有依赖项:

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

编制固化合同:

npm run compile

在新终端中,启动以太坊rpc客户端,例如ganache-cli

ganache-cli

切换回另一个终端并部署合同:

npm run deploy:development

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

升级contracts[可选]:

npm run upgrade

测试

使用npm run test运行测试,例如:

npm run test -- test/unit/agreements/AgreementStoreManager.Test.js

代码linting

使用ESLintEthlintJavaScript设置绒布。

代码样式是通过ci测试过程强制执行的,如果存在任何linting错误,生成将失败。

网络

测试网络

Duero测试网

部署在Ocean Duero测试网络上的合同地址:

ContractVersionAddress
AccessSecretStoreConditionv0.11.1^{}
AgreementStoreManagerv0.11.1^{}
ConditionStoreManagerv0.11.1^{}
DIDRegistryv0.11.1^{}
DIDRegistryLibraryv0.11.1^{}
Dispenserv0.11.1^{}
EpochLibraryv0.11.1^{}
EscrowAccessSecretStoreTemplatev0.11.1^{}
EscrowRewardv0.11.1^{}
HashLockConditionv0.11.1^{}
LockRewardConditionv0.11.1^{}
OceanTokenv0.11.1^{}
SignConditionv0.11.1^{}
TemplateStoreManagerv0.11.1^{}
ThresholdConditionv0.11.1^{}
WhitelistingConditionv0.11.1^{}

尼罗河试验网

部署在Ocean的Nile Beta网络上的合同地址:

ContractVersionAddress
AccessSecretStoreConditionv0.11.1^{}
AgreementStoreManagerv0.11.1^{}
ConditionStoreManagerv0.11.1^{}
DIDRegistryv0.11.1^{}
DIDRegistryLibraryv0.11.1^{}
Dispenserv0.11.1^{}
EpochLibraryv0.11.1^{}
EscrowAccessSecretStoreTemplatev0.11.1^{}
EscrowRewardv0.11.1^{}
HashLockConditionv0.11.1^{}
LockRewardConditionv0.11.1^{}
OceanTokenv0.11.1^{}
SignConditionv0.11.1^{}
TemplateStoreManagerv0.11.1^{}
ThresholdConditionv0.11.1^{}
WhitelistingConditionv0.11.1^{}

科万测试网

已弃用:已弃用kovan网络,并将在下一版本中删除。


部署在kovan testnet上的合同地址:

ContractVersionAddress
AccessSecretStoreConditionv0.10.3^{}
AgreementStoreManagerv0.10.3^{}
ConditionStoreManagerv0.10.3^{}
DIDRegistryv0.10.3^{}
DIDRegistryLibraryv0.10.3^{}
Dispenserv0.10.3^{}
EpochLibraryv0.10.3^{}
EscrowAccessSecretStoreTemplatev0.10.3^{}
EscrowRewardv0.10.3^{}
HashLockConditionv0.10.3^{}
LockRewardConditionv0.10.3^{}
OceanTokenv0.10.3^{}
SignConditionv0.10.3^{}
TemplateStoreManagerv0.10.3^{}

主机

太平洋主干网

部署在太平洋主网上的合同地址:

ContractVersionAddress
AccessSecretStoreConditionv0.11.1^{}
AgreementStoreManagerv0.11.1^{}
ConditionStoreManagerv0.11.1^{}
DIDRegistryv0.11.1^{}
DIDRegistryLibraryv0.11.1^{}
EpochLibraryv0.11.1^{}
EscrowAccessSecretStoreTemplatev0.11.1^{}
EscrowRewardv0.11.1^{}
HashLockConditionv0.11.1^{}
LockRewardConditionv0.11.1^{}
OceanTokenv0.11.1^{}
SignConditionv0.11.1^{}
TemplateStoreManagerv0.11.1^{}
ThresholdConditionv0.11.1^{}
WhitelistingConditionv0.11.1^{}

以太坊主网


已弃用:已弃用ethereum mainnet网络,并将在下一版本中删除。


部署在以太坊主网上的合同地址:

ContractVersionAddress
AccessSecretStoreConditionv0.10.3^{}
AgreementStoreManagerv0.10.3^{}
ConditionStoreManagerv0.10.3^{}
DIDRegistryv0.10.3^{}
DIDRegistryLibraryv0.10.3^{}
EpochLibraryv0.10.3^{}
EscrowAccessSecretStoreTemplatev0.10.3^{}
EscrowRewardv0.10.3^{}
HashLockConditionv0.10.3^{}
LockRewardConditionv0.10.3^{}
SignConditionv0.10.3^{}
TemplateStoreManagerv0.10.3^{}

套餐

为了便于集成海洋协议的keeper-contracts,有PythonJavaScriptJava包可以集成。这些库包括智能合约abi。 使用这些包有助于避免编译智能合约并将abi手动复制到项目中。这样集成就更干净、更容易了。 当前提供的软件包是:

这些包包含doc/artifacts/文件夹中的所有内容。

JavaScript中,它们可以这样使用:

安装keeper-contractsnpm包。

npm install @oceanprotocol/keeper-contracts

nile网络上加载OceanToken合同的abi:

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

artifacts的结构是:

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

文档

贡献

请参阅海洋协议文档中标题为“Ways to Contribute”的页面。

现有技术

这个项目建立在开源项目的基础上:

许可证

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.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android studio在应用程序中自动添加错误权限   java如何转换“javafx”。场景形象Image@1a3d58b'到正常的文件路径   java这个程序的流程是什么?请启发我的知识   javafx中按钮的java切换组   void方法中使用的void方法的数组组成?(爪哇)   jsp重定向到Liferay Portlet中的Java Servlet   java在创建反转arraylist的方法时遇到问题   使类(包装映射)在Java的forloop中可用   java将TextInputLayout或任何UI组件从活动传递到DialogFragment   java在启动SpringBootApplication时捕获异常   java如何实现像playstore应用程序那样的向下滚动隐藏操作栏?   java如何获得pom文件的完全解析模型?   在Java中将字节数组转换为字符串并返回后得到错误的结果   java数学解析器令牌结构   java是默认的Hibernate(5.2.5)会话级缓存终止性能?