Deposit
Documentation for eth_defi.enzyme.events.Deposit Python class.
- class Deposit
Bases:
eth_defi.enzyme.events.EnzymeBalanceEventEnzyme deposit event wrapper.
Wraps SharesBought event
See ComptrollerLib.sol
The solidity event:
event SharesBought( address indexed buyer, uint256 investmentAmount, uint256 sharesIssued, uint256 sharesReceived );Attributes summary
Access the non-indexed Solidity event arguments.
Get the denominator token for withdrawal/deposit.
Amount of deposit/withdrawal in the denominator token.
Address of the user who received the bought shares.
Amount of deposit/withdrawal in the denominator token.
Get the shares token for withdrawal/deposit.
Return the block mined at timestamp.
Our web3 connection.
Methods summary
- property investment_amount: decimal.Decimal
Amount of deposit/withdrawal in the denominator token.
- property shares_issued: decimal.Decimal
Amount of deposit/withdrawal in the denominator token.
- property receiver: eth_typing.evm.HexAddress
Address of the user who received the bought shares.
- __init__(vault, event_data)
- Parameters
vault (eth_defi.enzyme.vault.Vault) –
event_data (dict) –
- Return type
None
- property arguments: List[bytes]
Access the non-indexed Solidity event arguments.
- 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
- property shares_token: eth_defi.token.TokenDetails
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.
- property timestamp: datetime.datetime
Return the block mined at timestamp.
- property web3: web3.main.Web3
Our web3 connection.
- static wrap(vault, event_data)
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