neko-js-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.1.9 • Public • Published
// 1. create contract
const { FARM_ABI, farmContract } = require('@tdos/mazejs/dist')
const { Contract } = require('ethers') // import ethers version >= 5

// 2. create contract 
const u = `http://${process.env.HOST}:${process.env.PORT}` // jsonrpc provider
const provider = new providers.JsonRpcProvider(u)

const wallet = new Wallet(process.env.PRIVATE_KEY, provider) // wallet
const c = farmContract(new Contract('0x', FARM_ABI, wallet)) 

// 3. query

c.getMineParams().then(console.log)

Readme

Keywords

none

Package Sidebar

Install

npm i neko-js-sdk

Weekly Downloads

30

Version

1.1.9

License

ISC

Unpacked Size

678 kB

Total Files

49

Last publish

Collaborators

  • zqdhr