AssetDelta
Documentation for eth_defi.tx.AssetDelta Python class.
- class AssetDelta[source]
Spend/incoming asset information.
Some transaction builders, like Enzyme vaults, need to have the incoming/outgoing asset information associated with the transaction. This is because internally Enzyme needs to move assets to the adapter contract from the vault contract to perform the transaction.
We use this data structure to describe what assets the transaction touches.
See
eth_defi.enzyme.vault_transaction_builder
for more information.Attributes summary
The ERC-20 token for this delta.
Changed amount.
Methods summary
__init__
(asset, raw_amount)Get the asset delta representation as JSON'nable dict.
This delta describes incoming assets.
This delta describes assets that we spend in the transaction.
- raw_amount: int
Changed amount.
Negative for tokens that are going to be used for purchases in this tx, positive for incoming.
Much include any slippage tolerance for trades.