uxd-evm-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.0 • Public • Published

UXD EVM client (v1)

Typescript library for interacting with the UXD contracts on EVM.

To use

Install the library

npm i "UXDProtocol/uxd-evm-client" 

Import library code

You need to import the UXDController from the library as well as the ethers library

import { ethers } from 'ethers';
import { UXDController }from 'uxd-evm-client';

Initialize the controller

The controller must be ininitialized with following parameters:

  1. JSON RPC provider pointing to the kovan optimism RPC endpoint.
  2. UXD Controller contract address on kovan optimism.
  3. UXD token on kovan optimism.

The provider can be injected when using Metamask or other browser wallet

const provider = new ethers.providers.JsonRpcProvider("https://kovan.optimism.io")
const controller = new UXDController(
        provider,
        "0x73864663E5E8B3974D896AcE3Ce125e33d5d7c51",
        "0x02Bbb29C5ECAd50219215a400B10a161b77bc2DA");

You can then start calling functions on the controller

const totalSupply = await controller.uxdTotalSupply()
    console.log('totalsupply = ', totalSupply);

Check this here to see the list of public functions availale on the controller.

Version

Version 1.0.0 has been unpublished. Current version are tagged as alph 0.0.1-alpha.X

Readme

Keywords

none

Package Sidebar

Install

npm i uxd-evm-client

Weekly Downloads

2

Version

0.0.1-alpha.0

License

MIT

Unpacked Size

206 kB

Total Files

28

Last publish

Collaborators

  • inn0vative1