Git Product home page Git Product logo

ethereum-claims-registry's Introduction

Ethereum Claims Registry

The Ethereum Claims Registry is a contract that stores claims made by and to identities and contracts on the ethereum blockchain.

Using the registry

The Claim Registry can be used from javascript as well as directly from other contracts.

From javascript

To use the contract we provide truffle artifacts. Once you require the uport-identity module you will get an object containing a versioned index of the uport contracts. You can specify which version you want to user, or just use the latest one. Keep in mind that different versions will be deployed to different addresses.

const EthereumClaimsRegistry = require('ethereum-claims-registry').registry

You can use truffle-contract to utilize these artifacts.

const Contract = require('truffle-contract')
let ClaimsReg = Contract(EthereumClaimsRegistry)
ClaimsReg.setProvider(web3.currentProvider)
let claimsReg = ClaimsReg.deployed()

You can also use web3.

let networkId = 1 // Mainnet
let ClaimsReg = web3.eth.contract(EthereumClaimsRegistry.abi)
let claimsReg = ClaimsReg.at(EthereumClaimsRegistry.networks[networkId].address)

From solidity

TODO - add documentation

Contract Deployments

Network Address
Mainnet (id: 1) 0xaca1bcd8d0f5a9bfc95aff331da4c250cd9ac2da
Ropsten (id: 3) 0xaca1bcd8d0f5a9bfc95aff331da4c250cd9ac2da
Rinkeby (id: 4) 0xaca1bcd8d0f5a9bfc95aff331da4c250cd9ac2da
Kovan (id: 42) 0xaca1bcd8d0f5a9bfc95aff331da4c250cd9ac2da

Testing the contracts

Make sure you have truffle installed then simply run:

$ truffle test

Deploy contract

First run,

$ scripts/generateDeployTxs.js

you will get the data needed to deploy as an output from this command. Copy the senderAddress and send cost amount of ether to this address on the ethereum network you wish to deploy to. Once this tx is confirmed simply send the rawTx to the same network. contractAddress is the address of the deployed contract. This will be the same on all networks it is deployed to.

ethereum-claims-registry's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.