EnzymeVaultTransaction
Documentation for eth_defi.enzyme.vault_controlled_wallet.EnzymeVaultTransaction Python class.
- class EnzymeVaultTransaction
Bases:
objectDescribing a transaction Enzyme vault performs.
This structure contains inputs needed to perform a vault transaction
Unlike regular transcation, Enzyme vault transactions need information about expected inbound and outbound assets in the transaction
Multiple vault contract calls could be packed into a single transaction, but we do not support it ATM
Note
TODO: kwargs support missing
Attributes summary
The contract this transaction si for
Which smart contract we are calling
How much gas the hot wallet can spend on this tx
If this transaction results to changes in the vault balance it must be listed here.
Unnamed arguments for this Solidity function.
incoming_assetsmin_incoming_assets_amountsspend_asset_amountsspend_assetsMethods summary
__init__(contract, function, gas_limit[, ...])Return human-readable, JSON'able, output for this transaction.
Get the data payload in Solidity's ABI encodePacked format
- contract: web3.contract.contract.Contract
The contract this transaction si for
- function: web3.contract.contract.ContractFunction
Which smart contract we are calling
ContractFunction must be bound to its args, have function.args and/or function.kwargs set.
- gas_limit: int
How much gas the hot wallet can spend on this tx
- asset_deltas: List[eth_defi.tx.AssetDelta]
If this transaction results to changes in the vault balance it must be listed here.
This will check that any trade will
Give you the expected assets
Give you the expected slippage tolerance
Tells the vault what is the amount of the payment we make for a trade
- property args: List[Any]
Unnamed arguments for this Solidity function.
- encode_payload()
Get the data payload in Solidity’s ABI encodePacked format
- Return type
hexbytes.main.HexBytes
- as_json_friendly_dict()
Return human-readable, JSON’able, output for this transaction.
- Return type
- __init__(contract, function, gas_limit, asset_deltas=<factory>)
- Parameters
contract (web3.contract.contract.Contract) –
function (web3.contract.contract.ContractFunction) –
gas_limit (int) –
asset_deltas (List[eth_defi.tx.AssetDelta]) –
- Return type
None