swivel.abstracts.market_place
Last updated
Last updated
MarketPlace
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
Descendants
Methods
Method admin
The stored admin address for this contract
web3 callable, opts
Method c_token_address
Gets the compound token address associated with a given market
u (string) Underlying token address
m (int) Maturity epoch
opts (dict) optional call opts
web3 callable, opts
Method create_market
Creates a new market
New instances of both ZcToken and VaultTracker are deployed, their addresses then being associated with the newly created market.
Note that this method is only callable by the admin
m (int) Epoch in seconds, the maturity of the market
c (string) Address of the Compound token associated with the market
n (string) Name for the new ZcToken s (string) Name for the new ZcToken
opts (dict) Optional transaction options
web3 transactable, opts
Method markets
Gets the market associated with the given underlying and maturity arguments
The returned Market object is { cTokenAddr, ZcTokenAddr, vaultAddr }
u (string) Underlying token address
m (int) Muturity epoch opts (dict) optional call opts
web3 callable, opts
Method mature_market
Called after maturity, allowing all of the zcTokens to earn floating interest on Compound until funds are released
u (string) Underlying token address
m (int) Maturity epoch opts (dict) optional call opts
web3 transactable, opts
Method pause
Allows the admin to pause / unpause market transactions
b Boolean which acts as a toggle. True to pause, False to unpause
web3 transactable, opts
Method paused
A boolean which indicates a pause in all markets if truthy
web3 callable, opts
Method set_swivel_address
Sets the address of the Swivel smart contract this market place is associated with
Note that this method is only callable by the admin once
a (address) The address of a deployed Swivel smart contract
opts (dict) Optional transaction options
web3 transactable, opts
Method swivel
The address of the associated Swivel contract deployment
web3 callable, opts
Method transfer_admin
Allows the current admin to transfer the title to another party
Note that this method is only callable by the admin
a (address) Address of the new admin
web3 transactable, opts
Method transfer_vault_notional
Transfer vault notional from sender to a given address
u (string) Underlying token address
m (int) Muturity epoch
t (string) Address of the amount owner
a (int) Amount to transfer
opts (dict) Optional transaction opts
web3 transactable, opts