swivel.abstracts.swivel
Last updated
Last updated
Swivel
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 cancel
Allows the cancellation of an order, preventing it from being filled further
order (dict) An offline swivel order
s (string) Valid ECDSA signature for the order
opts (dict) Optional tx opts
web3 transactable, opts
Method combine_tokens
Allows users to deposit/burn 1:1 amounts of both zcTokens and vault notional, in the process 'combining' the two and redeeming underlying
u (string) Address of the underlying token
m (int) Maturity timestamp of the market
a (int) Amount of zctokens being redeemed
opts (dict) Optional tx opts
web3 transactable, opts
Method domain
The stored EIP712 domain hash for this contract
web3 callable, opts
Method exit
Allows a user to exit (sell) a currently held position to the marketplace
orders (tuple) Offline swivel orders
a (list) Order volume (principal) amounts relative to orders list
s (tuple) Valid ECDSA signatures for each order
opts (dict) Optional tx opts
web3 transactable, opts
Method feenominators
The stored fee constants for this contract
i (int) Index of the fenominator array to return
web3 callable, opts
Method hold
The stored hold constant for this contract
TODO
web3 callable, opts
Method initiate
Allows a user to initiate a position
orders (tuple) Offline swivel orders
a (list) Order volume (principal) amounts relative to orders list
s (tuple) Valid ECDSA signatures for each order
opts (dict) Optional tx opts
web3 transactable, opts
Method market_place
The stored address of a market place contract associated with this contract
web3 callable, opts
Method min_feenominator
The stored constant representing the minimum value for any fee denominator
web3 callable, opts
Method name
The stored name constant for this contract
web3 callable, opts
Method redeem_vault_interest
Allows vault owners to redeem any currently accrued interest
u (string) Address of the underlying token
m (int) Maturity timestamp of the market
opts (dict) Optional tx opts
web3 transactable, opts
Method redeem_zc_token
Allows zctoken holders to redeem their tokens for underlying tokens after maturity has been reached
u (string) Address of the underlying token
m (int) Maturity timestamp of the market
a (int) Amount of zctokens being redeemed
opts (dict) Optional tx opts
web3 transactable, opts
Method split_underlying
Allows users to deposit underlying and in the process split it into/mint zcTokens and vault notional
u (string) Address of the underlying token
m (int) Maturity timestamp of the market
a (int) Amount of underlying being deposited
opts (dict) Optional tx opts
web3 transactable, 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 version
The stored version constant for this contract
web3 callable, opts