class GetLogRequest(Serializable): FIELDS = [ ("branch", Branch), ("addresses", PrependedSizeListSerializer(4, Address)), ( "topics", PrependedSizeListSerializer( 4, PrependedSizeListSerializer(4, FixedSizeBytesSerializer(32))), ), ("start_block", uint64), ("end_block", uint64), ] def __init__( self, branch: Branch, addresses: List[Address], topics: List[List[bytes]], start_block: int, end_block: int, ): self.branch = branch self.addresses = addresses self.topics = topics self.start_block = start_block self.end_block = end_block
class GetRootChainStakesResponse(Serializable): FIELDS = [ ("error_code", uint32), ("stakes", biguint), ("signer", FixedSizeBytesSerializer(20)), ] def __init__(self, error_code: int, stakes: int = 0, signer: bytes = bytes(20)): self.error_code = error_code self.stakes = stakes self.signer = signer
class GetStorageResponse(Serializable): FIELDS = [("error_code", uint32), ("result", FixedSizeBytesSerializer(32))] def __init__(self, error_code: int, result: bytes): self.error_code = error_code self.result = result