Sign In

uxd-evm-client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uxd-evm-client

UXD EVM client

latest
Source
npmnpm
Version
0.0.1-alpha.0
Version published
Maintainers
1
Created
Source

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:

  • JSON RPC provider pointing to the kovan optimism RPC endpoint.
  • UXD Controller contract address on kovan optimism.
  • 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

FAQs

Package last updated on 11 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts