Documentation for eth_defi.tx.AssetDelta Python class.
- class AssetDelta
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.
eth_defi.enzyme.vault_transaction_builderfor more information.
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
Negative for tokens that are going to be used for purchases in this tx, positive for incoming.
Much include any slippage tolerance for trades.
Get the asset delta representation as JSON’nable dict.
We need to convert large Python ints to strings.