swivel.abstracts.swivel

Classes

Class Swivel

class Swivel

Helper class that provides a standard way to create an ABC using inheritance.

Ancestors

Descendants

Methods

Method admin

def admin(
    self,
    opts=None
)

The stored admin address for this contract

Returns

web3 callable, opts

Method cancel

Allows the cancellation of an order, preventing it from being filled further

Parameters

order (dict) An offline swivel order

s (string) Valid ECDSA signature for the order

opts (dict) Optional tx opts

Returns

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

Parameters

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

Returns

web3 transactable, opts

Method domain

The stored EIP712 domain hash for this contract

Returns

web3 callable, opts

Method exit

Allows a user to exit (sell) a currently held position to the marketplace

Parameters

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

Returns

web3 transactable, opts

Method feenominators

The stored fee constants for this contract

Parameters

i (int) Index of the fenominator array to return

Returns

web3 callable, opts

Method hold

The stored hold constant for this contract

Description

TODO

Returns

web3 callable, opts

Method initiate

Allows a user to initiate a position

Parameters

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

Returns

web3 transactable, opts

Method market_place

The stored address of a market place contract associated with this contract

Returns

web3 callable, opts

Method min_feenominator

The stored constant representing the minimum value for any fee denominator

Returns

web3 callable, opts

Method name

The stored name constant for this contract

Returns

web3 callable, opts

Method redeem_vault_interest

Allows vault owners to redeem any currently accrued interest

Parameters

u (string) Address of the underlying token

m (int) Maturity timestamp of the market

opts (dict) Optional tx opts

Returns

web3 transactable, opts

Method redeem_zc_token

Allows zctoken holders to redeem their tokens for underlying tokens after maturity has been reached

Parameters

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

Returns

web3 transactable, opts

Method split_underlying

Allows users to deposit underlying and in the process split it into/mint zcTokens and vault notional

Parameters

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

Returns

web3 transactable, opts

Method transfer_admin

Allows the current admin to transfer the title to another party

Description

Note that this method is only callable by the admin

Parameters

a (address) Address of the new admin

Returns

web3 transactable, opts

Method version

The stored version constant for this contract

Returns

web3 callable, opts

Last updated