UNPKG

olympus-protocol-connector

Version:

Module made by Olympus Labs for easier access to the Olympus protocol through Javascript/Typescript

29 lines (25 loc) 974 B
import { ERCServices, DerivativeServices } from './../lib/index'; /** discovery all ERC services */ const { erc20Service, erc721Service } = ERCServices; erc20Service.create('contract address'); erc721Service.create('contract address'); /** discovery all Derivative services */ const { erc20, managed, motTaxable, fundTrade, futureMVPService, futureManagement } = DerivativeServices; erc20.create('contract address'); managed.create('contract address'); motTaxable.create('contract address'); fundTrade.create('contract address'); futureMVPService.create('contract address'); futureManagement.create('contract address'); /** example for service load special version abi */ async function exampleForLoadSpecialAbiVersion(address: string) { const derivative = await fundTrade.create(address); /** reload will reset contract with special version of abi */ await derivative.reload('derivative abi name', 'special version number string'); }