Skip to content
πŸ”Œ Web3 Contracts for Metronome Token ready to be used.
JavaScript
Branch: master
Clone or download
Latest commit a87a6b7 Oct 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.babelrc Update babel, jest and clear npm audit warns Mar 12, 2019
.eslintignore Merge branch 'develop' May 23, 2018
.eslintrc.json Update lint rules, tests and doc Jan 30, 2019
.gitignore Cleanup lint rules May 24, 2018
.travis.yml testnet contracts: qtum and mordor Oct 9, 2019
LICENSE Improve readme, add eslint bloq and dev deps Apr 24, 2018
README.md testnet contracts: qtum and mordor Oct 9, 2019
logo.png Add new logo May 23, 2018
package-lock.json 2.5.0 Oct 10, 2019
package.json 2.5.0 Oct 10, 2019
webpack.config.js Remove unused Webpack web server config May 24, 2018

README.md

Metronome Contracts JS

πŸ”Œ Web3 Contracts for Metronome Token ready to be used.

Build Status Code Style Known Vulnerabilities Greenkeeper badge

Install

npm install --save metronome-contracts

Usage

const Web3 = require('web3')
const MetronomeContracts = require('metronome-contracts')

const web3 = new Web3('http://localhost:8545')
const metronomeContracts = new MetronomeContracts(web3, 'mainnet')

metronomeContracts.METToken.methods.balanceOf(address).call().then(console.log)

API

MetronomeContracts(web3, chain)

Constructor for the Metronome contracts object. It shall receive a web3 instance and an optional chain parameter that default to 'mainnet'. Other supported chains are: 'classic', 'ropsten' and 'mordor'. Numeric chain IDs can also be used.

metronomeContracts.{contractName}

The instance of the Metronome contracts will have a property for each contract: Auctions, AutonomousConverter, METToken, TokenPorter and Validator. Each contract is an instance of web3.eth.Contract.

MetronomeContracts.{chain}.{contractName}

This is a convenience object containing the abi, address and the birthblock of the contract on the specified chain.

Contracts API

License

MIT

You can’t perform that action at this time.