Smart contract interaction

Requirements

  • web3.js
  • BN.js
  • DAI, USDC or USDT stablecoins
  • (if you're using a smart contract to interact with ours) whitelisting for your smart contract as we currently have a block in place - please contact us at discord in this case

Conventions

When handling numeric values
All numeric values inputted into the smart contracts must be expressed in BigNumber format without decimals. Check with each token contract or the below table for how many decimals you have to shift.
When processing a transaction involving multiple stablecoins
Some contracts expect to receive/return an array of stablecoin amounts. In such cases, the order of the stablecoins within the array is as follows:
Index in Array
Stablecoin
Decimals
0
DAI
18
1
USDC
6
2
USDT
6
Copy link