🏺 Tribute-Utils
A utility to interact with the rDAI contracts.
Usage
tribute.getInfo()
allocations: array balance: number unallocated_balance: number unclaimed_balance: number
...
Example
;;;;;; { const state setState = ; // 1. enable metamask if windowethereum let address = await windowethereum; try if typeof windowethereum !== 'undefined' || typeof windowweb3 !== 'undefined' let walletProvider = windowweb3currentProvider ; // connect to contracts on the network const rDAIContract = CONTRACTSrtokenkovan rDAIabi walletProvider ; const DAIContract = CONTRACTSdaikovan DAIabi walletProvider ; // create the Tribute object const tribute = DAIContract rDAIContract walletProvider address ; const userDetails = await tribute; console; ; catch error console; } return <div> JSON </div> ;}