1

I recently read about BigChainDB and plan to use in some PoC project like KYC or Land/Asset Registry using Solidity. If someone has created any solidity smart contract(s) using BigChainDB, can they please share document/blog/links/GitHub repository. On the BigChainDB site, I could not find many resources which talk about smart contract implementation using BigChainDB.

Thanks in advance!

Regards

  • Since a solidity smart contract cannot interact with the world outside of the EVM in order to connect your contract with bigchaindb you will need to write an oracle service that will take charge of that. – Ismael Feb 17 '18 at 16:13
  • Thanks @Ismael...can you please share links to any article or code which showcases this. – tanmay Feb 18 '18 at 3:31
0

BigChainDB is not developed by Ethereum team. BigChainDB is offchain solution for achieving distributed database for dApps. You can use Oraclize service to access db into Eth contract.

How can I integrate BigChainDB

  1. Write a Server module using Python or Node.js to get the data from BigChainDB.
  2. Save basic info for get the data from BigChainDB in Eth Contract.
  3. If you want to get data from BigChainDB for calculation or verification or any other reason then call 1st service via Oracalize service.

For more details check below links for Oracalize services:

Oraclize Document

Oraclize Examples

As per bigchaindb website:

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)

Save trans Id/hash in contract.

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

  • @tanmay Hope will address your issue, Let me know any concerns. – Jitendra Kumar. Balla Feb 18 '18 at 12:03
  • kumar balla, thanks for your reply. I have used Oraclize services in some of my work. One question though, if eventually, it boils down to using Oraclize services what benefit will I get it using BigchainDB in comparison to using any other traditional database like SQL or mongoDB? – tanmay Feb 18 '18 at 12:17
  • SQL or mongoDB is centralised DB's. BigChainDB is distributed DB. Its have some of features of Blockchain like No central authority, Immutable,..,etc. Then your app will be complete decentralised app. Even DB. – Jitendra Kumar. Balla Feb 18 '18 at 12:28
  • kumar balla, thanks for your reply. I am hoping if someone in the forum can help me provide with some working code examples or articles connecting BigChainDB with ethereum. Once I get something useful will definitely resolve the question. – tanmay Feb 18 '18 at 12:43
  • @tanmay Updated, – Jitendra Kumar. Balla Feb 18 '18 at 13:07
0

BigChainDB doesn't exist within the Ethereum blockchain, so a smart contract can't access it. The closest you could get is have an Oracle on the Ethereum blockchain for querying data from BigChainDB,

  • 1
    Thanks @flygoing..do you have any sample work/code that I can refer ? – tanmay Feb 18 '18 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.