EnzymeBalanceEvent
Documentation for eth_defi.enzyme.events.EnzymeBalanceEvent Python class.
- class EnzymeBalanceEvent[source]
Enzyme deposit/redeem event wrapper.
Wrap the underlying raw JSON-RPC eth_getLogs data to something more manageable.
Attributes summary
Access the non-indexed Solidity event arguments.
Get the denominator token for withdrawal/deposit.
Get the shares token for withdrawal/deposit.
Return the block mined at timestamp.
Our web3 connection.
Enzyme vault instance
Underlying EVM JSON-RPC log data
Methods summary
- vault: eth_defi.enzyme.vault.Vault
Enzyme vault instance
- static wrap(vault, event_data)[source]
Parse Solidity events to the wrapped format.
- Parameters
event_data (dict) –
Raw JSON-RPC event data.
Example:
{'address': '0xbeaafda2e17fc95e69dc06878039d274e0d2b21a', 'blockHash': '0x5eee3d7d2f32034955f2db9c2e84c8dfabb89a4001d32d4e01bdae540f5a0c06', 'blockNumber': 65, 'chunk_id': 62, 'context': None, 'data': '0x000000000000000000000000000000000000000000000000000000001dcd6500000000000000000000000000000000000000000000000000000000001dcd6500000000000000000000000000000000000000000000000000000000001dcd6500', 'event': <class 'web3._utils.datatypes.SharesBought'>, 'logIndex': '0x4', 'removed': False, 'timestamp': 1679394381, 'topics': ['0x849165c18b9d0fb161bcb145e4ab523d350e5c98f1dbbb1960331e7ee3ca6767', '0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8'], 'transactionHash': '0xb430a5546dd43042e3d36526fbd71ebc38c8598f6ee354f17839d3cdddf74530', 'transactionIndex': '0x0', 'transactionLogIndex': '0x4'}
vault (eth_defi.enzyme.vault.Vault) –
- Return type
- property timestamp: datetime.datetime
Return the block mined at timestamp.
- property web3: web3.main.Web3
Our web3 connection.
- property denomination_token: eth_defi.token.TokenDetails
Get the denominator token for withdrawal/deposit.
Read the token on-chain details.
- Returns
Usually ERC-20 details for USDC
Get the shares token for withdrawal/deposit.
Read the token on-chain details.
- Returns
ERC-20 details for a token with the fund name/symbol and 18 decimals.
- __init__(vault, event_data)
- Parameters
vault (eth_defi.enzyme.vault.Vault) –
event_data (dict) –
- Return type
None