首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于BigChainDB的稳健智能契约

基于BigChainDB的稳健智能契约
EN

Ethereum用户
提问于 2018-02-17 12:49:05
回答 2查看 1.6K关注 0票数 2

最近,我读到了关于BigChainDB的文章,并计划在一些PoC项目中使用,比如KYC或Land/Asset。如果有人使用BigChainDB创建了任何可靠的智能契约(S),他们可以共享文档/博客/链接/GitHub存储库吗?在BigChainDB站点上,我找不到很多关于使用BigChainDB实现智能契约的资源。

提前感谢!

问候

EN

回答 2

Ethereum用户

回答已采纳

发布于 2018-02-18 11:58:03

BigChainDB不是由Ethereum开发的。BigChainDB是实现dApps分布式数据库的无链解决方案。您可以使用Oraclize服务访问Eth合同中的db。

如何集成BigChainDB

  1. 使用Python或Node.js编写服务器模块,从BigChainDB获取数据。
  2. 保存Eth合同中从BigChainDB获取数据的基本信息。
  3. 如果您希望从BigChainDB获取数据以进行计算或验证或任何其他原因,请通过Oracalize服务调用第一服务。

有关更多详细信息,请参阅下面的Oracalize服务链接:

Oraclize文档

Oraclize示例

网站:

代码语言:javascript
复制
const driver = require('bigchaindb-driver')


const alice = new driver.Ed25519Keypair()
const conn = new driver.Connection(
    'https://test.bigchaindb.com/api/v1/',
    { app_id: 'Get credentials from testnet.bigchaindb.com',
      app_key: 'by signing up and going to your Applications screen' })
const tx = driver.Transaction.makeCreateTransaction(
    { message: '' },
    null,
    [ driver.Transaction.makeOutput(
        driver.Transaction.makeEd25519Condition(alice.publicKey))],
    alice.publicKey)
const txSigned = driver.Transaction.signTransaction(tx, alice.privateKey)
conn.postTransaction(txSigned)

将trans /散列保存在合同中。

https://github.com/bigchaindb/bigchaindb-examples

票数 0
EN

Ethereum用户

发布于 2018-02-18 00:08:08

BigChainDB不存在于Ethereum区块链中,因此智能契约无法访问它。您能得到的最接近的是在Ethereum块链上有一个Oracle来查询来自BigChainDB的数据,

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/40003

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档