0.0.1-alpha.0 • Published 2 years ago
uxd-evm-client v0.0.1-alpha.0
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
0.0.1-beta.6
2 years ago
0.0.1-beta.5
2 years ago
0.0.1-beta.4
2 years ago
0.0.1-beta.3
3 years ago
0.0.1-beta.2
3 years ago
0.0.1-beta.1
3 years ago
0.0.1-alpha.0
3 years ago
1.0.0
3 years ago