@rsksmart/rns-auction-registrar

1.0.2 • Public • Published

rns-auction-registrar

RNS initial auction registrar.

Actual registrar in https://github.com/rnsdomains/rns-rskregistrar

Install

npm i @rsksmart/rns-auction-registrar

JS

const Web3 = require('web3');
const TokenRegistrarData = require('@rsksmart/rns-auction-registrar/TokenRegistrarData.json');
const web3 = new Web3('https://public-node.rsk.co')
const TokenRegistrar = new web3.eth.Contract(TokenRegistrarData.abi, TokenRegistrarData.address.rskMainnet);

Types

There are TypeScript typing definitions of the contracts published together with the original contracts. Supported contract's libraries are:

  • web3 version 1.* - web3-v1-contracts
  • web3 version 2.* - web3-v2-contracts
  • truffle - truffle-contracts
  • ethers - ethers-contracts

You can use them as follow:

import Web3 from 'web3'
import TokenRegistrar from '@rsksmart/rns-auction-registrar/types/web3-v1-contracts/TokenRegistrarData.d.ts'
import TokenRegistrarData from '@rsksmart/rns-auction-registrar/TokenRegistrarData.json'

const web3 = new Web3('https://public-node.rsk.co')
const registrar = new web3.eth.Contract(TokenRegistrarData.abi, TokenRegistrarData.address.rskMainnet) as TokenRegistrar

Replace web3-v1-contracts with the proper library version.


Dependencies (3)

Dev Dependencies (6)

Package Sidebar

Install

npm i @rsksmart/rns-auction-registrar

Weekly Downloads

47

Version

1.0.2

License

ISC

Unpacked Size

170 kB

Total Files

14

Last publish

Collaborators

  • icalisalvo-iovlabs
  • ilanolkies
  • jessgusclark