MarketPlace
A TypeScript wrapper for the MarketPlace smart contract.
Overview
Market
interface Market {
cTokenAddr: string;
zcTokenAddr: string;
vaultAddr: string;
maturityRate: string;
}Creating a MarketPlace instance
import { EthersVendor, MarketPlace } from '@swivel-finance/swivel-js';
import { ethers } from 'ethers';
// you need the address of the deployed MarketPlace contract
const marketPlaceAddress = '0x998689650D4d55822b4bDd4B7DB5F596bf6b3570';
// create an ethers provider and signer,...
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
// ...create a Vendor for the MarketPlace contract,
const vendor = new EthersVendor(provider, signer);
// ...and use the vendor to instantiate the MarketPlace contract
const marketPlace = new MarketPlace(vendor).at(marketPlaceAddress);Properties
address
Signature
Getters
admin
Signature
Returns
swivel
Signature
Returns
paused
Signature
Returns
Methods
constructor
Signature
Parameters
Paramater
Type
Description
at
Signature
Parameters
Paramater
Type
Description
Returns
markets
Signature
Parameters
Paramater
Type
Description
Returns
Example
matureMarket
Signature
Parameters
Paramater
Type
Description
Returns
transferVaultNotional
Signature
Parameters
Paramater
Type
Description
Returns
Last updated

