0.1.22 • Published 2 years ago

@xtoken/abis v0.1.22

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

xToken ABIs

Package containing all the xToken contract ABIs and addresses.

Install

yarn add @xtoken/abis

Build

yarn build

Link

Link @xtoken/abis package via yarn for local development and testing the integration on the UI

$ cd abis
$ yarn link # @xtoken/abis package will be linked to the local copy

$ cd cafe
$ yarn link @xtoken/abis # This will create a symlink named cafe/node_modules/@xtoken/abis that links to the local copy of the xToken abis project

$ yarn unlink # To unlink the installed package

Linting

To automatically fix eslint and prettier formatting issues, run:

yarn fix

Examples

import { ethers } from 'ethers'
import { Abis, ADDRESSES, X_AAVE_A } from '@xtoken/abis'

// Setup provider
const provider = new ethers.providers.InfuraProvider('homestead', '<API KEY>')
const network = await provider.getNetwork()
const { chainId } = network

// Initialise xAAVEa contract
const xaaveContract = new ethers.Contract(ADDRESSES[X_AAVE_A][chainId], Abis.xAAVE, provider)

Adding new contracts

1. Add Contract constants in constants.ts
2. Add mainnet addresses based on the constants in addresses.ts
3. Add the contract abis in abis/
4. Export the ABIs in abis/index.ts
0.1.21

2 years ago

0.1.22

2 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago