xycontract
v1.0.2
Published
A simple Contract Constructor
Downloads
206
Readme
Install
npm install xycontract --save
yarn add xycontract
Synopsis
import { createContract } from 'xycontract'
const contractConfig = createContract({
providerUrl: 'https://bsc-dataseed1.ninicoin.io',
})
const ContractInstance = contractConfig(BeiConstAbi, config.bei)
// 读方法
// read(name, bigNumber, ...params)
ContractInstance.read('credits', false, id)
// 写方法
// read(name, ...params)
ContractInstance.write('withdrawReward', toWei(5), false)