Socket
Book a DemoInstallSign in
Socket

@centrifuge/ethereum-contracts

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@centrifuge/ethereum-contracts

Centrifuge OS (https://github.com/centrifuge/centrifuge-ethereum-contracts)

npmnpm
Version
0.5.6
Version published
Weekly downloads
66
13.79%
Maintainers
3
Weekly downloads
 
Created
Source

centrifuge Ethereum Contracts

Build Status

Getting help: Head over to our developer documentation at developer.centrifuge.io to learn how to setup a node and interact with it. If you have any questions, feel free to join our slack channel

DISCLAIMER: The code released here presents a very early alpha version that should not be used in production and has not been audited. Use this at your own risk.

Running it


# install the repo dependencies
npm install 

# run testrpc with fixed mnmonic
npm run start-ganache

# to run tests
npm run test

# to continuously run tests, if you so choose
npm run re-test

Migrate script will run only all migrations under the 2 prefix, keep that in mind if adding a new prefix contract migration

Migrate Smart Contracts against Integration Environment

Follow instructions under https://github.com/centrifuge/go-centrifuge/blob/master/README.md to deploy a local light node that bootstraps from the remote node. As soon as the local node is running, and synced:

  • Copy migrateAccount.json file to your $ETH_DATADIR/$NETWORK_ID/keystore
  • Perform migration ./scripts/migrate.sh integration
    • Unlocks default account
    • Runs truffle migrate
    • Generates environment json file

Migrate Smart Contracts against Rinkeby Environment

Follow instructions under https://github.com/CentrifugeInc/go-centrifuge/blob/master/README.md to deploy a local light Rinkeby node. As soon as the local proxy node is running:

  • Unlock migrate account:
    • Binary run:
      geth attach http://localhost:9545 --exec "personal.unlockAccount('0x44a0579754d6c94e7bb2c26bfa7394311cc50ccb', 'INPUT_PWD', 500)"
      
    • Docker run:
      docker run -it --net=host --entrypoint "/geth" centrifugeio/cent-geth:latest attach http://localhost:9545 --exec "personal.unlockAccount('0x44a0579754d6c94e7bb2c26bfa7394311cc50ccb', 'INPUT_PWD', 500)"
      
  • Perform migration ./scripts/migrate.sh rinkeby
    • Runs truffle migrate
    • Generates environment json file

Released ABIs + Addresses

We keep track of the released ABIs and their respective deployed addresses as part of the repository.

Every environment will have its own json file that contains the following format:

{
  "contracts": {
    "ContractName": {
      "abi": ABI map,
      "bytecode": "...",
      "address": "0x94d04e16e8e39b7f6a825689ce52aa60f68069cc"
    },
    ...
  }
}

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts