2.5.0 ā€¢ Published 5 years ago

metronome-contracts v2.5.0

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

šŸ”Œ 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

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago