diff --git a/pkg/chains/evm/evm.pb.go b/pkg/chains/evm/evm.pb.go index feabac9992..7e049f80a0 100644 --- a/pkg/chains/evm/evm.pb.go +++ b/pkg/chains/evm/evm.pb.go @@ -811,6 +811,83 @@ func (x *Header) GetParentHash() []byte { return nil } +// represents LogPoller's latest/finalized/safe blocks view +type LPBlock struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + LatestBlockNumber int64 `protobuf:"varint,2,opt,name=latest_block_number,json=latestBlockNumber,proto3" json:"latest_block_number,omitempty"` + BlockTimestamp uint64 `protobuf:"varint,3,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // unix timestamp + FinalizedBlockNumber int64 `protobuf:"varint,4,opt,name=finalized_block_number,json=finalizedBlockNumber,proto3" json:"finalized_block_number,omitempty"` + SafeBlockNumber int64 `protobuf:"varint,5,opt,name=safe_block_number,json=safeBlockNumber,proto3" json:"safe_block_number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LPBlock) Reset() { + *x = LPBlock{} + mi := &file_evm_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LPBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LPBlock) ProtoMessage() {} + +func (x *LPBlock) ProtoReflect() protoreflect.Message { + mi := &file_evm_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LPBlock.ProtoReflect.Descriptor instead. +func (*LPBlock) Descriptor() ([]byte, []int) { + return file_evm_proto_rawDescGZIP(), []int{8} +} + +func (x *LPBlock) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *LPBlock) GetLatestBlockNumber() int64 { + if x != nil { + return x.LatestBlockNumber + } + return 0 +} + +func (x *LPBlock) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *LPBlock) GetFinalizedBlockNumber() int64 { + if x != nil { + return x.FinalizedBlockNumber + } + return 0 +} + +func (x *LPBlock) GetSafeBlockNumber() int64 { + if x != nil { + return x.SafeBlockNumber + } + return 0 +} + type Expression struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Evaluator: @@ -824,7 +901,7 @@ type Expression struct { func (x *Expression) Reset() { *x = Expression{} - mi := &file_evm_proto_msgTypes[8] + mi := &file_evm_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -836,7 +913,7 @@ func (x *Expression) String() string { func (*Expression) ProtoMessage() {} func (x *Expression) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[8] + mi := &file_evm_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -849,7 +926,7 @@ func (x *Expression) ProtoReflect() protoreflect.Message { // Deprecated: Use Expression.ProtoReflect.Descriptor instead. func (*Expression) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{8} + return file_evm_proto_rawDescGZIP(), []int{9} } func (x *Expression) GetEvaluator() isExpression_Evaluator { @@ -903,7 +980,7 @@ type BooleanExpression struct { func (x *BooleanExpression) Reset() { *x = BooleanExpression{} - mi := &file_evm_proto_msgTypes[9] + mi := &file_evm_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -915,7 +992,7 @@ func (x *BooleanExpression) String() string { func (*BooleanExpression) ProtoMessage() {} func (x *BooleanExpression) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[9] + mi := &file_evm_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -928,7 +1005,7 @@ func (x *BooleanExpression) ProtoReflect() protoreflect.Message { // Deprecated: Use BooleanExpression.ProtoReflect.Descriptor instead. func (*BooleanExpression) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{9} + return file_evm_proto_rawDescGZIP(), []int{10} } func (x *BooleanExpression) GetBooleanOperator() chain_common.BooleanOperator { @@ -954,7 +1031,7 @@ type And struct { func (x *And) Reset() { *x = And{} - mi := &file_evm_proto_msgTypes[10] + mi := &file_evm_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -966,7 +1043,7 @@ func (x *And) String() string { func (*And) ProtoMessage() {} func (x *And) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[10] + mi := &file_evm_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -979,7 +1056,7 @@ func (x *And) ProtoReflect() protoreflect.Message { // Deprecated: Use And.ProtoReflect.Descriptor instead. func (*And) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{10} + return file_evm_proto_rawDescGZIP(), []int{11} } func (x *And) GetExpr() []*Expression { @@ -998,7 +1075,7 @@ type Or struct { func (x *Or) Reset() { *x = Or{} - mi := &file_evm_proto_msgTypes[11] + mi := &file_evm_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1010,7 +1087,7 @@ func (x *Or) String() string { func (*Or) ProtoMessage() {} func (x *Or) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[11] + mi := &file_evm_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1023,7 +1100,7 @@ func (x *Or) ProtoReflect() protoreflect.Message { // Deprecated: Use Or.ProtoReflect.Descriptor instead. func (*Or) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{11} + return file_evm_proto_rawDescGZIP(), []int{12} } func (x *Or) GetExpr() []*Expression { @@ -1043,7 +1120,7 @@ type HashValueComparator struct { func (x *HashValueComparator) Reset() { *x = HashValueComparator{} - mi := &file_evm_proto_msgTypes[12] + mi := &file_evm_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1055,7 +1132,7 @@ func (x *HashValueComparator) String() string { func (*HashValueComparator) ProtoMessage() {} func (x *HashValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[12] + mi := &file_evm_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1068,7 +1145,7 @@ func (x *HashValueComparator) ProtoReflect() protoreflect.Message { // Deprecated: Use HashValueComparator.ProtoReflect.Descriptor instead. func (*HashValueComparator) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{12} + return file_evm_proto_rawDescGZIP(), []int{13} } func (x *HashValueComparator) GetValues() [][]byte { @@ -1095,7 +1172,7 @@ type EventByWord struct { func (x *EventByWord) Reset() { *x = EventByWord{} - mi := &file_evm_proto_msgTypes[13] + mi := &file_evm_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1107,7 +1184,7 @@ func (x *EventByWord) String() string { func (*EventByWord) ProtoMessage() {} func (x *EventByWord) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[13] + mi := &file_evm_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1120,7 +1197,7 @@ func (x *EventByWord) ProtoReflect() protoreflect.Message { // Deprecated: Use EventByWord.ProtoReflect.Descriptor instead. func (*EventByWord) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{13} + return file_evm_proto_rawDescGZIP(), []int{14} } func (x *EventByWord) GetWordIndex() uint32 { @@ -1147,7 +1224,7 @@ type EventByTopic struct { func (x *EventByTopic) Reset() { *x = EventByTopic{} - mi := &file_evm_proto_msgTypes[14] + mi := &file_evm_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1159,7 +1236,7 @@ func (x *EventByTopic) String() string { func (*EventByTopic) ProtoMessage() {} func (x *EventByTopic) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[14] + mi := &file_evm_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1172,7 +1249,7 @@ func (x *EventByTopic) ProtoReflect() protoreflect.Message { // Deprecated: Use EventByTopic.ProtoReflect.Descriptor instead. func (*EventByTopic) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{14} + return file_evm_proto_rawDescGZIP(), []int{15} } func (x *EventByTopic) GetTopic() uint64 { @@ -1207,7 +1284,7 @@ type Primitive struct { func (x *Primitive) Reset() { *x = Primitive{} - mi := &file_evm_proto_msgTypes[15] + mi := &file_evm_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1219,7 +1296,7 @@ func (x *Primitive) String() string { func (*Primitive) ProtoMessage() {} func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[15] + mi := &file_evm_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1232,7 +1309,7 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { // Deprecated: Use Primitive.ProtoReflect.Descriptor instead. func (*Primitive) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{15} + return file_evm_proto_rawDescGZIP(), []int{16} } func (x *Primitive) GetPrimitive() isPrimitive_Primitive { @@ -1342,7 +1419,7 @@ type HeaderByNumberRequest struct { func (x *HeaderByNumberRequest) Reset() { *x = HeaderByNumberRequest{} - mi := &file_evm_proto_msgTypes[16] + mi := &file_evm_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1354,7 +1431,7 @@ func (x *HeaderByNumberRequest) String() string { func (*HeaderByNumberRequest) ProtoMessage() {} func (x *HeaderByNumberRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[16] + mi := &file_evm_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1367,7 +1444,7 @@ func (x *HeaderByNumberRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderByNumberRequest.ProtoReflect.Descriptor instead. func (*HeaderByNumberRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{16} + return file_evm_proto_rawDescGZIP(), []int{17} } func (x *HeaderByNumberRequest) GetBlockNumber() *pb.BigInt { @@ -1393,7 +1470,7 @@ type HeaderByNumberReply struct { func (x *HeaderByNumberReply) Reset() { *x = HeaderByNumberReply{} - mi := &file_evm_proto_msgTypes[17] + mi := &file_evm_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1405,7 +1482,7 @@ func (x *HeaderByNumberReply) String() string { func (*HeaderByNumberReply) ProtoMessage() {} func (x *HeaderByNumberReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[17] + mi := &file_evm_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1418,7 +1495,7 @@ func (x *HeaderByNumberReply) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderByNumberReply.ProtoReflect.Descriptor instead. func (*HeaderByNumberReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{17} + return file_evm_proto_rawDescGZIP(), []int{18} } func (x *HeaderByNumberReply) GetHeader() *Header { @@ -1451,7 +1528,7 @@ type CallContractRequest struct { func (x *CallContractRequest) Reset() { *x = CallContractRequest{} - mi := &file_evm_proto_msgTypes[18] + mi := &file_evm_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1463,7 +1540,7 @@ func (x *CallContractRequest) String() string { func (*CallContractRequest) ProtoMessage() {} func (x *CallContractRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[18] + mi := &file_evm_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1476,7 +1553,7 @@ func (x *CallContractRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CallContractRequest.ProtoReflect.Descriptor instead. func (*CallContractRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{18} + return file_evm_proto_rawDescGZIP(), []int{19} } func (x *CallContractRequest) GetCall() *CallMsg { @@ -1516,7 +1593,7 @@ type CallContractReply struct { func (x *CallContractReply) Reset() { *x = CallContractReply{} - mi := &file_evm_proto_msgTypes[19] + mi := &file_evm_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1528,7 +1605,7 @@ func (x *CallContractReply) String() string { func (*CallContractReply) ProtoMessage() {} func (x *CallContractReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[19] + mi := &file_evm_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1541,7 +1618,7 @@ func (x *CallContractReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CallContractReply.ProtoReflect.Descriptor instead. func (*CallContractReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{19} + return file_evm_proto_rawDescGZIP(), []int{20} } func (x *CallContractReply) GetData() []byte { @@ -1561,7 +1638,7 @@ type GetTransactionFeeRequest struct { func (x *GetTransactionFeeRequest) Reset() { *x = GetTransactionFeeRequest{} - mi := &file_evm_proto_msgTypes[20] + mi := &file_evm_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1573,7 +1650,7 @@ func (x *GetTransactionFeeRequest) String() string { func (*GetTransactionFeeRequest) ProtoMessage() {} func (x *GetTransactionFeeRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[20] + mi := &file_evm_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1586,7 +1663,7 @@ func (x *GetTransactionFeeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionFeeRequest.ProtoReflect.Descriptor instead. func (*GetTransactionFeeRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{20} + return file_evm_proto_rawDescGZIP(), []int{21} } func (x *GetTransactionFeeRequest) GetTransactionId() string { @@ -1606,7 +1683,7 @@ type GetTransactionFeeReply struct { func (x *GetTransactionFeeReply) Reset() { *x = GetTransactionFeeReply{} - mi := &file_evm_proto_msgTypes[21] + mi := &file_evm_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1618,7 +1695,7 @@ func (x *GetTransactionFeeReply) String() string { func (*GetTransactionFeeReply) ProtoMessage() {} func (x *GetTransactionFeeReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[21] + mi := &file_evm_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1631,7 +1708,7 @@ func (x *GetTransactionFeeReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionFeeReply.ProtoReflect.Descriptor instead. func (*GetTransactionFeeReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{21} + return file_evm_proto_rawDescGZIP(), []int{22} } func (x *GetTransactionFeeReply) GetTransactionFee() *pb.BigInt { @@ -1656,7 +1733,7 @@ type FilterLogsRequest struct { func (x *FilterLogsRequest) Reset() { *x = FilterLogsRequest{} - mi := &file_evm_proto_msgTypes[22] + mi := &file_evm_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1668,7 +1745,7 @@ func (x *FilterLogsRequest) String() string { func (*FilterLogsRequest) ProtoMessage() {} func (x *FilterLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[22] + mi := &file_evm_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1681,7 +1758,7 @@ func (x *FilterLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterLogsRequest.ProtoReflect.Descriptor instead. func (*FilterLogsRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{22} + return file_evm_proto_rawDescGZIP(), []int{23} } func (x *FilterLogsRequest) GetFilterQuery() *FilterQuery { @@ -1714,7 +1791,7 @@ type FilterLogsReply struct { func (x *FilterLogsReply) Reset() { *x = FilterLogsReply{} - mi := &file_evm_proto_msgTypes[23] + mi := &file_evm_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1726,7 +1803,7 @@ func (x *FilterLogsReply) String() string { func (*FilterLogsReply) ProtoMessage() {} func (x *FilterLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[23] + mi := &file_evm_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1739,7 +1816,7 @@ func (x *FilterLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterLogsReply.ProtoReflect.Descriptor instead. func (*FilterLogsReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{23} + return file_evm_proto_rawDescGZIP(), []int{24} } func (x *FilterLogsReply) GetLogs() []*Log { @@ -1768,7 +1845,7 @@ type BalanceAtRequest struct { func (x *BalanceAtRequest) Reset() { *x = BalanceAtRequest{} - mi := &file_evm_proto_msgTypes[24] + mi := &file_evm_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1780,7 +1857,7 @@ func (x *BalanceAtRequest) String() string { func (*BalanceAtRequest) ProtoMessage() {} func (x *BalanceAtRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[24] + mi := &file_evm_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1793,7 +1870,7 @@ func (x *BalanceAtRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BalanceAtRequest.ProtoReflect.Descriptor instead. func (*BalanceAtRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{24} + return file_evm_proto_rawDescGZIP(), []int{25} } func (x *BalanceAtRequest) GetAccount() []byte { @@ -1826,7 +1903,7 @@ type BalanceAtReply struct { func (x *BalanceAtReply) Reset() { *x = BalanceAtReply{} - mi := &file_evm_proto_msgTypes[25] + mi := &file_evm_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1838,7 +1915,7 @@ func (x *BalanceAtReply) String() string { func (*BalanceAtReply) ProtoMessage() {} func (x *BalanceAtReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[25] + mi := &file_evm_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1851,7 +1928,7 @@ func (x *BalanceAtReply) ProtoReflect() protoreflect.Message { // Deprecated: Use BalanceAtReply.ProtoReflect.Descriptor instead. func (*BalanceAtReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{25} + return file_evm_proto_rawDescGZIP(), []int{26} } func (x *BalanceAtReply) GetBalance() *pb.BigInt { @@ -1870,7 +1947,7 @@ type EstimateGasRequest struct { func (x *EstimateGasRequest) Reset() { *x = EstimateGasRequest{} - mi := &file_evm_proto_msgTypes[26] + mi := &file_evm_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1882,7 +1959,7 @@ func (x *EstimateGasRequest) String() string { func (*EstimateGasRequest) ProtoMessage() {} func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[26] + mi := &file_evm_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1895,7 +1972,7 @@ func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateGasRequest.ProtoReflect.Descriptor instead. func (*EstimateGasRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{26} + return file_evm_proto_rawDescGZIP(), []int{27} } func (x *EstimateGasRequest) GetMsg() *CallMsg { @@ -1914,7 +1991,7 @@ type EstimateGasReply struct { func (x *EstimateGasReply) Reset() { *x = EstimateGasReply{} - mi := &file_evm_proto_msgTypes[27] + mi := &file_evm_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1926,7 +2003,7 @@ func (x *EstimateGasReply) String() string { func (*EstimateGasReply) ProtoMessage() {} func (x *EstimateGasReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[27] + mi := &file_evm_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1939,7 +2016,7 @@ func (x *EstimateGasReply) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateGasReply.ProtoReflect.Descriptor instead. func (*EstimateGasReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{27} + return file_evm_proto_rawDescGZIP(), []int{28} } func (x *EstimateGasReply) GetGas() uint64 { @@ -1959,7 +2036,7 @@ type GetTransactionByHashRequest struct { func (x *GetTransactionByHashRequest) Reset() { *x = GetTransactionByHashRequest{} - mi := &file_evm_proto_msgTypes[28] + mi := &file_evm_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1971,7 +2048,7 @@ func (x *GetTransactionByHashRequest) String() string { func (*GetTransactionByHashRequest) ProtoMessage() {} func (x *GetTransactionByHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[28] + mi := &file_evm_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1984,7 +2061,7 @@ func (x *GetTransactionByHashRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionByHashRequest.ProtoReflect.Descriptor instead. func (*GetTransactionByHashRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{28} + return file_evm_proto_rawDescGZIP(), []int{29} } func (x *GetTransactionByHashRequest) GetHash() []byte { @@ -2010,7 +2087,7 @@ type GetTransactionByHashReply struct { func (x *GetTransactionByHashReply) Reset() { *x = GetTransactionByHashReply{} - mi := &file_evm_proto_msgTypes[29] + mi := &file_evm_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2022,7 +2099,7 @@ func (x *GetTransactionByHashReply) String() string { func (*GetTransactionByHashReply) ProtoMessage() {} func (x *GetTransactionByHashReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[29] + mi := &file_evm_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2035,7 +2112,7 @@ func (x *GetTransactionByHashReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionByHashReply.ProtoReflect.Descriptor instead. func (*GetTransactionByHashReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{29} + return file_evm_proto_rawDescGZIP(), []int{30} } func (x *GetTransactionByHashReply) GetTransaction() *Transaction { @@ -2055,7 +2132,7 @@ type GetTransactionReceiptRequest struct { func (x *GetTransactionReceiptRequest) Reset() { *x = GetTransactionReceiptRequest{} - mi := &file_evm_proto_msgTypes[30] + mi := &file_evm_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2067,7 +2144,7 @@ func (x *GetTransactionReceiptRequest) String() string { func (*GetTransactionReceiptRequest) ProtoMessage() {} func (x *GetTransactionReceiptRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[30] + mi := &file_evm_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2080,7 +2157,7 @@ func (x *GetTransactionReceiptRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReceiptRequest.ProtoReflect.Descriptor instead. func (*GetTransactionReceiptRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{30} + return file_evm_proto_rawDescGZIP(), []int{31} } func (x *GetTransactionReceiptRequest) GetHash() []byte { @@ -2106,7 +2183,7 @@ type GetTransactionReceiptReply struct { func (x *GetTransactionReceiptReply) Reset() { *x = GetTransactionReceiptReply{} - mi := &file_evm_proto_msgTypes[31] + mi := &file_evm_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2118,7 +2195,7 @@ func (x *GetTransactionReceiptReply) String() string { func (*GetTransactionReceiptReply) ProtoMessage() {} func (x *GetTransactionReceiptReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[31] + mi := &file_evm_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2131,7 +2208,7 @@ func (x *GetTransactionReceiptReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReceiptReply.ProtoReflect.Descriptor instead. func (*GetTransactionReceiptReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{31} + return file_evm_proto_rawDescGZIP(), []int{32} } func (x *GetTransactionReceiptReply) GetReceipt() *Receipt { @@ -2150,7 +2227,7 @@ type RegisterLogTrackingRequest struct { func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_evm_proto_msgTypes[32] + mi := &file_evm_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2162,7 +2239,7 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[32] + mi := &file_evm_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2175,7 +2252,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{32} + return file_evm_proto_rawDescGZIP(), []int{33} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilter { @@ -2194,7 +2271,7 @@ type UnregisterLogTrackingRequest struct { func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_evm_proto_msgTypes[33] + mi := &file_evm_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2206,7 +2283,7 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[33] + mi := &file_evm_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2219,7 +2296,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{33} + return file_evm_proto_rawDescGZIP(), []int{34} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -2240,7 +2317,7 @@ type QueryTrackedLogsRequest struct { func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_evm_proto_msgTypes[34] + mi := &file_evm_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2252,7 +2329,7 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[34] + mi := &file_evm_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2265,7 +2342,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{34} + return file_evm_proto_rawDescGZIP(), []int{35} } func (x *QueryTrackedLogsRequest) GetExpression() []*Expression { @@ -2298,7 +2375,7 @@ type QueryTrackedLogsReply struct { func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_evm_proto_msgTypes[35] + mi := &file_evm_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2310,7 +2387,7 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[35] + mi := &file_evm_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2323,7 +2400,7 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{35} + return file_evm_proto_rawDescGZIP(), []int{36} } func (x *QueryTrackedLogsReply) GetLogs() []*Log { @@ -2333,6 +2410,50 @@ func (x *QueryTrackedLogsReply) GetLogs() []*Log { return nil } +type GetLatestLPBlockReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + LpBlock *LPBlock `protobuf:"bytes,1,opt,name=lp_block,json=lpBlock,proto3" json:"lp_block,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLatestLPBlockReply) Reset() { + *x = GetLatestLPBlockReply{} + mi := &file_evm_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLatestLPBlockReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLatestLPBlockReply) ProtoMessage() {} + +func (x *GetLatestLPBlockReply) ProtoReflect() protoreflect.Message { + mi := &file_evm_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLatestLPBlockReply.ProtoReflect.Descriptor instead. +func (*GetLatestLPBlockReply) Descriptor() ([]byte, []int) { + return file_evm_proto_rawDescGZIP(), []int{37} +} + +func (x *GetLatestLPBlockReply) GetLpBlock() *LPBlock { + if x != nil { + return x.LpBlock + } + return nil +} + type GasConfig struct { state protoimpl.MessageState `protogen:"open.v1"` GasLimit uint64 `protobuf:"varint,1,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` @@ -2342,7 +2463,7 @@ type GasConfig struct { func (x *GasConfig) Reset() { *x = GasConfig{} - mi := &file_evm_proto_msgTypes[36] + mi := &file_evm_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2354,7 +2475,7 @@ func (x *GasConfig) String() string { func (*GasConfig) ProtoMessage() {} func (x *GasConfig) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[36] + mi := &file_evm_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2367,7 +2488,7 @@ func (x *GasConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use GasConfig.ProtoReflect.Descriptor instead. func (*GasConfig) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{36} + return file_evm_proto_rawDescGZIP(), []int{38} } func (x *GasConfig) GetGasLimit() uint64 { @@ -2386,7 +2507,7 @@ type CalculateTransactionFeeRequest struct { func (x *CalculateTransactionFeeRequest) Reset() { *x = CalculateTransactionFeeRequest{} - mi := &file_evm_proto_msgTypes[37] + mi := &file_evm_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2398,7 +2519,7 @@ func (x *CalculateTransactionFeeRequest) String() string { func (*CalculateTransactionFeeRequest) ProtoMessage() {} func (x *CalculateTransactionFeeRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[37] + mi := &file_evm_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2411,7 +2532,7 @@ func (x *CalculateTransactionFeeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CalculateTransactionFeeRequest.ProtoReflect.Descriptor instead. func (*CalculateTransactionFeeRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{37} + return file_evm_proto_rawDescGZIP(), []int{39} } func (x *CalculateTransactionFeeRequest) GetGasInfo() *ReceiptGasInfo { @@ -2432,7 +2553,7 @@ type ReceiptGasInfo struct { func (x *ReceiptGasInfo) Reset() { *x = ReceiptGasInfo{} - mi := &file_evm_proto_msgTypes[38] + mi := &file_evm_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2444,7 +2565,7 @@ func (x *ReceiptGasInfo) String() string { func (*ReceiptGasInfo) ProtoMessage() {} func (x *ReceiptGasInfo) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[38] + mi := &file_evm_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2457,7 +2578,7 @@ func (x *ReceiptGasInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ReceiptGasInfo.ProtoReflect.Descriptor instead. func (*ReceiptGasInfo) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{38} + return file_evm_proto_rawDescGZIP(), []int{40} } func (x *ReceiptGasInfo) GetGasUsed() uint64 { @@ -2483,7 +2604,7 @@ type CalculateTransactionFeeReply struct { func (x *CalculateTransactionFeeReply) Reset() { *x = CalculateTransactionFeeReply{} - mi := &file_evm_proto_msgTypes[39] + mi := &file_evm_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2495,7 +2616,7 @@ func (x *CalculateTransactionFeeReply) String() string { func (*CalculateTransactionFeeReply) ProtoMessage() {} func (x *CalculateTransactionFeeReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[39] + mi := &file_evm_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2508,7 +2629,7 @@ func (x *CalculateTransactionFeeReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CalculateTransactionFeeReply.ProtoReflect.Descriptor instead. func (*CalculateTransactionFeeReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{39} + return file_evm_proto_rawDescGZIP(), []int{41} } func (x *CalculateTransactionFeeReply) GetTransactionFee() *pb.BigInt { @@ -2529,7 +2650,7 @@ type SubmitTransactionRequest struct { func (x *SubmitTransactionRequest) Reset() { *x = SubmitTransactionRequest{} - mi := &file_evm_proto_msgTypes[40] + mi := &file_evm_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2541,7 +2662,7 @@ func (x *SubmitTransactionRequest) String() string { func (*SubmitTransactionRequest) ProtoMessage() {} func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[40] + mi := &file_evm_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2554,7 +2675,7 @@ func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{40} + return file_evm_proto_rawDescGZIP(), []int{42} } func (x *SubmitTransactionRequest) GetTo() []byte { @@ -2589,7 +2710,7 @@ type SubmitTransactionReply struct { func (x *SubmitTransactionReply) Reset() { *x = SubmitTransactionReply{} - mi := &file_evm_proto_msgTypes[41] + mi := &file_evm_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2601,7 +2722,7 @@ func (x *SubmitTransactionReply) String() string { func (*SubmitTransactionReply) ProtoMessage() {} func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[41] + mi := &file_evm_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2614,7 +2735,7 @@ func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{41} + return file_evm_proto_rawDescGZIP(), []int{43} } func (x *SubmitTransactionReply) GetTxHash() []byte { @@ -2647,7 +2768,7 @@ type GetTransactionStatusRequest struct { func (x *GetTransactionStatusRequest) Reset() { *x = GetTransactionStatusRequest{} - mi := &file_evm_proto_msgTypes[42] + mi := &file_evm_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2659,7 +2780,7 @@ func (x *GetTransactionStatusRequest) String() string { func (*GetTransactionStatusRequest) ProtoMessage() {} func (x *GetTransactionStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[42] + mi := &file_evm_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2672,7 +2793,7 @@ func (x *GetTransactionStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionStatusRequest.ProtoReflect.Descriptor instead. func (*GetTransactionStatusRequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{42} + return file_evm_proto_rawDescGZIP(), []int{44} } func (x *GetTransactionStatusRequest) GetTransactionId() string { @@ -2691,7 +2812,7 @@ type GetTransactionStatusReply struct { func (x *GetTransactionStatusReply) Reset() { *x = GetTransactionStatusReply{} - mi := &file_evm_proto_msgTypes[43] + mi := &file_evm_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2703,7 +2824,7 @@ func (x *GetTransactionStatusReply) String() string { func (*GetTransactionStatusReply) ProtoMessage() {} func (x *GetTransactionStatusReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[43] + mi := &file_evm_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2716,7 +2837,7 @@ func (x *GetTransactionStatusReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionStatusReply.ProtoReflect.Descriptor instead. func (*GetTransactionStatusReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{43} + return file_evm_proto_rawDescGZIP(), []int{45} } func (x *GetTransactionStatusReply) GetTransactionStatus() TransactionStatus { @@ -2737,7 +2858,7 @@ type GetForwarderForEOARequest struct { func (x *GetForwarderForEOARequest) Reset() { *x = GetForwarderForEOARequest{} - mi := &file_evm_proto_msgTypes[44] + mi := &file_evm_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2749,7 +2870,7 @@ func (x *GetForwarderForEOARequest) String() string { func (*GetForwarderForEOARequest) ProtoMessage() {} func (x *GetForwarderForEOARequest) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[44] + mi := &file_evm_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2762,7 +2883,7 @@ func (x *GetForwarderForEOARequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetForwarderForEOARequest.ProtoReflect.Descriptor instead. func (*GetForwarderForEOARequest) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{44} + return file_evm_proto_rawDescGZIP(), []int{46} } func (x *GetForwarderForEOARequest) GetAddr() []byte { @@ -2795,7 +2916,7 @@ type GetForwarderForEOAReply struct { func (x *GetForwarderForEOAReply) Reset() { *x = GetForwarderForEOAReply{} - mi := &file_evm_proto_msgTypes[45] + mi := &file_evm_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2807,7 +2928,7 @@ func (x *GetForwarderForEOAReply) String() string { func (*GetForwarderForEOAReply) ProtoMessage() {} func (x *GetForwarderForEOAReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[45] + mi := &file_evm_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2820,7 +2941,7 @@ func (x *GetForwarderForEOAReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetForwarderForEOAReply.ProtoReflect.Descriptor instead. func (*GetForwarderForEOAReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{45} + return file_evm_proto_rawDescGZIP(), []int{47} } func (x *GetForwarderForEOAReply) GetAddr() []byte { @@ -2839,7 +2960,7 @@ type GetFiltersNamesReply struct { func (x *GetFiltersNamesReply) Reset() { *x = GetFiltersNamesReply{} - mi := &file_evm_proto_msgTypes[46] + mi := &file_evm_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2851,7 +2972,7 @@ func (x *GetFiltersNamesReply) String() string { func (*GetFiltersNamesReply) ProtoMessage() {} func (x *GetFiltersNamesReply) ProtoReflect() protoreflect.Message { - mi := &file_evm_proto_msgTypes[46] + mi := &file_evm_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2864,7 +2985,7 @@ func (x *GetFiltersNamesReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFiltersNamesReply.ProtoReflect.Descriptor instead. func (*GetFiltersNamesReply) Descriptor() ([]byte, []int) { - return file_evm_proto_rawDescGZIP(), []int{46} + return file_evm_proto_rawDescGZIP(), []int{48} } func (x *GetFiltersNamesReply) GetItems() []string { @@ -2941,7 +3062,13 @@ const file_evm_proto_rawDesc = "" + "\fblock_number\x18\x02 \x01(\v2\x11.values.v1.BigIntR\vblockNumber\x12\x12\n" + "\x04hash\x18\x03 \x01(\fR\x04hash\x12\x1f\n" + "\vparent_hash\x18\x04 \x01(\fR\n" + - "parentHash\"\x9c\x01\n" + + "parentHash\"\xd8\x01\n" + + "\aLPBlock\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\x12.\n" + + "\x13latest_block_number\x18\x02 \x01(\x03R\x11latestBlockNumber\x12'\n" + + "\x0fblock_timestamp\x18\x03 \x01(\x04R\x0eblockTimestamp\x124\n" + + "\x16finalized_block_number\x18\x04 \x01(\x03R\x14finalizedBlockNumber\x12*\n" + + "\x11safe_block_number\x18\x05 \x01(\x03R\x0fsafeBlockNumber\"\x9c\x01\n" + "\n" + "Expression\x123\n" + "\tprimitive\x18\x01 \x01(\v2\x13.loop.evm.PrimitiveH\x00R\tprimitive\x12L\n" + @@ -3031,7 +3158,9 @@ const file_evm_proto_rawDesc = "" + "\x0elimit_and_sort\x18\x02 \x01(\v2\x1f.loop.chain.common.LimitAndSortR\flimitAndSort\x12H\n" + "\x10confidence_level\x18\x03 \x01(\x0e2\x1d.loop.chain.common.ConfidenceR\x0fconfidenceLevel\":\n" + "\x15QueryTrackedLogsReply\x12!\n" + - "\x04logs\x18\x01 \x03(\v2\r.loop.evm.LogR\x04logs\"(\n" + + "\x04logs\x18\x01 \x03(\v2\r.loop.evm.LogR\x04logs\"E\n" + + "\x15GetLatestLPBlockReply\x12,\n" + + "\blp_block\x18\x01 \x01(\v2\x11.loop.evm.LPBlockR\alpBlock\"(\n" + "\tGasConfig\x12\x1b\n" + "\tgas_limit\x18\x01 \x01(\x04R\bgasLimit\"U\n" + "\x1eCalculateTransactionFeeRequest\x123\n" + @@ -3075,8 +3204,7 @@ const file_evm_proto_rawDesc = "" + "\x1eTRANSACTION_STATUS_UNCONFIRMED\x10\x02\x12 \n" + "\x1cTRANSACTION_STATUS_FINALIZED\x10\x03\x12\x1d\n" + "\x19TRANSACTION_STATUS_FAILED\x10\x04\x12\x1c\n" + - "\x18TRANSACTION_STATUS_FATAL\x10\x052\xf8\n" + - "\n" + + "\x18TRANSACTION_STATUS_FATAL\x10\x052\xc5\v\n" + "\x03EVM\x12[\n" + "\x11GetTransactionFee\x12\".loop.evm.GetTransactionFeeRequest\x1a .loop.evm.GetTransactionFeeReply\"\x00\x12J\n" + "\fCallContract\x12\x1d.loop.evm.CallContractRequest\x1a\x1b.loop.evm.CallContractReply\x12D\n" + @@ -3094,7 +3222,8 @@ const file_evm_proto_rawDesc = "" + "\x14GetTransactionStatus\x12%.loop.evm.GetTransactionStatusRequest\x1a#.loop.evm.GetTransactionStatusReply\x12Y\n" + "\x11SubmitTransaction\x12\".loop.evm.SubmitTransactionRequest\x1a .loop.evm.SubmitTransactionReply\x12k\n" + "\x17CalculateTransactionFee\x12(.loop.evm.CalculateTransactionFeeRequest\x1a&.loop.evm.CalculateTransactionFeeReply\x12\\\n" + - "\x12GetForwarderForEOA\x12#.loop.evm.GetForwarderForEOARequest\x1a!.loop.evm.GetForwarderForEOAReplyB=Z;github.com/smartcontractkit/chainlink-common/pkg/chains/evmb\x06proto3" + "\x12GetForwarderForEOA\x12#.loop.evm.GetForwarderForEOARequest\x1a!.loop.evm.GetForwarderForEOAReply\x12K\n" + + "\x10GetLatestLPBlock\x12\x16.google.protobuf.Empty\x1a\x1f.loop.evm.GetLatestLPBlockReplyB=Z;github.com/smartcontractkit/chainlink-common/pkg/chains/evmb\x06proto3" var ( file_evm_proto_rawDescOnce sync.Once @@ -3109,7 +3238,7 @@ func file_evm_proto_rawDescGZIP() []byte { } var file_evm_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_evm_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_evm_proto_msgTypes = make([]protoimpl.MessageInfo, 49) var file_evm_proto_goTypes = []any{ (TxStatus)(0), // 0: loop.evm.TxStatus (TransactionStatus)(0), // 1: loop.evm.TransactionStatus @@ -3121,140 +3250,145 @@ var file_evm_proto_goTypes = []any{ (*Receipt)(nil), // 7: loop.evm.Receipt (*LPFilter)(nil), // 8: loop.evm.LPFilter (*Header)(nil), // 9: loop.evm.Header - (*Expression)(nil), // 10: loop.evm.Expression - (*BooleanExpression)(nil), // 11: loop.evm.BooleanExpression - (*And)(nil), // 12: loop.evm.And - (*Or)(nil), // 13: loop.evm.Or - (*HashValueComparator)(nil), // 14: loop.evm.HashValueComparator - (*EventByWord)(nil), // 15: loop.evm.EventByWord - (*EventByTopic)(nil), // 16: loop.evm.EventByTopic - (*Primitive)(nil), // 17: loop.evm.Primitive - (*HeaderByNumberRequest)(nil), // 18: loop.evm.HeaderByNumberRequest - (*HeaderByNumberReply)(nil), // 19: loop.evm.HeaderByNumberReply - (*CallContractRequest)(nil), // 20: loop.evm.CallContractRequest - (*CallContractReply)(nil), // 21: loop.evm.CallContractReply - (*GetTransactionFeeRequest)(nil), // 22: loop.evm.GetTransactionFeeRequest - (*GetTransactionFeeReply)(nil), // 23: loop.evm.GetTransactionFeeReply - (*FilterLogsRequest)(nil), // 24: loop.evm.FilterLogsRequest - (*FilterLogsReply)(nil), // 25: loop.evm.FilterLogsReply - (*BalanceAtRequest)(nil), // 26: loop.evm.BalanceAtRequest - (*BalanceAtReply)(nil), // 27: loop.evm.BalanceAtReply - (*EstimateGasRequest)(nil), // 28: loop.evm.EstimateGasRequest - (*EstimateGasReply)(nil), // 29: loop.evm.EstimateGasReply - (*GetTransactionByHashRequest)(nil), // 30: loop.evm.GetTransactionByHashRequest - (*GetTransactionByHashReply)(nil), // 31: loop.evm.GetTransactionByHashReply - (*GetTransactionReceiptRequest)(nil), // 32: loop.evm.GetTransactionReceiptRequest - (*GetTransactionReceiptReply)(nil), // 33: loop.evm.GetTransactionReceiptReply - (*RegisterLogTrackingRequest)(nil), // 34: loop.evm.RegisterLogTrackingRequest - (*UnregisterLogTrackingRequest)(nil), // 35: loop.evm.UnregisterLogTrackingRequest - (*QueryTrackedLogsRequest)(nil), // 36: loop.evm.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 37: loop.evm.QueryTrackedLogsReply - (*GasConfig)(nil), // 38: loop.evm.GasConfig - (*CalculateTransactionFeeRequest)(nil), // 39: loop.evm.CalculateTransactionFeeRequest - (*ReceiptGasInfo)(nil), // 40: loop.evm.ReceiptGasInfo - (*CalculateTransactionFeeReply)(nil), // 41: loop.evm.CalculateTransactionFeeReply - (*SubmitTransactionRequest)(nil), // 42: loop.evm.SubmitTransactionRequest - (*SubmitTransactionReply)(nil), // 43: loop.evm.SubmitTransactionReply - (*GetTransactionStatusRequest)(nil), // 44: loop.evm.GetTransactionStatusRequest - (*GetTransactionStatusReply)(nil), // 45: loop.evm.GetTransactionStatusReply - (*GetForwarderForEOARequest)(nil), // 46: loop.evm.GetForwarderForEOARequest - (*GetForwarderForEOAReply)(nil), // 47: loop.evm.GetForwarderForEOAReply - (*GetFiltersNamesReply)(nil), // 48: loop.evm.GetFiltersNamesReply - (*pb.BigInt)(nil), // 49: values.v1.BigInt - (chain_common.BooleanOperator)(0), // 50: loop.chain.common.BooleanOperator - (chain_common.ComparisonOperator)(0), // 51: loop.chain.common.ComparisonOperator - (*chain_common.Primitive)(nil), // 52: loop.chain.common.Primitive - (chain_common.Confidence)(0), // 53: loop.chain.common.Confidence - (*chain_common.LimitAndSort)(nil), // 54: loop.chain.common.LimitAndSort - (*emptypb.Empty)(nil), // 55: google.protobuf.Empty + (*LPBlock)(nil), // 10: loop.evm.LPBlock + (*Expression)(nil), // 11: loop.evm.Expression + (*BooleanExpression)(nil), // 12: loop.evm.BooleanExpression + (*And)(nil), // 13: loop.evm.And + (*Or)(nil), // 14: loop.evm.Or + (*HashValueComparator)(nil), // 15: loop.evm.HashValueComparator + (*EventByWord)(nil), // 16: loop.evm.EventByWord + (*EventByTopic)(nil), // 17: loop.evm.EventByTopic + (*Primitive)(nil), // 18: loop.evm.Primitive + (*HeaderByNumberRequest)(nil), // 19: loop.evm.HeaderByNumberRequest + (*HeaderByNumberReply)(nil), // 20: loop.evm.HeaderByNumberReply + (*CallContractRequest)(nil), // 21: loop.evm.CallContractRequest + (*CallContractReply)(nil), // 22: loop.evm.CallContractReply + (*GetTransactionFeeRequest)(nil), // 23: loop.evm.GetTransactionFeeRequest + (*GetTransactionFeeReply)(nil), // 24: loop.evm.GetTransactionFeeReply + (*FilterLogsRequest)(nil), // 25: loop.evm.FilterLogsRequest + (*FilterLogsReply)(nil), // 26: loop.evm.FilterLogsReply + (*BalanceAtRequest)(nil), // 27: loop.evm.BalanceAtRequest + (*BalanceAtReply)(nil), // 28: loop.evm.BalanceAtReply + (*EstimateGasRequest)(nil), // 29: loop.evm.EstimateGasRequest + (*EstimateGasReply)(nil), // 30: loop.evm.EstimateGasReply + (*GetTransactionByHashRequest)(nil), // 31: loop.evm.GetTransactionByHashRequest + (*GetTransactionByHashReply)(nil), // 32: loop.evm.GetTransactionByHashReply + (*GetTransactionReceiptRequest)(nil), // 33: loop.evm.GetTransactionReceiptRequest + (*GetTransactionReceiptReply)(nil), // 34: loop.evm.GetTransactionReceiptReply + (*RegisterLogTrackingRequest)(nil), // 35: loop.evm.RegisterLogTrackingRequest + (*UnregisterLogTrackingRequest)(nil), // 36: loop.evm.UnregisterLogTrackingRequest + (*QueryTrackedLogsRequest)(nil), // 37: loop.evm.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 38: loop.evm.QueryTrackedLogsReply + (*GetLatestLPBlockReply)(nil), // 39: loop.evm.GetLatestLPBlockReply + (*GasConfig)(nil), // 40: loop.evm.GasConfig + (*CalculateTransactionFeeRequest)(nil), // 41: loop.evm.CalculateTransactionFeeRequest + (*ReceiptGasInfo)(nil), // 42: loop.evm.ReceiptGasInfo + (*CalculateTransactionFeeReply)(nil), // 43: loop.evm.CalculateTransactionFeeReply + (*SubmitTransactionRequest)(nil), // 44: loop.evm.SubmitTransactionRequest + (*SubmitTransactionReply)(nil), // 45: loop.evm.SubmitTransactionReply + (*GetTransactionStatusRequest)(nil), // 46: loop.evm.GetTransactionStatusRequest + (*GetTransactionStatusReply)(nil), // 47: loop.evm.GetTransactionStatusReply + (*GetForwarderForEOARequest)(nil), // 48: loop.evm.GetForwarderForEOARequest + (*GetForwarderForEOAReply)(nil), // 49: loop.evm.GetForwarderForEOAReply + (*GetFiltersNamesReply)(nil), // 50: loop.evm.GetFiltersNamesReply + (*pb.BigInt)(nil), // 51: values.v1.BigInt + (chain_common.BooleanOperator)(0), // 52: loop.chain.common.BooleanOperator + (chain_common.ComparisonOperator)(0), // 53: loop.chain.common.ComparisonOperator + (*chain_common.Primitive)(nil), // 54: loop.chain.common.Primitive + (chain_common.Confidence)(0), // 55: loop.chain.common.Confidence + (*chain_common.LimitAndSort)(nil), // 56: loop.chain.common.LimitAndSort + (*emptypb.Empty)(nil), // 57: google.protobuf.Empty } var file_evm_proto_depIdxs = []int32{ - 49, // 0: loop.evm.Log.block_number:type_name -> values.v1.BigInt - 49, // 1: loop.evm.FilterQuery.fromBlock:type_name -> values.v1.BigInt - 49, // 2: loop.evm.FilterQuery.toBlock:type_name -> values.v1.BigInt + 51, // 0: loop.evm.Log.block_number:type_name -> values.v1.BigInt + 51, // 1: loop.evm.FilterQuery.fromBlock:type_name -> values.v1.BigInt + 51, // 2: loop.evm.FilterQuery.toBlock:type_name -> values.v1.BigInt 3, // 3: loop.evm.FilterQuery.topics:type_name -> loop.evm.Topics - 49, // 4: loop.evm.Transaction.value:type_name -> values.v1.BigInt - 49, // 5: loop.evm.Transaction.gas_price:type_name -> values.v1.BigInt + 51, // 4: loop.evm.Transaction.value:type_name -> values.v1.BigInt + 51, // 5: loop.evm.Transaction.gas_price:type_name -> values.v1.BigInt 4, // 6: loop.evm.Receipt.logs:type_name -> loop.evm.Log - 49, // 7: loop.evm.Receipt.effective_gas_price:type_name -> values.v1.BigInt - 49, // 8: loop.evm.Receipt.block_number:type_name -> values.v1.BigInt - 49, // 9: loop.evm.Header.block_number:type_name -> values.v1.BigInt - 17, // 10: loop.evm.Expression.primitive:type_name -> loop.evm.Primitive - 11, // 11: loop.evm.Expression.boolean_expression:type_name -> loop.evm.BooleanExpression - 50, // 12: loop.evm.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator - 10, // 13: loop.evm.BooleanExpression.expression:type_name -> loop.evm.Expression - 10, // 14: loop.evm.And.expr:type_name -> loop.evm.Expression - 10, // 15: loop.evm.Or.expr:type_name -> loop.evm.Expression - 51, // 16: loop.evm.HashValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator - 14, // 17: loop.evm.EventByWord.hashed_value_comparers:type_name -> loop.evm.HashValueComparator - 14, // 18: loop.evm.EventByTopic.hashed_value_comparers:type_name -> loop.evm.HashValueComparator - 52, // 19: loop.evm.Primitive.general_primitive:type_name -> loop.chain.common.Primitive - 15, // 20: loop.evm.Primitive.event_by_word:type_name -> loop.evm.EventByWord - 16, // 21: loop.evm.Primitive.event_by_topic:type_name -> loop.evm.EventByTopic - 49, // 22: loop.evm.HeaderByNumberRequest.block_number:type_name -> values.v1.BigInt - 53, // 23: loop.evm.HeaderByNumberRequest.confidence_level:type_name -> loop.chain.common.Confidence + 51, // 7: loop.evm.Receipt.effective_gas_price:type_name -> values.v1.BigInt + 51, // 8: loop.evm.Receipt.block_number:type_name -> values.v1.BigInt + 51, // 9: loop.evm.Header.block_number:type_name -> values.v1.BigInt + 18, // 10: loop.evm.Expression.primitive:type_name -> loop.evm.Primitive + 12, // 11: loop.evm.Expression.boolean_expression:type_name -> loop.evm.BooleanExpression + 52, // 12: loop.evm.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator + 11, // 13: loop.evm.BooleanExpression.expression:type_name -> loop.evm.Expression + 11, // 14: loop.evm.And.expr:type_name -> loop.evm.Expression + 11, // 15: loop.evm.Or.expr:type_name -> loop.evm.Expression + 53, // 16: loop.evm.HashValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator + 15, // 17: loop.evm.EventByWord.hashed_value_comparers:type_name -> loop.evm.HashValueComparator + 15, // 18: loop.evm.EventByTopic.hashed_value_comparers:type_name -> loop.evm.HashValueComparator + 54, // 19: loop.evm.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 16, // 20: loop.evm.Primitive.event_by_word:type_name -> loop.evm.EventByWord + 17, // 21: loop.evm.Primitive.event_by_topic:type_name -> loop.evm.EventByTopic + 51, // 22: loop.evm.HeaderByNumberRequest.block_number:type_name -> values.v1.BigInt + 55, // 23: loop.evm.HeaderByNumberRequest.confidence_level:type_name -> loop.chain.common.Confidence 9, // 24: loop.evm.HeaderByNumberReply.header:type_name -> loop.evm.Header 2, // 25: loop.evm.CallContractRequest.call:type_name -> loop.evm.CallMsg - 49, // 26: loop.evm.CallContractRequest.block_number:type_name -> values.v1.BigInt - 53, // 27: loop.evm.CallContractRequest.confidence_level:type_name -> loop.chain.common.Confidence - 49, // 28: loop.evm.GetTransactionFeeReply.transaction_fee:type_name -> values.v1.BigInt + 51, // 26: loop.evm.CallContractRequest.block_number:type_name -> values.v1.BigInt + 55, // 27: loop.evm.CallContractRequest.confidence_level:type_name -> loop.chain.common.Confidence + 51, // 28: loop.evm.GetTransactionFeeReply.transaction_fee:type_name -> values.v1.BigInt 5, // 29: loop.evm.FilterLogsRequest.filter_query:type_name -> loop.evm.FilterQuery - 53, // 30: loop.evm.FilterLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence + 55, // 30: loop.evm.FilterLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence 4, // 31: loop.evm.FilterLogsReply.logs:type_name -> loop.evm.Log - 49, // 32: loop.evm.BalanceAtRequest.block_number:type_name -> values.v1.BigInt - 53, // 33: loop.evm.BalanceAtRequest.confidence_level:type_name -> loop.chain.common.Confidence - 49, // 34: loop.evm.BalanceAtReply.balance:type_name -> values.v1.BigInt + 51, // 32: loop.evm.BalanceAtRequest.block_number:type_name -> values.v1.BigInt + 55, // 33: loop.evm.BalanceAtRequest.confidence_level:type_name -> loop.chain.common.Confidence + 51, // 34: loop.evm.BalanceAtReply.balance:type_name -> values.v1.BigInt 2, // 35: loop.evm.EstimateGasRequest.msg:type_name -> loop.evm.CallMsg 6, // 36: loop.evm.GetTransactionByHashReply.transaction:type_name -> loop.evm.Transaction 7, // 37: loop.evm.GetTransactionReceiptReply.receipt:type_name -> loop.evm.Receipt 8, // 38: loop.evm.RegisterLogTrackingRequest.filter:type_name -> loop.evm.LPFilter - 10, // 39: loop.evm.QueryTrackedLogsRequest.expression:type_name -> loop.evm.Expression - 54, // 40: loop.evm.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort - 53, // 41: loop.evm.QueryTrackedLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence + 11, // 39: loop.evm.QueryTrackedLogsRequest.expression:type_name -> loop.evm.Expression + 56, // 40: loop.evm.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 55, // 41: loop.evm.QueryTrackedLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence 4, // 42: loop.evm.QueryTrackedLogsReply.logs:type_name -> loop.evm.Log - 40, // 43: loop.evm.CalculateTransactionFeeRequest.gas_info:type_name -> loop.evm.ReceiptGasInfo - 49, // 44: loop.evm.ReceiptGasInfo.effective_gas_price:type_name -> values.v1.BigInt - 49, // 45: loop.evm.CalculateTransactionFeeReply.transaction_fee:type_name -> values.v1.BigInt - 38, // 46: loop.evm.SubmitTransactionRequest.gas_config:type_name -> loop.evm.GasConfig - 0, // 47: loop.evm.SubmitTransactionReply.txStatus:type_name -> loop.evm.TxStatus - 1, // 48: loop.evm.GetTransactionStatusReply.transaction_status:type_name -> loop.evm.TransactionStatus - 22, // 49: loop.evm.EVM.GetTransactionFee:input_type -> loop.evm.GetTransactionFeeRequest - 20, // 50: loop.evm.EVM.CallContract:input_type -> loop.evm.CallContractRequest - 24, // 51: loop.evm.EVM.FilterLogs:input_type -> loop.evm.FilterLogsRequest - 26, // 52: loop.evm.EVM.BalanceAt:input_type -> loop.evm.BalanceAtRequest - 28, // 53: loop.evm.EVM.EstimateGas:input_type -> loop.evm.EstimateGasRequest - 30, // 54: loop.evm.EVM.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest - 32, // 55: loop.evm.EVM.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest - 18, // 56: loop.evm.EVM.HeaderByNumber:input_type -> loop.evm.HeaderByNumberRequest - 36, // 57: loop.evm.EVM.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest - 55, // 58: loop.evm.EVM.GetFiltersNames:input_type -> google.protobuf.Empty - 34, // 59: loop.evm.EVM.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest - 35, // 60: loop.evm.EVM.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest - 44, // 61: loop.evm.EVM.GetTransactionStatus:input_type -> loop.evm.GetTransactionStatusRequest - 42, // 62: loop.evm.EVM.SubmitTransaction:input_type -> loop.evm.SubmitTransactionRequest - 39, // 63: loop.evm.EVM.CalculateTransactionFee:input_type -> loop.evm.CalculateTransactionFeeRequest - 46, // 64: loop.evm.EVM.GetForwarderForEOA:input_type -> loop.evm.GetForwarderForEOARequest - 23, // 65: loop.evm.EVM.GetTransactionFee:output_type -> loop.evm.GetTransactionFeeReply - 21, // 66: loop.evm.EVM.CallContract:output_type -> loop.evm.CallContractReply - 25, // 67: loop.evm.EVM.FilterLogs:output_type -> loop.evm.FilterLogsReply - 27, // 68: loop.evm.EVM.BalanceAt:output_type -> loop.evm.BalanceAtReply - 29, // 69: loop.evm.EVM.EstimateGas:output_type -> loop.evm.EstimateGasReply - 31, // 70: loop.evm.EVM.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply - 33, // 71: loop.evm.EVM.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply - 19, // 72: loop.evm.EVM.HeaderByNumber:output_type -> loop.evm.HeaderByNumberReply - 37, // 73: loop.evm.EVM.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply - 48, // 74: loop.evm.EVM.GetFiltersNames:output_type -> loop.evm.GetFiltersNamesReply - 55, // 75: loop.evm.EVM.RegisterLogTracking:output_type -> google.protobuf.Empty - 55, // 76: loop.evm.EVM.UnregisterLogTracking:output_type -> google.protobuf.Empty - 45, // 77: loop.evm.EVM.GetTransactionStatus:output_type -> loop.evm.GetTransactionStatusReply - 43, // 78: loop.evm.EVM.SubmitTransaction:output_type -> loop.evm.SubmitTransactionReply - 41, // 79: loop.evm.EVM.CalculateTransactionFee:output_type -> loop.evm.CalculateTransactionFeeReply - 47, // 80: loop.evm.EVM.GetForwarderForEOA:output_type -> loop.evm.GetForwarderForEOAReply - 65, // [65:81] is the sub-list for method output_type - 49, // [49:65] is the sub-list for method input_type - 49, // [49:49] is the sub-list for extension type_name - 49, // [49:49] is the sub-list for extension extendee - 0, // [0:49] is the sub-list for field type_name + 10, // 43: loop.evm.GetLatestLPBlockReply.lp_block:type_name -> loop.evm.LPBlock + 42, // 44: loop.evm.CalculateTransactionFeeRequest.gas_info:type_name -> loop.evm.ReceiptGasInfo + 51, // 45: loop.evm.ReceiptGasInfo.effective_gas_price:type_name -> values.v1.BigInt + 51, // 46: loop.evm.CalculateTransactionFeeReply.transaction_fee:type_name -> values.v1.BigInt + 40, // 47: loop.evm.SubmitTransactionRequest.gas_config:type_name -> loop.evm.GasConfig + 0, // 48: loop.evm.SubmitTransactionReply.txStatus:type_name -> loop.evm.TxStatus + 1, // 49: loop.evm.GetTransactionStatusReply.transaction_status:type_name -> loop.evm.TransactionStatus + 23, // 50: loop.evm.EVM.GetTransactionFee:input_type -> loop.evm.GetTransactionFeeRequest + 21, // 51: loop.evm.EVM.CallContract:input_type -> loop.evm.CallContractRequest + 25, // 52: loop.evm.EVM.FilterLogs:input_type -> loop.evm.FilterLogsRequest + 27, // 53: loop.evm.EVM.BalanceAt:input_type -> loop.evm.BalanceAtRequest + 29, // 54: loop.evm.EVM.EstimateGas:input_type -> loop.evm.EstimateGasRequest + 31, // 55: loop.evm.EVM.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest + 33, // 56: loop.evm.EVM.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest + 19, // 57: loop.evm.EVM.HeaderByNumber:input_type -> loop.evm.HeaderByNumberRequest + 37, // 58: loop.evm.EVM.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest + 57, // 59: loop.evm.EVM.GetFiltersNames:input_type -> google.protobuf.Empty + 35, // 60: loop.evm.EVM.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest + 36, // 61: loop.evm.EVM.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest + 46, // 62: loop.evm.EVM.GetTransactionStatus:input_type -> loop.evm.GetTransactionStatusRequest + 44, // 63: loop.evm.EVM.SubmitTransaction:input_type -> loop.evm.SubmitTransactionRequest + 41, // 64: loop.evm.EVM.CalculateTransactionFee:input_type -> loop.evm.CalculateTransactionFeeRequest + 48, // 65: loop.evm.EVM.GetForwarderForEOA:input_type -> loop.evm.GetForwarderForEOARequest + 57, // 66: loop.evm.EVM.GetLatestLPBlock:input_type -> google.protobuf.Empty + 24, // 67: loop.evm.EVM.GetTransactionFee:output_type -> loop.evm.GetTransactionFeeReply + 22, // 68: loop.evm.EVM.CallContract:output_type -> loop.evm.CallContractReply + 26, // 69: loop.evm.EVM.FilterLogs:output_type -> loop.evm.FilterLogsReply + 28, // 70: loop.evm.EVM.BalanceAt:output_type -> loop.evm.BalanceAtReply + 30, // 71: loop.evm.EVM.EstimateGas:output_type -> loop.evm.EstimateGasReply + 32, // 72: loop.evm.EVM.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply + 34, // 73: loop.evm.EVM.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply + 20, // 74: loop.evm.EVM.HeaderByNumber:output_type -> loop.evm.HeaderByNumberReply + 38, // 75: loop.evm.EVM.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply + 50, // 76: loop.evm.EVM.GetFiltersNames:output_type -> loop.evm.GetFiltersNamesReply + 57, // 77: loop.evm.EVM.RegisterLogTracking:output_type -> google.protobuf.Empty + 57, // 78: loop.evm.EVM.UnregisterLogTracking:output_type -> google.protobuf.Empty + 47, // 79: loop.evm.EVM.GetTransactionStatus:output_type -> loop.evm.GetTransactionStatusReply + 45, // 80: loop.evm.EVM.SubmitTransaction:output_type -> loop.evm.SubmitTransactionReply + 43, // 81: loop.evm.EVM.CalculateTransactionFee:output_type -> loop.evm.CalculateTransactionFeeReply + 49, // 82: loop.evm.EVM.GetForwarderForEOA:output_type -> loop.evm.GetForwarderForEOAReply + 39, // 83: loop.evm.EVM.GetLatestLPBlock:output_type -> loop.evm.GetLatestLPBlockReply + 67, // [67:84] is the sub-list for method output_type + 50, // [50:67] is the sub-list for method input_type + 50, // [50:50] is the sub-list for extension type_name + 50, // [50:50] is the sub-list for extension extendee + 0, // [0:50] is the sub-list for field type_name } func init() { file_evm_proto_init() } @@ -3262,25 +3396,25 @@ func file_evm_proto_init() { if File_evm_proto != nil { return } - file_evm_proto_msgTypes[8].OneofWrappers = []any{ + file_evm_proto_msgTypes[9].OneofWrappers = []any{ (*Expression_Primitive)(nil), (*Expression_BooleanExpression)(nil), } - file_evm_proto_msgTypes[15].OneofWrappers = []any{ + file_evm_proto_msgTypes[16].OneofWrappers = []any{ (*Primitive_GeneralPrimitive)(nil), (*Primitive_ContractAddress)(nil), (*Primitive_EventSig)(nil), (*Primitive_EventByWord)(nil), (*Primitive_EventByTopic)(nil), } - file_evm_proto_msgTypes[40].OneofWrappers = []any{} + file_evm_proto_msgTypes[42].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_evm_proto_rawDesc), len(file_evm_proto_rawDesc)), NumEnums: 2, - NumMessages: 47, + NumMessages: 49, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/chains/evm/evm.proto b/pkg/chains/evm/evm.proto index df5371957c..370d4c88a4 100644 --- a/pkg/chains/evm/evm.proto +++ b/pkg/chains/evm/evm.proto @@ -24,6 +24,7 @@ service EVM{ rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); rpc CalculateTransactionFee(CalculateTransactionFeeRequest) returns (CalculateTransactionFeeReply); rpc GetForwarderForEOA(GetForwarderForEOARequest) returns (GetForwarderForEOAReply); + rpc GetLatestLPBlock(google.protobuf.Empty) returns (GetLatestLPBlockReply); } // represents simplified evm-style CallMsg @@ -105,6 +106,15 @@ message Header { bytes parent_hash = 4; // in [32]byte fix-sized array format } +// represents LogPoller's latest/finalized/safe blocks view +message LPBlock { + bytes hash = 1; + int64 latest_block_number = 2; + uint64 block_timestamp = 3; // unix timestamp + int64 finalized_block_number = 4; + int64 safe_block_number = 5; +} + message Expression { oneof evaluator { Primitive primitive = 1; @@ -288,6 +298,10 @@ message QueryTrackedLogsReply { repeated Log logs = 1; } +message GetLatestLPBlockReply { + LPBlock lp_block = 1; +} + enum TxStatus { TX_FATAL = 0; TX_REVERTED = 1; @@ -356,4 +370,4 @@ message GetForwarderForEOAReply { message GetFiltersNamesReply { repeated string items = 1; -} \ No newline at end of file +} diff --git a/pkg/chains/evm/evm_grpc.pb.go b/pkg/chains/evm/evm_grpc.pb.go index c07d38f923..d97ee57012 100644 --- a/pkg/chains/evm/evm_grpc.pb.go +++ b/pkg/chains/evm/evm_grpc.pb.go @@ -36,6 +36,7 @@ const ( EVM_SubmitTransaction_FullMethodName = "/loop.evm.EVM/SubmitTransaction" EVM_CalculateTransactionFee_FullMethodName = "/loop.evm.EVM/CalculateTransactionFee" EVM_GetForwarderForEOA_FullMethodName = "/loop.evm.EVM/GetForwarderForEOA" + EVM_GetLatestLPBlock_FullMethodName = "/loop.evm.EVM/GetLatestLPBlock" ) // EVMClient is the client API for EVM service. @@ -58,6 +59,7 @@ type EVMClient interface { SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionReply, error) CalculateTransactionFee(ctx context.Context, in *CalculateTransactionFeeRequest, opts ...grpc.CallOption) (*CalculateTransactionFeeReply, error) GetForwarderForEOA(ctx context.Context, in *GetForwarderForEOARequest, opts ...grpc.CallOption) (*GetForwarderForEOAReply, error) + GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLatestLPBlockReply, error) } type eVMClient struct { @@ -228,6 +230,16 @@ func (c *eVMClient) GetForwarderForEOA(ctx context.Context, in *GetForwarderForE return out, nil } +func (c *eVMClient) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLatestLPBlockReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLatestLPBlockReply) + err := c.cc.Invoke(ctx, EVM_GetLatestLPBlock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // EVMServer is the server API for EVM service. // All implementations must embed UnimplementedEVMServer // for forward compatibility. @@ -248,6 +260,7 @@ type EVMServer interface { SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionReply, error) CalculateTransactionFee(context.Context, *CalculateTransactionFeeRequest) (*CalculateTransactionFeeReply, error) GetForwarderForEOA(context.Context, *GetForwarderForEOARequest) (*GetForwarderForEOAReply, error) + GetLatestLPBlock(context.Context, *emptypb.Empty) (*GetLatestLPBlockReply, error) mustEmbedUnimplementedEVMServer() } @@ -306,6 +319,9 @@ func (UnimplementedEVMServer) CalculateTransactionFee(context.Context, *Calculat func (UnimplementedEVMServer) GetForwarderForEOA(context.Context, *GetForwarderForEOARequest) (*GetForwarderForEOAReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetForwarderForEOA not implemented") } +func (UnimplementedEVMServer) GetLatestLPBlock(context.Context, *emptypb.Empty) (*GetLatestLPBlockReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestLPBlock not implemented") +} func (UnimplementedEVMServer) mustEmbedUnimplementedEVMServer() {} func (UnimplementedEVMServer) testEmbeddedByValue() {} @@ -615,6 +631,24 @@ func _EVM_GetForwarderForEOA_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _EVM_GetLatestLPBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EVMServer).GetLatestLPBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EVM_GetLatestLPBlock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EVMServer).GetLatestLPBlock(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + // EVM_ServiceDesc is the grpc.ServiceDesc for EVM service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -686,6 +720,10 @@ var EVM_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetForwarderForEOA", Handler: _EVM_GetForwarderForEOA_Handler, }, + { + MethodName: "GetLatestLPBlock", + Handler: _EVM_GetLatestLPBlock_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "evm.proto", diff --git a/pkg/loop/internal/relayer/evm.go b/pkg/loop/internal/relayer/evm.go index 680a5ab156..1d81027d9c 100644 --- a/pkg/loop/internal/relayer/evm.go +++ b/pkg/loop/internal/relayer/evm.go @@ -55,9 +55,14 @@ func (e *EVMClient) SubmitTransaction(ctx context.Context, txRequest evmtypes.Su return nil, net.WrapRPCErr(err) } + h, err := evmpb.ConvertHashFromProto(reply.TxHash) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return &evmtypes.TransactionResult{ TxStatus: evmpb.ConvertTxStatusFromProto(reply.TxStatus), - TxHash: evmtypes.Hash(reply.TxHash), + TxHash: h, TxIdempotencyKey: reply.TxIdempotencyKey, }, nil } @@ -279,6 +284,25 @@ func (e *EVMClient) GetForwarderForEOA(ctx context.Context, eoa, ocr2AggregatorI return evmtypes.Address(reply.GetAddr()), nil } +func (e *EVMClient) GetLatestLPBlock(ctx context.Context) (*evmtypes.LPBlock, error) { + reply, err := e.grpcClient.GetLatestLPBlock(ctx, &emptypb.Empty{}) + if err != nil { + return nil, net.WrapRPCErr(err) + } + h, err := evmpb.ConvertHashFromProto(reply.GetLpBlock().GetHash()) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return &evmtypes.LPBlock{ + BlockTimestamp: reply.GetLpBlock().GetBlockTimestamp(), + LatestBlockNumber: reply.GetLpBlock().GetLatestBlockNumber(), + FinalizedBlockNumber: reply.GetLpBlock().GetFinalizedBlockNumber(), + SafeBlockNumber: reply.GetLpBlock().GetSafeBlockNumber(), + BlockHash: h, + }, nil +} + type evmServer struct { evmpb.UnimplementedEVMServer @@ -397,8 +421,12 @@ func (e *evmServer) EstimateGas(ctx context.Context, request *evmpb.EstimateGasR } func (e *evmServer) GetTransactionByHash(ctx context.Context, request *evmpb.GetTransactionByHashRequest) (*evmpb.GetTransactionByHashReply, error) { + h, err := evmpb.ConvertHashFromProto(request.GetHash()) + if err != nil { + return nil, err + } tx, err := e.impl.GetTransactionByHash(ctx, evmtypes.GetTransactionByHashRequest{ - Hash: evmtypes.Hash(request.GetHash()), + Hash: h, IsExternal: request.IsExternal, }) if err != nil { @@ -414,8 +442,12 @@ func (e *evmServer) GetTransactionByHash(ctx context.Context, request *evmpb.Get } func (e *evmServer) GetTransactionReceipt(ctx context.Context, request *evmpb.GetTransactionReceiptRequest) (*evmpb.GetTransactionReceiptReply, error) { + h, err := evmpb.ConvertHashFromProto(request.GetHash()) + if err != nil { + return nil, err + } receipt, err := e.impl.GetTransactionReceipt(ctx, evmtypes.GeTransactionReceiptRequest{ - Hash: evmtypes.Hash(request.GetHash()), + Hash: h, IsExternal: request.IsExternal, }) if err != nil { @@ -521,6 +553,23 @@ func (e *evmServer) SubmitTransaction(ctx context.Context, request *evmpb.Submit }, nil } +func (e *evmServer) GetLatestLPBlock(ctx context.Context, _ *emptypb.Empty) (*evmpb.GetLatestLPBlockReply, error) { + b, err := e.impl.GetLatestLPBlock(ctx) + if err != nil { + return nil, err + } + + return &evmpb.GetLatestLPBlockReply{ + LpBlock: &evmpb.LPBlock{ + Hash: b.BlockHash[:], + LatestBlockNumber: b.LatestBlockNumber, + FinalizedBlockNumber: b.FinalizedBlockNumber, + SafeBlockNumber: b.SafeBlockNumber, + BlockTimestamp: b.BlockTimestamp, + }, + }, nil +} + func (e *evmServer) CalculateTransactionFee(ctx context.Context, request *evmpb.CalculateTransactionFeeRequest) (*evmpb.CalculateTransactionFeeReply, error) { txFee, err := e.impl.CalculateTransactionFee(ctx, evmtypes.ReceiptGasInfo{ GasUsed: request.GasInfo.GasUsed, diff --git a/pkg/loop/internal/relayerset/evm.go b/pkg/loop/internal/relayerset/evm.go index 03608d60cd..d6f4ae48e4 100644 --- a/pkg/loop/internal/relayerset/evm.go +++ b/pkg/loop/internal/relayerset/evm.go @@ -91,6 +91,10 @@ func (e evmClient) GetForwarderForEOA(ctx context.Context, in *evmpb.GetForwarde return e.client.GetForwarderForEOA(appendRelayID(ctx, e.relayID), in, opts...) } +func (e evmClient) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*evmpb.GetLatestLPBlockReply, error) { + return e.client.GetLatestLPBlock(appendRelayID(ctx, e.relayID), in, opts...) +} + func (s *Server) GetTransactionFee(ctx context.Context, request *evmpb.GetTransactionFeeRequest) (*evmpb.GetTransactionFeeReply, error) { evmService, err := s.getEVMService(ctx) if err != nil { @@ -456,6 +460,28 @@ func (s *Server) CalculateTransactionFee(ctx context.Context, request *evmpb.Cal }, nil } +func (s *Server) GetLatestLPBlock(ctx context.Context, in *emptypb.Empty) (*evmpb.GetLatestLPBlockReply, error) { + evmService, err := s.getEVMService(ctx) + if err != nil { + return nil, err + } + + b, err := evmService.GetLatestLPBlock(ctx) + if err != nil { + return nil, err + } + + return &evmpb.GetLatestLPBlockReply{ + LpBlock: &evmpb.LPBlock{ + Hash: b.BlockHash[:], + LatestBlockNumber: b.LatestBlockNumber, + FinalizedBlockNumber: b.FinalizedBlockNumber, + SafeBlockNumber: b.SafeBlockNumber, + BlockTimestamp: b.BlockTimestamp, + }, + }, nil +} + func (s *Server) GetForwarderForEOA(ctx context.Context, request *evmpb.GetForwarderForEOARequest) (*evmpb.GetForwarderForEOAReply, error) { evmService, err := s.getEVMService(ctx) if err != nil { diff --git a/pkg/types/chains/evm/evm.go b/pkg/types/chains/evm/evm.go index bd1429d69d..b1d31dc2d3 100644 --- a/pkg/types/chains/evm/evm.go +++ b/pkg/types/chains/evm/evm.go @@ -69,6 +69,16 @@ type LPFilterQuery struct { LogsPerBlock uint64 // rate limit ( maximum # of logs per block, 0 = unlimited ) } +// matches LP Block +// ths block shows the Latest,Finalized,Safe blocks from LogPoller's perspective +type LPBlock struct { + BlockHash Hash + LatestBlockNumber int64 + BlockTimestamp uint64 + FinalizedBlockNumber int64 + SafeBlockNumber int64 +} + // matches simplifie evm-style callMsg for reads/EstimateGas type CallMsg struct { To Address diff --git a/pkg/types/mocks/evm_service.go b/pkg/types/mocks/evm_service.go index 27606e3c89..aaca9d1984 100644 --- a/pkg/types/mocks/evm_service.go +++ b/pkg/types/mocks/evm_service.go @@ -440,6 +440,64 @@ func (_c *EVMService_GetForwarderForEOA_Call) RunAndReturn(run func(context.Cont return _c } +// GetLatestLPBlock provides a mock function with given fields: ctx +func (_m *EVMService) GetLatestLPBlock(ctx context.Context) (*evm.LPBlock, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetLatestLPBlock") + } + + var r0 *evm.LPBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*evm.LPBlock, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) *evm.LPBlock); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*evm.LPBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EVMService_GetLatestLPBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestLPBlock' +type EVMService_GetLatestLPBlock_Call struct { + *mock.Call +} + +// GetLatestLPBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *EVMService_Expecter) GetLatestLPBlock(ctx interface{}) *EVMService_GetLatestLPBlock_Call { + return &EVMService_GetLatestLPBlock_Call{Call: _e.mock.On("GetLatestLPBlock", ctx)} +} + +func (_c *EVMService_GetLatestLPBlock_Call) Run(run func(ctx context.Context)) *EVMService_GetLatestLPBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EVMService_GetLatestLPBlock_Call) Return(_a0 *evm.LPBlock, _a1 error) *EVMService_GetLatestLPBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EVMService_GetLatestLPBlock_Call) RunAndReturn(run func(context.Context) (*evm.LPBlock, error)) *EVMService_GetLatestLPBlock_Call { + _c.Call.Return(run) + return _c +} + // GetTransactionByHash provides a mock function with given fields: ctx, request func (_m *EVMService) GetTransactionByHash(ctx context.Context, request evm.GetTransactionByHashRequest) (*evm.Transaction, error) { ret := _m.Called(ctx, request) diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index f6112b948a..90fbbaaddb 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -190,6 +190,9 @@ type EVMService interface { QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort, confidenceLevel primitives.ConfidenceLevel) ([]*evm.Log, error) + // GetLatestLPBlock retrieves current LatestBlock from cache perspective + GetLatestLPBlock(ctx context.Context) (*evm.LPBlock, error) + // GetFiltersNames returns all registered filters' names for later pruning // TODO PLEX-1465: once code is moved away, remove this GetFiltersNames method GetFiltersNames(ctx context.Context) ([]string, error)