1.0.0-beta • Published 4 years ago

lumerin-contracts v1.0.0-beta

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

šŸ”Œ Web3 Contracts for Lumerin Token ready to be used.

Build Status Code Style Known Vulnerabilities Greenkeeper badge

Install

npm install --save lumerin-contracts

Usage

const Web3 = require('web3')
const LumerinContracts = require('lumerin-contracts')

const web3 = new Web3('http://localhost:8545')
const lumerinContracts = new LumerinContracts(web3, 'mainnet')

lumerinContracts.LMRToken.methods.balanceOf(address).call().then(console.log)

API

LumerinContracts(web3, chain)

Constructor for the Lumerin 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.

lumerinContracts.{contractName}

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

LumerinContracts.{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