EncodedCallResult

Documentation for eth_defi.event_reader.multicall_batcher.EncodedCallResult Python class.

class EncodedCallResult

Bases: object

Result of an one multicall.

Example:

# File 21 of 47 : PlasmaVaultStorageLib.sol
#     /// @custom:storage-location erc7201:io.ipor.PlasmaVaultPerformanceFeeData
#     struct PerformanceFeeData {
#         address feeManager;
#         uint16 feeInPercentage;
#     }
data = call_by_name["getPerformanceFeeData"].result
performance_fee = int.from_bytes(data[32:64], byteorder="big") / 10_000

Attributes summary

call

success

result

block_identifier

Block number

timestamp

Timestamp of the block (if available)

revert_exception

Not available in multicalls, only through EncodedCall.call_as_result()

state

Copy the state reference in stateful reading

Methods summary

__init__(call, success, result, block_identifier)

block_identifier: Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]

Block number

timestamp: datetime.datetime | None

Timestamp of the block (if available)

revert_exception: Exception | None

Not available in multicalls, only through EncodedCall.call_as_result()

state: eth_defi.event_reader.multicall_batcher.BatchCallState | None

Copy the state reference in stateful reading

__init__(call, success, result, block_identifier, timestamp=None, revert_exception=None, state=None)
Parameters
Return type

None