🔌 Web3 Contracts for Lumerin Token ready to be used.
npm install --save @lumerin/contracts
const Web3 = require('web3')
const LumerinContracts = require('@lumerin/contracts')
const web3 = new Web3('http://localhost:8545')
const lumerinContracts = new LumerinContracts(web3, 'mainnet')
lumerinContracts.Lumerin.methods.balanceOf(address).call().then(console.log)
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: 'ropsten'
.
Numeric chain IDs can also be used.
The instance of the Lumerin contracts will have a property for each contract: CloneFactory
, Implementation
and Lumerin
.
Each contract is an instance of web3.eth.Contract
.
This is a convenience object containing the abi
, address
and the birthblock
(The block that the contract was deployed in) of the contract on the specified chain.
MIT