diff --git a/chain/peggy/types/abi_json.go b/chain/peggy/types/abi_json.go index ffd08ac1..666cb286 100644 --- a/chain/peggy/types/abi_json.go +++ b/chain/peggy/types/abi_json.go @@ -26,7 +26,8 @@ const ( { "internalType": "address[]", "name": "_destinations", "type": "address[]" }, { "internalType": "uint256[]", "name": "_fees", "type": "uint256[]" }, { "internalType": "uint256", "name": "_batchNonce", "type": "uint256" }, - { "internalType": "address", "name": "_tokenContract", "type": "address" } + { "internalType": "address", "name": "_tokenContract", "type": "address" }, + { "internalType": "uint256", "name": "_batchTimeout", "type": "uint256" } ], "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } @@ -39,9 +40,9 @@ const ( "stateMutability": "pure", "type": "function", "inputs": [ - { "internalType": "bytes32", "name": "_peggyId", "type": "bytes32" }, - { "internalType": "bytes32", "name": "_checkpoint", "type": "bytes32" }, - { "internalType": "uint256", "name": "_valsetNonce", "type": "uint256" }, + { "internalType": "bytes32", "name": "_peggyId", "type": "bytes32" }, + { "internalType": "bytes32", "name": "_checkpoint", "type": "bytes32" }, + { "internalType": "uint256", "name": "_valsetNonce", "type": "uint256" }, { "internalType": "address[]", "name": "_validators", "type": "address[]" }, { "internalType": "uint256[]", "name": "_powers", "type": "uint256[]" } ], @@ -49,4 +50,25 @@ const ( { "internalType": "bytes32", "name": "", "type": "bytes32" } ] }]` + + // OutgoingLogicCallABIJSON checks the ETH ABI for compatability of the logic call message + OutgoingLogicCallABIJSON = `[{ + "name": "checkpoint", + "outputs": [], + "stateMutability": "pure", + "type": "function", + "inputs": [ + { "internalType": "bytes32", "name": "_peggyId", "type": "bytes32" }, + { "internalType": "bytes32", "name": "_methodName", "type": "bytes32" }, + { "internalType": "uint256[]", "name": "_transferAmounts", "type": "uint256[]" }, + { "internalType": "address[]", "name": "_transferTokenContracts", "type": "address[]" }, + { "internalType": "uint256[]", "name": "_feeAmounts", "type": "uint256[]" }, + { "internalType": "address[]", "name": "_feeTokenContracts", "type": "address[]" }, + { "internalType": "address", "name": "_logicContractAddress", "type": "address" }, + { "internalType": "bytes", "name": "_payload", "type": "bytes" }, + { "internalType": "uint256", "name": "_timeout", "type": "uint256" }, + { "internalType": "bytes32", "name": "_invalidationId", "type": "bytes32" }, + { "internalType": "uint256", "name": "_invalidationNonce", "type": "uint256" } + ] + }]` ) diff --git a/chain/peggy/types/attestation.pb.go b/chain/peggy/types/attestation.pb.go index 8b57960d..8a95e018 100644 --- a/chain/peggy/types/attestation.pb.go +++ b/chain/peggy/types/attestation.pb.go @@ -1,10 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/attestation.proto +// source: injective/peggy/v1/attestation.proto package types import ( fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -29,21 +30,27 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ClaimType int32 const ( - CLAIM_TYPE_UNKNOWN ClaimType = 0 - CLAIM_TYPE_DEPOSIT ClaimType = 1 - CLAIM_TYPE_WITHDRAW ClaimType = 2 + CLAIM_TYPE_UNKNOWN ClaimType = 0 + CLAIM_TYPE_DEPOSIT ClaimType = 1 + CLAIM_TYPE_WITHDRAW ClaimType = 2 + CLAIM_TYPE_ERC20_DEPLOYED ClaimType = 3 + CLAIM_TYPE_LOGIC_CALL_EXECUTED ClaimType = 4 ) var ClaimType_name = map[int32]string{ 0: "CLAIM_TYPE_UNKNOWN", 1: "CLAIM_TYPE_DEPOSIT", 2: "CLAIM_TYPE_WITHDRAW", + 3: "CLAIM_TYPE_ERC20_DEPLOYED", + 4: "CLAIM_TYPE_LOGIC_CALL_EXECUTED", } var ClaimType_value = map[string]int32{ - "CLAIM_TYPE_UNKNOWN": 0, - "CLAIM_TYPE_DEPOSIT": 1, - "CLAIM_TYPE_WITHDRAW": 2, + "CLAIM_TYPE_UNKNOWN": 0, + "CLAIM_TYPE_DEPOSIT": 1, + "CLAIM_TYPE_WITHDRAW": 2, + "CLAIM_TYPE_ERC20_DEPLOYED": 3, + "CLAIM_TYPE_LOGIC_CALL_EXECUTED": 4, } func (x ClaimType) String() string { @@ -51,7 +58,7 @@ func (x ClaimType) String() string { } func (ClaimType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_103514c8073046b6, []int{0} + return fileDescriptor_3022043570947e1e, []int{0} } // Attestation is an aggregate of `claims` that eventually becomes `observed` by @@ -70,16 +77,17 @@ func (ClaimType) EnumDescriptor() ([]byte, []int) { // but there is no reason to store those exact details becuause the next message sender // will kindly provide you with them. type Attestation struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - Observed bool `protobuf:"varint,2,opt,name=observed,proto3" json:"observed,omitempty"` - Votes []string `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` + Observed bool `protobuf:"varint,1,opt,name=observed,proto3" json:"observed,omitempty"` + Votes []string `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Claim *types.Any `protobuf:"bytes,4,opt,name=claim,proto3" json:"claim,omitempty"` } func (m *Attestation) Reset() { *m = Attestation{} } func (m *Attestation) String() string { return proto.CompactTextString(m) } func (*Attestation) ProtoMessage() {} func (*Attestation) Descriptor() ([]byte, []int) { - return fileDescriptor_103514c8073046b6, []int{0} + return fileDescriptor_3022043570947e1e, []int{0} } func (m *Attestation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,13 +116,6 @@ func (m *Attestation) XXX_DiscardUnknown() { var xxx_messageInfo_Attestation proto.InternalMessageInfo -func (m *Attestation) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - func (m *Attestation) GetObserved() bool { if m != nil { return m.Observed @@ -129,20 +130,34 @@ func (m *Attestation) GetVotes() []string { return nil } +func (m *Attestation) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Attestation) GetClaim() *types.Any { + if m != nil { + return m.Claim + } + return nil +} + // ERC20Token unique identifier for an Ethereum ERC20 token. // CONTRACT: // The contract address on ETH of the token (note: developers should look up // the token symbol using the address on ETH to display for UI) type ERC20Token struct { - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` - Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` + Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` } func (m *ERC20Token) Reset() { *m = ERC20Token{} } func (m *ERC20Token) String() string { return proto.CompactTextString(m) } func (*ERC20Token) ProtoMessage() {} func (*ERC20Token) Descriptor() ([]byte, []int) { - return fileDescriptor_103514c8073046b6, []int{1} + return fileDescriptor_3022043570947e1e, []int{1} } func (m *ERC20Token) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -179,43 +194,48 @@ func (m *ERC20Token) GetContract() string { } func init() { - proto.RegisterEnum("injective.peggy.v1beta1.ClaimType", ClaimType_name, ClaimType_value) - proto.RegisterType((*Attestation)(nil), "injective.peggy.v1beta1.Attestation") - proto.RegisterType((*ERC20Token)(nil), "injective.peggy.v1beta1.ERC20Token") + proto.RegisterEnum("injective.peggy.v1.ClaimType", ClaimType_name, ClaimType_value) + proto.RegisterType((*Attestation)(nil), "injective.peggy.v1.Attestation") + proto.RegisterType((*ERC20Token)(nil), "injective.peggy.v1.ERC20Token") } func init() { - proto.RegisterFile("injective/peggy/v1beta1/attestation.proto", fileDescriptor_103514c8073046b6) -} - -var fileDescriptor_103514c8073046b6 = []byte{ - // 409 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x4e, 0xdb, 0x40, - 0x10, 0x86, 0xbd, 0x40, 0x11, 0x5e, 0x2e, 0xd1, 0x16, 0x95, 0xc8, 0x07, 0xc7, 0xe2, 0x50, 0xa5, - 0x95, 0xf0, 0x42, 0xfb, 0x04, 0x21, 0xa4, 0xaa, 0x05, 0x35, 0xc8, 0x75, 0x15, 0xb5, 0x97, 0x74, - 0xed, 0x8c, 0x8c, 0x0b, 0xde, 0xb1, 0xbc, 0x1b, 0x4b, 0x79, 0x83, 0x8a, 0x53, 0x5f, 0x80, 0x13, - 0x2f, 0xc3, 0x91, 0x63, 0xd5, 0x03, 0xaa, 0x92, 0x17, 0xa9, 0x62, 0x5c, 0x37, 0x2a, 0x39, 0xed, - 0xfe, 0xf3, 0x7f, 0x3b, 0x1a, 0xcd, 0xbf, 0xf4, 0x55, 0x2a, 0xbf, 0x41, 0xac, 0xd3, 0x12, 0x78, - 0x0e, 0x49, 0x32, 0xe5, 0xe5, 0x61, 0x04, 0x5a, 0x1c, 0x72, 0xa1, 0x35, 0x28, 0x2d, 0x74, 0x8a, - 0xd2, 0xcd, 0x0b, 0xd4, 0xc8, 0x76, 0x1b, 0xd4, 0xad, 0x50, 0xb7, 0x46, 0xad, 0x9d, 0x04, 0x13, - 0xac, 0x18, 0xbe, 0xb8, 0x3d, 0xe2, 0x7b, 0x5f, 0xe9, 0x76, 0xef, 0x5f, 0x0f, 0xd6, 0xa1, 0xdb, - 0x50, 0x82, 0xd4, 0x23, 0x89, 0x32, 0x86, 0x36, 0x71, 0x48, 0x77, 0x23, 0xa0, 0x55, 0xc9, 0x5f, - 0x54, 0x98, 0x45, 0xb7, 0x30, 0x52, 0x50, 0x94, 0x30, 0x6e, 0xaf, 0x39, 0xa4, 0xbb, 0x15, 0x34, - 0x9a, 0xed, 0xd0, 0x67, 0x25, 0x6a, 0x50, 0xed, 0x75, 0x67, 0xbd, 0x6b, 0x06, 0x8f, 0x62, 0x2f, - 0xa7, 0x74, 0x10, 0xf4, 0xdf, 0x1c, 0x84, 0x78, 0x09, 0x92, 0xbd, 0xa3, 0x9b, 0x22, 0xc3, 0x89, - 0xd4, 0x55, 0x6f, 0xf3, 0xc8, 0xbd, 0x7b, 0xe8, 0x18, 0xbf, 0x1e, 0x3a, 0x2f, 0x93, 0x54, 0x5f, - 0x4c, 0x22, 0x37, 0xc6, 0x8c, 0xc7, 0xa8, 0x32, 0x54, 0xf5, 0xb1, 0xaf, 0xc6, 0x97, 0x5c, 0x4f, - 0x73, 0x50, 0xae, 0x27, 0x75, 0x50, 0xbf, 0x5e, 0xcc, 0x11, 0xa3, 0xd4, 0x85, 0x88, 0x75, 0x35, - 0x87, 0x19, 0x34, 0xfa, 0xf5, 0x2d, 0xa1, 0x66, 0xff, 0x4a, 0xa4, 0x59, 0x38, 0xcd, 0x81, 0xb9, - 0x94, 0xf5, 0x4f, 0x7b, 0xde, 0x87, 0x51, 0xf8, 0xf9, 0x7c, 0x30, 0xfa, 0xe4, 0x9f, 0xf8, 0x67, - 0x43, 0xbf, 0x65, 0x58, 0x2f, 0xae, 0x6f, 0x9c, 0x15, 0xce, 0x7f, 0xfc, 0xf1, 0xe0, 0xfc, 0xec, - 0xa3, 0x17, 0xb6, 0xc8, 0x13, 0xbe, 0x76, 0xd8, 0x01, 0x7d, 0xbe, 0x54, 0x1d, 0x7a, 0xe1, 0xfb, - 0xe3, 0xa0, 0x37, 0x6c, 0xad, 0x59, 0xbb, 0xd7, 0x37, 0xce, 0x2a, 0xcb, 0xda, 0xf8, 0x7e, 0x6b, - 0x1b, 0x47, 0x70, 0x37, 0xb3, 0xc9, 0xfd, 0xcc, 0x26, 0xbf, 0x67, 0x36, 0xf9, 0x31, 0xb7, 0x8d, - 0xfb, 0xb9, 0x6d, 0xfc, 0x9c, 0xdb, 0xc6, 0x97, 0x93, 0xa5, 0x5d, 0x78, 0x7f, 0xd3, 0x3c, 0x15, - 0x91, 0xe2, 0x4d, 0xb6, 0xfb, 0x31, 0x16, 0xb0, 0x2c, 0x2f, 0x44, 0x2a, 0x79, 0x86, 0xe3, 0xc9, - 0x15, 0xa8, 0xfa, 0x8f, 0x54, 0x4b, 0x8b, 0x36, 0xab, 0x9c, 0xdf, 0xfe, 0x09, 0x00, 0x00, 0xff, - 0xff, 0x19, 0x8a, 0x07, 0x59, 0x43, 0x02, 0x00, 0x00, + proto.RegisterFile("injective/peggy/v1/attestation.proto", fileDescriptor_3022043570947e1e) +} + +var fileDescriptor_3022043570947e1e = []byte{ + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x31, 0x6f, 0x9b, 0x40, + 0x1c, 0xc5, 0xc1, 0x76, 0xac, 0xf8, 0xb2, 0x58, 0x57, 0x2b, 0x25, 0x48, 0x25, 0xc8, 0xaa, 0x2a, + 0x2b, 0x52, 0xee, 0x92, 0x74, 0xed, 0x42, 0x30, 0x69, 0x51, 0xa8, 0x1d, 0x51, 0x22, 0x37, 0x5d, + 0x2c, 0xc0, 0x57, 0x4c, 0x63, 0x38, 0x64, 0xce, 0x48, 0xcc, 0x5d, 0x2a, 0x4f, 0xfd, 0x02, 0x9e, + 0x3a, 0xf5, 0x9b, 0x64, 0xcc, 0x58, 0x75, 0x88, 0x2a, 0xfb, 0x8b, 0x54, 0x06, 0xe2, 0xa2, 0x36, + 0x55, 0x26, 0x78, 0xf7, 0x7e, 0xfc, 0x79, 0xfa, 0xdf, 0x03, 0xcf, 0xfd, 0xf0, 0x13, 0x71, 0x99, + 0x9f, 0x10, 0x1c, 0x11, 0xcf, 0x4b, 0x71, 0x72, 0x8c, 0x6d, 0xc6, 0x48, 0xcc, 0x6c, 0xe6, 0xd3, + 0x10, 0x45, 0x53, 0xca, 0x28, 0x84, 0x1b, 0x0a, 0x65, 0x14, 0x4a, 0x8e, 0xc5, 0x96, 0x47, 0x3d, + 0x9a, 0xd9, 0x78, 0xfd, 0x96, 0x93, 0xe2, 0x9e, 0x47, 0xa9, 0x37, 0x21, 0x38, 0x53, 0xce, 0xec, + 0x23, 0xb6, 0xc3, 0x34, 0xb7, 0xda, 0x9f, 0x79, 0xb0, 0xa3, 0xfc, 0x19, 0x0d, 0x45, 0xb0, 0x4d, + 0x9d, 0x98, 0x4c, 0x13, 0x32, 0x12, 0x78, 0x99, 0xef, 0x6c, 0x9b, 0x1b, 0x0d, 0x5b, 0x60, 0x2b, + 0xa1, 0x8c, 0xc4, 0x42, 0x45, 0xae, 0x76, 0x1a, 0x66, 0x2e, 0xe0, 0x2e, 0xa8, 0x8f, 0x89, 0xef, + 0x8d, 0x99, 0x50, 0x95, 0xf9, 0x4e, 0xcd, 0x2c, 0x14, 0x3c, 0x00, 0x5b, 0xee, 0xc4, 0xf6, 0x03, + 0xa1, 0x26, 0xf3, 0x9d, 0x9d, 0x93, 0x16, 0xca, 0x43, 0xa0, 0xfb, 0x10, 0x48, 0x09, 0x53, 0x33, + 0x47, 0xda, 0x11, 0x00, 0x9a, 0xa9, 0x9e, 0x1c, 0x59, 0xf4, 0x9a, 0x64, 0x19, 0x5c, 0x1a, 0xb2, + 0xa9, 0xed, 0xb2, 0x2c, 0x43, 0xc3, 0xdc, 0x68, 0x78, 0x06, 0xea, 0x76, 0x40, 0x67, 0x21, 0x13, + 0x2a, 0x6b, 0xe7, 0x14, 0xdd, 0xdc, 0xed, 0x73, 0x3f, 0xef, 0xf6, 0x5f, 0x78, 0x3e, 0x1b, 0xcf, + 0x1c, 0xe4, 0xd2, 0x00, 0xbb, 0x34, 0x0e, 0x68, 0x5c, 0x3c, 0x0e, 0xe3, 0xd1, 0x35, 0x66, 0x69, + 0x44, 0x62, 0xa4, 0x87, 0xcc, 0x2c, 0xbe, 0x3e, 0xf8, 0x5e, 0x01, 0x0d, 0x75, 0xfd, 0x6f, 0x2b, + 0x8d, 0x08, 0x44, 0x00, 0xaa, 0x86, 0xa2, 0xbf, 0x1d, 0x5a, 0x57, 0x17, 0xda, 0xf0, 0xb2, 0x77, + 0xde, 0xeb, 0x0f, 0x7a, 0x4d, 0x4e, 0xdc, 0x9d, 0x2f, 0xe4, 0x07, 0x9c, 0xbf, 0xf8, 0xae, 0x76, + 0xd1, 0x7f, 0xa7, 0x5b, 0x4d, 0xfe, 0x1f, 0xbe, 0x70, 0xe0, 0x11, 0x78, 0x52, 0x3a, 0x1d, 0xe8, + 0xd6, 0x9b, 0xae, 0xa9, 0x0c, 0x9a, 0x15, 0xf1, 0xe9, 0x7c, 0x21, 0x3f, 0x64, 0xc1, 0x57, 0x60, + 0xaf, 0x74, 0x9c, 0x2d, 0x67, 0x3d, 0xcd, 0xe8, 0x5f, 0x69, 0xdd, 0x66, 0x55, 0x7c, 0x36, 0x5f, + 0xc8, 0xff, 0x07, 0xe0, 0x19, 0x90, 0x4a, 0xa6, 0xd1, 0x7f, 0xad, 0xab, 0x43, 0x55, 0x31, 0x8c, + 0xa1, 0xf6, 0x5e, 0x53, 0x2f, 0x2d, 0xad, 0xdb, 0xac, 0x89, 0xed, 0xf9, 0x42, 0x7e, 0x84, 0x12, + 0x6b, 0x5f, 0xbe, 0x49, 0xdc, 0x29, 0xb9, 0x59, 0x4a, 0xfc, 0xed, 0x52, 0xe2, 0x7f, 0x2d, 0x25, + 0xfe, 0xeb, 0x4a, 0xe2, 0x6e, 0x57, 0x12, 0xf7, 0x63, 0x25, 0x71, 0x1f, 0xce, 0x4b, 0x5b, 0xd7, + 0xef, 0xdb, 0x68, 0xd8, 0x4e, 0x8c, 0x37, 0xdd, 0x3c, 0x74, 0xe9, 0x94, 0x94, 0xe5, 0xd8, 0xf6, + 0x43, 0x1c, 0xd0, 0xd1, 0x6c, 0x42, 0xe2, 0xa2, 0xde, 0xd9, 0xf5, 0x38, 0xf5, 0xac, 0x19, 0x2f, + 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x72, 0xb9, 0xcc, 0xd4, 0xfe, 0x02, 0x00, 0x00, } func (m *Attestation) Marshal() (dAtA []byte, err error) { @@ -238,13 +258,30 @@ func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttestation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Height != 0 { + i = encodeVarintAttestation(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } if len(m.Votes) > 0 { for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Votes[iNdEx]) copy(dAtA[i:], m.Votes[iNdEx]) i = encodeVarintAttestation(dAtA, i, uint64(len(m.Votes[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } if m.Observed { @@ -255,11 +292,6 @@ func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x10 - } - if m.EventNonce != 0 { - i = encodeVarintAttestation(dAtA, i, uint64(m.EventNonce)) - i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil @@ -285,13 +317,6 @@ func (m *ERC20Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Contract) > 0 { - i -= len(m.Contract) - copy(dAtA[i:], m.Contract) - i = encodeVarintAttestation(dAtA, i, uint64(len(m.Contract))) - i-- - dAtA[i] = 0x12 - } { size := m.Amount.Size() i -= size @@ -301,7 +326,14 @@ func (m *ERC20Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintAttestation(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintAttestation(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -322,9 +354,6 @@ func (m *Attestation) Size() (n int) { } var l int _ = l - if m.EventNonce != 0 { - n += 1 + sovAttestation(uint64(m.EventNonce)) - } if m.Observed { n += 2 } @@ -334,6 +363,13 @@ func (m *Attestation) Size() (n int) { n += 1 + l + sovAttestation(uint64(l)) } } + if m.Height != 0 { + n += 1 + sovAttestation(uint64(m.Height)) + } + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovAttestation(uint64(l)) + } return n } @@ -343,12 +379,12 @@ func (m *ERC20Token) Size() (n int) { } var l int _ = l - l = m.Amount.Size() - n += 1 + l + sovAttestation(uint64(l)) l = len(m.Contract) if l > 0 { n += 1 + l + sovAttestation(uint64(l)) } + l = m.Amount.Size() + n += 1 + l + sovAttestation(uint64(l)) return n } @@ -389,9 +425,9 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Observed", wireType) } - m.EventNonce = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAttestation @@ -401,16 +437,17 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.Observed = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Observed", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAttestation @@ -420,17 +457,48 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Observed = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttestation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttestation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttestation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAttestation @@ -440,23 +508,27 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAttestation } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAttestation } if postIndex > l { return io.ErrUnexpectedEOF } - m.Votes = append(m.Votes, string(dAtA[iNdEx:postIndex])) + if m.Claim == nil { + m.Claim = &types.Any{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -464,10 +536,7 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAttestation } if (iNdEx + skippy) > l { @@ -513,7 +582,7 @@ func (m *ERC20Token) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -541,13 +610,11 @@ func (m *ERC20Token) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Contract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -575,7 +642,9 @@ func (m *ERC20Token) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Contract = string(dAtA[iNdEx:postIndex]) + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -583,10 +652,7 @@ func (m *ERC20Token) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAttestation } if (iNdEx + skippy) > l { diff --git a/chain/peggy/types/batch.go b/chain/peggy/types/batch.go new file mode 100644 index 00000000..4ed40969 --- /dev/null +++ b/chain/peggy/types/batch.go @@ -0,0 +1,135 @@ +package types + +import ( + "math/big" + "strings" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/accounts/abi" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +// GetCheckpoint gets the checkpoint signature from the given outgoing tx batch +func (b OutgoingTxBatch) GetCheckpoint(peggyIDstring string) ([]byte, error) { + + abi, err := abi.JSON(strings.NewReader(OutgoingBatchTxCheckpointABIJSON)) + if err != nil { + return nil, sdkerrors.Wrap(err, "bad ABI definition in code") + } + + // the contract argument is not a arbitrary length array but a fixed length 32 byte + // array, therefore we have to utf8 encode the string (the default in this case) and + // then copy the variable length encoded data into a fixed length array. This function + // will panic if peggyId is too long to fit in 32 bytes + peggyID, err := strToFixByteArray(peggyIDstring) + if err != nil { + panic(err) + } + + // Create the methodName argument which salts the signature + methodNameBytes := []uint8("transactionBatch") + var batchMethodName [32]uint8 + copy(batchMethodName[:], methodNameBytes[:]) + + // Run through the elements of the batch and serialize them + txAmounts := make([]*big.Int, len(b.Transactions)) + txDestinations := make([]gethcommon.Address, len(b.Transactions)) + txFees := make([]*big.Int, len(b.Transactions)) + for i, tx := range b.Transactions { + txAmounts[i] = tx.Erc20Token.Amount.BigInt() + txDestinations[i] = gethcommon.HexToAddress(tx.DestAddress) + txFees[i] = tx.Erc20Fee.Amount.BigInt() + } + + // the methodName needs to be the same as the 'name' above in the checkpointAbiJson + // but other than that it's a constant that has no impact on the output. This is because + // it gets encoded as a function name which we must then discard. + abiEncodedBatch, err := abi.Pack("submitBatch", + peggyID, + batchMethodName, + txAmounts, + txDestinations, + txFees, + big.NewInt(int64(b.BatchNonce)), + gethcommon.HexToAddress(b.TokenContract), + big.NewInt(int64(b.BatchTimeout)), + ) + + // this should never happen outside of test since any case that could crash on encoding + // should be filtered above. + if err != nil { + return nil, sdkerrors.Wrap(err, "packing checkpoint") + } + + // we hash the resulting encoded bytes discarding the first 4 bytes these 4 bytes are the constant + // method name 'checkpoint'. If you where to replace the checkpoint constant in this code you would + // then need to adjust how many bytes you truncate off the front to get the output of abi.encode() + return crypto.Keccak256Hash(abiEncodedBatch[4:]).Bytes(), nil +} + +// GetCheckpoint gets the checkpoint signature from the given outgoing tx batch +func (c OutgoingLogicCall) GetCheckpoint(peggyIDstring string) ([]byte, error) { + + abi, err := abi.JSON(strings.NewReader(OutgoingLogicCallABIJSON)) + if err != nil { + return nil, sdkerrors.Wrap(err, "bad ABI definition in code") + } + + // Create the methodName argument which salts the signature + methodNameBytes := []uint8("logicCall") + var logicCallMethodName [32]uint8 + copy(logicCallMethodName[:], methodNameBytes[:]) + + // the contract argument is not a arbitrary length array but a fixed length 32 byte + // array, therefore we have to utf8 encode the string (the default in this case) and + // then copy the variable length encoded data into a fixed length array. This function + // will panic if peggyId is too long to fit in 32 bytes + peggyID, err := strToFixByteArray(peggyIDstring) + if err != nil { + panic(err) + } + + // Run through the elements of the logic call and serialize them + transferAmounts := make([]*big.Int, len(c.Transfers)) + transferTokenContracts := make([]gethcommon.Address, len(c.Transfers)) + feeAmounts := make([]*big.Int, len(c.Fees)) + feeTokenContracts := make([]gethcommon.Address, len(c.Fees)) + for i, tx := range c.Transfers { + transferAmounts[i] = tx.Amount.BigInt() + transferTokenContracts[i] = gethcommon.HexToAddress(tx.Contract) + } + for i, tx := range c.Fees { + feeAmounts[i] = tx.Amount.BigInt() + feeTokenContracts[i] = gethcommon.HexToAddress(tx.Contract) + } + payload := make([]byte, len(c.Payload)) + copy(payload, c.Payload) + var invalidationId [32]byte + copy(invalidationId[:], c.InvalidationId[:]) + + // the methodName needs to be the same as the 'name' above in the checkpointAbiJson + // but other than that it's a constant that has no impact on the output. This is because + // it gets encoded as a function name which we must then discard. + abiEncodedCall, err := abi.Pack("checkpoint", + peggyID, + logicCallMethodName, + transferAmounts, + transferTokenContracts, + feeAmounts, + feeTokenContracts, + gethcommon.HexToAddress(c.LogicContractAddress), + payload, + big.NewInt(int64(c.Timeout)), + invalidationId, + big.NewInt(int64(c.InvalidationNonce)), + ) + + // this should never happen outside of test since any case that could crash on encoding + // should be filtered above. + if err != nil { + return nil, sdkerrors.Wrap(err, "packing checkpoint") + } + + return crypto.Keccak256Hash(abiEncodedCall[4:]).Bytes(), nil +} diff --git a/chain/peggy/types/batch.pb.go b/chain/peggy/types/batch.pb.go index e84d5c3f..256ec0da 100644 --- a/chain/peggy/types/batch.pb.go +++ b/chain/peggy/types/batch.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/batch.proto +// source: injective/peggy/v1/batch.proto package types @@ -25,15 +25,17 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // OutgoingTxBatch represents a batch of transactions going from Peggy to ETH type OutgoingTxBatch struct { BatchNonce uint64 `protobuf:"varint,1,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` - Transactions []*OutgoingTransferTx `protobuf:"bytes,2,rep,name=transactions,proto3" json:"transactions,omitempty"` - TokenContract string `protobuf:"bytes,3,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` + BatchTimeout uint64 `protobuf:"varint,2,opt,name=batch_timeout,json=batchTimeout,proto3" json:"batch_timeout,omitempty"` + Transactions []*OutgoingTransferTx `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"` + TokenContract string `protobuf:"bytes,4,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` + Block uint64 `protobuf:"varint,5,opt,name=block,proto3" json:"block,omitempty"` } func (m *OutgoingTxBatch) Reset() { *m = OutgoingTxBatch{} } func (m *OutgoingTxBatch) String() string { return proto.CompactTextString(m) } func (*OutgoingTxBatch) ProtoMessage() {} func (*OutgoingTxBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_b522bd724798d44c, []int{0} + return fileDescriptor_48fd09581f1b5901, []int{0} } func (m *OutgoingTxBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -69,6 +71,13 @@ func (m *OutgoingTxBatch) GetBatchNonce() uint64 { return 0 } +func (m *OutgoingTxBatch) GetBatchTimeout() uint64 { + if m != nil { + return m.BatchTimeout + } + return 0 +} + func (m *OutgoingTxBatch) GetTransactions() []*OutgoingTransferTx { if m != nil { return m.Transactions @@ -83,6 +92,13 @@ func (m *OutgoingTxBatch) GetTokenContract() string { return "" } +func (m *OutgoingTxBatch) GetBlock() uint64 { + if m != nil { + return m.Block + } + return 0 +} + // OutgoingTransferTx represents an individual send from Peggy to ETH type OutgoingTransferTx struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -96,7 +112,7 @@ func (m *OutgoingTransferTx) Reset() { *m = OutgoingTransferTx{} } func (m *OutgoingTransferTx) String() string { return proto.CompactTextString(m) } func (*OutgoingTransferTx) ProtoMessage() {} func (*OutgoingTransferTx) Descriptor() ([]byte, []int) { - return fileDescriptor_b522bd724798d44c, []int{1} + return fileDescriptor_48fd09581f1b5901, []int{1} } func (m *OutgoingTransferTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,41 +176,142 @@ func (m *OutgoingTransferTx) GetErc20Fee() *ERC20Token { return nil } -func init() { - proto.RegisterType((*OutgoingTxBatch)(nil), "injective.peggy.v1beta1.OutgoingTxBatch") - proto.RegisterType((*OutgoingTransferTx)(nil), "injective.peggy.v1beta1.OutgoingTransferTx") +// OutgoingLogicCall represents an individual logic call from Peggy to ETH +type OutgoingLogicCall struct { + Transfers []*ERC20Token `protobuf:"bytes,1,rep,name=transfers,proto3" json:"transfers,omitempty"` + Fees []*ERC20Token `protobuf:"bytes,2,rep,name=fees,proto3" json:"fees,omitempty"` + LogicContractAddress string `protobuf:"bytes,3,opt,name=logic_contract_address,json=logicContractAddress,proto3" json:"logic_contract_address,omitempty"` + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` + Timeout uint64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` + InvalidationId []byte `protobuf:"bytes,6,opt,name=invalidation_id,json=invalidationId,proto3" json:"invalidation_id,omitempty"` + InvalidationNonce uint64 `protobuf:"varint,7,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` +} + +func (m *OutgoingLogicCall) Reset() { *m = OutgoingLogicCall{} } +func (m *OutgoingLogicCall) String() string { return proto.CompactTextString(m) } +func (*OutgoingLogicCall) ProtoMessage() {} +func (*OutgoingLogicCall) Descriptor() ([]byte, []int) { + return fileDescriptor_48fd09581f1b5901, []int{2} +} +func (m *OutgoingLogicCall) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OutgoingLogicCall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OutgoingLogicCall.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OutgoingLogicCall) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutgoingLogicCall.Merge(m, src) +} +func (m *OutgoingLogicCall) XXX_Size() int { + return m.Size() +} +func (m *OutgoingLogicCall) XXX_DiscardUnknown() { + xxx_messageInfo_OutgoingLogicCall.DiscardUnknown(m) +} + +var xxx_messageInfo_OutgoingLogicCall proto.InternalMessageInfo + +func (m *OutgoingLogicCall) GetTransfers() []*ERC20Token { + if m != nil { + return m.Transfers + } + return nil +} + +func (m *OutgoingLogicCall) GetFees() []*ERC20Token { + if m != nil { + return m.Fees + } + return nil +} + +func (m *OutgoingLogicCall) GetLogicContractAddress() string { + if m != nil { + return m.LogicContractAddress + } + return "" +} + +func (m *OutgoingLogicCall) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *OutgoingLogicCall) GetTimeout() uint64 { + if m != nil { + return m.Timeout + } + return 0 +} + +func (m *OutgoingLogicCall) GetInvalidationId() []byte { + if m != nil { + return m.InvalidationId + } + return nil +} + +func (m *OutgoingLogicCall) GetInvalidationNonce() uint64 { + if m != nil { + return m.InvalidationNonce + } + return 0 } func init() { - proto.RegisterFile("injective/peggy/v1beta1/batch.proto", fileDescriptor_b522bd724798d44c) -} - -var fileDescriptor_b522bd724798d44c = []byte{ - // 383 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0xaa, 0xd3, 0x40, - 0x14, 0x86, 0x3b, 0xb9, 0xd7, 0x8b, 0x77, 0x72, 0xbd, 0xc2, 0x2c, 0x34, 0xb8, 0x88, 0xb1, 0x45, - 0x88, 0x88, 0x49, 0x1b, 0x5f, 0x40, 0x5b, 0x15, 0x44, 0xb1, 0x10, 0xba, 0x72, 0x13, 0x26, 0x93, - 0xd3, 0x74, 0xd4, 0xce, 0x94, 0x99, 0xd3, 0xd2, 0xbe, 0x85, 0xcf, 0xe1, 0x93, 0xb8, 0xec, 0xd2, - 0xa5, 0xb4, 0x0b, 0x5f, 0x43, 0x32, 0x8d, 0x45, 0x91, 0xc2, 0xdd, 0xcd, 0xf9, 0xf9, 0xff, 0xef, - 0x3f, 0x03, 0x87, 0xf6, 0xa4, 0xfa, 0x04, 0x02, 0xe5, 0x0a, 0xd2, 0x05, 0xd4, 0xf5, 0x26, 0x5d, - 0x0d, 0x4a, 0x40, 0x3e, 0x48, 0x4b, 0x8e, 0x62, 0x96, 0x2c, 0x8c, 0x46, 0xcd, 0xee, 0x1f, 0x4d, - 0x89, 0x33, 0x25, 0xad, 0xe9, 0xc1, 0x93, 0x53, 0x69, 0x8e, 0x08, 0x16, 0x39, 0x4a, 0xad, 0x0e, - 0x8c, 0xee, 0x37, 0x42, 0xef, 0x8e, 0x97, 0x58, 0x6b, 0xa9, 0xea, 0xc9, 0x7a, 0xd8, 0xd0, 0xd9, - 0x43, 0xea, 0xbb, 0x9a, 0x42, 0x69, 0x25, 0x20, 0x20, 0x11, 0x89, 0xcf, 0x73, 0xea, 0xa4, 0x0f, - 0x8d, 0xc2, 0xc6, 0xf4, 0x0a, 0x0d, 0x57, 0x96, 0x8b, 0x86, 0x64, 0x03, 0x2f, 0x3a, 0x8b, 0xfd, - 0xec, 0x69, 0x72, 0x62, 0x9f, 0xe4, 0x58, 0xd0, 0x84, 0xa6, 0x60, 0x26, 0xeb, 0xfc, 0x1f, 0x00, - 0x7b, 0x4c, 0xaf, 0x51, 0x7f, 0x06, 0x55, 0x08, 0xad, 0xd0, 0x70, 0x81, 0xc1, 0x59, 0x44, 0xe2, - 0xcb, 0xfc, 0x8e, 0x53, 0x47, 0xad, 0xd8, 0xfd, 0x45, 0x28, 0xfb, 0x9f, 0xc5, 0xae, 0xa9, 0x27, - 0xab, 0x76, 0x4d, 0x4f, 0x56, 0xec, 0x1e, 0xbd, 0xb0, 0xa0, 0x2a, 0x30, 0x81, 0xe7, 0x28, 0xed, - 0xc4, 0x1e, 0xd1, 0xab, 0x0a, 0x2c, 0x16, 0xbc, 0xaa, 0x0c, 0x58, 0xdb, 0x76, 0xf8, 0x8d, 0xf6, - 0xf2, 0x20, 0xb1, 0x57, 0xd4, 0x07, 0x23, 0xb2, 0x7e, 0xe1, 0x8a, 0x83, 0xf3, 0x88, 0xc4, 0x7e, - 0xd6, 0x3b, 0xf9, 0xb1, 0xd7, 0xf9, 0x28, 0xeb, 0x4f, 0x1a, 0x6b, 0x4e, 0x5d, 0xce, 0xbd, 0xd9, - 0x0b, 0x7a, 0x79, 0xa0, 0x4c, 0x01, 0x82, 0x5b, 0x37, 0x67, 0xdc, 0x76, 0xa9, 0x37, 0x00, 0x43, - 0xf8, 0xbe, 0x0b, 0xc9, 0x76, 0x17, 0x92, 0x9f, 0xbb, 0x90, 0x7c, 0xdd, 0x87, 0x9d, 0xed, 0x3e, - 0xec, 0xfc, 0xd8, 0x87, 0x9d, 0x8f, 0xef, 0x6a, 0x89, 0xb3, 0x65, 0x99, 0x08, 0x3d, 0x4f, 0xdf, - 0xfe, 0x41, 0xbe, 0xe7, 0xa5, 0x4d, 0x8f, 0x05, 0xcf, 0x84, 0x36, 0xf0, 0xf7, 0x38, 0xe3, 0x52, - 0xa5, 0x73, 0x5d, 0x2d, 0xbf, 0x80, 0x6d, 0x2f, 0x02, 0x37, 0x0b, 0xb0, 0xe5, 0x85, 0x3b, 0x82, - 0xe7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xe4, 0x7f, 0x7f, 0x6f, 0x02, 0x00, 0x00, + proto.RegisterType((*OutgoingTxBatch)(nil), "injective.peggy.v1.OutgoingTxBatch") + proto.RegisterType((*OutgoingTransferTx)(nil), "injective.peggy.v1.OutgoingTransferTx") + proto.RegisterType((*OutgoingLogicCall)(nil), "injective.peggy.v1.OutgoingLogicCall") +} + +func init() { proto.RegisterFile("injective/peggy/v1/batch.proto", fileDescriptor_48fd09581f1b5901) } + +var fileDescriptor_48fd09581f1b5901 = []byte{ + // 524 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xad, 0xd3, 0x36, 0x25, 0x93, 0x34, 0x55, 0x57, 0x55, 0x65, 0x71, 0x30, 0x21, 0x7c, 0xe5, + 0x52, 0xbb, 0x0d, 0xdc, 0x40, 0x42, 0x34, 0x02, 0xa9, 0x50, 0x81, 0x64, 0xe5, 0xc4, 0x25, 0xda, + 0x78, 0x27, 0xce, 0x52, 0x67, 0x37, 0xf2, 0x6e, 0xa2, 0xe6, 0x5f, 0xf0, 0xaf, 0xe0, 0xd8, 0x23, + 0x17, 0xa4, 0x2a, 0xf9, 0x23, 0xc8, 0xe3, 0x38, 0xa4, 0xb4, 0x52, 0xb9, 0x79, 0xde, 0xcc, 0x9b, + 0x9d, 0xf7, 0x66, 0x0c, 0x9e, 0x54, 0xdf, 0x30, 0xb2, 0x72, 0x8a, 0xc1, 0x18, 0xe3, 0x78, 0x16, + 0x4c, 0x4f, 0x82, 0x3e, 0xb7, 0xd1, 0xd0, 0x1f, 0xa7, 0xda, 0x6a, 0xc6, 0x56, 0x79, 0x9f, 0xf2, + 0xfe, 0xf4, 0xe4, 0xe1, 0xd3, 0x3b, 0x38, 0xdc, 0x5a, 0x34, 0x96, 0x5b, 0xa9, 0x55, 0xce, 0x6c, + 0x5e, 0x3b, 0xb0, 0xf7, 0x65, 0x62, 0x63, 0x2d, 0x55, 0xdc, 0xbd, 0x3c, 0xcd, 0x7a, 0xb2, 0x47, + 0x50, 0xa5, 0xe6, 0x3d, 0xa5, 0x55, 0x84, 0xae, 0xd3, 0x70, 0x5a, 0x5b, 0x21, 0x10, 0xf4, 0x39, + 0x43, 0xd8, 0x13, 0xd8, 0xcd, 0x0b, 0xac, 0x1c, 0xa1, 0x9e, 0x58, 0xb7, 0x44, 0x25, 0x35, 0x02, + 0xbb, 0x39, 0xc6, 0x3e, 0x42, 0xcd, 0xa6, 0x5c, 0x19, 0x1e, 0x65, 0xcf, 0x19, 0x77, 0xb3, 0xb1, + 0xd9, 0xaa, 0xb6, 0x9f, 0xfb, 0xb7, 0x47, 0xf5, 0x57, 0x03, 0x64, 0xf5, 0x03, 0x4c, 0xbb, 0x97, + 0xe1, 0x0d, 0x2e, 0x7b, 0x06, 0x75, 0xab, 0x2f, 0x50, 0xf5, 0x22, 0xad, 0x6c, 0xca, 0x23, 0xeb, + 0x6e, 0x35, 0x9c, 0x56, 0x25, 0xdc, 0x25, 0xb4, 0xb3, 0x04, 0xd9, 0x01, 0x6c, 0xf7, 0x13, 0x1d, + 0x5d, 0xb8, 0xdb, 0x34, 0x4f, 0x1e, 0x34, 0x7f, 0x3b, 0xc0, 0x6e, 0xbf, 0xc0, 0xea, 0x50, 0x92, + 0x62, 0x29, 0xae, 0x24, 0x05, 0x3b, 0x84, 0xb2, 0x41, 0x25, 0x30, 0x25, 0x35, 0x95, 0x70, 0x19, + 0xb1, 0xc7, 0x50, 0x13, 0x68, 0x6c, 0x8f, 0x0b, 0x91, 0xa2, 0xc9, 0x74, 0x64, 0xd9, 0x6a, 0x86, + 0xbd, 0xcb, 0x21, 0xf6, 0x16, 0xaa, 0x98, 0x46, 0xed, 0xe3, 0x1e, 0x8d, 0x43, 0xb3, 0x55, 0xdb, + 0xde, 0x5d, 0x4a, 0xdf, 0x87, 0x9d, 0xf6, 0x71, 0x37, 0xab, 0x0a, 0x81, 0x28, 0xf4, 0xcd, 0x5e, + 0x43, 0x25, 0x6f, 0x30, 0x40, 0xa4, 0xe1, 0xef, 0xa7, 0x3f, 0x20, 0xc2, 0x07, 0xc4, 0xe6, 0x8f, + 0x12, 0xec, 0x17, 0xfa, 0xce, 0x75, 0x2c, 0xa3, 0x0e, 0x4f, 0x12, 0xf6, 0x06, 0x2a, 0x76, 0x29, + 0xd6, 0xb8, 0x0e, 0x79, 0x7f, 0x5f, 0xcb, 0xbf, 0x04, 0xd6, 0x86, 0xad, 0x01, 0xa2, 0x71, 0x4b, + 0xff, 0x45, 0xa4, 0x5a, 0xf6, 0x0a, 0x0e, 0x93, 0xec, 0xf9, 0xd5, 0x92, 0xfe, 0xb1, 0xec, 0x80, + 0xb2, 0xc5, 0xb2, 0x0a, 0xef, 0x5c, 0xd8, 0x19, 0xf3, 0x59, 0xa2, 0xb9, 0x20, 0xdf, 0x6a, 0x61, + 0x11, 0x66, 0x99, 0xe2, 0xbe, 0xf2, 0x7d, 0x16, 0x21, 0x7b, 0x01, 0x7b, 0x52, 0x4d, 0x79, 0x22, + 0x05, 0x9d, 0x72, 0x4f, 0x0a, 0xb7, 0x4c, 0xdc, 0xfa, 0x3a, 0x7c, 0x26, 0xd8, 0x11, 0xb0, 0x1b, + 0x85, 0xf9, 0x41, 0xef, 0x50, 0xb7, 0xfd, 0xf5, 0x0c, 0xdd, 0xf5, 0x29, 0xfe, 0x9c, 0x7b, 0xce, + 0xd5, 0xdc, 0x73, 0xae, 0xe7, 0x9e, 0xf3, 0x7d, 0xe1, 0x6d, 0x5c, 0x2d, 0xbc, 0x8d, 0x5f, 0x0b, + 0x6f, 0xe3, 0xeb, 0xa7, 0x58, 0xda, 0xe1, 0xa4, 0xef, 0x47, 0x7a, 0x14, 0x9c, 0x15, 0x5e, 0x9c, + 0xf3, 0xbe, 0x09, 0x56, 0xce, 0x1c, 0x45, 0x3a, 0xc5, 0xf5, 0x70, 0xc8, 0xa5, 0x0a, 0x46, 0x5a, + 0x4c, 0x12, 0x34, 0xcb, 0x5f, 0xd0, 0xce, 0xc6, 0x68, 0xfa, 0x65, 0xfa, 0xf5, 0x5e, 0xfe, 0x09, + 0x00, 0x00, 0xff, 0xff, 0xf1, 0x3d, 0xc5, 0x13, 0xd6, 0x03, 0x00, 0x00, } func (m *OutgoingTxBatch) Marshal() (dAtA []byte, err error) { @@ -217,12 +334,17 @@ func (m *OutgoingTxBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Block != 0 { + i = encodeVarintBatch(dAtA, i, uint64(m.Block)) + i-- + dAtA[i] = 0x28 + } if len(m.TokenContract) > 0 { i -= len(m.TokenContract) copy(dAtA[i:], m.TokenContract) i = encodeVarintBatch(dAtA, i, uint64(len(m.TokenContract))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.Transactions) > 0 { for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { @@ -235,9 +357,14 @@ func (m *OutgoingTxBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintBatch(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } + if m.BatchTimeout != 0 { + i = encodeVarintBatch(dAtA, i, uint64(m.BatchTimeout)) + i-- + dAtA[i] = 0x10 + } if m.BatchNonce != 0 { i = encodeVarintBatch(dAtA, i, uint64(m.BatchNonce)) i-- @@ -312,6 +439,88 @@ func (m *OutgoingTransferTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *OutgoingLogicCall) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OutgoingLogicCall) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutgoingLogicCall) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.InvalidationNonce != 0 { + i = encodeVarintBatch(dAtA, i, uint64(m.InvalidationNonce)) + i-- + dAtA[i] = 0x38 + } + if len(m.InvalidationId) > 0 { + i -= len(m.InvalidationId) + copy(dAtA[i:], m.InvalidationId) + i = encodeVarintBatch(dAtA, i, uint64(len(m.InvalidationId))) + i-- + dAtA[i] = 0x32 + } + if m.Timeout != 0 { + i = encodeVarintBatch(dAtA, i, uint64(m.Timeout)) + i-- + dAtA[i] = 0x28 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintBatch(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x22 + } + if len(m.LogicContractAddress) > 0 { + i -= len(m.LogicContractAddress) + copy(dAtA[i:], m.LogicContractAddress) + i = encodeVarintBatch(dAtA, i, uint64(len(m.LogicContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.Fees) > 0 { + for iNdEx := len(m.Fees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBatch(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Transfers) > 0 { + for iNdEx := len(m.Transfers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Transfers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBatch(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintBatch(dAtA []byte, offset int, v uint64) int { offset -= sovBatch(v) base := offset @@ -332,6 +541,9 @@ func (m *OutgoingTxBatch) Size() (n int) { if m.BatchNonce != 0 { n += 1 + sovBatch(uint64(m.BatchNonce)) } + if m.BatchTimeout != 0 { + n += 1 + sovBatch(uint64(m.BatchTimeout)) + } if len(m.Transactions) > 0 { for _, e := range m.Transactions { l = e.Size() @@ -342,6 +554,9 @@ func (m *OutgoingTxBatch) Size() (n int) { if l > 0 { n += 1 + l + sovBatch(uint64(l)) } + if m.Block != 0 { + n += 1 + sovBatch(uint64(m.Block)) + } return n } @@ -373,6 +588,45 @@ func (m *OutgoingTransferTx) Size() (n int) { return n } +func (m *OutgoingLogicCall) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Transfers) > 0 { + for _, e := range m.Transfers { + l = e.Size() + n += 1 + l + sovBatch(uint64(l)) + } + } + if len(m.Fees) > 0 { + for _, e := range m.Fees { + l = e.Size() + n += 1 + l + sovBatch(uint64(l)) + } + } + l = len(m.LogicContractAddress) + if l > 0 { + n += 1 + l + sovBatch(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovBatch(uint64(l)) + } + if m.Timeout != 0 { + n += 1 + sovBatch(uint64(m.Timeout)) + } + l = len(m.InvalidationId) + if l > 0 { + n += 1 + l + sovBatch(uint64(l)) + } + if m.InvalidationNonce != 0 { + n += 1 + sovBatch(uint64(m.InvalidationNonce)) + } + return n +} + func sovBatch(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -428,6 +682,25 @@ func (m *OutgoingTxBatch) Unmarshal(dAtA []byte) error { } } case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchTimeout", wireType) + } + m.BatchTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BatchTimeout |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) } @@ -461,7 +734,7 @@ func (m *OutgoingTxBatch) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } @@ -493,16 +766,32 @@ func (m *OutgoingTxBatch) Unmarshal(dAtA []byte) error { } m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + m.Block = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Block |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipBatch(dAtA[iNdEx:]) if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthBatch - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthBatch } if (iNdEx + skippy) > l { @@ -707,10 +996,263 @@ func (m *OutgoingTransferTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthBatch } - if (iNdEx + skippy) < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OutgoingLogicCall) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OutgoingLogicCall: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OutgoingLogicCall: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transfers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBatch + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transfers = append(m.Transfers, &ERC20Token{}) + if err := m.Transfers[len(m.Transfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBatch + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fees = append(m.Fees, &ERC20Token{}) + if err := m.Fees[len(m.Fees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogicContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthBatch + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogicContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBatch + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + m.Timeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timeout |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBatch + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InvalidationId = append(m.InvalidationId[:0], dAtA[iNdEx:postIndex]...) + if m.InvalidationId == nil { + m.InvalidationId = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + } + m.InvalidationNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InvalidationNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipBatch(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthBatch } if (iNdEx + skippy) > l { diff --git a/chain/peggy/types/batch_test.go b/chain/peggy/types/batch_test.go new file mode 100644 index 00000000..5aab58ca --- /dev/null +++ b/chain/peggy/types/batch_test.go @@ -0,0 +1,82 @@ +package types + +import ( + "encoding/hex" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestOutgoingTxBatchCheckpointGold1(t *testing.T) { + senderAddr, err := sdk.AccAddressFromHex("527FBEE652609AB150F0AEE9D61A2F76CFC4A73E") + require.NoError(t, err) + var ( + erc20Addr = "0x835973768750b3ED2D5c3EF5AdcD5eDb44d12aD4" + ) + + src := OutgoingTxBatch{ + BatchNonce: 1, + // + BatchTimeout: 2111, + Transactions: []*OutgoingTransferTx{ + { + Id: 0x1, + Sender: senderAddr.String(), + DestAddress: "0x9FC9C2DfBA3b6cF204C37a5F690619772b926e39", + Erc20Token: &ERC20Token{ + Amount: sdk.NewInt(0x1), + Contract: erc20Addr, + }, + Erc20Fee: &ERC20Token{ + Amount: sdk.NewInt(0x1), + Contract: erc20Addr, + }, + }, + }, + TokenContract: erc20Addr, + } + + // TODO: get from params + ourHash, err := src.GetCheckpoint("foo") + require.NoError(t, err) + + // hash from bridge contract + goldHash := "0xa3a7ee0a363b8ad2514e7ee8f110d7449c0d88f3b0913c28c1751e6e0079a9b2"[2:] + // The function used to compute the "gold hash" above is in /solidity/test/updateValsetAndSubmitBatch.ts + // Be aware that every time that you run the above .ts file, it will use a different tokenContractAddress and thus compute + // a different hash. + assert.Equal(t, goldHash, hex.EncodeToString(ourHash)) +} + +func TestOutgoingLogicCallCheckpointGold1(t *testing.T) { + payload, err := hex.DecodeString("0x74657374696e675061796c6f6164000000000000000000000000000000000000"[2:]) + require.NoError(t, err) + invalidationId, err := hex.DecodeString("0x696e76616c69646174696f6e4964000000000000000000000000000000000000"[2:]) + require.NoError(t, err) + + token := []*ERC20Token{&ERC20Token{ + Contract: "0xC26eFfa98B8A2632141562Ae7E34953Cfe5B4888", + Amount: sdk.NewIntFromUint64(1), + }} + call := OutgoingLogicCall{ + Transfers: token, + Fees: token, + LogicContractAddress: "0x17c1736CcF692F653c433d7aa2aB45148C016F68", + Payload: payload, + Timeout: 4766922941000, + InvalidationId: invalidationId, + InvalidationNonce: 1, + } + + ourHash, err := call.GetCheckpoint("foo") + require.NoError(t, err) + + // hash from bridge contract + goldHash := "0x1de95c9ace999f8ec70c6dc8d045942da2612950567c4861aca959c0650194da"[2:] + // The function used to compute the "gold hash" above is in /solidity/test/updateValsetAndSubmitBatch.ts + // Be aware that every time that you run the above .ts file, it will use a different tokenContractAddress and thus compute + // a different hash. + assert.Equal(t, goldHash, hex.EncodeToString(ourHash)) +} diff --git a/chain/peggy/types/codec.go b/chain/peggy/types/codec.go index cc94573f..c0a8da4c 100644 --- a/chain/peggy/types/codec.go +++ b/chain/peggy/types/codec.go @@ -14,17 +14,19 @@ func init() { RegisterCodec(ModuleCdc) } -// RegisterInterfaces regiesteres the interfaces for the proto stuff +// RegisterInterfaces registers the interfaces for the proto stuff func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgValsetConfirm{}, - &MsgValsetRequest{}, - &MsgSetEthAddress{}, &MsgSendToEth{}, &MsgRequestBatch{}, &MsgConfirmBatch{}, + &MsgConfirmLogicCall{}, &MsgDepositClaim{}, &MsgWithdrawClaim{}, + &MsgERC20DeployedClaim{}, + &MsgSetOrchestratorAddresses{}, + &MsgLogicCallExecutedClaim{}, ) registry.RegisterInterface( @@ -32,6 +34,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*EthereumClaim)(nil), &MsgDepositClaim{}, &MsgWithdrawClaim{}, + &MsgERC20DeployedClaim{}, + &MsgLogicCallExecutedClaim{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) @@ -40,15 +44,17 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { // RegisterCodec registers concrete types on the Amino codec func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterInterface((*EthereumClaim)(nil), nil) - cdc.RegisterConcrete(&MsgSetEthAddress{}, "peggy/MsgSetEthAddress", nil) - cdc.RegisterConcrete(&MsgValsetRequest{}, "peggy/MsgValsetRequest", nil) + cdc.RegisterConcrete(&MsgSetOrchestratorAddresses{}, "peggy/MsgSetOrchestratorAddresses", nil) cdc.RegisterConcrete(&MsgValsetConfirm{}, "peggy/MsgValsetConfirm", nil) cdc.RegisterConcrete(&MsgSendToEth{}, "peggy/MsgSendToEth", nil) cdc.RegisterConcrete(&MsgRequestBatch{}, "peggy/MsgRequestBatch", nil) cdc.RegisterConcrete(&MsgConfirmBatch{}, "peggy/MsgConfirmBatch", nil) + cdc.RegisterConcrete(&MsgConfirmLogicCall{}, "peggy/MsgConfirmLogicCall", nil) cdc.RegisterConcrete(&Valset{}, "peggy/Valset", nil) cdc.RegisterConcrete(&MsgDepositClaim{}, "peggy/MsgDepositClaim", nil) cdc.RegisterConcrete(&MsgWithdrawClaim{}, "peggy/MsgWithdrawClaim", nil) + cdc.RegisterConcrete(&MsgERC20DeployedClaim{}, "peggy/MsgERC20DeployedClaim", nil) + cdc.RegisterConcrete(&MsgLogicCallExecutedClaim{}, "peggy/MsgLogicCallExecutedClaim", nil) cdc.RegisterConcrete(&OutgoingTxBatch{}, "peggy/OutgoingTxBatch", nil) cdc.RegisterConcrete(&OutgoingTransferTx{}, "peggy/OutgoingTransferTx", nil) cdc.RegisterConcrete(&ERC20Token{}, "peggy/ERC20Token", nil) diff --git a/chain/peggy/types/ethereum.go b/chain/peggy/types/ethereum.go index f7fcf0a9..32a4fa3f 100644 --- a/chain/peggy/types/ethereum.go +++ b/chain/peggy/types/ethereum.go @@ -12,16 +12,16 @@ import ( const ( // PeggyDenomPrefix indicates the prefix for all assests minted by this module - PeggyDenomPrefix = "eth" + PeggyDenomPrefix = ModuleName - // PeggyDenomSeperator is the seperator for peggy denoms - PeggyDenomSeperator = "/" + // PeggyDenomSeparator is the separator for peggy denoms + PeggyDenomSeparator = "" // ETHContractAddressLen is the length of contract address strings ETHContractAddressLen = 42 // PeggyDenomLen is the length of the denoms generated by the peggy module - PeggyDenomLen = len(PeggyDenomPrefix) + len(PeggyDenomSeperator) + ETHContractAddressLen + PeggyDenomLen = len(PeggyDenomPrefix) + len(PeggyDenomSeparator) + ETHContractAddressLen ) // EthAddrLessThan migrates the Ethereum address less than function @@ -52,9 +52,17 @@ func NewERC20Token(amount uint64, contract string) *ERC20Token { return &ERC20Token{Amount: sdk.NewIntFromUint64(amount), Contract: contract} } +func NewSDKIntERC20Token(amount sdk.Int, contract string) *ERC20Token { + return &ERC20Token{Amount: amount, Contract: contract} +} + // PeggyCoin returns the peggy representation of the ERC20 func (e *ERC20Token) PeggyCoin() sdk.Coin { - return sdk.NewCoin(fmt.Sprintf("%s/%s", PeggyDenomPrefix, e.Contract), e.Amount) + return sdk.NewCoin(PeggyDenom(e.Contract), e.Amount) +} + +func PeggyDenom(tokenContract string) string { + return fmt.Sprintf("%s%s%s", PeggyDenomPrefix, PeggyDenomSeparator, tokenContract) } // ValidateBasic permforms stateless validation @@ -79,33 +87,18 @@ func (e *ERC20Token) Add(o *ERC20Token) *ERC20Token { return NewERC20Token(sum.Uint64(), e.Contract) } -// ERC20FromPeggyCoin returns the ERC20 representation of a given peggy coin -func ERC20FromPeggyCoin(v sdk.Coin) (*ERC20Token, error) { - contract, err := ValidatePeggyCoin(v) - if err != nil { - return nil, fmt.Errorf("%s isn't a valid peggy coin: %s", v.String(), err) - } - return &ERC20Token{Contract: contract, Amount: v.Amount}, nil -} - -// ValidatePeggyCoin returns true if a coin is a peggy representation of an ERC20 token -func ValidatePeggyCoin(v sdk.Coin) (string, error) { - // check if denom is "Peggy/{contractAddr}" - spl := strings.Split(v.Denom, PeggyDenomSeperator) - if len(spl) < 2 { - return "", fmt.Errorf("denom(%s) not valid, fewer seperators(%s) than expected", v.Denom, PeggyDenomSeperator) +func PeggyDenomToERC20(denom string) (string, error) { + fullPrefix := PeggyDenomPrefix + PeggyDenomSeparator + if !strings.HasPrefix(denom, fullPrefix) { + return "", fmt.Errorf("denom prefix(%s) not equal to expected(%s)", denom, fullPrefix) } - contract := spl[1] + contract := strings.TrimPrefix(denom, fullPrefix) err := ValidateEthAddress(contract) switch { - case len(spl) != 2: - return "", fmt.Errorf("denom(%s) not valid, more seperators(%s) than expected", v.Denom, PeggyDenomSeperator) - case spl[0] != PeggyDenomPrefix: - return "", fmt.Errorf("denom prefix(%s) not equal to expected(%s)", spl[0], PeggyDenomPrefix) case err != nil: return "", fmt.Errorf("error(%s) validating ethereum contract address", err) - case len(v.Denom) != PeggyDenomLen: - return "", fmt.Errorf("len(denom)(%d) not equal to PeggyDenomLen(%d)", len(v.Denom), PeggyDenomLen) + case len(denom) != PeggyDenomLen: + return "", fmt.Errorf("len(denom)(%d) not equal to PeggyDenomLen(%d)", len(denom), PeggyDenomLen) default: return contract, nil } diff --git a/chain/peggy/types/ethereum_signer.pb.go b/chain/peggy/types/ethereum_signer.pb.go index 69abfb21..74cf1d28 100644 --- a/chain/peggy/types/ethereum_signer.pb.go +++ b/chain/peggy/types/ethereum_signer.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/ethereum_signer.proto +// source: injective/peggy/v1/ethereum_signer.proto package types @@ -43,35 +43,35 @@ var SignType_value = map[string]int32{ } func (SignType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_614115c1c864803f, []int{0} + return fileDescriptor_bc165894b8b8af33, []int{0} } func init() { - proto.RegisterEnum("injective.peggy.v1beta1.SignType", SignType_name, SignType_value) + proto.RegisterEnum("injective.peggy.v1.SignType", SignType_name, SignType_value) } func init() { - proto.RegisterFile("injective/peggy/v1beta1/ethereum_signer.proto", fileDescriptor_614115c1c864803f) + proto.RegisterFile("injective/peggy/v1/ethereum_signer.proto", fileDescriptor_bc165894b8b8af33) } -var fileDescriptor_614115c1c864803f = []byte{ - // 285 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcd, 0xcc, 0xcb, 0x4a, - 0x4d, 0x2e, 0xc9, 0x2c, 0x4b, 0xd5, 0x2f, 0x48, 0x4d, 0x4f, 0xaf, 0xd4, 0x2f, 0x33, 0x4c, 0x4a, - 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0xc9, 0x48, 0x2d, 0x4a, 0x2d, 0xcd, 0x8d, 0x2f, 0xce, 0x4c, - 0xcf, 0x4b, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0x2b, 0xd7, 0x03, 0x2b, - 0xd7, 0x83, 0x2a, 0x97, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, - 0xb5, 0x26, 0x32, 0x72, 0x71, 0x04, 0x67, 0xa6, 0xe7, 0x85, 0x54, 0x16, 0xa4, 0x0a, 0x89, 0x72, - 0x09, 0x06, 0x7b, 0xba, 0xfb, 0xc5, 0x87, 0x44, 0x06, 0xb8, 0xc6, 0x87, 0xfa, 0x79, 0xfb, 0xf9, - 0x87, 0xfb, 0x09, 0x30, 0x08, 0x19, 0x71, 0xe9, 0x21, 0x84, 0xfd, 0x83, 0x9c, 0x3d, 0x5c, 0x83, - 0x43, 0x82, 0x1c, 0x43, 0xfc, 0x83, 0xe2, 0x41, 0xc2, 0xae, 0x2e, 0xf1, 0xbe, 0xa1, 0x3e, 0x21, - 0x9e, 0x20, 0x4e, 0x7c, 0x68, 0x80, 0x8b, 0x63, 0x88, 0xab, 0x00, 0xa3, 0x90, 0x01, 0x97, 0x0e, - 0x7e, 0x3d, 0xe1, 0x9e, 0x21, 0x1e, 0x2e, 0x41, 0x8e, 0xe1, 0xf1, 0x4e, 0x8e, 0x21, 0xce, 0x1e, - 0x02, 0x4c, 0x52, 0x1c, 0x1d, 0x8b, 0xe5, 0x18, 0x56, 0x2c, 0x91, 0x63, 0x70, 0x4a, 0x3d, 0xf1, - 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, - 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xef, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, - 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x4f, 0x98, 0x3f, 0x7d, 0x12, 0x93, 0x8a, 0xf5, 0xe1, 0xbe, 0xd6, - 0x4d, 0xce, 0x2f, 0x4a, 0x45, 0xe6, 0x66, 0x24, 0x66, 0xe6, 0xe9, 0xe7, 0xe6, 0xa7, 0x94, 0xe6, - 0xa4, 0x16, 0x43, 0x43, 0xb0, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x02, 0xc6, 0x80, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xfb, 0x44, 0x90, 0x61, 0x01, 0x00, 0x00, +var fileDescriptor_bc165894b8b8af33 = []byte{ + // 280 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc8, 0xcc, 0xcb, 0x4a, + 0x4d, 0x2e, 0xc9, 0x2c, 0x4b, 0xd5, 0x2f, 0x48, 0x4d, 0x4f, 0xaf, 0xd4, 0x2f, 0x33, 0xd4, 0x4f, + 0x2d, 0xc9, 0x48, 0x2d, 0x4a, 0x2d, 0xcd, 0x8d, 0x2f, 0xce, 0x4c, 0xcf, 0x4b, 0x2d, 0xd2, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xab, 0xd4, 0x03, 0xab, 0xd4, 0x2b, 0x33, 0x94, 0x12, + 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x5a, 0x13, 0x19, 0xb9, 0x38, + 0x82, 0x33, 0xd3, 0xf3, 0x42, 0x2a, 0x0b, 0x52, 0x85, 0x44, 0xb9, 0x04, 0x83, 0x3d, 0xdd, 0xfd, + 0xe2, 0x43, 0x22, 0x03, 0x5c, 0xe3, 0x43, 0xfd, 0xbc, 0xfd, 0xfc, 0xc3, 0xfd, 0x04, 0x18, 0x84, + 0x8c, 0xb8, 0xf4, 0x10, 0xc2, 0xfe, 0x41, 0xce, 0x1e, 0xae, 0xc1, 0x21, 0x41, 0x8e, 0x21, 0xfe, + 0x41, 0xf1, 0x20, 0x61, 0x57, 0x97, 0x78, 0xdf, 0x50, 0x9f, 0x10, 0x4f, 0x10, 0x27, 0x3e, 0x34, + 0xc0, 0xc5, 0x31, 0xc4, 0x55, 0x80, 0x51, 0xc8, 0x80, 0x4b, 0x07, 0xbf, 0x9e, 0x70, 0xcf, 0x10, + 0x0f, 0x97, 0x20, 0xc7, 0xf0, 0x78, 0x27, 0xc7, 0x10, 0x67, 0x0f, 0x01, 0x26, 0x29, 0x8e, 0x8e, + 0xc5, 0x72, 0x0c, 0x2b, 0x96, 0xc8, 0x31, 0x38, 0xa5, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, + 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, + 0xb1, 0x1c, 0x43, 0x94, 0x77, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, + 0x27, 0xcc, 0x8b, 0x3e, 0x89, 0x49, 0xc5, 0xfa, 0x70, 0x0f, 0xeb, 0x26, 0xe7, 0x17, 0xa5, 0x22, + 0x73, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0x73, 0xf3, 0x53, 0x4a, 0x73, 0x52, 0x8b, 0xa1, 0xe1, 0x56, + 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x01, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x71, 0x7f, 0xdc, 0xe7, 0x57, 0x01, 0x00, 0x00, } diff --git a/chain/peggy/types/ethereum_signer_test.go b/chain/peggy/types/ethereum_signer_test.go new file mode 100644 index 00000000..47f20cc6 --- /dev/null +++ b/chain/peggy/types/ethereum_signer_test.go @@ -0,0 +1,90 @@ +package types + +import ( + "encoding/hex" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestValsetConfirmSig(t *testing.T) { + const ( + correctSig = "e108a7776de6b87183b0690484a74daef44aa6daf907e91abaf7bbfa426ae7706b12e0bd44ef7b0634710d99c2d81087a2f39e075158212343a3b2948ecf33d01c" + invalidSig = "fffff7776de6b87183b0690484a74daef44aa6daf907e91abaf7bbfa426ae7706b12e0bd44ef7b0634710d99c2d81087a2f39e075158212343a3b2948ecf33d01c" + ethAddress = "0xc783df8a850f42e7F7e57013759C285caa701eB6" + hash = "88165860d955aee7dc3e83d9d1156a5864b708841965585d206dbef6e9e1a499" + ) + + specs := map[string]struct { + srcHash string + srcSignature string + srcETHAddr string + expErr bool + }{ + "all good": { + srcHash: hash, + srcSignature: correctSig, + srcETHAddr: ethAddress, + }, + "invalid signature": { + srcHash: hash, + srcSignature: invalidSig, + srcETHAddr: ethAddress, + expErr: true, + }, + "empty hash": { + srcSignature: correctSig, + srcETHAddr: ethAddress, + expErr: true, + }, + "hash too short": { + srcSignature: correctSig, + srcETHAddr: ethAddress, + srcHash: hash[0:30], + expErr: true, + }, + "hash too long": { + srcSignature: correctSig, + srcETHAddr: ethAddress, + srcHash: hash + "01", + expErr: true, + }, + "empty signature": { + srcHash: hash, + srcETHAddr: ethAddress, + expErr: true, + }, + "signature too short": { + srcHash: hash, + srcSignature: correctSig[0:64], + srcETHAddr: ethAddress, + expErr: true, + }, + "empty eth address": { + srcHash: hash, + srcSignature: correctSig, + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + var err error + var hashBytes []byte + if len(spec.srcHash) != 0 { + hashBytes, err = hex.DecodeString(spec.srcHash) + require.NoError(t, err) + } + sigBytes, err := hex.DecodeString(spec.srcSignature) + require.NoError(t, err) + + // when + err = ValidateEthereumSignature(hashBytes, sigBytes, spec.srcETHAddr) + if spec.expErr { + assert.Error(t, err) + return + } + assert.NoError(t, err) + }) + } +} diff --git a/chain/peggy/types/events.go b/chain/peggy/types/events.go index 695b43cb..13650d27 100644 --- a/chain/peggy/types/events.go +++ b/chain/peggy/types/events.go @@ -1,20 +1,29 @@ package types const ( - EventTypeObservation = "observation" - EventTypeOutgoingBatch = "outgoing_batch" - EventTypeMultisigBootstrap = "multisig_bootstrap" - EventTypeMultisigUpdateRequest = "multisig_update_request" - EventTypeOutgoingBatchCanceled = "outgoing_batch_canceled" - EventTypeBridgeWithdrawalReceived = "withdrawal_received" - EventTypeBridgeDepositReceived = "deposit_received" + EventTypeObservation = "observation" + EventTypeOutgoingBatch = "outgoing_batch" + EventTypeMultisigBootstrap = "multisig_bootstrap" + EventTypeMultisigUpdateRequest = "multisig_update_request" + EventTypeOutgoingBatchCanceled = "outgoing_batch_canceled" + EventTypeOutgoingLogicCallCanceled = "outgoing_logic_call_canceled" + EventTypeBridgeWithdrawalReceived = "withdrawal_received" + EventTypeBridgeDepositReceived = "deposit_received" - AttributeKeyAttestationID = "attestation_id" - AttributeKeyMultisigID = "multisig_id" - AttributeKeyOutgoingBatchID = "batch_id" - AttributeKeyOutgoingTXID = "outgoing_tx_id" - AttributeKeyAttestationType = "attestation_type" - AttributeKeyContract = "bridge_contract" - AttributeKeyNonce = "nonce" - AttributeKeyBridgeChainID = "bridge_chain_id" + AttributeKeyAttestationID = "attestation_id" + AttributeKeyAttestationIDs = "attestation_ids" + AttributeKeyBatchConfirmKey = "batch_confirm_key" + AttributeKeyValsetConfirmKey = "valset_confirm_key" + AttributeKeyMultisigID = "multisig_id" + AttributeKeyOutgoingBatchID = "batch_id" + AttributeKeyOutgoingTXID = "outgoing_tx_id" + AttributeKeyAttestationType = "attestation_type" + AttributeKeyContract = "bridge_contract" + AttributeKeyNonce = "nonce" + AttributeKeyValsetNonce = "valset_nonce" + AttributeKeyBatchNonce = "batch_nonce" + AttributeKeyBridgeChainID = "bridge_chain_id" + AttributeKeySetOperatorAddr = "set_operator_address" + AttributeKeyInvalidationID = "logic_call_invalidation_id" + AttributeKeyInvalidationNonce = "logic_call_invalidation_nonce" ) diff --git a/chain/peggy/types/expected_keepers.go b/chain/peggy/types/expected_keepers.go new file mode 100644 index 00000000..e3716d61 --- /dev/null +++ b/chain/peggy/types/expected_keepers.go @@ -0,0 +1,41 @@ +package types + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// StakingKeeper defines the expected staking keeper methods +type StakingKeeper interface { + GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator + GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 + GetLastTotalPower(ctx sdk.Context) (power sdk.Int) + IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + ValidatorQueueIterator(ctx sdk.Context, endTime time.Time, endHeight int64) sdk.Iterator + GetParams(ctx sdk.Context) stakingtypes.Params + GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) + IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + IterateLastValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI + ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI + Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) + Jail(sdk.Context, sdk.ConsAddress) +} + +// BankKeeper defines the expected bank keeper methods +type BankKeeper interface { + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error + BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error + GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetDenomMetaData(ctx sdk.Context, denom string) bank.Metadata +} + +type SlashingKeeper interface { + GetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress) (info slashingtypes.ValidatorSigningInfo, found bool) +} diff --git a/chain/peggy/types/genesis.go b/chain/peggy/types/genesis.go index 28bb4bec..ae9a21da 100644 --- a/chain/peggy/types/genesis.go +++ b/chain/peggy/types/genesis.go @@ -37,8 +37,44 @@ var ( // ParamsStoreKeyBridgeContractChainID stores the bridge chain id ParamsStoreKeyBridgeContractChainID = []byte("BridgeChainID") - // ParamsStoreKeyInjContractAddress stores INJ ERC-20 contract address. - ParamsStoreKeyInjContractAddress = []byte("InjContractAddress") + // ParamsStoreKeyCosmosCoinDenom stores native cosmos coin denom + ParamsStoreKeyCosmosCoinDenom = []byte("CosmosCoinDenom") + + // ParamsStoreKeyCosmosCoinErc20Contract store L1 erc20 contract address of cosmos native coin + ParamsStoreKeyCosmosCoinErc20Contract = []byte("CosmosCoinErc20Contract") + + // ParamsStoreKeySignedValsetsWindow stores the signed blocks window + ParamsStoreKeySignedValsetsWindow = []byte("SignedValsetsWindow") + + // ParamsStoreKeySignedBatchesWindow stores the signed blocks window + ParamsStoreKeySignedBatchesWindow = []byte("SignedBatchesWindow") + + // ParamsStoreKeySignedClaimsWindow stores the signed blocks window + ParamsStoreKeySignedClaimsWindow = []byte("SignedClaimsWindow") + + // ParamsStoreKeySignedClaimsWindow stores the signed blocks window + ParamsStoreKeyTargetBatchTimeout = []byte("TargetBatchTimeout") + + // ParamsStoreKeySignedClaimsWindow stores the signed blocks window + ParamsStoreKeyAverageBlockTime = []byte("AverageBlockTime") + + // ParamsStoreKeySignedClaimsWindow stores the signed blocks window + ParamsStoreKeyAverageEthereumBlockTime = []byte("AverageEthereumBlockTime") + + // ParamsStoreSlashFractionValset stores the slash fraction valset + ParamsStoreSlashFractionValset = []byte("SlashFractionValset") + + // ParamsStoreSlashFractionBatch stores the slash fraction Batch + ParamsStoreSlashFractionBatch = []byte("SlashFractionBatch") + + // ParamsStoreSlashFractionClaim stores the slash fraction Claim + ParamsStoreSlashFractionClaim = []byte("SlashFractionClaim") + + // ParamsStoreSlashFractionConflictingClaim stores the slash fraction ConflictingClaim + ParamsStoreSlashFractionConflictingClaim = []byte("SlashFractionConflictingClaim") + + // ParamStoreUnbondSlashingValsetsWindow stores unbond slashing valset window + ParamStoreUnbondSlashingValsetsWindow = []byte("UnbondSlashingValsetsWindow") // Ensure that params implements the proper interface _ paramtypes.ParamSet = &Params{} @@ -64,8 +100,19 @@ func DefaultGenesisState() *GenesisState { // DefaultParams returns a copy of the default params func DefaultParams() *Params { return &Params{ - PeggyId: "injecitve-peggyid", - BridgeChainId: 888, + PeggyId: "injective-peggyid", + SignedValsetsWindow: 10000, + SignedBatchesWindow: 10000, + SignedClaimsWindow: 10000, + TargetBatchTimeout: 43200000, + AverageBlockTime: 5000, + AverageEthereumBlockTime: 15000, + SlashFractionValset: sdk.NewDec(1).Quo(sdk.NewDec(1000)), + SlashFractionBatch: sdk.NewDec(1).Quo(sdk.NewDec(1000)), + SlashFractionClaim: sdk.NewDec(1).Quo(sdk.NewDec(1000)), + SlashFractionConflictingClaim: sdk.NewDec(1).Quo(sdk.NewDec(1000)), + CosmosCoinDenom: "inj", + UnbondSlashingValsetsWindow: 10000, } } @@ -77,18 +124,52 @@ func (p Params) ValidateBasic() error { if err := validateContractHash(p.ContractSourceHash); err != nil { return sdkerrors.Wrap(err, "contract hash") } - if err := validateStartThreshold(p.StartThreshold); err != nil { - return sdkerrors.Wrap(err, "start threshold") - } - if err := validateBridgeContractAddress(p.EthereumAddress); err != nil { + if err := validateBridgeContractAddress(p.BridgeEthereumAddress); err != nil { return sdkerrors.Wrap(err, "bridge contract address") } if err := validateBridgeChainID(p.BridgeChainId); err != nil { return sdkerrors.Wrap(err, "bridge chain id") } - if err := validateInjContractAddress(p.InjContractAddress); err != nil { - return sdkerrors.Wrap(err, "bridge contract address") + if err := validateCosmosCoinDenom(p.CosmosCoinDenom); err != nil { + return sdkerrors.Wrap(err, "cosmos coin denom") } + if err := validateCosmosCoinErc20Contract(p.CosmosCoinErc20Contract); err != nil { + return sdkerrors.Wrap(err, "cosmos coin erc20 contract address") + } + if err := validateTargetBatchTimeout(p.TargetBatchTimeout); err != nil { + return sdkerrors.Wrap(err, "Batch timeout") + } + if err := validateAverageBlockTime(p.AverageBlockTime); err != nil { + return sdkerrors.Wrap(err, "Block time") + } + if err := validateAverageEthereumBlockTime(p.AverageEthereumBlockTime); err != nil { + return sdkerrors.Wrap(err, "Ethereum block time") + } + if err := validateSignedValsetsWindow(p.SignedValsetsWindow); err != nil { + return sdkerrors.Wrap(err, "signed blocks window") + } + if err := validateSignedBatchesWindow(p.SignedBatchesWindow); err != nil { + return sdkerrors.Wrap(err, "signed blocks window") + } + if err := validateSignedClaimsWindow(p.SignedClaimsWindow); err != nil { + return sdkerrors.Wrap(err, "signed blocks window") + } + if err := validateSlashFractionValset(p.SlashFractionValset); err != nil { + return sdkerrors.Wrap(err, "slash fraction valset") + } + if err := validateSlashFractionBatch(p.SlashFractionBatch); err != nil { + return sdkerrors.Wrap(err, "slash fraction valset") + } + if err := validateSlashFractionClaim(p.SlashFractionClaim); err != nil { + return sdkerrors.Wrap(err, "slash fraction valset") + } + if err := validateSlashFractionConflictingClaim(p.SlashFractionConflictingClaim); err != nil { + return sdkerrors.Wrap(err, "slash fraction valset") + } + if err := validateUnbondSlashingValsetsWindow(p.UnbondSlashingValsetsWindow); err != nil { + return sdkerrors.Wrap(err, "unbond Slashing valset window") + } + return nil } @@ -103,10 +184,21 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(ParamsStoreKeyPeggyID, &p.PeggyId, validatePeggyID), paramtypes.NewParamSetPair(ParamsStoreKeyContractHash, &p.ContractSourceHash, validateContractHash), - paramtypes.NewParamSetPair(ParamsStoreKeyStartThreshold, &p.StartThreshold, validateStartThreshold), - paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractAddress, &p.EthereumAddress, validateBridgeContractAddress), + paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractAddress, &p.BridgeEthereumAddress, validateBridgeContractAddress), paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractChainID, &p.BridgeChainId, validateBridgeChainID), - paramtypes.NewParamSetPair(ParamsStoreKeyInjContractAddress, &p.InjContractAddress, validateInjContractAddress), + paramtypes.NewParamSetPair(ParamsStoreKeyCosmosCoinDenom, &p.CosmosCoinDenom, validateCosmosCoinDenom), + paramtypes.NewParamSetPair(ParamsStoreKeyCosmosCoinErc20Contract, &p.CosmosCoinErc20Contract, validateCosmosCoinErc20Contract), + paramtypes.NewParamSetPair(ParamsStoreKeySignedValsetsWindow, &p.SignedValsetsWindow, validateSignedValsetsWindow), + paramtypes.NewParamSetPair(ParamsStoreKeySignedBatchesWindow, &p.SignedBatchesWindow, validateSignedBatchesWindow), + paramtypes.NewParamSetPair(ParamsStoreKeySignedClaimsWindow, &p.SignedClaimsWindow, validateSignedClaimsWindow), + paramtypes.NewParamSetPair(ParamsStoreKeyAverageBlockTime, &p.AverageBlockTime, validateAverageBlockTime), + paramtypes.NewParamSetPair(ParamsStoreKeyTargetBatchTimeout, &p.TargetBatchTimeout, validateTargetBatchTimeout), + paramtypes.NewParamSetPair(ParamsStoreKeyAverageEthereumBlockTime, &p.AverageEthereumBlockTime, validateAverageEthereumBlockTime), + paramtypes.NewParamSetPair(ParamsStoreSlashFractionValset, &p.SlashFractionValset, validateSlashFractionValset), + paramtypes.NewParamSetPair(ParamsStoreSlashFractionBatch, &p.SlashFractionBatch, validateSlashFractionBatch), + paramtypes.NewParamSetPair(ParamsStoreSlashFractionClaim, &p.SlashFractionClaim, validateSlashFractionClaim), + paramtypes.NewParamSetPair(ParamsStoreSlashFractionConflictingClaim, &p.SlashFractionConflictingClaim, validateSlashFractionConflictingClaim), + paramtypes.NewParamSetPair(ParamStoreUnbondSlashingValsetsWindow, &p.UnbondSlashingValsetsWindow, validateUnbondSlashingValsetsWindow), } } @@ -129,6 +221,8 @@ func validatePeggyID(i interface{}) error { } func validateContractHash(i interface{}) error { + // TODO: should we validate that the input here is a properly formatted + // SHA256 (or other) hash? if _, ok := i.(string); !ok { return fmt.Errorf("invalid parameter type: %T", i) } @@ -136,6 +230,7 @@ func validateContractHash(i interface{}) error { } func validateStartThreshold(i interface{}) error { + // TODO: do we want to validate a range of values here? if _, ok := i.(uint64); !ok { return fmt.Errorf("invalid parameter type: %T", i) } @@ -149,6 +244,36 @@ func validateBridgeChainID(i interface{}) error { return nil } +func validateTargetBatchTimeout(i interface{}) error { + val, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } else if val < 60000 { + return fmt.Errorf("invalid target batch timeout, less than 60 seconds is too short") + } + return nil +} + +func validateAverageBlockTime(i interface{}) error { + val, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } else if val < 100 { + return fmt.Errorf("invalid average Cosmos block time, too short for latency limitations") + } + return nil +} + +func validateAverageEthereumBlockTime(i interface{}) error { + val, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } else if val < 100 { + return fmt.Errorf("invalid average Ethereum block time, too short for latency limitations") + } + return nil +} + func validateBridgeContractAddress(i interface{}) error { v, ok := i.(string) if !ok { @@ -163,6 +288,70 @@ func validateBridgeContractAddress(i interface{}) error { return nil } +func validateSignedValsetsWindow(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateUnbondSlashingValsetsWindow(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateSlashFractionValset(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(sdk.Dec); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateSignedBatchesWindow(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateSignedClaimsWindow(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateSlashFractionBatch(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(sdk.Dec); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateSlashFractionClaim(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(sdk.Dec); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateSlashFractionConflictingClaim(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(sdk.Dec); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + func strToFixByteArray(s string) ([32]byte, error) { var out [32]byte if len([]byte(s)) > 32 { @@ -172,16 +361,28 @@ func strToFixByteArray(s string) ([32]byte, error) { return out, nil } -func validateInjContractAddress(i interface{}) error { +func validateCosmosCoinDenom(i interface{}) error { v, ok := i.(string) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } - if err := ValidateEthAddress(v); err != nil { - // TODO: ensure that empty addresses are valid in params - if !strings.Contains(err.Error(), "empty") { - return err - } + + if _, err := strToFixByteArray(v); err != nil { + return err } return nil } + +func validateCosmosCoinErc20Contract(i interface{}) error { + v, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + // empty address is valid + if v == "" { + return nil + } + + return ValidateEthAddress(v) +} diff --git a/chain/peggy/types/genesis.pb.go b/chain/peggy/types/genesis.pb.go index 8a4d1842..7c7f7e3d 100644 --- a/chain/peggy/types/genesis.pb.go +++ b/chain/peggy/types/genesis.pb.go @@ -1,10 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/genesis.proto +// source: injective/peggy/v1/genesis.proto package types import ( fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -24,35 +25,90 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params represent the peggy genesis and store parameters -// PEGGYID: -// a random 32 byte value to prevent signature reuse -// CONTRACTHASH: +// peggy_id: +// a random 32 byte value to prevent signature reuse, for example if the +// cosmos validators decided to use the same Ethereum keys for another chain +// also running Peggy we would not want it to be possible to play a deposit +// from chain A back on chain B's peggy. This value IS USED ON ETHEREUM so +// it must be set in your genesis.json before launch and not changed after +// deploying Peggy +// +// contract_hash: // the code hash of a known good version of the Peggy contract -// solidity code. It will be used to verify exactly which version of the -// bridge will be deployed. -// STARTTHRESHOLD: -// the percentage of total voting power that must be online -// and participating in Peggy operations before a bridge can start operating -// BRIDGECONTRACTADDRESS: -// is address of the bridge contract on the Ethereum side -// BRIDGECHAINID: -// the unique identifier of the Ethereum chain -// INJADDRESS: -// is address of INJ erc-20 contract on Ethereum side. +// solidity code. This can be used to verify the correct version +// of the contract has been deployed. This is a reference value for +// goernance action only it is never read by any Peggy code +// +// bridge_ethereum_address: +// is address of the bridge contract on the Ethereum side, this is a +// reference value for governance only and is not actually used by any +// Peggy code +// +// bridge_chain_id: +// the unique identifier of the Ethereum chain, this is a reference value +// only and is not actually used by any Peggy code +// +// These reference values may be used by future Peggy client implemetnations +// to allow for saftey features or convenience features like the peggy address +// in your relayer. A relayer would require a configured peggy address if +// governance had not set the address on the chain it was relaying for. +// +// signed_valsets_window +// signed_batches_window +// signed_claims_window +// +// These values represent the time in blocks that a validator has to submit +// a signature for a batch or valset, or to submit a claim for a particular +// attestation nonce. In the case of attestations this clock starts when the +// attestation is created, but only allows for slashing once the event has passed +// +// target_batch_timeout: +// +// This is the 'target' value for when batches time out, this is a target becuase +// Ethereum is a probabalistic chain and you can't say for sure what the block +// frequency is ahead of time. +// +// average_block_time +// average_ethereum_block_time +// +// These values are the average Cosmos block time and Ethereum block time repsectively +// and they are used to copute what the target batch timeout is. It is important that +// governance updates these in case of any major, prolonged change in the time it takes +// to produce a block +// +// slash_fraction_valset +// slash_fraction_batch +// slash_fraction_claim +// slash_fraction_conflicting_claim +// +// The slashing fractions for the various peggy related slashing conditions. The first three +// refer to not submitting a particular message, the third for submitting a different claim +// for the same Ethereum event type Params struct { - PeggyId string `protobuf:"bytes,1,opt,name=peggy_id,json=peggyId,proto3" json:"peggy_id,omitempty"` - ContractSourceHash string `protobuf:"bytes,2,opt,name=contract_source_hash,json=contractSourceHash,proto3" json:"contract_source_hash,omitempty"` - StartThreshold uint64 `protobuf:"varint,3,opt,name=start_threshold,json=startThreshold,proto3" json:"start_threshold,omitempty"` - EthereumAddress string `protobuf:"bytes,4,opt,name=ethereum_address,json=ethereumAddress,proto3" json:"ethereum_address,omitempty"` - BridgeChainId uint64 `protobuf:"varint,5,opt,name=bridge_chain_id,json=bridgeChainId,proto3" json:"bridge_chain_id,omitempty"` - InjContractAddress string `protobuf:"bytes,6,opt,name=inj_contract_address,json=injContractAddress,proto3" json:"inj_contract_address,omitempty"` + PeggyId string `protobuf:"bytes,1,opt,name=peggy_id,json=peggyId,proto3" json:"peggy_id,omitempty"` + ContractSourceHash string `protobuf:"bytes,2,opt,name=contract_source_hash,json=contractSourceHash,proto3" json:"contract_source_hash,omitempty"` + BridgeEthereumAddress string `protobuf:"bytes,4,opt,name=bridge_ethereum_address,json=bridgeEthereumAddress,proto3" json:"bridge_ethereum_address,omitempty"` + BridgeChainId uint64 `protobuf:"varint,5,opt,name=bridge_chain_id,json=bridgeChainId,proto3" json:"bridge_chain_id,omitempty"` + SignedValsetsWindow uint64 `protobuf:"varint,6,opt,name=signed_valsets_window,json=signedValsetsWindow,proto3" json:"signed_valsets_window,omitempty"` + SignedBatchesWindow uint64 `protobuf:"varint,7,opt,name=signed_batches_window,json=signedBatchesWindow,proto3" json:"signed_batches_window,omitempty"` + SignedClaimsWindow uint64 `protobuf:"varint,8,opt,name=signed_claims_window,json=signedClaimsWindow,proto3" json:"signed_claims_window,omitempty"` + TargetBatchTimeout uint64 `protobuf:"varint,10,opt,name=target_batch_timeout,json=targetBatchTimeout,proto3" json:"target_batch_timeout,omitempty"` + AverageBlockTime uint64 `protobuf:"varint,11,opt,name=average_block_time,json=averageBlockTime,proto3" json:"average_block_time,omitempty"` + AverageEthereumBlockTime uint64 `protobuf:"varint,12,opt,name=average_ethereum_block_time,json=averageEthereumBlockTime,proto3" json:"average_ethereum_block_time,omitempty"` + SlashFractionValset github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=slash_fraction_valset,json=slashFractionValset,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_valset"` + SlashFractionBatch github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,14,opt,name=slash_fraction_batch,json=slashFractionBatch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_batch"` + SlashFractionClaim github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,15,opt,name=slash_fraction_claim,json=slashFractionClaim,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_claim"` + SlashFractionConflictingClaim github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,16,opt,name=slash_fraction_conflicting_claim,json=slashFractionConflictingClaim,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_conflicting_claim"` + UnbondSlashingValsetsWindow uint64 `protobuf:"varint,17,opt,name=unbond_slashing_valsets_window,json=unbondSlashingValsetsWindow,proto3" json:"unbond_slashing_valsets_window,omitempty"` + CosmosCoinDenom string `protobuf:"bytes,18,opt,name=cosmos_coin_denom,json=cosmosCoinDenom,proto3" json:"cosmos_coin_denom,omitempty"` + CosmosCoinErc20Contract string `protobuf:"bytes,19,opt,name=cosmos_coin_erc20_contract,json=cosmosCoinErc20Contract,proto3" json:"cosmos_coin_erc20_contract,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_a52c34416e2d1c3a, []int{0} + return fileDescriptor_3b8a70f18b346efa, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -95,44 +151,103 @@ func (m *Params) GetContractSourceHash() string { return "" } -func (m *Params) GetStartThreshold() uint64 { +func (m *Params) GetBridgeEthereumAddress() string { if m != nil { - return m.StartThreshold + return m.BridgeEthereumAddress + } + return "" +} + +func (m *Params) GetBridgeChainId() uint64 { + if m != nil { + return m.BridgeChainId } return 0 } -func (m *Params) GetEthereumAddress() string { +func (m *Params) GetSignedValsetsWindow() uint64 { if m != nil { - return m.EthereumAddress + return m.SignedValsetsWindow } - return "" + return 0 } -func (m *Params) GetBridgeChainId() uint64 { +func (m *Params) GetSignedBatchesWindow() uint64 { if m != nil { - return m.BridgeChainId + return m.SignedBatchesWindow + } + return 0 +} + +func (m *Params) GetSignedClaimsWindow() uint64 { + if m != nil { + return m.SignedClaimsWindow + } + return 0 +} + +func (m *Params) GetTargetBatchTimeout() uint64 { + if m != nil { + return m.TargetBatchTimeout + } + return 0 +} + +func (m *Params) GetAverageBlockTime() uint64 { + if m != nil { + return m.AverageBlockTime + } + return 0 +} + +func (m *Params) GetAverageEthereumBlockTime() uint64 { + if m != nil { + return m.AverageEthereumBlockTime + } + return 0 +} + +func (m *Params) GetUnbondSlashingValsetsWindow() uint64 { + if m != nil { + return m.UnbondSlashingValsetsWindow } return 0 } -func (m *Params) GetInjContractAddress() string { +func (m *Params) GetCosmosCoinDenom() string { + if m != nil { + return m.CosmosCoinDenom + } + return "" +} + +func (m *Params) GetCosmosCoinErc20Contract() string { if m != nil { - return m.InjContractAddress + return m.CosmosCoinErc20Contract } return "" } // GenesisState struct type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + LastObservedNonce uint64 `protobuf:"varint,2,opt,name=last_observed_nonce,json=lastObservedNonce,proto3" json:"last_observed_nonce,omitempty"` + Valsets []*Valset `protobuf:"bytes,3,rep,name=valsets,proto3" json:"valsets,omitempty"` + ValsetConfirms []*MsgValsetConfirm `protobuf:"bytes,4,rep,name=valset_confirms,json=valsetConfirms,proto3" json:"valset_confirms,omitempty"` + Batches []*OutgoingTxBatch `protobuf:"bytes,5,rep,name=batches,proto3" json:"batches,omitempty"` + BatchConfirms []MsgConfirmBatch `protobuf:"bytes,6,rep,name=batch_confirms,json=batchConfirms,proto3" json:"batch_confirms"` + LogicCalls []*OutgoingLogicCall `protobuf:"bytes,7,rep,name=logic_calls,json=logicCalls,proto3" json:"logic_calls,omitempty"` + LogicCallConfirms []MsgConfirmLogicCall `protobuf:"bytes,8,rep,name=logic_call_confirms,json=logicCallConfirms,proto3" json:"logic_call_confirms"` + Attestations []Attestation `protobuf:"bytes,9,rep,name=attestations,proto3" json:"attestations"` + OrchestratorAddresses []*MsgSetOrchestratorAddresses `protobuf:"bytes,10,rep,name=orchestrator_addresses,json=orchestratorAddresses,proto3" json:"orchestrator_addresses,omitempty"` + Erc20ToDenoms []*ERC20ToDenom `protobuf:"bytes,11,rep,name=erc20_to_denoms,json=erc20ToDenoms,proto3" json:"erc20_to_denoms,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_a52c34416e2d1c3a, []int{1} + return fileDescriptor_3b8a70f18b346efa, []int{1} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -168,41 +283,144 @@ func (m *GenesisState) GetParams() *Params { return nil } -func init() { - proto.RegisterType((*Params)(nil), "injective.peggy.v1beta1.Params") - proto.RegisterType((*GenesisState)(nil), "injective.peggy.v1beta1.GenesisState") +func (m *GenesisState) GetLastObservedNonce() uint64 { + if m != nil { + return m.LastObservedNonce + } + return 0 +} + +func (m *GenesisState) GetValsets() []*Valset { + if m != nil { + return m.Valsets + } + return nil +} + +func (m *GenesisState) GetValsetConfirms() []*MsgValsetConfirm { + if m != nil { + return m.ValsetConfirms + } + return nil +} + +func (m *GenesisState) GetBatches() []*OutgoingTxBatch { + if m != nil { + return m.Batches + } + return nil +} + +func (m *GenesisState) GetBatchConfirms() []MsgConfirmBatch { + if m != nil { + return m.BatchConfirms + } + return nil +} + +func (m *GenesisState) GetLogicCalls() []*OutgoingLogicCall { + if m != nil { + return m.LogicCalls + } + return nil +} + +func (m *GenesisState) GetLogicCallConfirms() []MsgConfirmLogicCall { + if m != nil { + return m.LogicCallConfirms + } + return nil +} + +func (m *GenesisState) GetAttestations() []Attestation { + if m != nil { + return m.Attestations + } + return nil +} + +func (m *GenesisState) GetOrchestratorAddresses() []*MsgSetOrchestratorAddresses { + if m != nil { + return m.OrchestratorAddresses + } + return nil +} + +func (m *GenesisState) GetErc20ToDenoms() []*ERC20ToDenom { + if m != nil { + return m.Erc20ToDenoms + } + return nil } func init() { - proto.RegisterFile("injective/peggy/v1beta1/genesis.proto", fileDescriptor_a52c34416e2d1c3a) -} - -var fileDescriptor_a52c34416e2d1c3a = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4f, 0xe3, 0x30, - 0x14, 0xc6, 0x93, 0x5e, 0x2f, 0x77, 0xe7, 0xbb, 0xa3, 0xc8, 0xaa, 0x44, 0x60, 0x08, 0x55, 0x25, - 0xa0, 0x0c, 0x24, 0x14, 0x06, 0x24, 0x36, 0xe8, 0x50, 0x2a, 0x18, 0x50, 0xcb, 0xc4, 0x12, 0x39, - 0xc9, 0x53, 0xec, 0xaa, 0x89, 0x23, 0xdb, 0xa9, 0xd4, 0x8d, 0x95, 0x8d, 0x3f, 0x8b, 0xb1, 0x23, - 0x03, 0x03, 0x6a, 0xff, 0x11, 0x14, 0x27, 0xa9, 0x58, 0xd8, 0xf2, 0xbe, 0xf7, 0xcb, 0xa7, 0xcf, - 0xdf, 0x43, 0x07, 0x2c, 0x9d, 0x42, 0xa8, 0xd8, 0x1c, 0xbc, 0x0c, 0xe2, 0x78, 0xe1, 0xcd, 0xfb, - 0x01, 0x28, 0xd2, 0xf7, 0x62, 0x48, 0x41, 0x32, 0xe9, 0x66, 0x82, 0x2b, 0x8e, 0x77, 0x36, 0x98, - 0xab, 0x31, 0xb7, 0xc2, 0xf6, 0xda, 0x31, 0x8f, 0xb9, 0x66, 0xbc, 0xe2, 0xab, 0xc4, 0xbb, 0xcf, - 0x0d, 0x64, 0xdd, 0x13, 0x41, 0x12, 0x89, 0x77, 0xd1, 0x6f, 0xfd, 0x87, 0xcf, 0x22, 0xdb, 0xec, - 0x98, 0xbd, 0x3f, 0xe3, 0x5f, 0x7a, 0x1e, 0x45, 0xf8, 0x14, 0xb5, 0x43, 0x9e, 0x2a, 0x41, 0x42, - 0xe5, 0x4b, 0x9e, 0x8b, 0x10, 0x7c, 0x4a, 0x24, 0xb5, 0x1b, 0x1a, 0xc3, 0xf5, 0x6e, 0xa2, 0x57, - 0x37, 0x44, 0x52, 0x7c, 0x84, 0x5a, 0x52, 0x11, 0xa1, 0x7c, 0x45, 0x05, 0x48, 0xca, 0x67, 0x91, - 0xfd, 0xa3, 0x63, 0xf6, 0x9a, 0xe3, 0x2d, 0x2d, 0x3f, 0xd4, 0x2a, 0x3e, 0x46, 0xdb, 0xa0, 0x28, - 0x08, 0xc8, 0x13, 0x9f, 0x44, 0x91, 0x00, 0x29, 0xed, 0xa6, 0xb6, 0x6d, 0xd5, 0xfa, 0x55, 0x29, - 0xe3, 0x43, 0xd4, 0x0a, 0x04, 0x8b, 0x62, 0xf0, 0x43, 0x4a, 0x58, 0x5a, 0xe4, 0xfc, 0xa9, 0x3d, - 0xff, 0x97, 0xf2, 0xa0, 0x50, 0xcb, 0xb4, 0x2c, 0x9d, 0xfa, 0x9b, 0xc4, 0xb5, 0xad, 0x55, 0xa6, - 0x65, 0xe9, 0x74, 0x50, 0xad, 0x2a, 0xe7, 0xcb, 0xe6, 0xd3, 0x7b, 0xc7, 0xe8, 0x0e, 0xd1, 0xbf, - 0x61, 0xd9, 0xe5, 0x44, 0x11, 0x05, 0xf8, 0x02, 0x59, 0x99, 0xae, 0x46, 0xd7, 0xf1, 0xf7, 0x6c, - 0xdf, 0xfd, 0xa6, 0x5b, 0xb7, 0x6c, 0x70, 0x5c, 0xe1, 0xd7, 0xf0, 0xba, 0x72, 0xcc, 0xe5, 0xca, - 0x31, 0x3f, 0x56, 0x8e, 0xf9, 0xb2, 0x76, 0x8c, 0xe5, 0xda, 0x31, 0xde, 0xd6, 0x8e, 0xf1, 0x78, - 0x1b, 0x33, 0x45, 0xf3, 0xc0, 0x0d, 0x79, 0xe2, 0x8d, 0x6a, 0xb3, 0x3b, 0x12, 0x48, 0x6f, 0x63, - 0x7d, 0x12, 0x72, 0x01, 0x5f, 0xc7, 0xe2, 0x55, 0x5e, 0xc2, 0xa3, 0x7c, 0x06, 0xb2, 0x3a, 0xbd, - 0x5a, 0x64, 0x20, 0x03, 0x4b, 0x9f, 0xf0, 0xfc, 0x33, 0x00, 0x00, 0xff, 0xff, 0x19, 0x6e, 0xc4, - 0xce, 0x1a, 0x02, 0x00, 0x00, + proto.RegisterType((*Params)(nil), "injective.peggy.v1.Params") + proto.RegisterType((*GenesisState)(nil), "injective.peggy.v1.GenesisState") +} + +func init() { proto.RegisterFile("injective/peggy/v1/genesis.proto", fileDescriptor_3b8a70f18b346efa) } + +var fileDescriptor_3b8a70f18b346efa = []byte{ + // 944 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x6e, 0x1b, 0x45, + 0x18, 0xb7, 0xa9, 0x6b, 0xa7, 0x93, 0x3f, 0x6e, 0xc6, 0x09, 0x1d, 0x5c, 0xd5, 0xb1, 0x4a, 0x29, + 0x11, 0xa2, 0x76, 0x6a, 0x10, 0x07, 0x50, 0x0f, 0xb1, 0x9b, 0xd2, 0x88, 0x86, 0x54, 0x9b, 0x08, + 0x24, 0x24, 0xb4, 0x8c, 0x67, 0x27, 0xeb, 0xa1, 0xbb, 0x33, 0xd1, 0xce, 0xd8, 0xa1, 0x37, 0x1e, + 0x81, 0x07, 0xe1, 0x2d, 0xb8, 0xf4, 0xd8, 0x23, 0x42, 0xa8, 0x42, 0xc9, 0x8b, 0xa0, 0xfd, 0x66, + 0x76, 0xbd, 0x09, 0x9b, 0x1c, 0x22, 0x4e, 0xf6, 0xce, 0xef, 0xdf, 0xa7, 0x6f, 0x66, 0xbe, 0x41, + 0x5d, 0x21, 0x7f, 0xe6, 0xcc, 0x88, 0x19, 0xef, 0x1f, 0xf3, 0x30, 0x7c, 0xdd, 0x9f, 0x3d, 0xee, + 0x87, 0x5c, 0x72, 0x2d, 0x74, 0xef, 0x38, 0x51, 0x46, 0x61, 0x9c, 0x33, 0x7a, 0xc0, 0xe8, 0xcd, + 0x1e, 0xb7, 0xd7, 0x42, 0x15, 0x2a, 0x80, 0xfb, 0xe9, 0x3f, 0xcb, 0x6c, 0x77, 0x4a, 0xbc, 0xcc, + 0xeb, 0x63, 0xee, 0x9c, 0xda, 0xf7, 0x4a, 0xf0, 0x58, 0x87, 0xfa, 0x0a, 0xf9, 0x98, 0x1a, 0x36, + 0x71, 0xf8, 0x83, 0x12, 0x9c, 0x1a, 0xc3, 0xb5, 0xa1, 0x46, 0x28, 0x69, 0x59, 0xf7, 0xff, 0x58, + 0x40, 0xf5, 0x97, 0x34, 0xa1, 0xb1, 0xc6, 0x1f, 0xa0, 0x05, 0x20, 0xfa, 0x22, 0x20, 0xd5, 0x6e, + 0x75, 0xf3, 0x96, 0xd7, 0x80, 0xef, 0xdd, 0x00, 0x6f, 0xa1, 0x35, 0xa6, 0xa4, 0x49, 0x28, 0x33, + 0xbe, 0x56, 0xd3, 0x84, 0x71, 0x7f, 0x42, 0xf5, 0x84, 0xbc, 0x07, 0x34, 0x9c, 0x61, 0x07, 0x00, + 0x3d, 0xa7, 0x7a, 0x82, 0xbf, 0x40, 0x77, 0xc6, 0x89, 0x08, 0x42, 0xee, 0x73, 0x33, 0xe1, 0x09, + 0x9f, 0xc6, 0x3e, 0x0d, 0x82, 0x84, 0x6b, 0x4d, 0x6a, 0x20, 0x5a, 0xb7, 0xf0, 0x8e, 0x43, 0xb7, + 0x2d, 0x88, 0x1f, 0xa2, 0xa6, 0xd3, 0xb1, 0x09, 0x15, 0x32, 0xad, 0xe5, 0x66, 0xb7, 0xba, 0x59, + 0xf3, 0x96, 0xed, 0xf2, 0x28, 0x5d, 0xdd, 0x0d, 0xf0, 0x00, 0xad, 0x6b, 0x11, 0x4a, 0x1e, 0xf8, + 0x33, 0x1a, 0x69, 0x6e, 0xb4, 0x7f, 0x22, 0x64, 0xa0, 0x4e, 0x48, 0x1d, 0xd8, 0x2d, 0x0b, 0x7e, + 0x67, 0xb1, 0xef, 0x01, 0x2a, 0x68, 0xa0, 0x4f, 0x3c, 0xd7, 0x34, 0x8a, 0x9a, 0xa1, 0xc5, 0x9c, + 0x66, 0x0b, 0xad, 0x39, 0x0d, 0x8b, 0xa8, 0x88, 0x73, 0xc9, 0x02, 0x48, 0xb0, 0xc5, 0x46, 0x00, + 0xcd, 0x15, 0x86, 0x26, 0x21, 0x37, 0x36, 0xc5, 0x37, 0x22, 0xe6, 0x6a, 0x6a, 0x08, 0xb2, 0x0a, + 0x8b, 0x41, 0xc8, 0xa1, 0x45, 0xf0, 0xa7, 0x08, 0xd3, 0x19, 0x4f, 0x68, 0xc8, 0xfd, 0x71, 0xa4, + 0xd8, 0x2b, 0x90, 0x90, 0x45, 0xe0, 0xdf, 0x76, 0xc8, 0x30, 0x05, 0x52, 0x01, 0x7e, 0x82, 0xee, + 0x66, 0xec, 0xbc, 0xb5, 0x05, 0xd9, 0x12, 0xc8, 0x88, 0xa3, 0x64, 0xed, 0x9d, 0xcb, 0xc7, 0x68, + 0x5d, 0x47, 0x54, 0x4f, 0xfc, 0xa3, 0x74, 0xc7, 0x84, 0x92, 0xae, 0x81, 0x64, 0xb9, 0x5b, 0xdd, + 0x5c, 0x1a, 0xf6, 0xde, 0xbc, 0xdb, 0xa8, 0xfc, 0xf5, 0x6e, 0xe3, 0x61, 0x28, 0xcc, 0x64, 0x3a, + 0xee, 0x31, 0x15, 0xf7, 0x99, 0xd2, 0xb1, 0xd2, 0xee, 0xe7, 0x91, 0x0e, 0x5e, 0xb9, 0x63, 0xfa, + 0x94, 0x33, 0xaf, 0x05, 0x66, 0xcf, 0x9c, 0x97, 0xed, 0x37, 0xfe, 0x09, 0xad, 0x5d, 0xc8, 0x80, + 0x56, 0x90, 0x95, 0x6b, 0x45, 0xe0, 0x73, 0x11, 0xd0, 0xb9, 0x92, 0x04, 0xd8, 0x1e, 0xd2, 0xfc, + 0x1f, 0x12, 0x60, 0x37, 0xf1, 0x09, 0xea, 0x5e, 0x4c, 0x50, 0xf2, 0x28, 0x12, 0xcc, 0x08, 0x19, + 0xba, 0xb4, 0xdb, 0xd7, 0x4a, 0xbb, 0x77, 0x3e, 0x6d, 0xee, 0x6a, 0x83, 0x47, 0xa8, 0x33, 0x95, + 0x63, 0x25, 0x03, 0x1f, 0x78, 0x69, 0xda, 0x85, 0x23, 0xbe, 0x0a, 0x5b, 0x7c, 0xd7, 0xb2, 0x0e, + 0x1c, 0xe9, 0xfc, 0x51, 0xff, 0x04, 0xad, 0xda, 0x6c, 0x9f, 0x29, 0x21, 0xfd, 0x80, 0x4b, 0x15, + 0x13, 0x0c, 0x17, 0xaf, 0x69, 0x81, 0x91, 0x12, 0xf2, 0x69, 0xba, 0x8c, 0xbf, 0x42, 0xed, 0x22, + 0x97, 0x27, 0x6c, 0xb0, 0xe5, 0x67, 0x57, 0x9a, 0xb4, 0x40, 0x74, 0x67, 0x2e, 0xda, 0x49, 0xf1, + 0x91, 0x83, 0xbf, 0xac, 0xfd, 0xfa, 0x77, 0xb7, 0x72, 0xff, 0xf7, 0x3a, 0x5a, 0xfa, 0xda, 0x8e, + 0xc1, 0x03, 0x43, 0x0d, 0xc7, 0x03, 0x54, 0x3f, 0x86, 0xa9, 0x02, 0x93, 0x64, 0x71, 0xd0, 0xee, + 0xfd, 0x77, 0x2c, 0xf6, 0xec, 0xdc, 0xf1, 0x1c, 0x13, 0xf7, 0x50, 0x2b, 0xa2, 0xda, 0xf8, 0x6a, + 0xac, 0x79, 0x32, 0xe3, 0x81, 0x2f, 0x95, 0x64, 0x1c, 0x66, 0x4c, 0xcd, 0x5b, 0x4d, 0xa1, 0x7d, + 0x87, 0x7c, 0x9b, 0x02, 0xf8, 0x73, 0xd4, 0x70, 0x8d, 0x21, 0x37, 0xba, 0x37, 0x2e, 0x0b, 0xb1, + 0x7d, 0xf1, 0x32, 0x2a, 0xde, 0x43, 0x4d, 0xfb, 0x17, 0xf6, 0x53, 0x24, 0x71, 0x3a, 0x90, 0x52, + 0xf5, 0x83, 0x32, 0xf5, 0x9e, 0x76, 0x8d, 0x1d, 0x59, 0xb2, 0xb7, 0x32, 0x2b, 0x7e, 0x6a, 0xfc, + 0x04, 0x35, 0xdc, 0x30, 0x21, 0x37, 0xc1, 0xe6, 0xc3, 0x32, 0x9b, 0xfd, 0xa9, 0x09, 0x95, 0x90, + 0xe1, 0xe1, 0x2f, 0x70, 0x7c, 0xbd, 0x4c, 0x83, 0x5f, 0xa2, 0x15, 0x3b, 0x25, 0xf2, 0x62, 0xea, + 0x97, 0xbb, 0xec, 0xe9, 0xd0, 0xe5, 0x82, 0xcb, 0xb0, 0x96, 0x1e, 0x3c, 0x6f, 0x19, 0x0c, 0xf2, + 0x82, 0x9e, 0xa1, 0xc5, 0x48, 0x85, 0x82, 0xf9, 0x8c, 0x46, 0x91, 0x26, 0x0d, 0xb0, 0xfb, 0xe8, + 0xaa, 0xa2, 0x5e, 0xa4, 0xf4, 0x11, 0x8d, 0x22, 0x0f, 0x45, 0xd9, 0x5f, 0x8d, 0x7f, 0x44, 0xad, + 0xb9, 0xcf, 0xbc, 0xbc, 0x05, 0xf0, 0xfb, 0xf8, 0xea, 0xf2, 0x72, 0x47, 0x57, 0xe2, 0x6a, 0xee, + 0x9b, 0x97, 0xb9, 0x8b, 0x96, 0x0a, 0x8f, 0x91, 0x26, 0xb7, 0xc0, 0x77, 0xa3, 0xcc, 0x77, 0x7b, + 0xce, 0x73, 0x7e, 0xe7, 0xa4, 0xf8, 0x08, 0xbd, 0xaf, 0x92, 0xb4, 0x9b, 0x26, 0xa1, 0x46, 0x25, + 0xd9, 0x3b, 0xc3, 0x35, 0x41, 0x60, 0xda, 0xbf, 0xa4, 0xd8, 0x03, 0x6e, 0xf6, 0x0b, 0xba, 0xed, + 0x4c, 0xe6, 0xad, 0xab, 0xb2, 0x65, 0xfc, 0x1c, 0x35, 0xed, 0xdd, 0x30, 0xca, 0x5e, 0x28, 0x4d, + 0x16, 0x21, 0xa0, 0x5b, 0x16, 0xb0, 0xe3, 0x8d, 0x06, 0x5b, 0x87, 0x0a, 0xae, 0x98, 0xb7, 0x0c, + 0x42, 0xf7, 0xa5, 0x87, 0xfc, 0xcd, 0x69, 0xa7, 0xfa, 0xf6, 0xb4, 0x53, 0xfd, 0xe7, 0xb4, 0x53, + 0xfd, 0xed, 0xac, 0x53, 0x79, 0x7b, 0xd6, 0xa9, 0xfc, 0x79, 0xd6, 0xa9, 0xfc, 0xf0, 0x4d, 0x61, + 0x86, 0xec, 0x66, 0xa6, 0x2f, 0xe8, 0x58, 0xf7, 0xf3, 0x88, 0x47, 0x4c, 0x25, 0xbc, 0xf8, 0x99, + 0xbe, 0x88, 0xfd, 0x58, 0x05, 0xd3, 0x88, 0x6b, 0xf7, 0xd4, 0xc3, 0xb0, 0x19, 0xd7, 0xe1, 0x89, + 0xff, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8a, 0xd5, 0x4e, 0x21, 0xb5, 0x08, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -225,30 +443,115 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.InjContractAddress) > 0 { - i -= len(m.InjContractAddress) - copy(dAtA[i:], m.InjContractAddress) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.InjContractAddress))) + if len(m.CosmosCoinErc20Contract) > 0 { + i -= len(m.CosmosCoinErc20Contract) + copy(dAtA[i:], m.CosmosCoinErc20Contract) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.CosmosCoinErc20Contract))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if len(m.CosmosCoinDenom) > 0 { + i -= len(m.CosmosCoinDenom) + copy(dAtA[i:], m.CosmosCoinDenom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.CosmosCoinDenom))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if m.UnbondSlashingValsetsWindow != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.UnbondSlashingValsetsWindow)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + { + size := m.SlashFractionConflictingClaim.Size() + i -= size + if _, err := m.SlashFractionConflictingClaim.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.SlashFractionClaim.Size() + i -= size + if _, err := m.SlashFractionClaim.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.SlashFractionBatch.Size() + i -= size + if _, err := m.SlashFractionBatch.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.SlashFractionValset.Size() + i -= size + if _, err := m.SlashFractionValset.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + if m.AverageEthereumBlockTime != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.AverageEthereumBlockTime)) + i-- + dAtA[i] = 0x60 + } + if m.AverageBlockTime != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.AverageBlockTime)) + i-- + dAtA[i] = 0x58 + } + if m.TargetBatchTimeout != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.TargetBatchTimeout)) + i-- + dAtA[i] = 0x50 + } + if m.SignedClaimsWindow != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.SignedClaimsWindow)) + i-- + dAtA[i] = 0x40 + } + if m.SignedBatchesWindow != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.SignedBatchesWindow)) + i-- + dAtA[i] = 0x38 + } + if m.SignedValsetsWindow != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.SignedValsetsWindow)) + i-- + dAtA[i] = 0x30 } if m.BridgeChainId != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.BridgeChainId)) i-- dAtA[i] = 0x28 } - if len(m.EthereumAddress) > 0 { - i -= len(m.EthereumAddress) - copy(dAtA[i:], m.EthereumAddress) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.EthereumAddress))) + if len(m.BridgeEthereumAddress) > 0 { + i -= len(m.BridgeEthereumAddress) + copy(dAtA[i:], m.BridgeEthereumAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.BridgeEthereumAddress))) i-- dAtA[i] = 0x22 } - if m.StartThreshold != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.StartThreshold)) - i-- - dAtA[i] = 0x18 - } if len(m.ContractSourceHash) > 0 { i -= len(m.ContractSourceHash) copy(dAtA[i:], m.ContractSourceHash) @@ -286,6 +589,137 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Erc20ToDenoms) > 0 { + for iNdEx := len(m.Erc20ToDenoms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Erc20ToDenoms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.OrchestratorAddresses) > 0 { + for iNdEx := len(m.OrchestratorAddresses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OrchestratorAddresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.Attestations) > 0 { + for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attestations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.LogicCallConfirms) > 0 { + for iNdEx := len(m.LogicCallConfirms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LogicCallConfirms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.LogicCalls) > 0 { + for iNdEx := len(m.LogicCalls) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LogicCalls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.BatchConfirms) > 0 { + for iNdEx := len(m.BatchConfirms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BatchConfirms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.Batches) > 0 { + for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.ValsetConfirms) > 0 { + for iNdEx := len(m.ValsetConfirms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValsetConfirms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Valsets) > 0 { + for iNdEx := len(m.Valsets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Valsets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.LastObservedNonce != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastObservedNonce)) + i-- + dAtA[i] = 0x10 + } if m.Params != nil { { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) @@ -326,19 +760,49 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - if m.StartThreshold != 0 { - n += 1 + sovGenesis(uint64(m.StartThreshold)) - } - l = len(m.EthereumAddress) + l = len(m.BridgeEthereumAddress) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } if m.BridgeChainId != 0 { n += 1 + sovGenesis(uint64(m.BridgeChainId)) } - l = len(m.InjContractAddress) + if m.SignedValsetsWindow != 0 { + n += 1 + sovGenesis(uint64(m.SignedValsetsWindow)) + } + if m.SignedBatchesWindow != 0 { + n += 1 + sovGenesis(uint64(m.SignedBatchesWindow)) + } + if m.SignedClaimsWindow != 0 { + n += 1 + sovGenesis(uint64(m.SignedClaimsWindow)) + } + if m.TargetBatchTimeout != 0 { + n += 1 + sovGenesis(uint64(m.TargetBatchTimeout)) + } + if m.AverageBlockTime != 0 { + n += 1 + sovGenesis(uint64(m.AverageBlockTime)) + } + if m.AverageEthereumBlockTime != 0 { + n += 1 + sovGenesis(uint64(m.AverageEthereumBlockTime)) + } + l = m.SlashFractionValset.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.SlashFractionBatch.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.SlashFractionClaim.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.SlashFractionConflictingClaim.Size() + n += 2 + l + sovGenesis(uint64(l)) + if m.UnbondSlashingValsetsWindow != 0 { + n += 2 + sovGenesis(uint64(m.UnbondSlashingValsetsWindow)) + } + l = len(m.CosmosCoinDenom) if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) + n += 2 + l + sovGenesis(uint64(l)) + } + l = len(m.CosmosCoinErc20Contract) + if l > 0 { + n += 2 + l + sovGenesis(uint64(l)) } return n } @@ -353,6 +817,63 @@ func (m *GenesisState) Size() (n int) { l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) } + if m.LastObservedNonce != 0 { + n += 1 + sovGenesis(uint64(m.LastObservedNonce)) + } + if len(m.Valsets) > 0 { + for _, e := range m.Valsets { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ValsetConfirms) > 0 { + for _, e := range m.ValsetConfirms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Batches) > 0 { + for _, e := range m.Batches { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.BatchConfirms) > 0 { + for _, e := range m.BatchConfirms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.LogicCalls) > 0 { + for _, e := range m.LogicCalls { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.LogicCallConfirms) > 0 { + for _, e := range m.LogicCallConfirms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Attestations) > 0 { + for _, e := range m.Attestations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.OrchestratorAddresses) > 0 { + for _, e := range m.OrchestratorAddresses { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Erc20ToDenoms) > 0 { + for _, e := range m.Erc20ToDenoms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -455,28 +976,9 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.ContractSourceHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartThreshold", wireType) - } - m.StartThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BridgeEthereumAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -504,7 +1006,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.EthereumAddress = string(dAtA[iNdEx:postIndex]) + m.BridgeEthereumAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { @@ -526,10 +1028,10 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InjContractAddress", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedValsetsWindow", wireType) } - var stringLen uint64 + m.SignedValsetsWindow = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -539,38 +1041,332 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SignedValsetsWindow |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedBatchesWindow", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.SignedBatchesWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignedBatchesWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - m.InjContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedClaimsWindow", wireType) } - if skippy < 0 { - return ErrInvalidLengthGenesis + m.SignedClaimsWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignedClaimsWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenesis + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetBatchTimeout", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + m.TargetBatchTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetBatchTimeout |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AverageBlockTime", wireType) + } + m.AverageBlockTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AverageBlockTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AverageEthereumBlockTime", wireType) + } + m.AverageEthereumBlockTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AverageEthereumBlockTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionValset", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFractionValset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionBatch", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFractionBatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionClaim", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFractionClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionConflictingClaim", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFractionConflictingClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondSlashingValsetsWindow", wireType) + } + m.UnbondSlashingValsetsWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondSlashingValsetsWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosCoinDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CosmosCoinDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosCoinErc20Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CosmosCoinErc20Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } iNdEx += skippy } @@ -646,16 +1442,338 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastObservedNonce", wireType) } - if skippy < 0 { - return ErrInvalidLengthGenesis + m.LastObservedNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastObservedNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valsets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Valsets = append(m.Valsets, &Valset{}) + if err := m.Valsets[len(m.Valsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValsetConfirms", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValsetConfirms = append(m.ValsetConfirms, &MsgValsetConfirm{}) + if err := m.ValsetConfirms[len(m.ValsetConfirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Batches = append(m.Batches, &OutgoingTxBatch{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchConfirms", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BatchConfirms = append(m.BatchConfirms, MsgConfirmBatch{}) + if err := m.BatchConfirms[len(m.BatchConfirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogicCalls", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogicCalls = append(m.LogicCalls, &OutgoingLogicCall{}) + if err := m.LogicCalls[len(m.LogicCalls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogicCallConfirms", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogicCallConfirms = append(m.LogicCallConfirms, MsgConfirmLogicCall{}) + if err := m.LogicCallConfirms[len(m.LogicCallConfirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attestations = append(m.Attestations, Attestation{}) + if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddresses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrchestratorAddresses = append(m.OrchestratorAddresses, &MsgSetOrchestratorAddresses{}) + if err := m.OrchestratorAddresses[len(m.OrchestratorAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20ToDenoms", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20ToDenoms = append(m.Erc20ToDenoms, &ERC20ToDenom{}) + if err := m.Erc20ToDenoms[len(m.Erc20ToDenoms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenesis } if (iNdEx + skippy) > l { diff --git a/chain/peggy/types/genesis_test.go b/chain/peggy/types/genesis_test.go new file mode 100644 index 00000000..49c3066d --- /dev/null +++ b/chain/peggy/types/genesis_test.go @@ -0,0 +1,57 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestGenesisStateValidate(t *testing.T) { + specs := map[string]struct { + src *GenesisState + expErr bool + }{ + "default params": {src: DefaultGenesisState(), expErr: false}, + "empty params": {src: &GenesisState{Params: &Params{}}, expErr: true}, + "invalid params": {src: &GenesisState{ + Params: &Params{ + PeggyId: "foo", + ContractSourceHash: "laksdjflasdkfja", + BridgeEthereumAddress: "invalid-eth-address", + BridgeChainId: 3279089, + }, + }, expErr: true}, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestStringToByteArray(t *testing.T) { + specs := map[string]struct { + testString string + expErr bool + }{ + "16 bytes": {"lakjsdflaksdjfds", false}, + "32 bytes": {"lakjsdflaksdjfdslakjsdflaksdjfds", false}, + "33 bytes": {"€€€€€€€€€€€", true}, + } + + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + _, err := strToFixByteArray(spec.testString) + if spec.expErr { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/chain/peggy/types/key.go b/chain/peggy/types/key.go index a93955ee..d6b5fd29 100644 --- a/chain/peggy/types/key.go +++ b/chain/peggy/types/key.go @@ -30,11 +30,22 @@ var ( // i.e cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn ValsetConfirmKey = []byte{0x3} - // OracleClaimKey attestation details by nonce and validator address + // OracleClaimKey Claim details by nonce and validator address // i.e. cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn - // NOTE: this should be refactored to take a cosmos account address + // A claim is named more intuitively than an Attestation, it is literally + // a validator making a claim to have seen something happen. Claims are + // attached to attestations which can be thought of as 'the event' that + // will eventually be executed. OracleClaimKey = []byte{0x4} + // OracleAttestationKey attestation details by nonce and validator address + // i.e. cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn + // An attestation can be thought of as the 'event to be executed' while + // the Claims are an individual validator saying that they saw an event + // occur the Attestation is 'the event' that multiple claims vote on and + // eventually executes + OracleAttestationKey = []byte{0x5} + // OutgoingTXPoolKey indexes the last nonce for the outgoing tx pool OutgoingTXPoolKey = []byte{0x6} @@ -47,6 +58,9 @@ var ( // OutgoingTXBatchKey indexes outgoing tx batches under a nonce and token address OutgoingTXBatchKey = []byte{0xa} + // OutgoingTXBatchBlockKey indexes outgoing tx batches under a block height and token address + OutgoingTXBatchBlockKey = []byte{0xb} + // BatchConfirmKey indexes validator confirmations by token contract address BatchConfirmKey = []byte{0xe1} @@ -67,19 +81,56 @@ var ( // KeyLastOutgoingBatchID indexes the lastBatchID KeyLastOutgoingBatchID = append(SequenceKeyPrefix, []byte("lastBatchId")...) + + // KeyOrchestratorAddress indexes the validator keys for an orchestrator + KeyOrchestratorAddress = []byte{0xe8} + + // KeyOutgoingLogicCall indexes the outgoing logic calls + KeyOutgoingLogicCall = []byte{0xde} + + // KeyOutgoingLogicConfirm indexes the outgoing logic confirms + KeyOutgoingLogicConfirm = []byte{0xae} + + // LastObservedEthereumBlockHeightKey indexes the latest Ethereum block height + LastObservedEthereumBlockHeightKey = []byte{0xf9} + + // DenomToERC20Key prefixes the index of Cosmos originated asset denoms to ERC20s + DenomToERC20Key = []byte{0xf3} + + // ERC20ToDenomKey prefixes the index of Cosmos originated assets ERC20s to denoms + ERC20ToDenomKey = []byte{0xf4} + + // LastSlashedValsetNonce indexes the latest slashed valset nonce + LastSlashedValsetNonce = []byte{0xf5} + + // LatestValsetNonce indexes the latest valset nonce + LatestValsetNonce = []byte{0xf6} + + // LastSlashedBatchBlock indexes the latest slashed batch block height + LastSlashedBatchBlock = []byte{0xf7} + + // LastUnBondingBlockHeight indexes the last validator unbonding block height + LastUnBondingBlockHeight = []byte{0xf8} ) +// GetOrchestratorAddressKey returns the following key format +// prefix +// [0xe8][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] +func GetOrchestratorAddressKey(orc sdk.AccAddress) []byte { + return append(KeyOrchestratorAddress, orc.Bytes()...) +} + // GetEthAddressKey returns the following key format // prefix cosmos-validator -// [0x0][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] -func GetEthAddressKey(validator sdk.AccAddress) []byte { +// [0x0][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn] +func GetEthAddressKey(validator sdk.ValAddress) []byte { return append(EthAddressKey, validator.Bytes()...) } -// GetValsetRequestKey returns the following key format +// GetValsetKey returns the following key format // prefix nonce // [0x0][0 0 0 0 0 0 0 1] -func GetValsetRequestKey(nonce uint64) []byte { +func GetValsetKey(nonce uint64) []byte { return append(ValsetRequestKey, UInt64Bytes(nonce)...) } @@ -94,30 +145,55 @@ func GetValsetConfirmKey(nonce uint64, validator sdk.AccAddress) []byte { // GetClaimKey returns the following key format // prefix type cosmos-validator-address nonce attestation-details-hash // [0x0][0 0 0 1][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] -// TODO: remove the validator address usage here! -func GetClaimKey(claimType ClaimType, nonce uint64, validator sdk.ValAddress, details EthereumClaim) []byte { +// The Claim hash identifies a unique event, for example it would have a event nonce, a sender and a receiver. Or an event nonce and a batch nonce. But +// the Claim is stored indexed with the claimer key to make sure that it is unique. +func GetClaimKey(details EthereumClaim) []byte { var detailsHash []byte if details != nil { detailsHash = details.ClaimHash() } else { panic("No claim without details!") } - claimTypeLen := len([]byte{byte(claimType)}) - nonceBz := UInt64Bytes(nonce) + claimTypeLen := len([]byte{byte(details.GetType())}) + nonceBz := UInt64Bytes(details.GetEventNonce()) key := make([]byte, len(OracleClaimKey)+claimTypeLen+sdk.AddrLen+len(nonceBz)+len(detailsHash)) copy(key[0:], OracleClaimKey) - copy(key[len(OracleClaimKey):], []byte{byte(claimType)}) - copy(key[len(OracleClaimKey)+claimTypeLen:], validator) + copy(key[len(OracleClaimKey):], []byte{byte(details.GetType())}) + // TODO this is the delegate address, should be stored by the valaddress + copy(key[len(OracleClaimKey)+claimTypeLen:], details.GetClaimer()) copy(key[len(OracleClaimKey)+claimTypeLen+sdk.AddrLen:], nonceBz) copy(key[len(OracleClaimKey)+claimTypeLen+sdk.AddrLen+len(nonceBz):], detailsHash) return key } // GetAttestationKey returns the following key format -// prefix nonce attestation-details-hash -// [0x6][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] -func GetAttestationKey(eventNonce uint64, details EthereumClaim) []byte { - return append(UInt64Bytes(eventNonce), details.ClaimHash()...) +// prefix nonce claim-details-hash +// [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] +// An attestation is an event multiple people are voting on, this function needs the claim +// details because each Attestation is aggregating all claims of a specific event, lets say +// validator X and validator y where making different claims about the same event nonce +// Note that the claim hash does NOT include the claimer address and only identifies an event +func GetAttestationKey(eventNonce uint64, claimHash []byte) []byte { + key := make([]byte, len(OracleAttestationKey)+len(UInt64Bytes(0))+len(claimHash)) + copy(key[0:], OracleAttestationKey) + copy(key[len(OracleAttestationKey):], UInt64Bytes(eventNonce)) + copy(key[len(OracleAttestationKey)+len(UInt64Bytes(0)):], claimHash) + return key +} + +// GetAttestationKeyWithHash returns the following key format +// prefix nonce claim-details-hash +// [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] +// An attestation is an event multiple people are voting on, this function needs the claim +// details because each Attestation is aggregating all claims of a specific event, lets say +// validator X and validator y where making different claims about the same event nonce +// Note that the claim hash does NOT include the claimer address and only identifies an event +func GetAttestationKeyWithHash(eventNonce uint64, claimHash []byte) []byte { + key := make([]byte, len(OracleAttestationKey)+len(UInt64Bytes(0))+len(claimHash)) + copy(key[0:], OracleAttestationKey) + copy(key[len(OracleAttestationKey):], UInt64Bytes(eventNonce)) + copy(key[len(OracleAttestationKey)+len(UInt64Bytes(0)):], claimHash) + return key } // GetOutgoingTxPoolKey returns the following key format @@ -134,10 +210,17 @@ func GetOutgoingTxBatchKey(tokenContract string, nonce uint64) []byte { return append(append(OutgoingTXBatchKey, []byte(tokenContract)...), UInt64Bytes(nonce)...) } +// GetOutgoingTxBatchBlockKey returns the following key format +// prefix blockheight +// [0xb][0 0 0 0 2 1 4 3] +func GetOutgoingTxBatchBlockKey(block uint64) []byte { + return append(OutgoingTXBatchBlockKey, UInt64Bytes(block)...) +} + // GetBatchConfirmKey returns the following key format -// prefix eth-contract-address cosmos-address -// [0xe1][0xc783df8a850f42e7F7e57013759C285caa701eB6][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] -// MARK finish-batches: take a look at this +// prefix eth-contract-address BatchNonce Validator-address +// [0xe1][0xc783df8a850f42e7F7e57013759C285caa701eB6][0 0 0 0 0 0 0 1][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn] +// TODO this should be a sdk.ValAddress func GetBatchConfirmKey(tokenContract string, batchNonce uint64, validator sdk.AccAddress) []byte { a := append(UInt64Bytes(batchNonce), validator.Bytes()...) b := append([]byte(tokenContract), a...) @@ -148,19 +231,16 @@ func GetBatchConfirmKey(tokenContract string, batchNonce uint64, validator sdk.A // GetFeeSecondIndexKey returns the following key format // prefix eth-contract-address fee_amount // [0x9][0xc783df8a850f42e7F7e57013759C285caa701eB6][1000000000] -func GetFeeSecondIndexKey(fee sdk.Coin, injTokenContract string) []byte { - var contractAddr string - if fee.Denom == "inj" { - contractAddr = injTokenContract - } else { - er, _ := ERC20FromPeggyCoin(fee) - contractAddr = er.Contract - } - - r := make([]byte, 1+ETHContractAddressLen+8) +func GetFeeSecondIndexKey(tokenContract string, fee sdk.Coin) []byte { + r := make([]byte, 1+ETHContractAddressLen+32) + // sdkInts have a size limit of 255 bits or 32 bytes + // therefore this will never panic and is always safe + amount := make([]byte, 32) + amount = fee.Amount.BigInt().FillBytes(amount) + // TODO this won't ever work fix it copy(r[0:], SecondIndexOutgoingTXFeeKey) - copy(r[len(SecondIndexOutgoingTXFeeKey):], []byte(contractAddr)) - copy(r[len(SecondIndexOutgoingTXFeeKey)+len(contractAddr):], sdk.Uint64ToBigEndian(fee.Amount.Uint64())) + copy(r[len(SecondIndexOutgoingTXFeeKey):], []byte(tokenContract)) + copy(r[len(SecondIndexOutgoingTXFeeKey)+len(tokenContract):], amount) return r } @@ -171,3 +251,22 @@ func GetFeeSecondIndexKey(fee sdk.Coin, injTokenContract string) []byte { func GetLastEventNonceByValidatorKey(validator sdk.ValAddress) []byte { return append(LastEventNonceByValidatorKey, validator.Bytes()...) } + +func GetDenomToERC20Key(denom string) []byte { + return append(DenomToERC20Key, []byte(denom)...) +} + +func GetERC20ToDenomKey(erc20 string) []byte { + return append(ERC20ToDenomKey, []byte(erc20)...) +} + +func GetOutgoingLogicCallKey(invalidationId []byte, invalidationNonce uint64) []byte { + a := append(KeyOutgoingLogicCall, invalidationId...) + return append(a, UInt64Bytes(invalidationNonce)...) +} + +func GetLogicConfirmKey(invalidationId []byte, invalidationNonce uint64, validator sdk.AccAddress) []byte { + interm := append(KeyOutgoingLogicConfirm, invalidationId...) + interm = append(interm, UInt64Bytes(invalidationNonce)...) + return append(interm, validator.Bytes()...) +} diff --git a/chain/peggy/types/msgs.go b/chain/peggy/types/msgs.go index 779f957d..8ad583ec 100644 --- a/chain/peggy/types/msgs.go +++ b/chain/peggy/types/msgs.go @@ -6,39 +6,40 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/common" "github.com/tendermint/tendermint/crypto/tmhash" ) var ( _ sdk.Msg = &MsgValsetConfirm{} - _ sdk.Msg = &MsgValsetRequest{} - _ sdk.Msg = &MsgSetEthAddress{} _ sdk.Msg = &MsgSendToEth{} _ sdk.Msg = &MsgRequestBatch{} _ sdk.Msg = &MsgConfirmBatch{} + _ sdk.Msg = &MsgSetOrchestratorAddresses{} ) -// NewMsgValsetConfirm returns a new msgValsetConfirm -func NewMsgValsetConfirm(nonce uint64, ethAddress string, validator sdk.AccAddress, signature string) *MsgValsetConfirm { - return &MsgValsetConfirm{ - Nonce: nonce, - Validator: validator.String(), - EthAddress: ethAddress, - Signature: signature, +// NewMsgSetOrchestratorAddress returns a new MsgSetOrchestratorAddresses +func NewMsgSetOrchestratorAddress(sender, orchestrator sdk.AccAddress, ethAddr common.Address) *MsgSetOrchestratorAddresses { + return &MsgSetOrchestratorAddresses{ + Sender: sender.String(), + Orchestrator: orchestrator.String(), + EthAddress: ethAddr.Hex(), } } // Route should return the name of the module -func (msg *MsgValsetConfirm) Route() string { return RouterKey } +func (msg *MsgSetOrchestratorAddresses) Route() string { return RouterKey } // Type should return the action -func (msg *MsgValsetConfirm) Type() string { return "valset_confirm" } +func (msg *MsgSetOrchestratorAddresses) Type() string { return "set_operator_address" } // ValidateBasic performs stateless checks -func (msg *MsgValsetConfirm) ValidateBasic() (err error) { - if _, err = sdk.AccAddressFromBech32(msg.Validator); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Validator) +func (msg *MsgSetOrchestratorAddresses) ValidateBasic() (err error) { + if _, err = sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if _, err = sdk.AccAddressFromBech32(msg.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator) } if err := ValidateEthAddress(msg.EthAddress); err != nil { return sdkerrors.Wrap(err, "ethereum address") @@ -47,101 +48,56 @@ func (msg *MsgValsetConfirm) ValidateBasic() (err error) { } // GetSignBytes encodes the message for signing -func (msg *MsgValsetConfirm) GetSignBytes() []byte { +func (msg *MsgSetOrchestratorAddresses) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) } // GetSigners defines whose signature is required -func (msg *MsgValsetConfirm) GetSigners() []sdk.AccAddress { - // TODO: figure out how to convert between AccAddress and ValAddress properly - acc, err := sdk.AccAddressFromBech32(msg.Validator) +func (msg *MsgSetOrchestratorAddresses) GetSigners() []sdk.AccAddress { + acc, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { panic(err) } - return []sdk.AccAddress{acc} -} - -// NewMsgValsetRequest returns a new msgValsetRequest -func NewMsgValsetRequest(requester sdk.AccAddress) *MsgValsetRequest { - return &MsgValsetRequest{ - Requester: requester.String(), - } -} -// Route should return the name of the module -func (msg MsgValsetRequest) Route() string { return RouterKey } - -// Type should return the action -func (msg MsgValsetRequest) Type() string { return "valset_request" } - -// ValidateBasic performs stateless checks -func (msg MsgValsetRequest) ValidateBasic() (err error) { - if _, err = sdk.AccAddressFromBech32(msg.Requester); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Requester) - } - return nil -} - -// GetSignBytes encodes the message for signing -func (msg MsgValsetRequest) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) -} - -// GetSigners defines whose signature is required -func (msg MsgValsetRequest) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Requester) - if err != nil { - panic(err) - } return []sdk.AccAddress{acc} } -// NewMsgSetEthAddress return a new msgSetEthAddress -// TODO: figure out if we need sdk.ValAddress here -func NewMsgSetEthAddress(address string, validator sdk.AccAddress, signature string) *MsgSetEthAddress { - return &MsgSetEthAddress{ - Address: address, - Validator: validator.String(), - Signature: signature, +// NewMsgValsetConfirm returns a new msgValsetConfirm +func NewMsgValsetConfirm(nonce uint64, ethAddress string, validator sdk.AccAddress, signature string) *MsgValsetConfirm { + return &MsgValsetConfirm{ + Nonce: nonce, + Orchestrator: validator.String(), + EthAddress: ethAddress, + Signature: signature, } } // Route should return the name of the module -func (msg MsgSetEthAddress) Route() string { return RouterKey } +func (msg *MsgValsetConfirm) Route() string { return RouterKey } // Type should return the action -func (msg MsgSetEthAddress) Type() string { return "set_eth_address" } +func (msg *MsgValsetConfirm) Type() string { return "valset_confirm" } -// ValidateBasic runs stateless checks on the message -// Checks if the Eth address is valid, and whether the Eth address has signed the validator address -// (proving control of the Eth address) -func (msg MsgSetEthAddress) ValidateBasic() error { - val, err := sdk.AccAddressFromBech32(msg.Validator) - if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Validator) +// ValidateBasic performs stateless checks +func (msg *MsgValsetConfirm) ValidateBasic() (err error) { + if _, err = sdk.AccAddressFromBech32(msg.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator) } - if err := ValidateEthAddress(msg.Address); err != nil { + if err := ValidateEthAddress(msg.EthAddress); err != nil { return sdkerrors.Wrap(err, "ethereum address") } - sigBytes, err := hex.DecodeString(msg.Signature) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "Could not decode hex string %s", msg.Signature) - } - err = ValidateEthereumSignature(crypto.Keccak256(val.Bytes()), sigBytes, msg.Address) - if err != nil { - return sdkerrors.Wrapf(err, "digest: %x\nsig: %x\naddress %s\nerror: %s\n", crypto.Keccak256(val.Bytes()), msg.Signature, msg.Address, err.Error()) - } return nil } // GetSignBytes encodes the message for signing -func (msg MsgSetEthAddress) GetSignBytes() []byte { +func (msg *MsgValsetConfirm) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) } // GetSigners defines whose signature is required -func (msg MsgSetEthAddress) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Validator) +func (msg *MsgValsetConfirm) GetSigners() []sdk.AccAddress { + // TODO: figure out how to convert between AccAddress and ValAddress properly + acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) if err != nil { panic(err) } @@ -171,22 +127,10 @@ func (msg MsgSendToEth) ValidateBasic() error { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) } - // validate if denom of Amount and BridgeFee are same. - if msg.Amount.GetDenom() != msg.BridgeFee.GetDenom() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("fee and amount must be the same type %s != %s", msg.Amount.GetDenom(), msg.BridgeFee.GetDenom())) + // fee and send must be of the same denom + if msg.Amount.Denom != msg.BridgeFee.Denom { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("fee and amount must be the same type %s != %s", msg.Amount.Denom, msg.BridgeFee.Denom)) } - // aCoin, err := ERC20FromPeggyCoin(msg.Amount) - // if err != nil { - // return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("amount %#v is not a voucher type", msg)) - // } - // fCoin, err := ERC20FromPeggyCoin(msg.BridgeFee) - // if err != nil { - // return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("fee %#vs is not a voucher type", msg)) - // } - // // fee and send must be of the same denom - // if aCoin.Contract != fCoin.Contract { - // return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("fee and amount must be the same type %s != %s", aCoin.Contract, fCoin.Contract)) - // } if !msg.Amount.IsValid() || msg.Amount.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "amount") @@ -217,9 +161,9 @@ func (msg MsgSendToEth) GetSigners() []sdk.AccAddress { } // NewMsgRequestBatch returns a new msgRequestBatch -func NewMsgRequestBatch(requester sdk.AccAddress) *MsgRequestBatch { +func NewMsgRequestBatch(orchestrator sdk.AccAddress) *MsgRequestBatch { return &MsgRequestBatch{ - Requester: requester.String(), + Orchestrator: orchestrator.String(), } } @@ -231,12 +175,9 @@ func (msg MsgRequestBatch) Type() string { return "request_batch" } // ValidateBasic performs stateless checks func (msg MsgRequestBatch) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Requester); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Requester) + if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator) } - // TODO ensure that Demon matches hardcoded allowed value - // TODO later make sure that Demon matches a list of tokens already - // in the bridge to send return nil } @@ -247,7 +188,7 @@ func (msg MsgRequestBatch) GetSignBytes() []byte { // GetSigners defines whose signature is required func (msg MsgRequestBatch) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Requester) + acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) if err != nil { panic(err) } @@ -263,8 +204,8 @@ func (msg MsgConfirmBatch) Type() string { return "confirm_batch" } // ValidateBasic performs stateless checks func (msg MsgConfirmBatch) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Validator); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Validator) + if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator) } if err := ValidateEthAddress(msg.EthSigner); err != nil { return sdkerrors.Wrap(err, "eth signer") @@ -286,7 +227,46 @@ func (msg MsgConfirmBatch) GetSignBytes() []byte { // GetSigners defines whose signature is required func (msg MsgConfirmBatch) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Validator) + acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{acc} +} + +// Route should return the name of the module +func (msg MsgConfirmLogicCall) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgConfirmLogicCall) Type() string { return "confirm_logic" } + +// ValidateBasic performs stateless checks +func (msg MsgConfirmLogicCall) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator) + } + if err := ValidateEthAddress(msg.EthSigner); err != nil { + return sdkerrors.Wrap(err, "eth signer") + } + _, err := hex.DecodeString(msg.Signature) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "Could not decode hex string %s", msg.Signature) + } + _, err = hex.DecodeString(msg.InvalidationId) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "Could not decode hex string %s", msg.InvalidationId) + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgConfirmLogicCall) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgConfirmLogicCall) GetSigners() []sdk.AccAddress { + acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) if err != nil { panic(err) } @@ -295,7 +275,21 @@ func (msg MsgConfirmBatch) GetSigners() []sdk.AccAddress { // EthereumClaim represents a claim on ethereum state type EthereumClaim interface { + // All Ethereum claims that we relay from the Peggy contract and into the module + // have a nonce that is monotonically increasing and unique, since this nonce is + // issued by the Ethereum contract it is immutable and must be agreed on by all validators + // any disagreement on what claim goes to what nonce means someone is lying. GetEventNonce() uint64 + // The block height that the claimed event occurred on. This EventNonce provides sufficient + // ordering for the execution of all claims. The block height is used only for batchTimeouts + logicTimeouts + // when we go to create a new batch we set the timeout some number of batches out from the last + // known height plus projected block progress since then. + GetBlockHeight() uint64 + // the delegate address of the claimer, for MsgDepositClaim and MsgWithdrawClaim + // this is sent in as the sdk.AccAddress of the delegated key. it is up to the user + // to disambiguate this into a sdk.ValAddress + GetClaimer() sdk.AccAddress + // Which type of claim this is GetType() ClaimType ValidateBasic() error ClaimHash() []byte @@ -304,6 +298,8 @@ type EthereumClaim interface { var ( _ EthereumClaim = &MsgDepositClaim{} _ EthereumClaim = &MsgWithdrawClaim{} + _ EthereumClaim = &MsgERC20DeployedClaim{} + _ EthereumClaim = &MsgLogicCallExecutedClaim{} ) // GetType returns the type of the claim @@ -336,6 +332,16 @@ func (msg MsgDepositClaim) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) } +func (msg MsgDepositClaim) GetClaimer() sdk.AccAddress { + err := msg.ValidateBasic() + if err != nil { + panic("MsgDepositClaim failed ValidateBasic! Should have been handled earlier") + } + + val, _ := sdk.AccAddressFromBech32(msg.Orchestrator) + return val +} + // GetSigners defines whose signature is required func (msg MsgDepositClaim) GetSigners() []sdk.AccAddress { acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) @@ -395,6 +401,15 @@ func (msg MsgWithdrawClaim) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) } +func (msg MsgWithdrawClaim) GetClaimer() sdk.AccAddress { + err := msg.ValidateBasic() + if err != nil { + panic("MsgWithdrawClaim failed ValidateBasic! Should have been handled earlier") + } + val, _ := sdk.AccAddressFromBech32(msg.Orchestrator) + return val +} + // GetSigners defines whose signature is required func (msg MsgWithdrawClaim) GetSigners() []sdk.AccAddress { acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) @@ -414,3 +429,118 @@ func (msg MsgWithdrawClaim) Type() string { return "withdraw_claim" } const ( TypeMsgDepositClaim = "deposit_claim" ) + +// EthereumClaim implementation for MsgERC20DeployedClaim +// ====================================================== + +// GetType returns the type of the claim +func (e *MsgERC20DeployedClaim) GetType() ClaimType { + return CLAIM_TYPE_ERC20_DEPLOYED +} + +// ValidateBasic performs stateless checks +func (e *MsgERC20DeployedClaim) ValidateBasic() error { + if err := ValidateEthAddress(e.TokenContract); err != nil { + return sdkerrors.Wrap(err, "erc20 token") + } + if _, err := sdk.AccAddressFromBech32(e.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, e.Orchestrator) + } + if e.EventNonce == 0 { + return fmt.Errorf("nonce == 0") + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgERC20DeployedClaim) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg MsgERC20DeployedClaim) GetClaimer() sdk.AccAddress { + err := msg.ValidateBasic() + if err != nil { + panic("MsgERC20DeployedClaim failed ValidateBasic! Should have been handled earlier") + } + + val, _ := sdk.AccAddressFromBech32(msg.Orchestrator) + return val +} + +// GetSigners defines whose signature is required +func (msg MsgERC20DeployedClaim) GetSigners() []sdk.AccAddress { + acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{acc} +} + +// Type should return the action +func (msg MsgERC20DeployedClaim) Type() string { return "ERC20_deployed_claim" } + +// Route should return the name of the module +func (msg MsgERC20DeployedClaim) Route() string { return RouterKey } + +// Hash implements BridgeDeposit.Hash +func (b *MsgERC20DeployedClaim) ClaimHash() []byte { + path := fmt.Sprintf("%s/%s/%s/%s/%d/", b.CosmosDenom, b.TokenContract, b.Name, b.Symbol, b.Decimals) + return tmhash.Sum([]byte(path)) +} + +// EthereumClaim implementation for MsgLogicCallExecutedClaim +// ====================================================== + +// GetType returns the type of the claim +func (e *MsgLogicCallExecutedClaim) GetType() ClaimType { + return CLAIM_TYPE_LOGIC_CALL_EXECUTED +} + +// ValidateBasic performs stateless checks +func (e *MsgLogicCallExecutedClaim) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(e.Orchestrator); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, e.Orchestrator) + } + if e.EventNonce == 0 { + return fmt.Errorf("nonce == 0") + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgLogicCallExecutedClaim) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg MsgLogicCallExecutedClaim) GetClaimer() sdk.AccAddress { + err := msg.ValidateBasic() + if err != nil { + panic("MsgERC20DeployedClaim failed ValidateBasic! Should have been handled earlier") + } + + val, _ := sdk.AccAddressFromBech32(msg.Orchestrator) + return val +} + +// GetSigners defines whose signature is required +func (msg MsgLogicCallExecutedClaim) GetSigners() []sdk.AccAddress { + acc, err := sdk.AccAddressFromBech32(msg.Orchestrator) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{acc} +} + +// Type should return the action +func (msg MsgLogicCallExecutedClaim) Type() string { return "Logic_Call_Executed_Claim" } + +// Route should return the name of the module +func (msg MsgLogicCallExecutedClaim) Route() string { return RouterKey } + +// Hash implements BridgeDeposit.Hash +func (b *MsgLogicCallExecutedClaim) ClaimHash() []byte { + path := fmt.Sprintf("%s/%d/", b.InvalidationId, b.InvalidationNonce) + return tmhash.Sum([]byte(path)) +} diff --git a/chain/peggy/types/msgs.pb.go b/chain/peggy/types/msgs.pb.go index 517f78a5..4743f21e 100644 --- a/chain/peggy/types/msgs.pb.go +++ b/chain/peggy/types/msgs.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/msgs.proto +// source: injective/peggy/v1/msgs.proto package types @@ -31,40 +31,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgValsetConfirm -// this is the message sent by the validators when they wish to submit their -// signatures over the validator set at a given block height. A validator must -// first call MsgSetEthAddress to set their Ethereum address to be used for -// signing. Then someone (anyone) must make a ValsetRequest the request is -// essentially a messaging mechanism to determine which block all validators -// should submit signatures over. Finally validators sign the validator set, -// powers, and Ethereum addresses of the entire validator set at the height of a -// ValsetRequest and submit that signature with this message. -// -// If a sufficient number of validators (66% of voting power) (A) have set -// Ethereum addresses and (B) submit ValsetConfirm messages with their -// signatures it is then possible for anyone to view these signatures in the -// chain store and submit them to Ethereum to update the validator set -// ------------- -type MsgValsetConfirm struct { - Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - Validator string `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"` - EthAddress string `protobuf:"bytes,3,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` - Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *MsgValsetConfirm) Reset() { *m = MsgValsetConfirm{} } -func (m *MsgValsetConfirm) String() string { return proto.CompactTextString(m) } -func (*MsgValsetConfirm) ProtoMessage() {} -func (*MsgValsetConfirm) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{0} -} -func (m *MsgValsetConfirm) XXX_Unmarshal(b []byte) error { +// MsgSetOrchestratorAddresses +// this message allows validators to delegate their voting responsibilities +// to a given key. This key is then used as an optional authentication method +// for sigining oracle claims +// VALIDATOR +// The validator field is a cosmosvaloper1... string (i.e. sdk.ValAddress) +// that references a validator in the active set +// ORCHESTRATOR +// The orchestrator field is a cosmos1... string (i.e. sdk.AccAddress) that +// references the key that is being delegated to +// ETH_ADDRESS +// This is a hex encoded 0x Ethereum public key that will be used by this validator +// on Ethereum +type MsgSetOrchestratorAddresses struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Orchestrator string `protobuf:"bytes,2,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` + EthAddress string `protobuf:"bytes,3,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` +} + +func (m *MsgSetOrchestratorAddresses) Reset() { *m = MsgSetOrchestratorAddresses{} } +func (m *MsgSetOrchestratorAddresses) String() string { return proto.CompactTextString(m) } +func (*MsgSetOrchestratorAddresses) ProtoMessage() {} +func (*MsgSetOrchestratorAddresses) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{0} +} +func (m *MsgSetOrchestratorAddresses) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgValsetConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetOrchestratorAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgValsetConfirm.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetOrchestratorAddresses.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -74,62 +71,54 @@ func (m *MsgValsetConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgValsetConfirm) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgValsetConfirm.Merge(m, src) +func (m *MsgSetOrchestratorAddresses) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetOrchestratorAddresses.Merge(m, src) } -func (m *MsgValsetConfirm) XXX_Size() int { +func (m *MsgSetOrchestratorAddresses) XXX_Size() int { return m.Size() } -func (m *MsgValsetConfirm) XXX_DiscardUnknown() { - xxx_messageInfo_MsgValsetConfirm.DiscardUnknown(m) +func (m *MsgSetOrchestratorAddresses) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetOrchestratorAddresses.DiscardUnknown(m) } -var xxx_messageInfo_MsgValsetConfirm proto.InternalMessageInfo - -func (m *MsgValsetConfirm) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} +var xxx_messageInfo_MsgSetOrchestratorAddresses proto.InternalMessageInfo -func (m *MsgValsetConfirm) GetValidator() string { +func (m *MsgSetOrchestratorAddresses) GetSender() string { if m != nil { - return m.Validator + return m.Sender } return "" } -func (m *MsgValsetConfirm) GetEthAddress() string { +func (m *MsgSetOrchestratorAddresses) GetOrchestrator() string { if m != nil { - return m.EthAddress + return m.Orchestrator } return "" } -func (m *MsgValsetConfirm) GetSignature() string { +func (m *MsgSetOrchestratorAddresses) GetEthAddress() string { if m != nil { - return m.Signature + return m.EthAddress } return "" } -// TODO: write response data here -type MsgValsetConfirmResponse struct { +type MsgSetOrchestratorAddressesResponse struct { } -func (m *MsgValsetConfirmResponse) Reset() { *m = MsgValsetConfirmResponse{} } -func (m *MsgValsetConfirmResponse) String() string { return proto.CompactTextString(m) } -func (*MsgValsetConfirmResponse) ProtoMessage() {} -func (*MsgValsetConfirmResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{1} +func (m *MsgSetOrchestratorAddressesResponse) Reset() { *m = MsgSetOrchestratorAddressesResponse{} } +func (m *MsgSetOrchestratorAddressesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetOrchestratorAddressesResponse) ProtoMessage() {} +func (*MsgSetOrchestratorAddressesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{1} } -func (m *MsgValsetConfirmResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSetOrchestratorAddressesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgValsetConfirmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetOrchestratorAddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgValsetConfirmResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetOrchestratorAddressesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -139,44 +128,52 @@ func (m *MsgValsetConfirmResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgValsetConfirmResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgValsetConfirmResponse.Merge(m, src) +func (m *MsgSetOrchestratorAddressesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetOrchestratorAddressesResponse.Merge(m, src) } -func (m *MsgValsetConfirmResponse) XXX_Size() int { +func (m *MsgSetOrchestratorAddressesResponse) XXX_Size() int { return m.Size() } -func (m *MsgValsetConfirmResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgValsetConfirmResponse.DiscardUnknown(m) +func (m *MsgSetOrchestratorAddressesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetOrchestratorAddressesResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgValsetConfirmResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgSetOrchestratorAddressesResponse proto.InternalMessageInfo -// ValsetRequest -// This message starts off the validator set update process by coordinating a -// block height around which signatures over the validators, powers, and -// ethereum addresses will be made and submitted using a ValsetConfirm. Anyone -// can send this message as it is not authenticated except as a valid tx. In -// theory people could spam it and the validators will have to determine which -// block to actually coordinate around by looking over the valset requests and -// seeing which one some other validator has already submitted a ValsetResponse -// for. +// MsgValsetConfirm +// this is the message sent by the validators when they wish to submit their +// signatures over the validator set at a given block height. A validator must +// first call MsgSetEthAddress to set their Ethereum address to be used for +// signing. Then someone (anyone) must make a ValsetRequest the request is +// essentially a messaging mechanism to determine which block all validators +// should submit signatures over. Finally validators sign the validator set, +// powers, and Ethereum addresses of the entire validator set at the height of a +// ValsetRequest and submit that signature with this message. +// +// If a sufficient number of validators (66% of voting power) (A) have set +// Ethereum addresses and (B) submit ValsetConfirm messages with their +// signatures it is then possible for anyone to view these signatures in the +// chain store and submit them to Ethereum to update the validator set // ------------- -type MsgValsetRequest struct { - Requester string `protobuf:"bytes,1,opt,name=requester,proto3" json:"requester,omitempty"` +type MsgValsetConfirm struct { + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + Orchestrator string `protobuf:"bytes,2,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` + EthAddress string `protobuf:"bytes,3,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` + Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } -func (m *MsgValsetRequest) Reset() { *m = MsgValsetRequest{} } -func (m *MsgValsetRequest) String() string { return proto.CompactTextString(m) } -func (*MsgValsetRequest) ProtoMessage() {} -func (*MsgValsetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{2} +func (m *MsgValsetConfirm) Reset() { *m = MsgValsetConfirm{} } +func (m *MsgValsetConfirm) String() string { return proto.CompactTextString(m) } +func (*MsgValsetConfirm) ProtoMessage() {} +func (*MsgValsetConfirm) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{2} } -func (m *MsgValsetRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgValsetConfirm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgValsetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgValsetConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgValsetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgValsetConfirm.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -186,145 +183,61 @@ func (m *MsgValsetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgValsetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgValsetRequest.Merge(m, src) +func (m *MsgValsetConfirm) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgValsetConfirm.Merge(m, src) } -func (m *MsgValsetRequest) XXX_Size() int { +func (m *MsgValsetConfirm) XXX_Size() int { return m.Size() } -func (m *MsgValsetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgValsetRequest.DiscardUnknown(m) +func (m *MsgValsetConfirm) XXX_DiscardUnknown() { + xxx_messageInfo_MsgValsetConfirm.DiscardUnknown(m) } -var xxx_messageInfo_MsgValsetRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgValsetConfirm proto.InternalMessageInfo -func (m *MsgValsetRequest) GetRequester() string { +func (m *MsgValsetConfirm) GetNonce() uint64 { if m != nil { - return m.Requester - } - return "" -} - -// TODO: write response data here -type MsgValsetRequestResponse struct { -} - -func (m *MsgValsetRequestResponse) Reset() { *m = MsgValsetRequestResponse{} } -func (m *MsgValsetRequestResponse) String() string { return proto.CompactTextString(m) } -func (*MsgValsetRequestResponse) ProtoMessage() {} -func (*MsgValsetRequestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{3} -} -func (m *MsgValsetRequestResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgValsetRequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgValsetRequestResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgValsetRequestResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgValsetRequestResponse.Merge(m, src) -} -func (m *MsgValsetRequestResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgValsetRequestResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgValsetRequestResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgValsetRequestResponse proto.InternalMessageInfo - -// SetEthAddress -// This is used by the validators to set the Ethereum address that represents -// them on the Ethereum side of the bridge. They must sign their Cosmos address -// using the Ethereum address they have submitted. Like ValsetResponse this -// message can in theory be submitted by anyone, but only the current validator -// sets submissions carry any weight. -// ------------- -type MsgSetEthAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Validator string `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *MsgSetEthAddress) Reset() { *m = MsgSetEthAddress{} } -func (m *MsgSetEthAddress) String() string { return proto.CompactTextString(m) } -func (*MsgSetEthAddress) ProtoMessage() {} -func (*MsgSetEthAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{4} -} -func (m *MsgSetEthAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetEthAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetEthAddress.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.Nonce } -} -func (m *MsgSetEthAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetEthAddress.Merge(m, src) -} -func (m *MsgSetEthAddress) XXX_Size() int { - return m.Size() -} -func (m *MsgSetEthAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetEthAddress.DiscardUnknown(m) + return 0 } -var xxx_messageInfo_MsgSetEthAddress proto.InternalMessageInfo - -func (m *MsgSetEthAddress) GetAddress() string { +func (m *MsgValsetConfirm) GetOrchestrator() string { if m != nil { - return m.Address + return m.Orchestrator } return "" } -func (m *MsgSetEthAddress) GetValidator() string { +func (m *MsgValsetConfirm) GetEthAddress() string { if m != nil { - return m.Validator + return m.EthAddress } return "" } -func (m *MsgSetEthAddress) GetSignature() string { +func (m *MsgValsetConfirm) GetSignature() string { if m != nil { return m.Signature } return "" } -// TODO: write response data here -type MsgSetEthAddressResponse struct { +type MsgValsetConfirmResponse struct { } -func (m *MsgSetEthAddressResponse) Reset() { *m = MsgSetEthAddressResponse{} } -func (m *MsgSetEthAddressResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSetEthAddressResponse) ProtoMessage() {} -func (*MsgSetEthAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{5} +func (m *MsgValsetConfirmResponse) Reset() { *m = MsgValsetConfirmResponse{} } +func (m *MsgValsetConfirmResponse) String() string { return proto.CompactTextString(m) } +func (*MsgValsetConfirmResponse) ProtoMessage() {} +func (*MsgValsetConfirmResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{3} } -func (m *MsgSetEthAddressResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgValsetConfirmResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSetEthAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgValsetConfirmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSetEthAddressResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgValsetConfirmResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -334,17 +247,17 @@ func (m *MsgSetEthAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgSetEthAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetEthAddressResponse.Merge(m, src) +func (m *MsgValsetConfirmResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgValsetConfirmResponse.Merge(m, src) } -func (m *MsgSetEthAddressResponse) XXX_Size() int { +func (m *MsgValsetConfirmResponse) XXX_Size() int { return m.Size() } -func (m *MsgSetEthAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetEthAddressResponse.DiscardUnknown(m) +func (m *MsgValsetConfirmResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgValsetConfirmResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSetEthAddressResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgValsetConfirmResponse proto.InternalMessageInfo // MsgSendToEth // This is the message that a user calls when they want to bridge an asset @@ -369,7 +282,7 @@ func (m *MsgSendToEth) Reset() { *m = MsgSendToEth{} } func (m *MsgSendToEth) String() string { return proto.CompactTextString(m) } func (*MsgSendToEth) ProtoMessage() {} func (*MsgSendToEth) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{6} + return fileDescriptor_751daa04abed7ef4, []int{4} } func (m *MsgSendToEth) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -426,7 +339,6 @@ func (m *MsgSendToEth) GetBridgeFee() types.Coin { return types.Coin{} } -// TODO: write response data here type MsgSendToEthResponse struct { } @@ -434,7 +346,7 @@ func (m *MsgSendToEthResponse) Reset() { *m = MsgSendToEthResponse{} } func (m *MsgSendToEthResponse) String() string { return proto.CompactTextString(m) } func (*MsgSendToEthResponse) ProtoMessage() {} func (*MsgSendToEthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{7} + return fileDescriptor_751daa04abed7ef4, []int{5} } func (m *MsgSendToEthResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -473,15 +385,15 @@ var xxx_messageInfo_MsgSendToEthResponse proto.InternalMessageInfo // can finally submit the batch // ------------- type MsgRequestBatch struct { - Requester string `protobuf:"bytes,1,opt,name=requester,proto3" json:"requester,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Orchestrator string `protobuf:"bytes,1,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } func (m *MsgRequestBatch) Reset() { *m = MsgRequestBatch{} } func (m *MsgRequestBatch) String() string { return proto.CompactTextString(m) } func (*MsgRequestBatch) ProtoMessage() {} func (*MsgRequestBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{8} + return fileDescriptor_751daa04abed7ef4, []int{6} } func (m *MsgRequestBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -510,9 +422,9 @@ func (m *MsgRequestBatch) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRequestBatch proto.InternalMessageInfo -func (m *MsgRequestBatch) GetRequester() string { +func (m *MsgRequestBatch) GetOrchestrator() string { if m != nil { - return m.Requester + return m.Orchestrator } return "" } @@ -524,7 +436,6 @@ func (m *MsgRequestBatch) GetDenom() string { return "" } -// TODO: write response data here type MsgRequestBatchResponse struct { } @@ -532,7 +443,7 @@ func (m *MsgRequestBatchResponse) Reset() { *m = MsgRequestBatchResponse func (m *MsgRequestBatchResponse) String() string { return proto.CompactTextString(m) } func (*MsgRequestBatchResponse) ProtoMessage() {} func (*MsgRequestBatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{9} + return fileDescriptor_751daa04abed7ef4, []int{7} } func (m *MsgRequestBatchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,7 +484,7 @@ type MsgConfirmBatch struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` TokenContract string `protobuf:"bytes,2,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` EthSigner string `protobuf:"bytes,3,opt,name=eth_signer,json=ethSigner,proto3" json:"eth_signer,omitempty"` - Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` + Orchestrator string `protobuf:"bytes,4,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -581,7 +492,7 @@ func (m *MsgConfirmBatch) Reset() { *m = MsgConfirmBatch{} } func (m *MsgConfirmBatch) String() string { return proto.CompactTextString(m) } func (*MsgConfirmBatch) ProtoMessage() {} func (*MsgConfirmBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{10} + return fileDescriptor_751daa04abed7ef4, []int{8} } func (m *MsgConfirmBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -631,9 +542,9 @@ func (m *MsgConfirmBatch) GetEthSigner() string { return "" } -func (m *MsgConfirmBatch) GetValidator() string { +func (m *MsgConfirmBatch) GetOrchestrator() string { if m != nil { - return m.Validator + return m.Orchestrator } return "" } @@ -645,7 +556,6 @@ func (m *MsgConfirmBatch) GetSignature() string { return "" } -// TODO: write response data here type MsgConfirmBatchResponse struct { } @@ -653,7 +563,7 @@ func (m *MsgConfirmBatchResponse) Reset() { *m = MsgConfirmBatchResponse func (m *MsgConfirmBatchResponse) String() string { return proto.CompactTextString(m) } func (*MsgConfirmBatchResponse) ProtoMessage() {} func (*MsgConfirmBatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{11} + return fileDescriptor_751daa04abed7ef4, []int{9} } func (m *MsgConfirmBatchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -682,6 +592,126 @@ func (m *MsgConfirmBatchResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConfirmBatchResponse proto.InternalMessageInfo +// MsgConfirmLogicCall +// When validators observe a MsgRequestBatch they form a batch by ordering +// transactions currently in the txqueue in order of highest to lowest fee, +// cutting off when the batch either reaches a hardcoded maximum size (to be +// decided, probably around 100) or when transactions stop being profitable +// (TODO determine this without nondeterminism) This message includes the batch +// as well as an Ethereum signature over this batch by the validator +// ------------- +type MsgConfirmLogicCall struct { + InvalidationId string `protobuf:"bytes,1,opt,name=invalidation_id,json=invalidationId,proto3" json:"invalidation_id,omitempty"` + InvalidationNonce uint64 `protobuf:"varint,2,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` + EthSigner string `protobuf:"bytes,3,opt,name=eth_signer,json=ethSigner,proto3" json:"eth_signer,omitempty"` + Orchestrator string `protobuf:"bytes,4,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` + Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *MsgConfirmLogicCall) Reset() { *m = MsgConfirmLogicCall{} } +func (m *MsgConfirmLogicCall) String() string { return proto.CompactTextString(m) } +func (*MsgConfirmLogicCall) ProtoMessage() {} +func (*MsgConfirmLogicCall) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{10} +} +func (m *MsgConfirmLogicCall) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConfirmLogicCall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConfirmLogicCall.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgConfirmLogicCall) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConfirmLogicCall.Merge(m, src) +} +func (m *MsgConfirmLogicCall) XXX_Size() int { + return m.Size() +} +func (m *MsgConfirmLogicCall) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConfirmLogicCall.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConfirmLogicCall proto.InternalMessageInfo + +func (m *MsgConfirmLogicCall) GetInvalidationId() string { + if m != nil { + return m.InvalidationId + } + return "" +} + +func (m *MsgConfirmLogicCall) GetInvalidationNonce() uint64 { + if m != nil { + return m.InvalidationNonce + } + return 0 +} + +func (m *MsgConfirmLogicCall) GetEthSigner() string { + if m != nil { + return m.EthSigner + } + return "" +} + +func (m *MsgConfirmLogicCall) GetOrchestrator() string { + if m != nil { + return m.Orchestrator + } + return "" +} + +func (m *MsgConfirmLogicCall) GetSignature() string { + if m != nil { + return m.Signature + } + return "" +} + +type MsgConfirmLogicCallResponse struct { +} + +func (m *MsgConfirmLogicCallResponse) Reset() { *m = MsgConfirmLogicCallResponse{} } +func (m *MsgConfirmLogicCallResponse) String() string { return proto.CompactTextString(m) } +func (*MsgConfirmLogicCallResponse) ProtoMessage() {} +func (*MsgConfirmLogicCallResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{11} +} +func (m *MsgConfirmLogicCallResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConfirmLogicCallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConfirmLogicCallResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgConfirmLogicCallResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConfirmLogicCallResponse.Merge(m, src) +} +func (m *MsgConfirmLogicCallResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgConfirmLogicCallResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConfirmLogicCallResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConfirmLogicCallResponse proto.InternalMessageInfo + // EthereumBridgeDepositClaim // When more than 66% of the active validator set has // claimed to have seen the deposit enter the ethereum blockchain coins are @@ -689,21 +719,19 @@ var xxx_messageInfo_MsgConfirmBatchResponse proto.InternalMessageInfo // ------------- type MsgDepositClaim struct { EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - TokenContract string `protobuf:"bytes,2,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` - EthereumSender string `protobuf:"bytes,4,opt,name=ethereum_sender,json=ethereumSender,proto3" json:"ethereum_sender,omitempty"` - CosmosReceiver string `protobuf:"bytes,5,opt,name=cosmos_receiver,json=cosmosReceiver,proto3" json:"cosmos_receiver,omitempty"` - Orchestrator string `protobuf:"bytes,6,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` - TokenName string `protobuf:"bytes,7,opt,name=token_name,json=tokenName,proto3" json:"token_name,omitempty"` - TokenSymbol string `protobuf:"bytes,8,opt,name=token_symbol,json=tokenSymbol,proto3" json:"token_symbol,omitempty"` - TokenDecimals uint64 `protobuf:"varint,9,opt,name=token_decimals,json=tokenDecimals,proto3" json:"token_decimals,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + TokenContract string `protobuf:"bytes,3,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + EthereumSender string `protobuf:"bytes,5,opt,name=ethereum_sender,json=ethereumSender,proto3" json:"ethereum_sender,omitempty"` + CosmosReceiver string `protobuf:"bytes,6,opt,name=cosmos_receiver,json=cosmosReceiver,proto3" json:"cosmos_receiver,omitempty"` + Orchestrator string `protobuf:"bytes,7,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` } func (m *MsgDepositClaim) Reset() { *m = MsgDepositClaim{} } func (m *MsgDepositClaim) String() string { return proto.CompactTextString(m) } func (*MsgDepositClaim) ProtoMessage() {} func (*MsgDepositClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{12} + return fileDescriptor_751daa04abed7ef4, []int{12} } func (m *MsgDepositClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -739,6 +767,13 @@ func (m *MsgDepositClaim) GetEventNonce() uint64 { return 0 } +func (m *MsgDepositClaim) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + func (m *MsgDepositClaim) GetTokenContract() string { if m != nil { return m.TokenContract @@ -767,41 +802,57 @@ func (m *MsgDepositClaim) GetOrchestrator() string { return "" } -func (m *MsgDepositClaim) GetTokenName() string { - if m != nil { - return m.TokenName - } - return "" +type MsgDepositClaimResponse struct { } -func (m *MsgDepositClaim) GetTokenSymbol() string { - if m != nil { - return m.TokenSymbol - } - return "" +func (m *MsgDepositClaimResponse) Reset() { *m = MsgDepositClaimResponse{} } +func (m *MsgDepositClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositClaimResponse) ProtoMessage() {} +func (*MsgDepositClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{13} } - -func (m *MsgDepositClaim) GetTokenDecimals() uint64 { - if m != nil { - return m.TokenDecimals - } - return 0 +func (m *MsgDepositClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - +func (m *MsgDepositClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositClaimResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDepositClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositClaimResponse.Merge(m, src) +} +func (m *MsgDepositClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositClaimResponse proto.InternalMessageInfo + // WithdrawClaim claims that a batch of withdrawal // operations on the bridge contract was executed. type MsgWithdrawClaim struct { EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - BatchNonce uint64 `protobuf:"varint,2,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` - TokenContract string `protobuf:"bytes,3,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - Orchestrator string `protobuf:"bytes,4,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + BatchNonce uint64 `protobuf:"varint,3,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` + TokenContract string `protobuf:"bytes,4,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` + Orchestrator string `protobuf:"bytes,5,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` } func (m *MsgWithdrawClaim) Reset() { *m = MsgWithdrawClaim{} } func (m *MsgWithdrawClaim) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawClaim) ProtoMessage() {} func (*MsgWithdrawClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{13} + return fileDescriptor_751daa04abed7ef4, []int{14} } func (m *MsgWithdrawClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -837,6 +888,13 @@ func (m *MsgWithdrawClaim) GetEventNonce() uint64 { return 0 } +func (m *MsgWithdrawClaim) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + func (m *MsgWithdrawClaim) GetBatchNonce() uint64 { if m != nil { return m.BatchNonce @@ -858,7 +916,6 @@ func (m *MsgWithdrawClaim) GetOrchestrator() string { return "" } -// TODO: write response data here type MsgWithdrawClaimResponse struct { } @@ -866,7 +923,7 @@ func (m *MsgWithdrawClaimResponse) Reset() { *m = MsgWithdrawClaimRespon func (m *MsgWithdrawClaimResponse) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawClaimResponse) ProtoMessage() {} func (*MsgWithdrawClaimResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{14} + return fileDescriptor_751daa04abed7ef4, []int{15} } func (m *MsgWithdrawClaimResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -895,22 +952,124 @@ func (m *MsgWithdrawClaimResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawClaimResponse proto.InternalMessageInfo -// TODO: write response data here -type MsgDepositClaimResponse struct { +// ERC20DeployedClaim allows the Cosmos module +// to learn about an ERC20 that someone deployed +// to represent a Cosmos asset +type MsgERC20DeployedClaim struct { + EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + CosmosDenom string `protobuf:"bytes,3,opt,name=cosmos_denom,json=cosmosDenom,proto3" json:"cosmos_denom,omitempty"` + TokenContract string `protobuf:"bytes,4,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimals uint64 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Orchestrator string `protobuf:"bytes,8,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` +} + +func (m *MsgERC20DeployedClaim) Reset() { *m = MsgERC20DeployedClaim{} } +func (m *MsgERC20DeployedClaim) String() string { return proto.CompactTextString(m) } +func (*MsgERC20DeployedClaim) ProtoMessage() {} +func (*MsgERC20DeployedClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{16} +} +func (m *MsgERC20DeployedClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgERC20DeployedClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgERC20DeployedClaim.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgERC20DeployedClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgERC20DeployedClaim.Merge(m, src) +} +func (m *MsgERC20DeployedClaim) XXX_Size() int { + return m.Size() +} +func (m *MsgERC20DeployedClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgERC20DeployedClaim.DiscardUnknown(m) } -func (m *MsgDepositClaimResponse) Reset() { *m = MsgDepositClaimResponse{} } -func (m *MsgDepositClaimResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDepositClaimResponse) ProtoMessage() {} -func (*MsgDepositClaimResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f74c0d0c1d859e2f, []int{15} +var xxx_messageInfo_MsgERC20DeployedClaim proto.InternalMessageInfo + +func (m *MsgERC20DeployedClaim) GetEventNonce() uint64 { + if m != nil { + return m.EventNonce + } + return 0 } -func (m *MsgDepositClaimResponse) XXX_Unmarshal(b []byte) error { + +func (m *MsgERC20DeployedClaim) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *MsgERC20DeployedClaim) GetCosmosDenom() string { + if m != nil { + return m.CosmosDenom + } + return "" +} + +func (m *MsgERC20DeployedClaim) GetTokenContract() string { + if m != nil { + return m.TokenContract + } + return "" +} + +func (m *MsgERC20DeployedClaim) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgERC20DeployedClaim) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *MsgERC20DeployedClaim) GetDecimals() uint64 { + if m != nil { + return m.Decimals + } + return 0 +} + +func (m *MsgERC20DeployedClaim) GetOrchestrator() string { + if m != nil { + return m.Orchestrator + } + return "" +} + +type MsgERC20DeployedClaimResponse struct { +} + +func (m *MsgERC20DeployedClaimResponse) Reset() { *m = MsgERC20DeployedClaimResponse{} } +func (m *MsgERC20DeployedClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgERC20DeployedClaimResponse) ProtoMessage() {} +func (*MsgERC20DeployedClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{17} +} +func (m *MsgERC20DeployedClaimResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDepositClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgERC20DeployedClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDepositClaimResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgERC20DeployedClaimResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -920,106 +1079,237 @@ func (m *MsgDepositClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgDepositClaimResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDepositClaimResponse.Merge(m, src) +func (m *MsgERC20DeployedClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgERC20DeployedClaimResponse.Merge(m, src) } -func (m *MsgDepositClaimResponse) XXX_Size() int { +func (m *MsgERC20DeployedClaimResponse) XXX_Size() int { return m.Size() } -func (m *MsgDepositClaimResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDepositClaimResponse.DiscardUnknown(m) +func (m *MsgERC20DeployedClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgERC20DeployedClaimResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgDepositClaimResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgERC20DeployedClaimResponse proto.InternalMessageInfo -func init() { - proto.RegisterType((*MsgValsetConfirm)(nil), "injective.peggy.v1beta1.MsgValsetConfirm") - proto.RegisterType((*MsgValsetConfirmResponse)(nil), "injective.peggy.v1beta1.MsgValsetConfirmResponse") - proto.RegisterType((*MsgValsetRequest)(nil), "injective.peggy.v1beta1.MsgValsetRequest") - proto.RegisterType((*MsgValsetRequestResponse)(nil), "injective.peggy.v1beta1.MsgValsetRequestResponse") - proto.RegisterType((*MsgSetEthAddress)(nil), "injective.peggy.v1beta1.MsgSetEthAddress") - proto.RegisterType((*MsgSetEthAddressResponse)(nil), "injective.peggy.v1beta1.MsgSetEthAddressResponse") - proto.RegisterType((*MsgSendToEth)(nil), "injective.peggy.v1beta1.MsgSendToEth") - proto.RegisterType((*MsgSendToEthResponse)(nil), "injective.peggy.v1beta1.MsgSendToEthResponse") - proto.RegisterType((*MsgRequestBatch)(nil), "injective.peggy.v1beta1.MsgRequestBatch") - proto.RegisterType((*MsgRequestBatchResponse)(nil), "injective.peggy.v1beta1.MsgRequestBatchResponse") - proto.RegisterType((*MsgConfirmBatch)(nil), "injective.peggy.v1beta1.MsgConfirmBatch") - proto.RegisterType((*MsgConfirmBatchResponse)(nil), "injective.peggy.v1beta1.MsgConfirmBatchResponse") - proto.RegisterType((*MsgDepositClaim)(nil), "injective.peggy.v1beta1.MsgDepositClaim") - proto.RegisterType((*MsgWithdrawClaim)(nil), "injective.peggy.v1beta1.MsgWithdrawClaim") - proto.RegisterType((*MsgWithdrawClaimResponse)(nil), "injective.peggy.v1beta1.MsgWithdrawClaimResponse") - proto.RegisterType((*MsgDepositClaimResponse)(nil), "injective.peggy.v1beta1.MsgDepositClaimResponse") +// This informs the Cosmos module that a logic +// call has been executed +type MsgLogicCallExecutedClaim struct { + EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + InvalidationId []byte `protobuf:"bytes,3,opt,name=invalidation_id,json=invalidationId,proto3" json:"invalidation_id,omitempty"` + InvalidationNonce uint64 `protobuf:"varint,4,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` + Orchestrator string `protobuf:"bytes,5,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"` +} + +func (m *MsgLogicCallExecutedClaim) Reset() { *m = MsgLogicCallExecutedClaim{} } +func (m *MsgLogicCallExecutedClaim) String() string { return proto.CompactTextString(m) } +func (*MsgLogicCallExecutedClaim) ProtoMessage() {} +func (*MsgLogicCallExecutedClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{18} +} +func (m *MsgLogicCallExecutedClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLogicCallExecutedClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLogicCallExecutedClaim.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLogicCallExecutedClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLogicCallExecutedClaim.Merge(m, src) +} +func (m *MsgLogicCallExecutedClaim) XXX_Size() int { + return m.Size() +} +func (m *MsgLogicCallExecutedClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLogicCallExecutedClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLogicCallExecutedClaim proto.InternalMessageInfo + +func (m *MsgLogicCallExecutedClaim) GetEventNonce() uint64 { + if m != nil { + return m.EventNonce + } + return 0 +} + +func (m *MsgLogicCallExecutedClaim) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *MsgLogicCallExecutedClaim) GetInvalidationId() []byte { + if m != nil { + return m.InvalidationId + } + return nil +} + +func (m *MsgLogicCallExecutedClaim) GetInvalidationNonce() uint64 { + if m != nil { + return m.InvalidationNonce + } + return 0 +} + +func (m *MsgLogicCallExecutedClaim) GetOrchestrator() string { + if m != nil { + return m.Orchestrator + } + return "" +} + +type MsgLogicCallExecutedClaimResponse struct { +} + +func (m *MsgLogicCallExecutedClaimResponse) Reset() { *m = MsgLogicCallExecutedClaimResponse{} } +func (m *MsgLogicCallExecutedClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLogicCallExecutedClaimResponse) ProtoMessage() {} +func (*MsgLogicCallExecutedClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{19} +} +func (m *MsgLogicCallExecutedClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLogicCallExecutedClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLogicCallExecutedClaimResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLogicCallExecutedClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLogicCallExecutedClaimResponse.Merge(m, src) +} +func (m *MsgLogicCallExecutedClaimResponse) XXX_Size() int { + return m.Size() } +func (m *MsgLogicCallExecutedClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLogicCallExecutedClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLogicCallExecutedClaimResponse proto.InternalMessageInfo func init() { - proto.RegisterFile("injective/peggy/v1beta1/msgs.proto", fileDescriptor_f74c0d0c1d859e2f) -} - -var fileDescriptor_f74c0d0c1d859e2f = []byte{ - // 1005 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0x4d, 0x6f, 0xdc, 0x44, - 0x18, 0xc7, 0xe3, 0x64, 0x9b, 0x64, 0x27, 0x6f, 0xc8, 0x0a, 0x8d, 0x77, 0x69, 0x77, 0x53, 0x4b, - 0xa5, 0xe1, 0x10, 0xbb, 0x29, 0x07, 0x6e, 0x48, 0xe4, 0xa5, 0x52, 0x05, 0xe9, 0x61, 0x83, 0x40, - 0xe2, 0x62, 0xcd, 0xda, 0x4f, 0xed, 0xa1, 0xeb, 0x99, 0x65, 0x66, 0x76, 0xab, 0xdc, 0x2a, 0x24, - 0x4e, 0x1c, 0xa8, 0xc4, 0x07, 0xe0, 0xcc, 0x57, 0xe0, 0x13, 0xf4, 0x58, 0x89, 0x0b, 0xe2, 0x50, - 0xa1, 0x84, 0x6f, 0xc1, 0x05, 0x79, 0x66, 0xec, 0xb5, 0x17, 0xc7, 0x6c, 0x4f, 0xd9, 0x79, 0xfc, - 0x9f, 0x79, 0x7e, 0xcf, 0xcb, 0x3c, 0x13, 0xe4, 0x12, 0xfa, 0x2d, 0x84, 0x92, 0x4c, 0xc1, 0x1f, - 0x43, 0x1c, 0x5f, 0xfa, 0xd3, 0xa3, 0x21, 0x48, 0x7c, 0xe4, 0xa7, 0x22, 0x16, 0xde, 0x98, 0x33, - 0xc9, 0xec, 0xbd, 0x42, 0xe3, 0x29, 0x8d, 0x67, 0x34, 0xdd, 0x5e, 0xc8, 0x44, 0xca, 0x84, 0x3f, - 0xc4, 0x02, 0x8a, 0x8d, 0x21, 0x23, 0x54, 0x6f, 0xec, 0xee, 0xc6, 0x2c, 0x66, 0xea, 0xa7, 0x9f, - 0xfd, 0x32, 0xd6, 0x3b, 0x31, 0x63, 0xf1, 0x08, 0x7c, 0x3c, 0x26, 0x3e, 0xa6, 0x94, 0x49, 0x2c, - 0x09, 0xa3, 0xc6, 0x99, 0xfb, 0x83, 0x85, 0xde, 0x3b, 0x17, 0xf1, 0x57, 0x78, 0x24, 0x40, 0x9e, - 0x30, 0xfa, 0x8c, 0xf0, 0xd4, 0xde, 0x45, 0xb7, 0x28, 0xa3, 0x21, 0x38, 0xd6, 0xbe, 0x75, 0xd0, - 0x1a, 0xe8, 0x85, 0x7d, 0x07, 0xb5, 0xa7, 0x78, 0x44, 0x22, 0x2c, 0x19, 0x77, 0x96, 0xf7, 0xad, - 0x83, 0xf6, 0x60, 0x66, 0xb0, 0xfb, 0x68, 0x03, 0x64, 0x12, 0xe0, 0x28, 0xe2, 0x20, 0x84, 0xb3, - 0xa2, 0xbe, 0x23, 0x90, 0xc9, 0x67, 0xda, 0x92, 0x6d, 0x17, 0x24, 0xa6, 0x58, 0x4e, 0x38, 0x38, - 0x2d, 0xbd, 0xbd, 0x30, 0xb8, 0x5d, 0xe4, 0xcc, 0x63, 0x0c, 0x40, 0x8c, 0x19, 0x15, 0xe0, 0x3e, - 0x2c, 0x21, 0x0e, 0xe0, 0xbb, 0x09, 0x08, 0x99, 0x9d, 0xc6, 0xf5, 0x4f, 0xe0, 0x0a, 0xb3, 0x3d, - 0x98, 0x19, 0x2a, 0xa7, 0x99, 0x1d, 0xc5, 0x69, 0x89, 0x3a, 0xed, 0x02, 0xe4, 0xd9, 0x8c, 0xcd, - 0x41, 0x6b, 0x39, 0xb8, 0x3e, 0x2b, 0x5f, 0xfe, 0x4f, 0xd0, 0x95, 0x98, 0x56, 0xea, 0x63, 0xaa, - 0x78, 0x2a, 0x28, 0x7e, 0xb3, 0xd0, 0xa6, 0xfa, 0x48, 0xa3, 0x2f, 0xd9, 0x99, 0x4c, 0xec, 0xdb, - 0x68, 0x55, 0x00, 0x8d, 0x8a, 0x68, 0xcc, 0xca, 0xee, 0xa0, 0xf5, 0x2c, 0xaf, 0x11, 0x08, 0x69, - 0xfc, 0xaf, 0x81, 0x4c, 0x4e, 0xb3, 0x1c, 0x7c, 0x82, 0x56, 0x71, 0xca, 0x26, 0x54, 0x2a, 0xd7, - 0x1b, 0x8f, 0x3a, 0x9e, 0x6e, 0x10, 0x2f, 0x6b, 0x90, 0xbc, 0x6b, 0xbc, 0x13, 0x46, 0xe8, 0x71, - 0xeb, 0xf5, 0xdb, 0xfe, 0xd2, 0xc0, 0xc8, 0xed, 0x4f, 0x11, 0x1a, 0x72, 0x12, 0xc5, 0x10, 0x3c, - 0x03, 0x5d, 0x8b, 0x05, 0x36, 0xb7, 0xf5, 0x96, 0xc7, 0x00, 0xee, 0x6d, 0xb4, 0x5b, 0x66, 0x2f, - 0x82, 0x3a, 0x43, 0x3b, 0xe7, 0x22, 0x36, 0x09, 0x3f, 0xc6, 0x32, 0x4c, 0x9a, 0xeb, 0x94, 0x35, - 0x5a, 0x04, 0x94, 0xa5, 0x26, 0x32, 0xbd, 0x70, 0x3b, 0x68, 0x6f, 0xee, 0x98, 0xc2, 0xc3, 0xaf, - 0x96, 0x72, 0x61, 0x3a, 0x44, 0xbb, 0xa8, 0xef, 0xd6, 0xfb, 0x68, 0x5b, 0xb2, 0xe7, 0x40, 0x83, - 0x90, 0x51, 0xc9, 0x71, 0x98, 0x67, 0x6f, 0x4b, 0x59, 0x4f, 0x8c, 0xd1, 0xbe, 0x8b, 0xb2, 0x1e, - 0x0d, 0xb2, 0xa2, 0x01, 0xcf, 0x4b, 0x08, 0x32, 0xb9, 0x50, 0x86, 0x6a, 0xf9, 0x5b, 0x8d, 0xe5, - 0xbf, 0x35, 0x5f, 0x7e, 0x1d, 0x46, 0x19, 0xb5, 0x08, 0xe3, 0xe5, 0x8a, 0x0a, 0xe3, 0x14, 0xc6, - 0x4c, 0x10, 0x79, 0x32, 0xc2, 0x24, 0x55, 0x17, 0x68, 0x0a, 0x54, 0x06, 0xe5, 0x60, 0x90, 0x32, - 0x3d, 0x7d, 0x97, 0x88, 0x1e, 0x57, 0xba, 0xa2, 0x7d, 0xec, 0x65, 0xd5, 0xfb, 0xf3, 0x6d, 0xff, - 0xc3, 0x98, 0xc8, 0x64, 0x32, 0xf4, 0x42, 0x96, 0xfa, 0x66, 0x90, 0xe8, 0x3f, 0x87, 0x22, 0x7a, - 0xee, 0xcb, 0xcb, 0x31, 0x08, 0xef, 0x09, 0x95, 0x45, 0x93, 0x3c, 0x40, 0x3b, 0x20, 0x13, 0xe0, - 0x30, 0x49, 0x03, 0xd3, 0x99, 0x3a, 0x01, 0xdb, 0xb9, 0xf9, 0x42, 0x77, 0xe8, 0x03, 0xb4, 0xa3, - 0x0f, 0x0a, 0x38, 0x84, 0x40, 0xa6, 0xc0, 0x4d, 0x2e, 0xb6, 0xb5, 0x79, 0x60, 0xac, 0xb6, 0x8b, - 0x36, 0x19, 0x0f, 0x13, 0x10, 0x92, 0xab, 0x7c, 0xae, 0x2a, 0x55, 0xc5, 0x96, 0xd5, 0x43, 0x07, - 0x49, 0x71, 0x0a, 0xce, 0x9a, 0xce, 0xa9, 0xb2, 0x3c, 0xc5, 0x29, 0xd8, 0xf7, 0xd0, 0xa6, 0xfe, - 0x2c, 0x2e, 0xd3, 0x21, 0x1b, 0x39, 0xeb, 0x4a, 0xb0, 0xa1, 0x6c, 0x17, 0xca, 0x34, 0x4b, 0x53, - 0x04, 0x21, 0x49, 0xf1, 0x48, 0x38, 0x6d, 0x95, 0x4a, 0x9d, 0xa6, 0x53, 0x63, 0x74, 0x7f, 0xd1, - 0x83, 0xef, 0x6b, 0x22, 0x93, 0x88, 0xe3, 0x17, 0x0b, 0xd6, 0xa0, 0x8f, 0x36, 0x86, 0x59, 0x25, - 0x8d, 0x60, 0x59, 0x0b, 0x94, 0xe9, 0xa6, 0x22, 0xad, 0xd4, 0x15, 0x69, 0x3e, 0x15, 0xad, 0xff, - 0xa6, 0xc2, 0x8c, 0x8f, 0x0a, 0x60, 0xd1, 0x40, 0xba, 0xb7, 0xca, 0xfd, 0x93, 0x7f, 0x7a, 0xf4, - 0xcf, 0x3a, 0x5a, 0x39, 0x17, 0xb1, 0xfd, 0x93, 0x85, 0xb6, 0xaa, 0x63, 0xfd, 0x23, 0xef, 0x86, - 0x97, 0xc5, 0x9b, 0x1f, 0xbd, 0xdd, 0xa3, 0x85, 0xa5, 0x05, 0xd2, 0xfe, 0xf7, 0xbf, 0xff, 0xfd, - 0xf3, 0x72, 0xd7, 0x75, 0x8a, 0x97, 0xcd, 0x9f, 0x2a, 0x61, 0x96, 0x0a, 0xe5, 0x7f, 0x46, 0x94, - 0x4f, 0xf1, 0x05, 0x88, 0x8c, 0x74, 0x11, 0xa2, 0xf9, 0x49, 0x7f, 0x33, 0x91, 0x99, 0x40, 0xf6, - 0x2b, 0x0b, 0x6d, 0x55, 0x5f, 0x82, 0x46, 0xa2, 0x8a, 0xb4, 0x99, 0xa8, 0x7e, 0xea, 0xdf, 0x53, - 0x44, 0x1f, 0xb8, 0x9d, 0x19, 0x51, 0x86, 0x53, 0x7a, 0x38, 0xed, 0x97, 0x16, 0x6a, 0xcf, 0x5e, - 0x85, 0xfb, 0xcd, 0x3e, 0x8c, 0xac, 0x7b, 0xb8, 0x90, 0xac, 0xc0, 0xb8, 0xab, 0x30, 0xf6, 0xdc, - 0xf7, 0xcb, 0x18, 0x34, 0x0a, 0x24, 0xcb, 0x50, 0xec, 0x1f, 0x2d, 0xb4, 0x59, 0x19, 0xe2, 0x07, - 0x4d, 0xc7, 0x97, 0x95, 0xdd, 0x87, 0x8b, 0x2a, 0x0b, 0x96, 0xbe, 0x62, 0xe9, 0xb8, 0x7b, 0x33, - 0x16, 0x53, 0x9d, 0x40, 0x5d, 0x2b, 0x45, 0x53, 0x99, 0xf7, 0x8d, 0x34, 0x65, 0x65, 0x33, 0x4d, - 0xed, 0x60, 0xae, 0xa1, 0x31, 0xdd, 0x5b, 0xa2, 0xa9, 0x8c, 0xed, 0x46, 0x9a, 0xb2, 0xb2, 0x99, - 0xa6, 0xee, 0x2a, 0xd7, 0xd1, 0x44, 0x5a, 0x17, 0x84, 0xca, 0x79, 0x76, 0xa3, 0xaa, 0x13, 0xac, - 0xb1, 0x7f, 0x2b, 0xd2, 0xe6, 0xfe, 0xad, 0x1f, 0x3b, 0x35, 0x37, 0xea, 0x85, 0x11, 0x6a, 0xa2, - 0x63, 0x78, 0x7d, 0xd5, 0xb3, 0xde, 0x5c, 0xf5, 0xac, 0xbf, 0xae, 0x7a, 0xd6, 0xab, 0xeb, 0xde, - 0xd2, 0x9b, 0xeb, 0xde, 0xd2, 0x1f, 0xd7, 0xbd, 0xa5, 0x6f, 0x3e, 0x2f, 0xbd, 0x3f, 0x4f, 0x72, - 0xc7, 0x5f, 0xe0, 0xa1, 0xf0, 0x0b, 0x8c, 0xc3, 0x90, 0x71, 0x28, 0x2f, 0x13, 0x4c, 0xa8, 0x9f, - 0xb2, 0x68, 0x32, 0x02, 0x61, 0x5c, 0xaa, 0x87, 0x6a, 0xb8, 0xaa, 0xfe, 0x7b, 0xfd, 0xf8, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, 0xd6, 0x66, 0xc5, 0x50, 0x0b, 0x00, 0x00, + proto.RegisterType((*MsgSetOrchestratorAddresses)(nil), "injective.peggy.v1.MsgSetOrchestratorAddresses") + proto.RegisterType((*MsgSetOrchestratorAddressesResponse)(nil), "injective.peggy.v1.MsgSetOrchestratorAddressesResponse") + proto.RegisterType((*MsgValsetConfirm)(nil), "injective.peggy.v1.MsgValsetConfirm") + proto.RegisterType((*MsgValsetConfirmResponse)(nil), "injective.peggy.v1.MsgValsetConfirmResponse") + proto.RegisterType((*MsgSendToEth)(nil), "injective.peggy.v1.MsgSendToEth") + proto.RegisterType((*MsgSendToEthResponse)(nil), "injective.peggy.v1.MsgSendToEthResponse") + proto.RegisterType((*MsgRequestBatch)(nil), "injective.peggy.v1.MsgRequestBatch") + proto.RegisterType((*MsgRequestBatchResponse)(nil), "injective.peggy.v1.MsgRequestBatchResponse") + proto.RegisterType((*MsgConfirmBatch)(nil), "injective.peggy.v1.MsgConfirmBatch") + proto.RegisterType((*MsgConfirmBatchResponse)(nil), "injective.peggy.v1.MsgConfirmBatchResponse") + proto.RegisterType((*MsgConfirmLogicCall)(nil), "injective.peggy.v1.MsgConfirmLogicCall") + proto.RegisterType((*MsgConfirmLogicCallResponse)(nil), "injective.peggy.v1.MsgConfirmLogicCallResponse") + proto.RegisterType((*MsgDepositClaim)(nil), "injective.peggy.v1.MsgDepositClaim") + proto.RegisterType((*MsgDepositClaimResponse)(nil), "injective.peggy.v1.MsgDepositClaimResponse") + proto.RegisterType((*MsgWithdrawClaim)(nil), "injective.peggy.v1.MsgWithdrawClaim") + proto.RegisterType((*MsgWithdrawClaimResponse)(nil), "injective.peggy.v1.MsgWithdrawClaimResponse") + proto.RegisterType((*MsgERC20DeployedClaim)(nil), "injective.peggy.v1.MsgERC20DeployedClaim") + proto.RegisterType((*MsgERC20DeployedClaimResponse)(nil), "injective.peggy.v1.MsgERC20DeployedClaimResponse") + proto.RegisterType((*MsgLogicCallExecutedClaim)(nil), "injective.peggy.v1.MsgLogicCallExecutedClaim") + proto.RegisterType((*MsgLogicCallExecutedClaimResponse)(nil), "injective.peggy.v1.MsgLogicCallExecutedClaimResponse") +} + +func init() { proto.RegisterFile("injective/peggy/v1/msgs.proto", fileDescriptor_751daa04abed7ef4) } + +var fileDescriptor_751daa04abed7ef4 = []byte{ + // 1238 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x41, 0x6f, 0xdc, 0x44, + 0x14, 0x8e, 0x93, 0x4d, 0xda, 0xbc, 0x6c, 0x9b, 0x62, 0x42, 0xd9, 0x2c, 0xcd, 0x6e, 0xe2, 0xb4, + 0x24, 0x2d, 0x8d, 0x9d, 0x04, 0xaa, 0xde, 0x90, 0xc8, 0x26, 0x15, 0x51, 0xbb, 0x45, 0xda, 0x20, + 0x90, 0xb8, 0x58, 0x5e, 0xfb, 0xd5, 0x36, 0xb1, 0x3d, 0x8b, 0x67, 0x76, 0x4b, 0x38, 0x21, 0xae, + 0x39, 0x00, 0x42, 0xe2, 0x17, 0x70, 0xe7, 0xc4, 0xa5, 0x47, 0x4e, 0x3d, 0xa1, 0x4a, 0x5c, 0x10, + 0x48, 0x15, 0x4a, 0xf8, 0x21, 0xc8, 0x33, 0xb3, 0x8e, 0x77, 0xd7, 0x0e, 0x5b, 0x29, 0x9c, 0x76, + 0xe7, 0xcd, 0x7b, 0xf3, 0xbe, 0xf7, 0xbd, 0x79, 0xef, 0x8d, 0x61, 0xc9, 0x8f, 0x3e, 0x47, 0x9b, + 0xf9, 0x3d, 0x34, 0x3a, 0xe8, 0xba, 0x47, 0x46, 0x6f, 0xcb, 0x08, 0xa9, 0x4b, 0xf5, 0x4e, 0x4c, + 0x18, 0x51, 0xd5, 0x74, 0x5b, 0xe7, 0xdb, 0x7a, 0x6f, 0xab, 0x5a, 0xb3, 0x09, 0x0d, 0x09, 0x35, + 0xda, 0x16, 0x45, 0xa3, 0xb7, 0xd5, 0x46, 0x66, 0x6d, 0x19, 0x36, 0xf1, 0x23, 0x61, 0x53, 0x5d, + 0x70, 0x89, 0x4b, 0xf8, 0x5f, 0x23, 0xf9, 0x27, 0xa5, 0x37, 0x5c, 0x42, 0xdc, 0x00, 0x0d, 0xab, + 0xe3, 0x1b, 0x56, 0x14, 0x11, 0x66, 0x31, 0x9f, 0x44, 0xd2, 0x8f, 0xf6, 0x15, 0xbc, 0xd5, 0xa4, + 0xee, 0x01, 0xb2, 0x8f, 0x62, 0xdb, 0x43, 0xca, 0x62, 0x8b, 0x91, 0xf8, 0x03, 0xc7, 0x89, 0x91, + 0x52, 0xa4, 0xea, 0x75, 0x98, 0xa1, 0x18, 0x39, 0x18, 0x57, 0x94, 0x65, 0x65, 0x7d, 0xb6, 0x25, + 0x57, 0xaa, 0x06, 0x65, 0x92, 0x31, 0xa8, 0x4c, 0xf2, 0xdd, 0x01, 0x99, 0x5a, 0x87, 0x39, 0x64, + 0x9e, 0x69, 0x89, 0xc3, 0x2a, 0x53, 0x5c, 0x05, 0x90, 0x79, 0xf2, 0x78, 0xed, 0x16, 0xac, 0x9e, + 0xe3, 0xbb, 0x85, 0xb4, 0x43, 0x22, 0x8a, 0xda, 0xb1, 0x02, 0xd7, 0x9a, 0xd4, 0xfd, 0xc4, 0x0a, + 0x28, 0xb2, 0x06, 0x89, 0x9e, 0xf8, 0x71, 0xa8, 0x2e, 0xc0, 0x74, 0x44, 0x22, 0x1b, 0x39, 0xae, + 0x52, 0x4b, 0x2c, 0x2e, 0x04, 0x96, 0x7a, 0x03, 0x66, 0xa9, 0xef, 0x46, 0x16, 0xeb, 0xc6, 0x58, + 0x29, 0xf1, 0xed, 0x33, 0x81, 0x56, 0x85, 0xca, 0x30, 0x98, 0x14, 0xe9, 0x33, 0x05, 0xca, 0x3c, + 0xa2, 0xc8, 0xf9, 0x98, 0xec, 0x31, 0xaf, 0x90, 0xbe, 0x45, 0xb8, 0x9c, 0x60, 0x70, 0x90, 0x32, + 0x89, 0xf1, 0x12, 0x32, 0x6f, 0x17, 0x29, 0x53, 0xef, 0xc3, 0x8c, 0x15, 0x92, 0x6e, 0xc4, 0x38, + 0xb2, 0xb9, 0xed, 0x45, 0x5d, 0x64, 0x5d, 0x4f, 0xb2, 0xae, 0xcb, 0xac, 0xeb, 0x0d, 0xe2, 0x47, + 0x3b, 0xa5, 0xe7, 0x2f, 0xeb, 0x13, 0x2d, 0xa9, 0xae, 0xbe, 0x0f, 0xd0, 0x8e, 0x7d, 0xc7, 0x45, + 0xf3, 0x09, 0x0a, 0xdc, 0x63, 0x18, 0xcf, 0x0a, 0x93, 0x07, 0x88, 0xda, 0x75, 0x58, 0xc8, 0x62, + 0x4f, 0x83, 0x7a, 0x08, 0xf3, 0x4d, 0xea, 0xb6, 0xf0, 0x8b, 0x2e, 0x52, 0xb6, 0x63, 0x31, 0xdb, + 0x1b, 0xa1, 0x59, 0xc9, 0xa1, 0x79, 0x01, 0xa6, 0x1d, 0x8c, 0x48, 0x28, 0xe3, 0x13, 0x0b, 0x6d, + 0x11, 0xde, 0x1c, 0x3a, 0x2c, 0xf5, 0xf3, 0xb3, 0xc2, 0x1d, 0x49, 0x4e, 0x85, 0xa3, 0xfc, 0x2c, + 0xdf, 0x82, 0xab, 0x8c, 0x1c, 0x62, 0x64, 0xda, 0x24, 0x62, 0xb1, 0x65, 0xf7, 0x39, 0xbc, 0xc2, + 0xa5, 0x0d, 0x29, 0x54, 0x97, 0x20, 0xc9, 0xaa, 0x99, 0xa4, 0x0e, 0x63, 0x99, 0xe7, 0x59, 0x64, + 0xde, 0x01, 0x17, 0x8c, 0x04, 0x51, 0xca, 0x09, 0x62, 0xe0, 0x2a, 0x4c, 0x0f, 0x5f, 0x05, 0x11, + 0x4c, 0x16, 0x70, 0x1a, 0xcc, 0x6f, 0x0a, 0xbc, 0x7e, 0xb6, 0xf7, 0x88, 0xb8, 0xbe, 0xdd, 0xb0, + 0x82, 0x40, 0x5d, 0x83, 0x79, 0x3f, 0xea, 0x59, 0x81, 0xef, 0xf0, 0x2a, 0x34, 0x7d, 0x47, 0x92, + 0x77, 0x35, 0x2b, 0xde, 0x77, 0xd4, 0x0d, 0x50, 0x07, 0x14, 0x05, 0x0d, 0x93, 0x9c, 0x86, 0xd7, + 0xb2, 0x3b, 0x8f, 0x39, 0x25, 0xff, 0x7b, 0xac, 0x4b, 0xbc, 0x4f, 0x0c, 0xc7, 0x73, 0x76, 0xf3, + 0x27, 0x79, 0xf2, 0x76, 0xb1, 0x43, 0xa8, 0xcf, 0x1a, 0x81, 0xe5, 0x87, 0xbc, 0xd0, 0x7a, 0x18, + 0x31, 0x33, 0x9b, 0x42, 0xe0, 0x22, 0x01, 0x7a, 0x05, 0xca, 0xed, 0x80, 0xd8, 0x87, 0xa6, 0x87, + 0xbe, 0xeb, 0x31, 0x19, 0xdd, 0x1c, 0x97, 0x7d, 0xc8, 0x45, 0x39, 0xa9, 0x9e, 0xca, 0x4b, 0xf5, + 0x83, 0xb4, 0x68, 0x78, 0x64, 0x3b, 0x7a, 0x72, 0xb9, 0xff, 0x7c, 0x59, 0x7f, 0xdb, 0xf5, 0x99, + 0xd7, 0x6d, 0xeb, 0x36, 0x09, 0x0d, 0xd9, 0x3c, 0xc5, 0xcf, 0x06, 0x75, 0x0e, 0x0d, 0x76, 0xd4, + 0x41, 0xaa, 0xef, 0x47, 0x2c, 0xad, 0xa1, 0x35, 0x98, 0x47, 0xe6, 0x61, 0x8c, 0xdd, 0xd0, 0x94, + 0x85, 0x2b, 0x98, 0xb8, 0xda, 0x17, 0x1f, 0x88, 0x02, 0x5e, 0x83, 0x79, 0x71, 0x90, 0x19, 0xa3, + 0x8d, 0x7e, 0x0f, 0xe3, 0xca, 0x8c, 0x50, 0x14, 0xe2, 0x96, 0x94, 0x8e, 0x30, 0x7f, 0x69, 0x94, + 0x79, 0x79, 0x8f, 0xb2, 0xdc, 0xa5, 0xbc, 0xfe, 0x2a, 0x7a, 0xdf, 0xa7, 0x3e, 0xf3, 0x9c, 0xd8, + 0x7a, 0x7a, 0x71, 0xc4, 0xd6, 0x61, 0xae, 0x9d, 0xdc, 0x58, 0x79, 0xc6, 0x94, 0x38, 0x83, 0x8b, + 0x1e, 0x17, 0x14, 0x59, 0x29, 0x8f, 0xf9, 0xe1, 0xf8, 0xa6, 0x73, 0xe2, 0x13, 0x2d, 0x73, 0x20, + 0x86, 0x34, 0xc0, 0xef, 0x27, 0xe1, 0x8d, 0x26, 0x75, 0xf7, 0x5a, 0x8d, 0xed, 0xcd, 0x5d, 0xec, + 0x04, 0xe4, 0x08, 0x9d, 0x8b, 0x8b, 0x72, 0x05, 0xca, 0x32, 0x4d, 0xa2, 0x17, 0x89, 0xcb, 0x33, + 0x27, 0x64, 0xbb, 0x89, 0x68, 0xdc, 0x38, 0x55, 0x28, 0x45, 0x56, 0xd8, 0x2f, 0x0c, 0xfe, 0x9f, + 0x77, 0xf7, 0xa3, 0xb0, 0x4d, 0x02, 0x99, 0x7b, 0xb9, 0x52, 0xab, 0x70, 0xd9, 0x41, 0xdb, 0x0f, + 0xad, 0x80, 0xf2, 0x7c, 0x97, 0x5a, 0xe9, 0x7a, 0x84, 0xaf, 0xcb, 0x39, 0x7c, 0xd5, 0x61, 0x29, + 0x97, 0x92, 0x94, 0xb4, 0xbf, 0x14, 0x58, 0x6c, 0x52, 0x37, 0x2d, 0xc3, 0xbd, 0x2f, 0xd1, 0xee, + 0xb2, 0x8b, 0x24, 0x2e, 0xa7, 0x4f, 0x25, 0xdc, 0x95, 0xc7, 0xec, 0x53, 0xa5, 0xa2, 0x3e, 0x35, + 0xce, 0x75, 0x59, 0x85, 0x95, 0xc2, 0xe0, 0xfa, 0x14, 0x6c, 0x1f, 0x97, 0x61, 0xaa, 0x49, 0x5d, + 0xf5, 0x5b, 0x05, 0xae, 0x0c, 0xbe, 0x0c, 0x6e, 0xea, 0xa3, 0x4f, 0x27, 0x7d, 0x78, 0x64, 0x57, + 0xef, 0x8e, 0xa3, 0x95, 0x12, 0x7e, 0xe7, 0x9b, 0xdf, 0xff, 0xf9, 0x61, 0xf2, 0xa6, 0xa6, 0x19, + 0x39, 0xaf, 0xb6, 0x1e, 0x37, 0x49, 0xee, 0x0f, 0xf7, 0xff, 0xb5, 0x02, 0xb3, 0x67, 0x2f, 0x80, + 0xe5, 0x02, 0x3f, 0xa9, 0x46, 0x75, 0xfd, 0xbf, 0x34, 0x52, 0x14, 0x6b, 0x1c, 0xc5, 0x8a, 0x56, + 0xcf, 0x43, 0x91, 0xb4, 0x2b, 0x93, 0x11, 0x13, 0x99, 0xa7, 0x1e, 0x2b, 0x50, 0x1e, 0x18, 0xd8, + 0xab, 0x05, 0x3e, 0xb2, 0x4a, 0xd5, 0x77, 0xc6, 0x50, 0x4a, 0xb1, 0xdc, 0xe6, 0x58, 0x56, 0xb5, + 0x95, 0x3c, 0x2c, 0xb1, 0xb0, 0x30, 0x79, 0x3b, 0xe1, 0x68, 0x06, 0xa6, 0x7a, 0x11, 0x9a, 0xac, + 0x52, 0x21, 0x9a, 0xdc, 0x71, 0x7b, 0x2e, 0x1a, 0x99, 0x18, 0x89, 0xe6, 0x47, 0x05, 0xae, 0x8d, + 0x8e, 0xe5, 0xf3, 0x9d, 0xa5, 0x8a, 0x55, 0x63, 0x4c, 0xc5, 0x14, 0xd9, 0x3a, 0x47, 0xa6, 0x69, + 0xcb, 0x85, 0xc8, 0x42, 0x33, 0x48, 0xac, 0x38, 0x4d, 0x03, 0xf3, 0xb3, 0x88, 0xa6, 0xac, 0x52, + 0x21, 0x4d, 0xb9, 0xd3, 0xe4, 0x5c, 0x9a, 0x1c, 0x61, 0x61, 0xda, 0xdc, 0x79, 0x52, 0x57, 0x83, + 0x53, 0xa7, 0xa8, 0xae, 0x06, 0xb4, 0x0a, 0xeb, 0x2a, 0xbf, 0xfb, 0x9f, 0x5b, 0x57, 0x4f, 0xa5, + 0x89, 0x44, 0xf4, 0x93, 0x02, 0x6a, 0xce, 0x98, 0xb8, 0x5d, 0xe0, 0x70, 0x54, 0xb5, 0xba, 0x35, + 0xb6, 0x6a, 0x0a, 0x70, 0x93, 0x03, 0xbc, 0xa3, 0xad, 0xe7, 0x01, 0xc4, 0xd8, 0xde, 0xde, 0x34, + 0x1d, 0x69, 0x28, 0x61, 0xfe, 0xa2, 0xc0, 0xf5, 0x82, 0xc6, 0xbc, 0x51, 0xe0, 0x3f, 0x5f, 0xbd, + 0x7a, 0xef, 0x95, 0xd4, 0x53, 0xc8, 0xf7, 0x38, 0x64, 0x43, 0xdb, 0xc8, 0x83, 0xcc, 0xaf, 0x9a, + 0x69, 0x5b, 0x41, 0x60, 0xa2, 0xb4, 0x96, 0xb8, 0x9f, 0x29, 0x50, 0x29, 0xfc, 0x0c, 0x34, 0x0a, + 0x7b, 0x54, 0xbe, 0x41, 0xf5, 0xfe, 0x2b, 0x1a, 0xa4, 0xe8, 0xdf, 0xe3, 0xe8, 0x75, 0xed, 0x6e, + 0x7e, 0x8f, 0x63, 0x66, 0x76, 0x54, 0xf4, 0x3f, 0xe2, 0x76, 0xf0, 0xf9, 0x49, 0x4d, 0x79, 0x71, + 0x52, 0x53, 0xfe, 0x3e, 0xa9, 0x29, 0xdf, 0x9d, 0xd6, 0x26, 0x5e, 0x9c, 0xd6, 0x26, 0xfe, 0x38, + 0xad, 0x4d, 0x7c, 0xf6, 0x30, 0xf3, 0x02, 0xdc, 0xef, 0x9f, 0xf8, 0xc8, 0x6a, 0xd3, 0xb3, 0xf3, + 0x37, 0x6c, 0x12, 0x63, 0x76, 0xe9, 0x59, 0x7e, 0x64, 0x84, 0xc4, 0xe9, 0x06, 0x48, 0xa5, 0x73, + 0xfe, 0x54, 0x6c, 0xcf, 0xf0, 0x6f, 0xe6, 0x77, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x24, 0xbd, + 0x50, 0xe2, 0xbc, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1035,13 +1325,15 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { ValsetConfirm(ctx context.Context, in *MsgValsetConfirm, opts ...grpc.CallOption) (*MsgValsetConfirmResponse, error) - ValsetRequest(ctx context.Context, in *MsgValsetRequest, opts ...grpc.CallOption) (*MsgValsetRequestResponse, error) - SetEthAddress(ctx context.Context, in *MsgSetEthAddress, opts ...grpc.CallOption) (*MsgSetEthAddressResponse, error) SendToEth(ctx context.Context, in *MsgSendToEth, opts ...grpc.CallOption) (*MsgSendToEthResponse, error) RequestBatch(ctx context.Context, in *MsgRequestBatch, opts ...grpc.CallOption) (*MsgRequestBatchResponse, error) ConfirmBatch(ctx context.Context, in *MsgConfirmBatch, opts ...grpc.CallOption) (*MsgConfirmBatchResponse, error) + ConfirmLogicCall(ctx context.Context, in *MsgConfirmLogicCall, opts ...grpc.CallOption) (*MsgConfirmLogicCallResponse, error) DepositClaim(ctx context.Context, in *MsgDepositClaim, opts ...grpc.CallOption) (*MsgDepositClaimResponse, error) WithdrawClaim(ctx context.Context, in *MsgWithdrawClaim, opts ...grpc.CallOption) (*MsgWithdrawClaimResponse, error) + ERC20DeployedClaim(ctx context.Context, in *MsgERC20DeployedClaim, opts ...grpc.CallOption) (*MsgERC20DeployedClaimResponse, error) + LogicCallExecutedClaim(ctx context.Context, in *MsgLogicCallExecutedClaim, opts ...grpc.CallOption) (*MsgLogicCallExecutedClaimResponse, error) + SetOrchestratorAddresses(ctx context.Context, in *MsgSetOrchestratorAddresses, opts ...grpc.CallOption) (*MsgSetOrchestratorAddressesResponse, error) } type msgClient struct { @@ -1054,70 +1346,88 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) ValsetConfirm(ctx context.Context, in *MsgValsetConfirm, opts ...grpc.CallOption) (*MsgValsetConfirmResponse, error) { out := new(MsgValsetConfirmResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/ValsetConfirm", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/ValsetConfirm", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) ValsetRequest(ctx context.Context, in *MsgValsetRequest, opts ...grpc.CallOption) (*MsgValsetRequestResponse, error) { - out := new(MsgValsetRequestResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/ValsetRequest", in, out, opts...) +func (c *msgClient) SendToEth(ctx context.Context, in *MsgSendToEth, opts ...grpc.CallOption) (*MsgSendToEthResponse, error) { + out := new(MsgSendToEthResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/SendToEth", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) SetEthAddress(ctx context.Context, in *MsgSetEthAddress, opts ...grpc.CallOption) (*MsgSetEthAddressResponse, error) { - out := new(MsgSetEthAddressResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/SetEthAddress", in, out, opts...) +func (c *msgClient) RequestBatch(ctx context.Context, in *MsgRequestBatch, opts ...grpc.CallOption) (*MsgRequestBatchResponse, error) { + out := new(MsgRequestBatchResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/RequestBatch", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) SendToEth(ctx context.Context, in *MsgSendToEth, opts ...grpc.CallOption) (*MsgSendToEthResponse, error) { - out := new(MsgSendToEthResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/SendToEth", in, out, opts...) +func (c *msgClient) ConfirmBatch(ctx context.Context, in *MsgConfirmBatch, opts ...grpc.CallOption) (*MsgConfirmBatchResponse, error) { + out := new(MsgConfirmBatchResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/ConfirmBatch", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) RequestBatch(ctx context.Context, in *MsgRequestBatch, opts ...grpc.CallOption) (*MsgRequestBatchResponse, error) { - out := new(MsgRequestBatchResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/RequestBatch", in, out, opts...) +func (c *msgClient) ConfirmLogicCall(ctx context.Context, in *MsgConfirmLogicCall, opts ...grpc.CallOption) (*MsgConfirmLogicCallResponse, error) { + out := new(MsgConfirmLogicCallResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/ConfirmLogicCall", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) ConfirmBatch(ctx context.Context, in *MsgConfirmBatch, opts ...grpc.CallOption) (*MsgConfirmBatchResponse, error) { - out := new(MsgConfirmBatchResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/ConfirmBatch", in, out, opts...) +func (c *msgClient) DepositClaim(ctx context.Context, in *MsgDepositClaim, opts ...grpc.CallOption) (*MsgDepositClaimResponse, error) { + out := new(MsgDepositClaimResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/DepositClaim", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) DepositClaim(ctx context.Context, in *MsgDepositClaim, opts ...grpc.CallOption) (*MsgDepositClaimResponse, error) { - out := new(MsgDepositClaimResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/DepositClaim", in, out, opts...) +func (c *msgClient) WithdrawClaim(ctx context.Context, in *MsgWithdrawClaim, opts ...grpc.CallOption) (*MsgWithdrawClaimResponse, error) { + out := new(MsgWithdrawClaimResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/WithdrawClaim", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) WithdrawClaim(ctx context.Context, in *MsgWithdrawClaim, opts ...grpc.CallOption) (*MsgWithdrawClaimResponse, error) { - out := new(MsgWithdrawClaimResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Msg/WithdrawClaim", in, out, opts...) +func (c *msgClient) ERC20DeployedClaim(ctx context.Context, in *MsgERC20DeployedClaim, opts ...grpc.CallOption) (*MsgERC20DeployedClaimResponse, error) { + out := new(MsgERC20DeployedClaimResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/ERC20DeployedClaim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LogicCallExecutedClaim(ctx context.Context, in *MsgLogicCallExecutedClaim, opts ...grpc.CallOption) (*MsgLogicCallExecutedClaimResponse, error) { + out := new(MsgLogicCallExecutedClaimResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/LogicCallExecutedClaim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetOrchestratorAddresses(ctx context.Context, in *MsgSetOrchestratorAddresses, opts ...grpc.CallOption) (*MsgSetOrchestratorAddressesResponse, error) { + out := new(MsgSetOrchestratorAddressesResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/SetOrchestratorAddresses", in, out, opts...) if err != nil { return nil, err } @@ -1127,13 +1437,15 @@ func (c *msgClient) WithdrawClaim(ctx context.Context, in *MsgWithdrawClaim, opt // MsgServer is the server API for Msg service. type MsgServer interface { ValsetConfirm(context.Context, *MsgValsetConfirm) (*MsgValsetConfirmResponse, error) - ValsetRequest(context.Context, *MsgValsetRequest) (*MsgValsetRequestResponse, error) - SetEthAddress(context.Context, *MsgSetEthAddress) (*MsgSetEthAddressResponse, error) SendToEth(context.Context, *MsgSendToEth) (*MsgSendToEthResponse, error) RequestBatch(context.Context, *MsgRequestBatch) (*MsgRequestBatchResponse, error) ConfirmBatch(context.Context, *MsgConfirmBatch) (*MsgConfirmBatchResponse, error) + ConfirmLogicCall(context.Context, *MsgConfirmLogicCall) (*MsgConfirmLogicCallResponse, error) DepositClaim(context.Context, *MsgDepositClaim) (*MsgDepositClaimResponse, error) WithdrawClaim(context.Context, *MsgWithdrawClaim) (*MsgWithdrawClaimResponse, error) + ERC20DeployedClaim(context.Context, *MsgERC20DeployedClaim) (*MsgERC20DeployedClaimResponse, error) + LogicCallExecutedClaim(context.Context, *MsgLogicCallExecutedClaim) (*MsgLogicCallExecutedClaimResponse, error) + SetOrchestratorAddresses(context.Context, *MsgSetOrchestratorAddresses) (*MsgSetOrchestratorAddressesResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1143,12 +1455,6 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) ValsetConfirm(ctx context.Context, req *MsgValsetConfirm) (*MsgValsetConfirmResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValsetConfirm not implemented") } -func (*UnimplementedMsgServer) ValsetRequest(ctx context.Context, req *MsgValsetRequest) (*MsgValsetRequestResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValsetRequest not implemented") -} -func (*UnimplementedMsgServer) SetEthAddress(ctx context.Context, req *MsgSetEthAddress) (*MsgSetEthAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetEthAddress not implemented") -} func (*UnimplementedMsgServer) SendToEth(ctx context.Context, req *MsgSendToEth) (*MsgSendToEthResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendToEth not implemented") } @@ -1158,12 +1464,24 @@ func (*UnimplementedMsgServer) RequestBatch(ctx context.Context, req *MsgRequest func (*UnimplementedMsgServer) ConfirmBatch(ctx context.Context, req *MsgConfirmBatch) (*MsgConfirmBatchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmBatch not implemented") } +func (*UnimplementedMsgServer) ConfirmLogicCall(ctx context.Context, req *MsgConfirmLogicCall) (*MsgConfirmLogicCallResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConfirmLogicCall not implemented") +} func (*UnimplementedMsgServer) DepositClaim(ctx context.Context, req *MsgDepositClaim) (*MsgDepositClaimResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositClaim not implemented") } func (*UnimplementedMsgServer) WithdrawClaim(ctx context.Context, req *MsgWithdrawClaim) (*MsgWithdrawClaimResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawClaim not implemented") } +func (*UnimplementedMsgServer) ERC20DeployedClaim(ctx context.Context, req *MsgERC20DeployedClaim) (*MsgERC20DeployedClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ERC20DeployedClaim not implemented") +} +func (*UnimplementedMsgServer) LogicCallExecutedClaim(ctx context.Context, req *MsgLogicCallExecutedClaim) (*MsgLogicCallExecutedClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LogicCallExecutedClaim not implemented") +} +func (*UnimplementedMsgServer) SetOrchestratorAddresses(ctx context.Context, req *MsgSetOrchestratorAddresses) (*MsgSetOrchestratorAddressesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetOrchestratorAddresses not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1179,7 +1497,7 @@ func _Msg_ValsetConfirm_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/ValsetConfirm", + FullMethod: "/injective.peggy.v1.Msg/ValsetConfirm", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).ValsetConfirm(ctx, req.(*MsgValsetConfirm)) @@ -1187,148 +1505,176 @@ func _Msg_ValsetConfirm_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_ValsetRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgValsetRequest) +func _Msg_SendToEth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSendToEth) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ValsetRequest(ctx, in) + return srv.(MsgServer).SendToEth(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/ValsetRequest", + FullMethod: "/injective.peggy.v1.Msg/SendToEth", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ValsetRequest(ctx, req.(*MsgValsetRequest)) + return srv.(MsgServer).SendToEth(ctx, req.(*MsgSendToEth)) } return interceptor(ctx, in, info, handler) } -func _Msg_SetEthAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetEthAddress) +func _Msg_RequestBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRequestBatch) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SetEthAddress(ctx, in) + return srv.(MsgServer).RequestBatch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/SetEthAddress", + FullMethod: "/injective.peggy.v1.Msg/RequestBatch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetEthAddress(ctx, req.(*MsgSetEthAddress)) + return srv.(MsgServer).RequestBatch(ctx, req.(*MsgRequestBatch)) } return interceptor(ctx, in, info, handler) } -func _Msg_SendToEth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSendToEth) +func _Msg_ConfirmBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConfirmBatch) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SendToEth(ctx, in) + return srv.(MsgServer).ConfirmBatch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/SendToEth", + FullMethod: "/injective.peggy.v1.Msg/ConfirmBatch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SendToEth(ctx, req.(*MsgSendToEth)) + return srv.(MsgServer).ConfirmBatch(ctx, req.(*MsgConfirmBatch)) } return interceptor(ctx, in, info, handler) } -func _Msg_RequestBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRequestBatch) +func _Msg_ConfirmLogicCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConfirmLogicCall) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RequestBatch(ctx, in) + return srv.(MsgServer).ConfirmLogicCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/RequestBatch", + FullMethod: "/injective.peggy.v1.Msg/ConfirmLogicCall", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RequestBatch(ctx, req.(*MsgRequestBatch)) + return srv.(MsgServer).ConfirmLogicCall(ctx, req.(*MsgConfirmLogicCall)) } return interceptor(ctx, in, info, handler) } -func _Msg_ConfirmBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgConfirmBatch) +func _Msg_DepositClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositClaim) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ConfirmBatch(ctx, in) + return srv.(MsgServer).DepositClaim(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/ConfirmBatch", + FullMethod: "/injective.peggy.v1.Msg/DepositClaim", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ConfirmBatch(ctx, req.(*MsgConfirmBatch)) + return srv.(MsgServer).DepositClaim(ctx, req.(*MsgDepositClaim)) } return interceptor(ctx, in, info, handler) } -func _Msg_DepositClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDepositClaim) +func _Msg_WithdrawClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawClaim) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DepositClaim(ctx, in) + return srv.(MsgServer).WithdrawClaim(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/DepositClaim", + FullMethod: "/injective.peggy.v1.Msg/WithdrawClaim", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DepositClaim(ctx, req.(*MsgDepositClaim)) + return srv.(MsgServer).WithdrawClaim(ctx, req.(*MsgWithdrawClaim)) } return interceptor(ctx, in, info, handler) } -func _Msg_WithdrawClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawClaim) +func _Msg_ERC20DeployedClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgERC20DeployedClaim) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).WithdrawClaim(ctx, in) + return srv.(MsgServer).ERC20DeployedClaim(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Msg/WithdrawClaim", + FullMethod: "/injective.peggy.v1.Msg/ERC20DeployedClaim", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawClaim(ctx, req.(*MsgWithdrawClaim)) + return srv.(MsgServer).ERC20DeployedClaim(ctx, req.(*MsgERC20DeployedClaim)) } return interceptor(ctx, in, info, handler) } -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "injective.peggy.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { +func _Msg_LogicCallExecutedClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLogicCallExecutedClaim) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LogicCallExecutedClaim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Msg/LogicCallExecutedClaim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LogicCallExecutedClaim(ctx, req.(*MsgLogicCallExecutedClaim)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetOrchestratorAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetOrchestratorAddresses) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetOrchestratorAddresses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Msg/SetOrchestratorAddresses", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetOrchestratorAddresses(ctx, req.(*MsgSetOrchestratorAddresses)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "injective.peggy.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { MethodName: "ValsetConfirm", Handler: _Msg_ValsetConfirm_Handler, }, - { - MethodName: "ValsetRequest", - Handler: _Msg_ValsetRequest_Handler, - }, - { - MethodName: "SetEthAddress", - Handler: _Msg_SetEthAddress_Handler, - }, { MethodName: "SendToEth", Handler: _Msg_SendToEth_Handler, @@ -1341,6 +1687,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ConfirmBatch", Handler: _Msg_ConfirmBatch_Handler, }, + { + MethodName: "ConfirmLogicCall", + Handler: _Msg_ConfirmLogicCall_Handler, + }, { MethodName: "DepositClaim", Handler: _Msg_DepositClaim_Handler, @@ -1349,12 +1699,24 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "WithdrawClaim", Handler: _Msg_WithdrawClaim_Handler, }, + { + MethodName: "ERC20DeployedClaim", + Handler: _Msg_ERC20DeployedClaim_Handler, + }, + { + MethodName: "LogicCallExecutedClaim", + Handler: _Msg_LogicCallExecutedClaim_Handler, + }, + { + MethodName: "SetOrchestratorAddresses", + Handler: _Msg_SetOrchestratorAddresses_Handler, + }, }, Streams: []grpc.StreamDesc{}, - Metadata: "injective/peggy/v1beta1/msgs.proto", + Metadata: "injective/peggy/v1/msgs.proto", } -func (m *MsgValsetConfirm) Marshal() (dAtA []byte, err error) { +func (m *MsgSetOrchestratorAddresses) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1364,23 +1726,16 @@ func (m *MsgValsetConfirm) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgValsetConfirm) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSetOrchestratorAddresses) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgValsetConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSetOrchestratorAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } if len(m.EthAddress) > 0 { i -= len(m.EthAddress) copy(dAtA[i:], m.EthAddress) @@ -1388,75 +1743,24 @@ func (m *MsgValsetConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Validator) > 0 { - i -= len(m.Validator) - copy(dAtA[i:], m.Validator) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Validator))) + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- dAtA[i] = 0x12 } - if m.Nonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgValsetConfirmResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgValsetConfirmResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgValsetConfirmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgValsetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgValsetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgValsetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Requester) > 0 { - i -= len(m.Requester) - copy(dAtA[i:], m.Requester) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Requester))) + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Sender))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgValsetRequestResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgSetOrchestratorAddressesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1466,12 +1770,12 @@ func (m *MsgValsetRequestResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgValsetRequestResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSetOrchestratorAddressesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgValsetRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSetOrchestratorAddressesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1479,7 +1783,7 @@ func (m *MsgValsetRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgSetEthAddress) Marshal() (dAtA []byte, err error) { +func (m *MsgValsetConfirm) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1489,12 +1793,12 @@ func (m *MsgSetEthAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSetEthAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgValsetConfirm) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSetEthAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgValsetConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1504,26 +1808,31 @@ func (m *MsgSetEthAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Signature) i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signature))) i-- + dAtA[i] = 0x22 + } + if len(m.EthAddress) > 0 { + i -= len(m.EthAddress) + copy(dAtA[i:], m.EthAddress) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthAddress))) + i-- dAtA[i] = 0x1a } - if len(m.Validator) > 0 { - i -= len(m.Validator) - copy(dAtA[i:], m.Validator) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Validator))) + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- dAtA[i] = 0x12 } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Address))) + if m.Nonce != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.Nonce)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *MsgSetEthAddressResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgValsetConfirmResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1533,12 +1842,12 @@ func (m *MsgSetEthAddressResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSetEthAddressResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgValsetConfirmResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSetEthAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgValsetConfirmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1653,10 +1962,10 @@ func (m *MsgRequestBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Requester) > 0 { - i -= len(m.Requester) - copy(dAtA[i:], m.Requester) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Requester))) + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- dAtA[i] = 0xa } @@ -1713,10 +2022,10 @@ func (m *MsgConfirmBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.Validator) > 0 { - i -= len(m.Validator) - copy(dAtA[i:], m.Validator) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Validator))) + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- dAtA[i] = 0x22 } @@ -1765,7 +2074,7 @@ func (m *MsgConfirmBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgDepositClaim) Marshal() (dAtA []byte, err error) { +func (m *MsgConfirmLogicCall) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1775,55 +2084,115 @@ func (m *MsgDepositClaim) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDepositClaim) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgConfirmLogicCall) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgConfirmLogicCall) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TokenDecimals != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.TokenDecimals)) + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signature))) i-- - dAtA[i] = 0x48 + dAtA[i] = 0x2a } - if len(m.TokenSymbol) > 0 { - i -= len(m.TokenSymbol) - copy(dAtA[i:], m.TokenSymbol) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenSymbol))) + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x22 + } + if len(m.EthSigner) > 0 { + i -= len(m.EthSigner) + copy(dAtA[i:], m.EthSigner) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthSigner))) + i-- + dAtA[i] = 0x1a } - if len(m.TokenName) > 0 { - i -= len(m.TokenName) - copy(dAtA[i:], m.TokenName) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenName))) + if m.InvalidationNonce != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.InvalidationNonce)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x10 + } + if len(m.InvalidationId) > 0 { + i -= len(m.InvalidationId) + copy(dAtA[i:], m.InvalidationId) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.InvalidationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgConfirmLogicCallResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgConfirmLogicCallResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConfirmLogicCallResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDepositClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgDepositClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if len(m.Orchestrator) > 0 { i -= len(m.Orchestrator) copy(dAtA[i:], m.Orchestrator) i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.CosmosReceiver) > 0 { i -= len(m.CosmosReceiver) copy(dAtA[i:], m.CosmosReceiver) i = encodeVarintMsgs(dAtA, i, uint64(len(m.CosmosReceiver))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if len(m.EthereumSender) > 0 { i -= len(m.EthereumSender) copy(dAtA[i:], m.EthereumSender) i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumSender))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } { size := m.Amount.Size() @@ -1834,13 +2203,18 @@ func (m *MsgDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintMsgs(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 if len(m.TokenContract) > 0 { i -= len(m.TokenContract) copy(dAtA[i:], m.TokenContract) i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.BlockHeight != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 } if m.EventNonce != 0 { i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) @@ -1850,6 +2224,29 @@ func (m *MsgDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgDepositClaimResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDepositClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgWithdrawClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1875,18 +2272,23 @@ func (m *MsgWithdrawClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Orchestrator) i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if len(m.TokenContract) > 0 { i -= len(m.TokenContract) copy(dAtA[i:], m.TokenContract) i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if m.BatchNonce != 0 { i = encodeVarintMsgs(dAtA, i, uint64(m.BatchNonce)) i-- + dAtA[i] = 0x18 + } + if m.BlockHeight != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.BlockHeight)) + i-- dAtA[i] = 0x10 } if m.EventNonce != 0 { @@ -1920,7 +2322,7 @@ func (m *MsgWithdrawClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgDepositClaimResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgERC20DeployedClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1930,77 +2332,200 @@ func (m *MsgDepositClaimResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDepositClaimResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgERC20DeployedClaim) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDepositClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgERC20DeployedClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - return len(dAtA) - i, nil -} - -func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int { - offset -= sovMsgs(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) + i-- + dAtA[i] = 0x42 } - dAtA[offset] = uint8(v) - return base + if m.Decimals != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x32 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x2a + } + if len(m.TokenContract) > 0 { + i -= len(m.TokenContract) + copy(dAtA[i:], m.TokenContract) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) + i-- + dAtA[i] = 0x22 + } + if len(m.CosmosDenom) > 0 { + i -= len(m.CosmosDenom) + copy(dAtA[i:], m.CosmosDenom) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.CosmosDenom))) + i-- + dAtA[i] = 0x1a + } + if m.BlockHeight != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.EventNonce != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *MsgValsetConfirm) Size() (n int) { - if m == nil { - return 0 + +func (m *MsgERC20DeployedClaimResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgERC20DeployedClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgERC20DeployedClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Nonce != 0 { - n += 1 + sovMsgs(uint64(m.Nonce)) + return len(dAtA) - i, nil +} + +func (m *MsgLogicCallExecutedClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.Validator) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) + return dAtA[:n], nil +} + +func (m *MsgLogicCallExecutedClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLogicCallExecutedClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orchestrator) > 0 { + i -= len(m.Orchestrator) + copy(dAtA[i:], m.Orchestrator) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Orchestrator))) + i-- + dAtA[i] = 0x2a } - l = len(m.EthAddress) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) + if m.InvalidationNonce != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.InvalidationNonce)) + i-- + dAtA[i] = 0x20 } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) + if len(m.InvalidationId) > 0 { + i -= len(m.InvalidationId) + copy(dAtA[i:], m.InvalidationId) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.InvalidationId))) + i-- + dAtA[i] = 0x1a } - return n + if m.BlockHeight != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.EventNonce != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *MsgValsetConfirmResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgLogicCallExecutedClaimResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgLogicCallExecutedClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLogicCallExecutedClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgValsetRequest) Size() (n int) { +func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int { + offset -= sovMsgs(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgSetOrchestratorAddresses) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Requester) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.Orchestrator) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.EthAddress) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } return n } -func (m *MsgValsetRequestResponse) Size() (n int) { +func (m *MsgSetOrchestratorAddressesResponse) Size() (n int) { if m == nil { return 0 } @@ -2009,17 +2534,20 @@ func (m *MsgValsetRequestResponse) Size() (n int) { return n } -func (m *MsgSetEthAddress) Size() (n int) { +func (m *MsgValsetConfirm) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Address) + if m.Nonce != 0 { + n += 1 + sovMsgs(uint64(m.Nonce)) + } + l = len(m.Orchestrator) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } - l = len(m.Validator) + l = len(m.EthAddress) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } @@ -2030,7 +2558,7 @@ func (m *MsgSetEthAddress) Size() (n int) { return n } -func (m *MsgSetEthAddressResponse) Size() (n int) { +func (m *MsgValsetConfirmResponse) Size() (n int) { if m == nil { return 0 } @@ -2075,7 +2603,7 @@ func (m *MsgRequestBatch) Size() (n int) { } var l int _ = l - l = len(m.Requester) + l = len(m.Orchestrator) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } @@ -2112,7 +2640,7 @@ func (m *MsgConfirmBatch) Size() (n int) { if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } - l = len(m.Validator) + l = len(m.Orchestrator) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } @@ -2132,6 +2660,43 @@ func (m *MsgConfirmBatchResponse) Size() (n int) { return n } +func (m *MsgConfirmLogicCall) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InvalidationId) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + if m.InvalidationNonce != 0 { + n += 1 + sovMsgs(uint64(m.InvalidationNonce)) + } + l = len(m.EthSigner) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.Orchestrator) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + return n +} + +func (m *MsgConfirmLogicCallResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgDepositClaim) Size() (n int) { if m == nil { return 0 @@ -2141,6 +2706,9 @@ func (m *MsgDepositClaim) Size() (n int) { if m.EventNonce != 0 { n += 1 + sovMsgs(uint64(m.EventNonce)) } + if m.BlockHeight != 0 { + n += 1 + sovMsgs(uint64(m.BlockHeight)) + } l = len(m.TokenContract) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) @@ -2159,68 +2727,553 @@ func (m *MsgDepositClaim) Size() (n int) { if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } - l = len(m.TokenName) + return n +} + +func (m *MsgDepositClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EventNonce != 0 { + n += 1 + sovMsgs(uint64(m.EventNonce)) + } + if m.BlockHeight != 0 { + n += 1 + sovMsgs(uint64(m.BlockHeight)) + } + if m.BatchNonce != 0 { + n += 1 + sovMsgs(uint64(m.BatchNonce)) + } + l = len(m.TokenContract) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.Orchestrator) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + return n +} + +func (m *MsgWithdrawClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgERC20DeployedClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EventNonce != 0 { + n += 1 + sovMsgs(uint64(m.EventNonce)) + } + if m.BlockHeight != 0 { + n += 1 + sovMsgs(uint64(m.BlockHeight)) + } + l = len(m.CosmosDenom) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.TokenContract) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + l = len(m.Name) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } - l = len(m.TokenSymbol) + l = len(m.Symbol) if l > 0 { n += 1 + l + sovMsgs(uint64(l)) } - if m.TokenDecimals != 0 { - n += 1 + sovMsgs(uint64(m.TokenDecimals)) + if m.Decimals != 0 { + n += 1 + sovMsgs(uint64(m.Decimals)) + } + l = len(m.Orchestrator) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + return n +} + +func (m *MsgERC20DeployedClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgLogicCallExecutedClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EventNonce != 0 { + n += 1 + sovMsgs(uint64(m.EventNonce)) + } + if m.BlockHeight != 0 { + n += 1 + sovMsgs(uint64(m.BlockHeight)) + } + l = len(m.InvalidationId) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + if m.InvalidationNonce != 0 { + n += 1 + sovMsgs(uint64(m.InvalidationNonce)) + } + l = len(m.Orchestrator) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + return n +} + +func (m *MsgLogicCallExecutedClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsgs(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsgs(x uint64) (n int) { + return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSetOrchestratorAddresses) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetOrchestratorAddresses: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetOrchestratorAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orchestrator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetOrchestratorAddressesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetOrchestratorAddressesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetOrchestratorAddressesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgValsetConfirm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgValsetConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orchestrator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - return n -} -func (m *MsgWithdrawClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovMsgs(uint64(m.EventNonce)) - } - if m.BatchNonce != 0 { - n += 1 + sovMsgs(uint64(m.BatchNonce)) - } - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Orchestrator) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n + return nil } - -func (m *MsgWithdrawClaimResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgValsetConfirmResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgValsetConfirmResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgValsetConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - var l int - _ = l - return n -} -func (m *MsgDepositClaimResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n -} - -func sovMsgs(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMsgs(x uint64) (n int) { - return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { +func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2243,17 +3296,17 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgValsetConfirm: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSendToEth: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgValsetConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSendToEth: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } - m.Nonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -2263,14 +3316,27 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthDest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2298,13 +3364,13 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validator = string(dAtA[iNdEx:postIndex]) + m.EthDest = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -2314,29 +3380,30 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMsgs } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthMsgs } if postIndex > l { return io.ErrUnexpectedEOF } - m.EthAddress = string(dAtA[iNdEx:postIndex]) + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BridgeFee", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -2346,23 +3413,24 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMsgs } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthMsgs } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signature = string(dAtA[iNdEx:postIndex]) + if err := m.BridgeFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2370,10 +3438,7 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2388,7 +3453,7 @@ func (m *MsgValsetConfirm) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgValsetConfirmResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSendToEthResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2411,10 +3476,10 @@ func (m *MsgValsetConfirmResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgValsetConfirmResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSendToEthResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgValsetConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSendToEthResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2423,10 +3488,7 @@ func (m *MsgValsetConfirmResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2441,7 +3503,7 @@ func (m *MsgValsetConfirmResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgValsetRequest) Unmarshal(dAtA []byte) error { +func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2464,15 +3526,47 @@ func (m *MsgValsetRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgValsetRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRequestBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgValsetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRequestBatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requester", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orchestrator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2500,7 +3594,7 @@ func (m *MsgValsetRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Requester = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2508,10 +3602,7 @@ func (m *MsgValsetRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2526,7 +3617,7 @@ func (m *MsgValsetRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgValsetRequestResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRequestBatchResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2549,10 +3640,10 @@ func (m *MsgValsetRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgValsetRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRequestBatchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgValsetRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRequestBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2561,10 +3652,7 @@ func (m *MsgValsetRequestResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2579,7 +3667,7 @@ func (m *MsgValsetRequestResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetEthAddress) Unmarshal(dAtA []byte) error { +func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2602,15 +3690,66 @@ func (m *MsgSetEthAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetEthAddress: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConfirmBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetEthAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConfirmBatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthSigner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2638,11 +3777,11 @@ func (m *MsgSetEthAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.EthSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2670,9 +3809,9 @@ func (m *MsgSetEthAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validator = string(dAtA[iNdEx:postIndex]) + m.Orchestrator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } @@ -2710,10 +3849,7 @@ func (m *MsgSetEthAddress) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2728,7 +3864,7 @@ func (m *MsgSetEthAddress) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetEthAddressResponse) Unmarshal(dAtA []byte) error { +func (m *MsgConfirmBatchResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2751,10 +3887,10 @@ func (m *MsgSetEthAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetEthAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConfirmBatchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetEthAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConfirmBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2763,10 +3899,7 @@ func (m *MsgSetEthAddressResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2781,7 +3914,7 @@ func (m *MsgSetEthAddressResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { +func (m *MsgConfirmLogicCall) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2804,15 +3937,15 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSendToEth: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConfirmLogicCall: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendToEth: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConfirmLogicCall: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2840,11 +3973,30 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sender = string(dAtA[iNdEx:postIndex]) + m.InvalidationId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + } + m.InvalidationNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InvalidationNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthDest", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthSigner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2872,13 +4024,13 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.EthDest = string(dAtA[iNdEx:postIndex]) + m.EthSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -2888,30 +4040,29 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthMsgs } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthMsgs } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Orchestrator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeFee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -2921,24 +4072,23 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthMsgs } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthMsgs } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.BridgeFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Signature = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2946,10 +4096,7 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -2964,7 +4111,7 @@ func (m *MsgSendToEth) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSendToEthResponse) Unmarshal(dAtA []byte) error { +func (m *MsgConfirmLogicCallResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2987,10 +4134,10 @@ func (m *MsgSendToEthResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSendToEthResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConfirmLogicCallResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendToEthResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConfirmLogicCallResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2999,10 +4146,7 @@ func (m *MsgSendToEthResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3017,7 +4161,7 @@ func (m *MsgSendToEthResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { +func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3040,15 +4184,53 @@ func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestBatch: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDepositClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestBatch: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDepositClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) + } + m.EventNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EventNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requester", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3076,11 +4258,11 @@ func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Requester = string(dAtA[iNdEx:postIndex]) + m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3108,7 +4290,105 @@ func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumSender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthereumSender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosReceiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CosmosReceiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orchestrator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3116,10 +4396,7 @@ func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3134,7 +4411,7 @@ func (m *MsgRequestBatch) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestBatchResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDepositClaimResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3157,10 +4434,10 @@ func (m *MsgRequestBatchResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestBatchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDepositClaimResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDepositClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3169,10 +4446,7 @@ func (m *MsgRequestBatchResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3187,7 +4461,7 @@ func (m *MsgRequestBatchResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3210,17 +4484,17 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgConfirmBatch: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgConfirmBatch: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) } - m.Nonce = 0 + m.EventNonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3230,16 +4504,16 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + m.EventNonce |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - var stringLen uint64 + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3249,29 +4523,16 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthSigner", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) } - var stringLen uint64 + m.BatchNonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3281,27 +4542,14 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.BatchNonce |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3329,11 +4577,11 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validator = string(dAtA[iNdEx:postIndex]) + m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3361,7 +4609,7 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Signature = string(dAtA[iNdEx:postIndex]) + m.Orchestrator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3369,10 +4617,7 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3387,7 +4632,7 @@ func (m *MsgConfirmBatch) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgConfirmBatchResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawClaimResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3410,10 +4655,10 @@ func (m *MsgConfirmBatchResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgConfirmBatchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawClaimResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgConfirmBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3422,10 +4667,7 @@ func (m *MsgConfirmBatchResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3440,7 +4682,7 @@ func (m *MsgConfirmBatchResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { +func (m *MsgERC20DeployedClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3463,10 +4705,10 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDepositClaim: wiretype end group for non-group") + return fmt.Errorf("proto: MsgERC20DeployedClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDepositClaim: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgERC20DeployedClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3489,10 +4731,10 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { } } case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - var stringLen uint64 + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3502,27 +4744,14 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CosmosDenom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3550,13 +4779,11 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.CosmosDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSender", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3584,11 +4811,11 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.EthereumSender = string(dAtA[iNdEx:postIndex]) + m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosReceiver", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3616,11 +4843,11 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CosmosReceiver = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3648,13 +4875,13 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Orchestrator = string(dAtA[iNdEx:postIndex]) + m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenName", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) } - var stringLen uint64 + m.Decimals = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3664,27 +4891,14 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Decimals |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenSymbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3712,37 +4926,65 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenSymbol = string(dAtA[iNdEx:postIndex]) + m.Orchestrator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenDecimals", wireType) - } - m.TokenDecimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TokenDecimals |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipMsgs(dAtA[iNdEx:]) if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } - if (iNdEx + skippy) < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgERC20DeployedClaimResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgERC20DeployedClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgERC20DeployedClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3757,7 +4999,7 @@ func (m *MsgDepositClaim) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { +func (m *MsgLogicCallExecutedClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3780,10 +5022,10 @@ func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawClaim: wiretype end group for non-group") + return fmt.Errorf("proto: MsgLogicCallExecutedClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawClaim: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgLogicCallExecutedClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3807,9 +5049,9 @@ func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - m.BatchNonce = 0 + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3819,16 +5061,16 @@ func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift + m.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -3838,25 +5080,46 @@ func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthMsgs } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthMsgs } if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenContract = string(dAtA[iNdEx:postIndex]) + m.InvalidationId = append(m.InvalidationId[:0], dAtA[iNdEx:postIndex]...) + if m.InvalidationId == nil { + m.InvalidationId = []byte{} + } iNdEx = postIndex case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + } + m.InvalidationNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InvalidationNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Orchestrator", wireType) } @@ -3894,63 +5157,7 @@ func (m *MsgWithdrawClaim) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgWithdrawClaimResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawClaimResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { @@ -3965,7 +5172,7 @@ func (m *MsgWithdrawClaimResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDepositClaimResponse) Unmarshal(dAtA []byte) error { +func (m *MsgLogicCallExecutedClaimResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3988,10 +5195,10 @@ func (m *MsgDepositClaimResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDepositClaimResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgLogicCallExecutedClaimResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDepositClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgLogicCallExecutedClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4000,10 +5207,7 @@ func (m *MsgDepositClaimResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsgs } if (iNdEx + skippy) > l { diff --git a/chain/peggy/types/msgs.pb.gw.go b/chain/peggy/types/msgs.pb.gw.go new file mode 100644 index 00000000..3a1c2074 --- /dev/null +++ b/chain/peggy/types/msgs.pb.gw.go @@ -0,0 +1,886 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: injective/peggy/v1/msgs.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_Msg_ValsetConfirm_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_ValsetConfirm_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgValsetConfirm + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ValsetConfirm_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ValsetConfirm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_ValsetConfirm_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgValsetConfirm + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ValsetConfirm_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ValsetConfirm(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_SendToEth_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_SendToEth_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgSendToEth + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SendToEth_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SendToEth(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_SendToEth_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgSendToEth + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SendToEth_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SendToEth(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_RequestBatch_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_RequestBatch_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgRequestBatch + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RequestBatch_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RequestBatch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_RequestBatch_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgRequestBatch + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RequestBatch_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RequestBatch(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_ConfirmBatch_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_ConfirmBatch_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgConfirmBatch + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ConfirmBatch_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ConfirmBatch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_ConfirmBatch_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgConfirmBatch + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ConfirmBatch_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ConfirmBatch(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_ConfirmLogicCall_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_ConfirmLogicCall_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgConfirmLogicCall + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ConfirmLogicCall_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ConfirmLogicCall(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_ConfirmLogicCall_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgConfirmLogicCall + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ConfirmLogicCall_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ConfirmLogicCall(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_DepositClaim_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_DepositClaim_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgDepositClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_DepositClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DepositClaim(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_DepositClaim_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgDepositClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_DepositClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DepositClaim(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_WithdrawClaim_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_WithdrawClaim_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_WithdrawClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.WithdrawClaim(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_WithdrawClaim_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_WithdrawClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.WithdrawClaim(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_ERC20DeployedClaim_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_ERC20DeployedClaim_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgERC20DeployedClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ERC20DeployedClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ERC20DeployedClaim(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_ERC20DeployedClaim_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgERC20DeployedClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ERC20DeployedClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ERC20DeployedClaim(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_LogicCallExecutedClaim_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_LogicCallExecutedClaim_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgLogicCallExecutedClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_LogicCallExecutedClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LogicCallExecutedClaim(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_LogicCallExecutedClaim_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgLogicCallExecutedClaim + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_LogicCallExecutedClaim_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LogicCallExecutedClaim(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_SetOrchestratorAddresses_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_SetOrchestratorAddresses_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgSetOrchestratorAddresses + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SetOrchestratorAddresses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetOrchestratorAddresses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_SetOrchestratorAddresses_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgSetOrchestratorAddresses + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SetOrchestratorAddresses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetOrchestratorAddresses(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". +// UnaryRPC :call MsgServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { + + mux.Handle("POST", pattern_Msg_ValsetConfirm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_ValsetConfirm_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ValsetConfirm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_SendToEth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_SendToEth_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_SendToEth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_RequestBatch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_RequestBatch_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_RequestBatch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_ConfirmBatch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_ConfirmBatch_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ConfirmBatch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_ConfirmLogicCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_ConfirmLogicCall_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ConfirmLogicCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_DepositClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_DepositClaim_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_DepositClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_WithdrawClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_WithdrawClaim_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_WithdrawClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_ERC20DeployedClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_ERC20DeployedClaim_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ERC20DeployedClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_LogicCallExecutedClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_LogicCallExecutedClaim_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_LogicCallExecutedClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_SetOrchestratorAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_SetOrchestratorAddresses_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_SetOrchestratorAddresses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMsgHandler(ctx, mux, conn) +} + +// RegisterMsgHandler registers the http handlers for service Msg to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) +} + +// RegisterMsgHandlerClient registers the http handlers for service Msg +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MsgClient" to call the correct interceptors. +func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { + + mux.Handle("POST", pattern_Msg_ValsetConfirm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_ValsetConfirm_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ValsetConfirm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_SendToEth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_SendToEth_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_SendToEth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_RequestBatch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_RequestBatch_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_RequestBatch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_ConfirmBatch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_ConfirmBatch_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ConfirmBatch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_ConfirmLogicCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_ConfirmLogicCall_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ConfirmLogicCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_DepositClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_DepositClaim_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_DepositClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_WithdrawClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_WithdrawClaim_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_WithdrawClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_ERC20DeployedClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_ERC20DeployedClaim_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ERC20DeployedClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_LogicCallExecutedClaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_LogicCallExecutedClaim_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_LogicCallExecutedClaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_SetOrchestratorAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_SetOrchestratorAddresses_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_SetOrchestratorAddresses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Msg_ValsetConfirm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "valset_confirm"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_SendToEth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "send_to_eth"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_RequestBatch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "request_batch"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_ConfirmBatch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "confirm_batch"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_ConfirmLogicCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "confim_logic"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_DepositClaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "deposit_claim"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_WithdrawClaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "withdraw_claim"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_ERC20DeployedClaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "erc20_deployed_claim"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_LogicCallExecutedClaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "logic_call_executed_claim"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_SetOrchestratorAddresses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"injective", "peggy", "v1", "set_orchestrator_address"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Msg_ValsetConfirm_0 = runtime.ForwardResponseMessage + + forward_Msg_SendToEth_0 = runtime.ForwardResponseMessage + + forward_Msg_RequestBatch_0 = runtime.ForwardResponseMessage + + forward_Msg_ConfirmBatch_0 = runtime.ForwardResponseMessage + + forward_Msg_ConfirmLogicCall_0 = runtime.ForwardResponseMessage + + forward_Msg_DepositClaim_0 = runtime.ForwardResponseMessage + + forward_Msg_WithdrawClaim_0 = runtime.ForwardResponseMessage + + forward_Msg_ERC20DeployedClaim_0 = runtime.ForwardResponseMessage + + forward_Msg_LogicCallExecutedClaim_0 = runtime.ForwardResponseMessage + + forward_Msg_SetOrchestratorAddresses_0 = runtime.ForwardResponseMessage +) diff --git a/chain/peggy/types/msgs_test.go b/chain/peggy/types/msgs_test.go new file mode 100644 index 00000000..db01265f --- /dev/null +++ b/chain/peggy/types/msgs_test.go @@ -0,0 +1,65 @@ +package types + +import ( + "bytes" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" +) + +func TestValidateMsgSetOrchestratorAddresses(t *testing.T) { + var ( + ethAddress = common.HexToAddress("0xb462864E395d88d6bc7C5dd5F3F5eb4cc2599255") + cosmosAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, sdk.AddrLen) + valAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, sdk.AddrLen) + ) + specs := map[string]struct { + srcCosmosAddr sdk.AccAddress + srcValAddr sdk.AccAddress + srcETHAddr common.Address + expErr bool + }{ + "all good": { + srcCosmosAddr: cosmosAddress, + srcValAddr: valAddress, + srcETHAddr: ethAddress, + }, + "empty validator address": { + srcETHAddr: ethAddress, + srcCosmosAddr: cosmosAddress, + expErr: true, + }, + "invalid validator address": { + srcValAddr: []byte{0x1}, + srcCosmosAddr: cosmosAddress, + srcETHAddr: ethAddress, + expErr: true, + }, + "empty cosmos address": { + srcValAddr: valAddress, + srcETHAddr: ethAddress, + expErr: true, + }, + "invalid cosmos address": { + srcCosmosAddr: []byte{0x1}, + srcValAddr: valAddress, + srcETHAddr: ethAddress, + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + msg := NewMsgSetOrchestratorAddress(spec.srcValAddr, spec.srcCosmosAddr, spec.srcETHAddr) + // when + err := msg.ValidateBasic() + if spec.expErr { + assert.Error(t, err) + return + } + assert.NoError(t, err) + }) + } + +} diff --git a/chain/peggy/types/pool.pb.go b/chain/peggy/types/pool.pb.go index 20888c5e..9340e660 100644 --- a/chain/peggy/types/pool.pb.go +++ b/chain/peggy/types/pool.pb.go @@ -1,10 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/pool.proto +// source: injective/peggy/v1/pool.proto package types import ( fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -37,7 +38,7 @@ func (m *OutgoingTx) Reset() { *m = OutgoingTx{} } func (m *OutgoingTx) String() string { return proto.CompactTextString(m) } func (*OutgoingTx) ProtoMessage() {} func (*OutgoingTx) Descriptor() ([]byte, []int) { - return fileDescriptor_0baba9e874638a68, []int{0} + return fileDescriptor_36397d69759ce164, []int{0} } func (m *OutgoingTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +104,7 @@ func (m *IDSet) Reset() { *m = IDSet{} } func (m *IDSet) String() string { return proto.CompactTextString(m) } func (*IDSet) ProtoMessage() {} func (*IDSet) Descriptor() ([]byte, []int) { - return fileDescriptor_0baba9e874638a68, []int{1} + return fileDescriptor_36397d69759ce164, []int{1} } func (m *IDSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -139,38 +140,86 @@ func (m *IDSet) GetIds() []uint64 { return nil } -func init() { - proto.RegisterType((*OutgoingTx)(nil), "injective.peggy.v1beta1.OutgoingTx") - proto.RegisterType((*IDSet)(nil), "injective.peggy.v1beta1.IDSet") +type BatchFees struct { + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + TopOneHundred github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=topOneHundred,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"topOneHundred"` +} + +func (m *BatchFees) Reset() { *m = BatchFees{} } +func (m *BatchFees) String() string { return proto.CompactTextString(m) } +func (*BatchFees) ProtoMessage() {} +func (*BatchFees) Descriptor() ([]byte, []int) { + return fileDescriptor_36397d69759ce164, []int{2} +} +func (m *BatchFees) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchFees) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchFees.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchFees) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchFees.Merge(m, src) +} +func (m *BatchFees) XXX_Size() int { + return m.Size() +} +func (m *BatchFees) XXX_DiscardUnknown() { + xxx_messageInfo_BatchFees.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchFees proto.InternalMessageInfo + +func (m *BatchFees) GetToken() string { + if m != nil { + return m.Token + } + return "" } func init() { - proto.RegisterFile("injective/peggy/v1beta1/pool.proto", fileDescriptor_0baba9e874638a68) -} - -var fileDescriptor_0baba9e874638a68 = []byte{ - // 323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbf, 0x4a, 0x03, 0x41, - 0x18, 0xc4, 0x6f, 0x4d, 0x0c, 0x66, 0x6d, 0xe4, 0x10, 0xbd, 0x44, 0x38, 0x43, 0xaa, 0x34, 0xee, - 0x12, 0x2d, 0xec, 0x04, 0xa3, 0x08, 0x41, 0x41, 0x88, 0x56, 0x36, 0xe1, 0xee, 0xf6, 0x73, 0xb3, - 0x92, 0xdb, 0xef, 0xb8, 0xdd, 0x0b, 0xe6, 0x2d, 0x7c, 0x1e, 0x9f, 0x20, 0x65, 0x4a, 0x2b, 0x91, - 0xe4, 0x45, 0xe4, 0xfe, 0x24, 0x58, 0xda, 0xcd, 0x37, 0x3b, 0x3f, 0x18, 0x66, 0x69, 0x57, 0xe9, - 0x37, 0x88, 0xac, 0x9a, 0x01, 0x4f, 0x40, 0xca, 0x39, 0x9f, 0xf5, 0x43, 0xb0, 0x41, 0x9f, 0x27, - 0x88, 0x53, 0x96, 0xa4, 0x68, 0xd1, 0x3d, 0xde, 0x66, 0x58, 0x91, 0x61, 0x55, 0xa6, 0xed, 0x47, - 0x68, 0x62, 0x34, 0x3c, 0x0c, 0x0c, 0x6c, 0xc1, 0x08, 0x95, 0x2e, 0xc1, 0xf6, 0xa1, 0x44, 0x89, - 0x85, 0xe4, 0xb9, 0x2a, 0xdd, 0xee, 0x27, 0xa1, 0xf4, 0x31, 0xb3, 0x12, 0x95, 0x96, 0xcf, 0xef, - 0xee, 0x11, 0x6d, 0x18, 0xd0, 0x02, 0x52, 0x8f, 0x74, 0x48, 0xaf, 0x39, 0xaa, 0x2e, 0xf7, 0x84, - 0x36, 0x05, 0x18, 0x3b, 0x0e, 0x84, 0x48, 0xbd, 0x9d, 0xe2, 0x69, 0x2f, 0x37, 0xae, 0x85, 0x48, - 0xdd, 0x4b, 0xda, 0x08, 0x62, 0xcc, 0xb4, 0xf5, 0x6a, 0x1d, 0xd2, 0xdb, 0x3f, 0x6f, 0xb1, 0xb2, - 0x0a, 0xcb, 0xab, 0x6c, 0xfa, 0xb1, 0x1b, 0x54, 0x7a, 0x50, 0x5f, 0x7c, 0x9f, 0x3a, 0xa3, 0x2a, - 0xee, 0x5e, 0x51, 0x1a, 0xa6, 0x4a, 0x48, 0x18, 0xbf, 0x02, 0x78, 0xf5, 0xff, 0xc1, 0xcd, 0x12, - 0xb9, 0x03, 0xe8, 0xb6, 0xe8, 0xee, 0xf0, 0xf6, 0x09, 0xac, 0x7b, 0x40, 0x6b, 0x4a, 0x18, 0x8f, - 0x74, 0x6a, 0xbd, 0xfa, 0x28, 0x97, 0x03, 0x58, 0xac, 0x7c, 0xb2, 0x5c, 0xf9, 0xe4, 0x67, 0xe5, - 0x93, 0x8f, 0xb5, 0xef, 0x2c, 0xd7, 0xbe, 0xf3, 0xb5, 0xf6, 0x9d, 0x97, 0x7b, 0xa9, 0xec, 0x24, - 0x0b, 0x59, 0x84, 0x31, 0x1f, 0x6e, 0xb6, 0x7c, 0x08, 0x42, 0xc3, 0xb7, 0xcb, 0x9e, 0x45, 0x98, - 0xc2, 0xdf, 0x73, 0x12, 0x28, 0xcd, 0x63, 0x14, 0xd9, 0x14, 0x4c, 0xf5, 0x35, 0x76, 0x9e, 0x80, - 0x09, 0x1b, 0xc5, 0x8a, 0x17, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x2b, 0xe7, 0xbd, 0xba, - 0x01, 0x00, 0x00, + proto.RegisterType((*OutgoingTx)(nil), "injective.peggy.v1.OutgoingTx") + proto.RegisterType((*IDSet)(nil), "injective.peggy.v1.IDSet") + proto.RegisterType((*BatchFees)(nil), "injective.peggy.v1.BatchFees") +} + +func init() { proto.RegisterFile("injective/peggy/v1/pool.proto", fileDescriptor_36397d69759ce164) } + +var fileDescriptor_36397d69759ce164 = []byte{ + // 393 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0x8e, 0xd3, 0x30, + 0x10, 0x8e, 0x69, 0xb7, 0x22, 0x46, 0x48, 0xc8, 0x5a, 0xa1, 0xec, 0x22, 0xb2, 0x55, 0x0f, 0xa8, + 0x97, 0xb5, 0x15, 0x38, 0x70, 0x43, 0x22, 0xa0, 0x15, 0x15, 0x48, 0x2b, 0x85, 0x3d, 0x71, 0x59, + 0x25, 0xf1, 0xe0, 0x9a, 0xdd, 0x78, 0xa2, 0xd8, 0x09, 0xec, 0x5b, 0xf0, 0x3c, 0x3c, 0x41, 0x8f, + 0x3d, 0x22, 0x0e, 0x15, 0x6a, 0x5f, 0x04, 0xe5, 0x87, 0xaa, 0xdc, 0x38, 0x79, 0x66, 0x3e, 0x7f, + 0x33, 0xdf, 0xf8, 0x33, 0x7d, 0xaa, 0xcd, 0x17, 0xc8, 0x9d, 0x6e, 0x40, 0x94, 0xa0, 0xd4, 0x9d, + 0x68, 0x22, 0x51, 0x22, 0xde, 0xf2, 0xb2, 0x42, 0x87, 0x8c, 0xed, 0x61, 0xde, 0xc1, 0xbc, 0x89, + 0x4e, 0xc3, 0x1c, 0x6d, 0x81, 0x56, 0x64, 0xa9, 0x05, 0xd1, 0x44, 0x19, 0xb8, 0x34, 0x12, 0x39, + 0x6a, 0xd3, 0x73, 0x4e, 0x8f, 0x15, 0x2a, 0xec, 0x42, 0xd1, 0x46, 0x7d, 0x75, 0xf6, 0x83, 0x50, + 0x7a, 0x59, 0x3b, 0x85, 0xda, 0xa8, 0xab, 0x6f, 0xec, 0x31, 0x9d, 0x58, 0x30, 0x12, 0xaa, 0x80, + 0x4c, 0xc9, 0xdc, 0x4f, 0x86, 0x8c, 0x3d, 0xa1, 0xbe, 0x04, 0xeb, 0xae, 0x53, 0x29, 0xab, 0xe0, + 0x5e, 0x07, 0xdd, 0x6f, 0x0b, 0xaf, 0xa5, 0xac, 0xd8, 0x4b, 0x3a, 0x49, 0x0b, 0xac, 0x8d, 0x0b, + 0x46, 0x53, 0x32, 0x7f, 0xf0, 0xfc, 0x84, 0xf7, 0x52, 0x78, 0x2b, 0x85, 0x0f, 0x52, 0xf8, 0x1b, + 0xd4, 0x26, 0x1e, 0xaf, 0x36, 0x67, 0x5e, 0x32, 0x5c, 0x67, 0xaf, 0x28, 0xcd, 0x2a, 0x2d, 0x15, + 0x5c, 0x7f, 0x06, 0x08, 0xc6, 0xff, 0x47, 0xf6, 0x7b, 0xca, 0x05, 0xc0, 0xec, 0x84, 0x1e, 0x2d, + 0xde, 0x7e, 0x04, 0xc7, 0x1e, 0xd1, 0x91, 0x96, 0x36, 0x20, 0xd3, 0xd1, 0x7c, 0x9c, 0xb4, 0xe1, + 0xec, 0x2b, 0xf5, 0xe3, 0xd4, 0xe5, 0xcb, 0x0b, 0x00, 0xcb, 0x8e, 0xe9, 0x91, 0xc3, 0x1b, 0x30, + 0xc3, 0x52, 0x7d, 0xc2, 0xae, 0xe8, 0x43, 0x87, 0xe5, 0xa5, 0x81, 0x77, 0xb5, 0x91, 0x15, 0xc8, + 0x7e, 0xaf, 0x98, 0xb7, 0x53, 0x7e, 0x6d, 0xce, 0x9e, 0x29, 0xed, 0x96, 0x75, 0xc6, 0x73, 0x2c, + 0xc4, 0xf0, 0xb4, 0xfd, 0x71, 0x6e, 0xe5, 0x8d, 0x70, 0x77, 0x25, 0x58, 0xbe, 0x30, 0x2e, 0xf9, + 0xb7, 0x49, 0x0c, 0xab, 0x6d, 0x48, 0xd6, 0xdb, 0x90, 0xfc, 0xde, 0x86, 0xe4, 0xfb, 0x2e, 0xf4, + 0xd6, 0xbb, 0xd0, 0xfb, 0xb9, 0x0b, 0xbd, 0x4f, 0xef, 0x0f, 0x1a, 0x2e, 0xfe, 0xfa, 0xf7, 0x21, + 0xcd, 0xac, 0xd8, 0xbb, 0x79, 0x9e, 0x63, 0x05, 0x87, 0xe9, 0x32, 0xd5, 0x46, 0x14, 0x28, 0xeb, + 0x5b, 0xb0, 0xc3, 0x4f, 0xe8, 0x26, 0x67, 0x93, 0xce, 0xbe, 0x17, 0x7f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x2a, 0x0f, 0x42, 0xcc, 0x29, 0x02, 0x00, 0x00, } func (m *OutgoingTx) Marshal() (dAtA []byte, err error) { @@ -271,6 +320,46 @@ func (m *IDSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BatchFees) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchFees) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchFees) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TopOneHundred.Size() + i -= size + if _, err := m.TopOneHundred.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintPool(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintPool(dAtA []byte, offset int, v uint64) int { offset -= sovPool(v) base := offset @@ -319,6 +408,21 @@ func (m *IDSet) Size() (n int) { return n } +func (m *BatchFees) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Token) + if l > 0 { + n += 1 + l + sovPool(uint64(l)) + } + l = m.TopOneHundred.Size() + n += 1 + l + sovPool(uint64(l)) + return n +} + func sovPool(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -490,10 +594,7 @@ func (m *OutgoingTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPool - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPool } if (iNdEx + skippy) > l { @@ -619,10 +720,123 @@ func (m *IDSet) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchFees) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchFees: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchFees: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthPool } - if (iNdEx + skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TopOneHundred", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TopOneHundred.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPool } if (iNdEx + skippy) > l { diff --git a/chain/peggy/types/query.pb.go b/chain/peggy/types/query.pb.go index c2c60887..de04863f 100644 --- a/chain/peggy/types/query.pb.go +++ b/chain/peggy/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/query.proto +// source: injective/peggy/v1/query.proto package types @@ -36,7 +36,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{0} + return fileDescriptor_702b8e5c1503495b, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{1} + return fileDescriptor_702b8e5c1503495b, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -116,7 +116,7 @@ func (m *QueryCurrentValsetRequest) Reset() { *m = QueryCurrentValsetReq func (m *QueryCurrentValsetRequest) String() string { return proto.CompactTextString(m) } func (*QueryCurrentValsetRequest) ProtoMessage() {} func (*QueryCurrentValsetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{2} + return fileDescriptor_702b8e5c1503495b, []int{2} } func (m *QueryCurrentValsetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -153,7 +153,7 @@ func (m *QueryCurrentValsetResponse) Reset() { *m = QueryCurrentValsetRe func (m *QueryCurrentValsetResponse) String() string { return proto.CompactTextString(m) } func (*QueryCurrentValsetResponse) ProtoMessage() {} func (*QueryCurrentValsetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{3} + return fileDescriptor_702b8e5c1503495b, []int{3} } func (m *QueryCurrentValsetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -197,7 +197,7 @@ func (m *QueryValsetRequestRequest) Reset() { *m = QueryValsetRequestReq func (m *QueryValsetRequestRequest) String() string { return proto.CompactTextString(m) } func (*QueryValsetRequestRequest) ProtoMessage() {} func (*QueryValsetRequestRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{4} + return fileDescriptor_702b8e5c1503495b, []int{4} } func (m *QueryValsetRequestRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,7 +241,7 @@ func (m *QueryValsetRequestResponse) Reset() { *m = QueryValsetRequestRe func (m *QueryValsetRequestResponse) String() string { return proto.CompactTextString(m) } func (*QueryValsetRequestResponse) ProtoMessage() {} func (*QueryValsetRequestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{5} + return fileDescriptor_702b8e5c1503495b, []int{5} } func (m *QueryValsetRequestResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -286,7 +286,7 @@ func (m *QueryValsetConfirmRequest) Reset() { *m = QueryValsetConfirmReq func (m *QueryValsetConfirmRequest) String() string { return proto.CompactTextString(m) } func (*QueryValsetConfirmRequest) ProtoMessage() {} func (*QueryValsetConfirmRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{6} + return fileDescriptor_702b8e5c1503495b, []int{6} } func (m *QueryValsetConfirmRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -337,7 +337,7 @@ func (m *QueryValsetConfirmResponse) Reset() { *m = QueryValsetConfirmRe func (m *QueryValsetConfirmResponse) String() string { return proto.CompactTextString(m) } func (*QueryValsetConfirmResponse) ProtoMessage() {} func (*QueryValsetConfirmResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{7} + return fileDescriptor_702b8e5c1503495b, []int{7} } func (m *QueryValsetConfirmResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -381,7 +381,7 @@ func (m *QueryValsetConfirmsByNonceRequest) Reset() { *m = QueryValsetCo func (m *QueryValsetConfirmsByNonceRequest) String() string { return proto.CompactTextString(m) } func (*QueryValsetConfirmsByNonceRequest) ProtoMessage() {} func (*QueryValsetConfirmsByNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{8} + return fileDescriptor_702b8e5c1503495b, []int{8} } func (m *QueryValsetConfirmsByNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -425,7 +425,7 @@ func (m *QueryValsetConfirmsByNonceResponse) Reset() { *m = QueryValsetC func (m *QueryValsetConfirmsByNonceResponse) String() string { return proto.CompactTextString(m) } func (*QueryValsetConfirmsByNonceResponse) ProtoMessage() {} func (*QueryValsetConfirmsByNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{9} + return fileDescriptor_702b8e5c1503495b, []int{9} } func (m *QueryValsetConfirmsByNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +468,7 @@ func (m *QueryLastValsetRequestsRequest) Reset() { *m = QueryLastValsetR func (m *QueryLastValsetRequestsRequest) String() string { return proto.CompactTextString(m) } func (*QueryLastValsetRequestsRequest) ProtoMessage() {} func (*QueryLastValsetRequestsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{10} + return fileDescriptor_702b8e5c1503495b, []int{10} } func (m *QueryLastValsetRequestsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -505,7 +505,7 @@ func (m *QueryLastValsetRequestsResponse) Reset() { *m = QueryLastValset func (m *QueryLastValsetRequestsResponse) String() string { return proto.CompactTextString(m) } func (*QueryLastValsetRequestsResponse) ProtoMessage() {} func (*QueryLastValsetRequestsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{11} + return fileDescriptor_702b8e5c1503495b, []int{11} } func (m *QueryLastValsetRequestsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -553,7 +553,7 @@ func (m *QueryLastPendingValsetRequestByAddrRequest) String() string { } func (*QueryLastPendingValsetRequestByAddrRequest) ProtoMessage() {} func (*QueryLastPendingValsetRequestByAddrRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{12} + return fileDescriptor_702b8e5c1503495b, []int{12} } func (m *QueryLastPendingValsetRequestByAddrRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -590,7 +590,7 @@ func (m *QueryLastPendingValsetRequestByAddrRequest) GetAddress() string { } type QueryLastPendingValsetRequestByAddrResponse struct { - Valset *Valset `protobuf:"bytes,1,opt,name=valset,proto3" json:"valset,omitempty"` + Valsets []*Valset `protobuf:"bytes,1,rep,name=valsets,proto3" json:"valsets,omitempty"` } func (m *QueryLastPendingValsetRequestByAddrResponse) Reset() { @@ -601,7 +601,7 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) String() string { } func (*QueryLastPendingValsetRequestByAddrResponse) ProtoMessage() {} func (*QueryLastPendingValsetRequestByAddrResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{13} + return fileDescriptor_702b8e5c1503495b, []int{13} } func (m *QueryLastPendingValsetRequestByAddrResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -630,9 +630,89 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryLastPendingValsetRequestByAddrResponse proto.InternalMessageInfo -func (m *QueryLastPendingValsetRequestByAddrResponse) GetValset() *Valset { +func (m *QueryLastPendingValsetRequestByAddrResponse) GetValsets() []*Valset { if m != nil { - return m.Valset + return m.Valsets + } + return nil +} + +type QueryBatchFeeRequest struct { +} + +func (m *QueryBatchFeeRequest) Reset() { *m = QueryBatchFeeRequest{} } +func (m *QueryBatchFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBatchFeeRequest) ProtoMessage() {} +func (*QueryBatchFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{14} +} +func (m *QueryBatchFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBatchFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBatchFeeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBatchFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBatchFeeRequest.Merge(m, src) +} +func (m *QueryBatchFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBatchFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBatchFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBatchFeeRequest proto.InternalMessageInfo + +type QueryBatchFeeResponse struct { + BatchFees []*BatchFees `protobuf:"bytes,1,rep,name=batchFees,proto3" json:"batchFees,omitempty"` +} + +func (m *QueryBatchFeeResponse) Reset() { *m = QueryBatchFeeResponse{} } +func (m *QueryBatchFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBatchFeeResponse) ProtoMessage() {} +func (*QueryBatchFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{15} +} +func (m *QueryBatchFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBatchFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBatchFeeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBatchFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBatchFeeResponse.Merge(m, src) +} +func (m *QueryBatchFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBatchFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBatchFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBatchFeeResponse proto.InternalMessageInfo + +func (m *QueryBatchFeeResponse) GetBatchFees() []*BatchFees { + if m != nil { + return m.BatchFees } return nil } @@ -649,7 +729,7 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) String() string { } func (*QueryLastPendingBatchRequestByAddrRequest) ProtoMessage() {} func (*QueryLastPendingBatchRequestByAddrRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{14} + return fileDescriptor_702b8e5c1503495b, []int{16} } func (m *QueryLastPendingBatchRequestByAddrRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -697,7 +777,7 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) String() string { } func (*QueryLastPendingBatchRequestByAddrResponse) ProtoMessage() {} func (*QueryLastPendingBatchRequestByAddrResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{15} + return fileDescriptor_702b8e5c1503495b, []int{17} } func (m *QueryLastPendingBatchRequestByAddrResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -733,6 +813,98 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) GetBatch() *OutgoingTxBatch return nil } +type QueryLastPendingLogicCallByAddrRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryLastPendingLogicCallByAddrRequest) Reset() { + *m = QueryLastPendingLogicCallByAddrRequest{} +} +func (m *QueryLastPendingLogicCallByAddrRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLastPendingLogicCallByAddrRequest) ProtoMessage() {} +func (*QueryLastPendingLogicCallByAddrRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{18} +} +func (m *QueryLastPendingLogicCallByAddrRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastPendingLogicCallByAddrRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastPendingLogicCallByAddrRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLastPendingLogicCallByAddrRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastPendingLogicCallByAddrRequest.Merge(m, src) +} +func (m *QueryLastPendingLogicCallByAddrRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLastPendingLogicCallByAddrRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastPendingLogicCallByAddrRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastPendingLogicCallByAddrRequest proto.InternalMessageInfo + +func (m *QueryLastPendingLogicCallByAddrRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type QueryLastPendingLogicCallByAddrResponse struct { + Call *OutgoingLogicCall `protobuf:"bytes,1,opt,name=call,proto3" json:"call,omitempty"` +} + +func (m *QueryLastPendingLogicCallByAddrResponse) Reset() { + *m = QueryLastPendingLogicCallByAddrResponse{} +} +func (m *QueryLastPendingLogicCallByAddrResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLastPendingLogicCallByAddrResponse) ProtoMessage() {} +func (*QueryLastPendingLogicCallByAddrResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{19} +} +func (m *QueryLastPendingLogicCallByAddrResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastPendingLogicCallByAddrResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastPendingLogicCallByAddrResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLastPendingLogicCallByAddrResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastPendingLogicCallByAddrResponse.Merge(m, src) +} +func (m *QueryLastPendingLogicCallByAddrResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLastPendingLogicCallByAddrResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastPendingLogicCallByAddrResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastPendingLogicCallByAddrResponse proto.InternalMessageInfo + +func (m *QueryLastPendingLogicCallByAddrResponse) GetCall() *OutgoingLogicCall { + if m != nil { + return m.Call + } + return nil +} + type QueryOutgoingTxBatchesRequest struct { } @@ -740,7 +912,7 @@ func (m *QueryOutgoingTxBatchesRequest) Reset() { *m = QueryOutgoingTxBa func (m *QueryOutgoingTxBatchesRequest) String() string { return proto.CompactTextString(m) } func (*QueryOutgoingTxBatchesRequest) ProtoMessage() {} func (*QueryOutgoingTxBatchesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{16} + return fileDescriptor_702b8e5c1503495b, []int{20} } func (m *QueryOutgoingTxBatchesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -777,7 +949,7 @@ func (m *QueryOutgoingTxBatchesResponse) Reset() { *m = QueryOutgoingTxB func (m *QueryOutgoingTxBatchesResponse) String() string { return proto.CompactTextString(m) } func (*QueryOutgoingTxBatchesResponse) ProtoMessage() {} func (*QueryOutgoingTxBatchesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{17} + return fileDescriptor_702b8e5c1503495b, []int{21} } func (m *QueryOutgoingTxBatchesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -813,6 +985,86 @@ func (m *QueryOutgoingTxBatchesResponse) GetBatches() []*OutgoingTxBatch { return nil } +type QueryOutgoingLogicCallsRequest struct { +} + +func (m *QueryOutgoingLogicCallsRequest) Reset() { *m = QueryOutgoingLogicCallsRequest{} } +func (m *QueryOutgoingLogicCallsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOutgoingLogicCallsRequest) ProtoMessage() {} +func (*QueryOutgoingLogicCallsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{22} +} +func (m *QueryOutgoingLogicCallsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOutgoingLogicCallsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOutgoingLogicCallsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryOutgoingLogicCallsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOutgoingLogicCallsRequest.Merge(m, src) +} +func (m *QueryOutgoingLogicCallsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOutgoingLogicCallsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOutgoingLogicCallsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOutgoingLogicCallsRequest proto.InternalMessageInfo + +type QueryOutgoingLogicCallsResponse struct { + Calls []*OutgoingLogicCall `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` +} + +func (m *QueryOutgoingLogicCallsResponse) Reset() { *m = QueryOutgoingLogicCallsResponse{} } +func (m *QueryOutgoingLogicCallsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOutgoingLogicCallsResponse) ProtoMessage() {} +func (*QueryOutgoingLogicCallsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{23} +} +func (m *QueryOutgoingLogicCallsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOutgoingLogicCallsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOutgoingLogicCallsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryOutgoingLogicCallsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOutgoingLogicCallsResponse.Merge(m, src) +} +func (m *QueryOutgoingLogicCallsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOutgoingLogicCallsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOutgoingLogicCallsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOutgoingLogicCallsResponse proto.InternalMessageInfo + +func (m *QueryOutgoingLogicCallsResponse) GetCalls() []*OutgoingLogicCall { + if m != nil { + return m.Calls + } + return nil +} + type QueryBatchRequestByNonceRequest struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` @@ -822,7 +1074,7 @@ func (m *QueryBatchRequestByNonceRequest) Reset() { *m = QueryBatchReque func (m *QueryBatchRequestByNonceRequest) String() string { return proto.CompactTextString(m) } func (*QueryBatchRequestByNonceRequest) ProtoMessage() {} func (*QueryBatchRequestByNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{18} + return fileDescriptor_702b8e5c1503495b, []int{24} } func (m *QueryBatchRequestByNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -873,7 +1125,7 @@ func (m *QueryBatchRequestByNonceResponse) Reset() { *m = QueryBatchRequ func (m *QueryBatchRequestByNonceResponse) String() string { return proto.CompactTextString(m) } func (*QueryBatchRequestByNonceResponse) ProtoMessage() {} func (*QueryBatchRequestByNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{19} + return fileDescriptor_702b8e5c1503495b, []int{25} } func (m *QueryBatchRequestByNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -918,7 +1170,7 @@ func (m *QueryBatchConfirmsRequest) Reset() { *m = QueryBatchConfirmsReq func (m *QueryBatchConfirmsRequest) String() string { return proto.CompactTextString(m) } func (*QueryBatchConfirmsRequest) ProtoMessage() {} func (*QueryBatchConfirmsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{20} + return fileDescriptor_702b8e5c1503495b, []int{26} } func (m *QueryBatchConfirmsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -969,7 +1221,7 @@ func (m *QueryBatchConfirmsResponse) Reset() { *m = QueryBatchConfirmsRe func (m *QueryBatchConfirmsResponse) String() string { return proto.CompactTextString(m) } func (*QueryBatchConfirmsResponse) ProtoMessage() {} func (*QueryBatchConfirmsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{21} + return fileDescriptor_702b8e5c1503495b, []int{27} } func (m *QueryBatchConfirmsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1005,6 +1257,102 @@ func (m *QueryBatchConfirmsResponse) GetConfirms() []*MsgConfirmBatch { return nil } +type QueryLogicConfirmsRequest struct { + InvalidationId []byte `protobuf:"bytes,1,opt,name=invalidation_id,json=invalidationId,proto3" json:"invalidation_id,omitempty"` + InvalidationNonce uint64 `protobuf:"varint,2,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` +} + +func (m *QueryLogicConfirmsRequest) Reset() { *m = QueryLogicConfirmsRequest{} } +func (m *QueryLogicConfirmsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLogicConfirmsRequest) ProtoMessage() {} +func (*QueryLogicConfirmsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{28} +} +func (m *QueryLogicConfirmsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLogicConfirmsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLogicConfirmsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLogicConfirmsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLogicConfirmsRequest.Merge(m, src) +} +func (m *QueryLogicConfirmsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLogicConfirmsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLogicConfirmsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLogicConfirmsRequest proto.InternalMessageInfo + +func (m *QueryLogicConfirmsRequest) GetInvalidationId() []byte { + if m != nil { + return m.InvalidationId + } + return nil +} + +func (m *QueryLogicConfirmsRequest) GetInvalidationNonce() uint64 { + if m != nil { + return m.InvalidationNonce + } + return 0 +} + +type QueryLogicConfirmsResponse struct { + Confirms []*MsgConfirmLogicCall `protobuf:"bytes,1,rep,name=confirms,proto3" json:"confirms,omitempty"` +} + +func (m *QueryLogicConfirmsResponse) Reset() { *m = QueryLogicConfirmsResponse{} } +func (m *QueryLogicConfirmsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLogicConfirmsResponse) ProtoMessage() {} +func (*QueryLogicConfirmsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{29} +} +func (m *QueryLogicConfirmsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLogicConfirmsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLogicConfirmsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLogicConfirmsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLogicConfirmsResponse.Merge(m, src) +} +func (m *QueryLogicConfirmsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLogicConfirmsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLogicConfirmsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLogicConfirmsResponse proto.InternalMessageInfo + +func (m *QueryLogicConfirmsResponse) GetConfirms() []*MsgConfirmLogicCall { + if m != nil { + return m.Confirms + } + return nil +} + type QueryLastEventNonceByAddrRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } @@ -1013,7 +1361,7 @@ func (m *QueryLastEventNonceByAddrRequest) Reset() { *m = QueryLastEvent func (m *QueryLastEventNonceByAddrRequest) String() string { return proto.CompactTextString(m) } func (*QueryLastEventNonceByAddrRequest) ProtoMessage() {} func (*QueryLastEventNonceByAddrRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{22} + return fileDescriptor_702b8e5c1503495b, []int{30} } func (m *QueryLastEventNonceByAddrRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1057,7 +1405,7 @@ func (m *QueryLastEventNonceByAddrResponse) Reset() { *m = QueryLastEven func (m *QueryLastEventNonceByAddrResponse) String() string { return proto.CompactTextString(m) } func (*QueryLastEventNonceByAddrResponse) ProtoMessage() {} func (*QueryLastEventNonceByAddrResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{23} + return fileDescriptor_702b8e5c1503495b, []int{31} } func (m *QueryLastEventNonceByAddrResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1093,22 +1441,22 @@ func (m *QueryLastEventNonceByAddrResponse) GetEventNonce() uint64 { return 0 } -type QueryUnbatchedTxPoolByAddrRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +type QueryERC20ToDenomRequest struct { + Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` } -func (m *QueryUnbatchedTxPoolByAddrRequest) Reset() { *m = QueryUnbatchedTxPoolByAddrRequest{} } -func (m *QueryUnbatchedTxPoolByAddrRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUnbatchedTxPoolByAddrRequest) ProtoMessage() {} -func (*QueryUnbatchedTxPoolByAddrRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{24} +func (m *QueryERC20ToDenomRequest) Reset() { *m = QueryERC20ToDenomRequest{} } +func (m *QueryERC20ToDenomRequest) String() string { return proto.CompactTextString(m) } +func (*QueryERC20ToDenomRequest) ProtoMessage() {} +func (*QueryERC20ToDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{32} } -func (m *QueryUnbatchedTxPoolByAddrRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryERC20ToDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUnbatchedTxPoolByAddrRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryERC20ToDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUnbatchedTxPoolByAddrRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryERC20ToDenomRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1118,41 +1466,41 @@ func (m *QueryUnbatchedTxPoolByAddrRequest) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryUnbatchedTxPoolByAddrRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUnbatchedTxPoolByAddrRequest.Merge(m, src) +func (m *QueryERC20ToDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryERC20ToDenomRequest.Merge(m, src) } -func (m *QueryUnbatchedTxPoolByAddrRequest) XXX_Size() int { +func (m *QueryERC20ToDenomRequest) XXX_Size() int { return m.Size() } -func (m *QueryUnbatchedTxPoolByAddrRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUnbatchedTxPoolByAddrRequest.DiscardUnknown(m) +func (m *QueryERC20ToDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryERC20ToDenomRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUnbatchedTxPoolByAddrRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryERC20ToDenomRequest proto.InternalMessageInfo -func (m *QueryUnbatchedTxPoolByAddrRequest) GetAddress() string { +func (m *QueryERC20ToDenomRequest) GetErc20() string { if m != nil { - return m.Address + return m.Erc20 } return "" } -type QueryUnbatchedTxPoolByAddrResponse struct { - OutgoingTxs []*OutgoingTx `protobuf:"bytes,1,rep,name=outgoingTxs,proto3" json:"outgoingTxs,omitempty"` +type QueryERC20ToDenomResponse struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } -func (m *QueryUnbatchedTxPoolByAddrResponse) Reset() { *m = QueryUnbatchedTxPoolByAddrResponse{} } -func (m *QueryUnbatchedTxPoolByAddrResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUnbatchedTxPoolByAddrResponse) ProtoMessage() {} -func (*QueryUnbatchedTxPoolByAddrResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c6a104860710204b, []int{25} +func (m *QueryERC20ToDenomResponse) Reset() { *m = QueryERC20ToDenomResponse{} } +func (m *QueryERC20ToDenomResponse) String() string { return proto.CompactTextString(m) } +func (*QueryERC20ToDenomResponse) ProtoMessage() {} +func (*QueryERC20ToDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{33} } -func (m *QueryUnbatchedTxPoolByAddrResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryERC20ToDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUnbatchedTxPoolByAddrResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryERC20ToDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUnbatchedTxPoolByAddrResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryERC20ToDenomResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1162,159 +1510,600 @@ func (m *QueryUnbatchedTxPoolByAddrResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryUnbatchedTxPoolByAddrResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUnbatchedTxPoolByAddrResponse.Merge(m, src) +func (m *QueryERC20ToDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryERC20ToDenomResponse.Merge(m, src) } -func (m *QueryUnbatchedTxPoolByAddrResponse) XXX_Size() int { +func (m *QueryERC20ToDenomResponse) XXX_Size() int { return m.Size() } -func (m *QueryUnbatchedTxPoolByAddrResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUnbatchedTxPoolByAddrResponse.DiscardUnknown(m) +func (m *QueryERC20ToDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryERC20ToDenomResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUnbatchedTxPoolByAddrResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryERC20ToDenomResponse proto.InternalMessageInfo -func (m *QueryUnbatchedTxPoolByAddrResponse) GetOutgoingTxs() []*OutgoingTx { +func (m *QueryERC20ToDenomResponse) GetDenom() string { if m != nil { - return m.OutgoingTxs + return m.Denom } - return nil + return "" } -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "injective.peggy.v1beta1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "injective.peggy.v1beta1.QueryParamsResponse") - proto.RegisterType((*QueryCurrentValsetRequest)(nil), "injective.peggy.v1beta1.QueryCurrentValsetRequest") - proto.RegisterType((*QueryCurrentValsetResponse)(nil), "injective.peggy.v1beta1.QueryCurrentValsetResponse") - proto.RegisterType((*QueryValsetRequestRequest)(nil), "injective.peggy.v1beta1.QueryValsetRequestRequest") - proto.RegisterType((*QueryValsetRequestResponse)(nil), "injective.peggy.v1beta1.QueryValsetRequestResponse") - proto.RegisterType((*QueryValsetConfirmRequest)(nil), "injective.peggy.v1beta1.QueryValsetConfirmRequest") - proto.RegisterType((*QueryValsetConfirmResponse)(nil), "injective.peggy.v1beta1.QueryValsetConfirmResponse") - proto.RegisterType((*QueryValsetConfirmsByNonceRequest)(nil), "injective.peggy.v1beta1.QueryValsetConfirmsByNonceRequest") - proto.RegisterType((*QueryValsetConfirmsByNonceResponse)(nil), "injective.peggy.v1beta1.QueryValsetConfirmsByNonceResponse") - proto.RegisterType((*QueryLastValsetRequestsRequest)(nil), "injective.peggy.v1beta1.QueryLastValsetRequestsRequest") - proto.RegisterType((*QueryLastValsetRequestsResponse)(nil), "injective.peggy.v1beta1.QueryLastValsetRequestsResponse") - proto.RegisterType((*QueryLastPendingValsetRequestByAddrRequest)(nil), "injective.peggy.v1beta1.QueryLastPendingValsetRequestByAddrRequest") - proto.RegisterType((*QueryLastPendingValsetRequestByAddrResponse)(nil), "injective.peggy.v1beta1.QueryLastPendingValsetRequestByAddrResponse") - proto.RegisterType((*QueryLastPendingBatchRequestByAddrRequest)(nil), "injective.peggy.v1beta1.QueryLastPendingBatchRequestByAddrRequest") - proto.RegisterType((*QueryLastPendingBatchRequestByAddrResponse)(nil), "injective.peggy.v1beta1.QueryLastPendingBatchRequestByAddrResponse") - proto.RegisterType((*QueryOutgoingTxBatchesRequest)(nil), "injective.peggy.v1beta1.QueryOutgoingTxBatchesRequest") - proto.RegisterType((*QueryOutgoingTxBatchesResponse)(nil), "injective.peggy.v1beta1.QueryOutgoingTxBatchesResponse") - proto.RegisterType((*QueryBatchRequestByNonceRequest)(nil), "injective.peggy.v1beta1.QueryBatchRequestByNonceRequest") - proto.RegisterType((*QueryBatchRequestByNonceResponse)(nil), "injective.peggy.v1beta1.QueryBatchRequestByNonceResponse") - proto.RegisterType((*QueryBatchConfirmsRequest)(nil), "injective.peggy.v1beta1.QueryBatchConfirmsRequest") - proto.RegisterType((*QueryBatchConfirmsResponse)(nil), "injective.peggy.v1beta1.QueryBatchConfirmsResponse") - proto.RegisterType((*QueryLastEventNonceByAddrRequest)(nil), "injective.peggy.v1beta1.QueryLastEventNonceByAddrRequest") - proto.RegisterType((*QueryLastEventNonceByAddrResponse)(nil), "injective.peggy.v1beta1.QueryLastEventNonceByAddrResponse") - proto.RegisterType((*QueryUnbatchedTxPoolByAddrRequest)(nil), "injective.peggy.v1beta1.QueryUnbatchedTxPoolByAddrRequest") - proto.RegisterType((*QueryUnbatchedTxPoolByAddrResponse)(nil), "injective.peggy.v1beta1.QueryUnbatchedTxPoolByAddrResponse") +type QueryDenomToERC20Request struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } -func init() { - proto.RegisterFile("injective/peggy/v1beta1/query.proto", fileDescriptor_c6a104860710204b) -} - -var fileDescriptor_c6a104860710204b = []byte{ - // 1121 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x41, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xf6, 0xdf, 0x24, 0x7f, 0x5e, 0x54, 0x15, 0xa6, 0x41, 0x84, 0x85, 0x3a, 0x66, 0xa3, - 0xb4, 0x4e, 0xd3, 0x7a, 0x49, 0x02, 0x84, 0xb4, 0x14, 0xa9, 0x76, 0x82, 0x84, 0x5a, 0x20, 0x58, - 0x29, 0x07, 0x54, 0xa9, 0x5a, 0xaf, 0xa7, 0x9b, 0x05, 0x7b, 0xc7, 0xdd, 0x5d, 0x47, 0xb1, 0xaa, - 0x5e, 0xb8, 0x72, 0x41, 0xe2, 0x0b, 0x70, 0xe4, 0x13, 0x20, 0xb8, 0x21, 0x4e, 0x15, 0xa7, 0x4a, - 0x5c, 0xca, 0x05, 0xa1, 0x84, 0xaf, 0xc0, 0x1d, 0x79, 0xe6, 0xcd, 0xd6, 0x6b, 0xef, 0xec, 0xac, - 0x93, 0x9e, 0xec, 0x9d, 0x7d, 0xbf, 0xf7, 0x7e, 0xef, 0xcd, 0xcc, 0x7b, 0x3f, 0x2d, 0x2c, 0xf9, - 0xc1, 0x57, 0xd4, 0x8d, 0xfd, 0x03, 0x6a, 0x77, 0xa9, 0xe7, 0xf5, 0xed, 0x83, 0xb5, 0x26, 0x8d, - 0x9d, 0x35, 0xfb, 0x61, 0x8f, 0x86, 0xfd, 0x6a, 0x37, 0x64, 0x31, 0x23, 0xaf, 0x25, 0x46, 0x55, - 0x6e, 0x54, 0x45, 0x23, 0x73, 0x59, 0x85, 0xf6, 0x68, 0x40, 0x23, 0x3f, 0x12, 0x78, 0x53, 0x19, - 0x24, 0xee, 0x77, 0xa9, 0x34, 0xb2, 0x54, 0x46, 0x9d, 0xc8, 0xd3, 0x3a, 0x6a, 0x3a, 0xb1, 0xbb, - 0xaf, 0x73, 0xd4, 0x65, 0xac, 0x8d, 0x36, 0x6f, 0x7a, 0x8c, 0x79, 0x6d, 0x6a, 0x3b, 0x5d, 0xdf, - 0x76, 0x82, 0x80, 0xc5, 0x4e, 0xec, 0xb3, 0x40, 0x86, 0x99, 0xf7, 0x98, 0xc7, 0xf8, 0x5f, 0x7b, - 0xf0, 0x4f, 0xac, 0x5a, 0xf3, 0x40, 0x3e, 0x1f, 0x14, 0x65, 0xd7, 0x09, 0x9d, 0x4e, 0xd4, 0xa0, - 0x0f, 0x7b, 0x34, 0x8a, 0xad, 0x3d, 0xb8, 0x90, 0x5a, 0x8d, 0xba, 0x2c, 0x88, 0x28, 0xb9, 0x09, - 0x33, 0x5d, 0xbe, 0xb2, 0x60, 0x94, 0x8d, 0xca, 0xdc, 0xfa, 0x62, 0x55, 0x51, 0xc3, 0xaa, 0x00, - 0xd6, 0xce, 0x3e, 0xf9, 0x6b, 0x71, 0xaa, 0x81, 0x20, 0xeb, 0x0d, 0x78, 0x9d, 0x7b, 0xad, 0xf7, - 0xc2, 0x90, 0x06, 0xf1, 0x17, 0x4e, 0x3b, 0xa2, 0xb1, 0x0c, 0x79, 0x17, 0xcc, 0xac, 0x97, 0x18, - 0x79, 0x13, 0x66, 0x0e, 0xf8, 0x8a, 0x36, 0x32, 0x02, 0xd1, 0xdc, 0x5a, 0xc3, 0x98, 0xa9, 0x60, - 0xf8, 0x43, 0xe6, 0x61, 0x3a, 0x60, 0x81, 0x4b, 0xb9, 0xd3, 0xb3, 0x0d, 0xf1, 0x90, 0x30, 0x19, - 0x81, 0x9c, 0x96, 0xc9, 0xed, 0x14, 0x93, 0x3a, 0x0b, 0x1e, 0xf8, 0x61, 0x27, 0x97, 0x09, 0x59, - 0x80, 0x59, 0xa7, 0xd5, 0x0a, 0x69, 0x14, 0x2d, 0x9c, 0x29, 0x1b, 0x95, 0x97, 0x1a, 0xf2, 0xd1, - 0x72, 0x52, 0x1c, 0x13, 0x67, 0xc8, 0xb1, 0x0e, 0xb3, 0xae, 0x58, 0x42, 0x92, 0x2b, 0x4a, 0x92, - 0x9f, 0x44, 0x5e, 0xda, 0x87, 0x44, 0x5a, 0x5b, 0xf0, 0xd6, 0x78, 0x88, 0xa8, 0xd6, 0xff, 0x74, - 0x40, 0x2d, 0xbf, 0x82, 0x5f, 0x83, 0x95, 0x07, 0x45, 0x96, 0x3b, 0xf0, 0x7f, 0x8c, 0x35, 0x38, - 0x4f, 0xff, 0x9b, 0x8c, 0x66, 0x02, 0xb5, 0xca, 0x50, 0xe2, 0xc1, 0xee, 0x38, 0x51, 0xfa, 0x48, - 0x25, 0xa7, 0xf9, 0x1e, 0x2c, 0x2a, 0x2d, 0x90, 0xcb, 0x16, 0xcc, 0x8a, 0x6d, 0x92, 0x54, 0xb4, - 0xdb, 0x2a, 0xed, 0xad, 0x8f, 0xe0, 0x4a, 0xe2, 0x7d, 0x97, 0x06, 0x2d, 0x3f, 0xf0, 0x52, 0x41, - 0x6a, 0xfd, 0x5b, 0xad, 0x56, 0x28, 0x0b, 0x36, 0xb4, 0xa5, 0x46, 0x7a, 0x4b, 0x1f, 0xc0, 0x6a, - 0x21, 0x3f, 0xa7, 0x3d, 0x87, 0x3b, 0xb0, 0x32, 0x1a, 0xa7, 0x36, 0x68, 0x34, 0x13, 0xd2, 0x6d, - 0x8f, 0xa7, 0x9d, 0xe5, 0x06, 0xd9, 0x7e, 0x08, 0xd3, 0xbc, 0x9b, 0x21, 0xd9, 0x8a, 0x92, 0xec, - 0x67, 0xbd, 0xd8, 0x63, 0x7e, 0xe0, 0xed, 0x1d, 0x0a, 0x6f, 0x02, 0x66, 0x2d, 0xc2, 0x45, 0x1e, - 0x6d, 0xe4, 0x35, 0x4d, 0xf6, 0xb8, 0x85, 0xa7, 0x20, 0xc3, 0x00, 0x29, 0xd4, 0x60, 0xb6, 0x29, - 0x96, 0x70, 0x8b, 0x8b, 0x93, 0x90, 0x40, 0xab, 0x89, 0x27, 0x29, 0x9d, 0xa9, 0xfe, 0x46, 0x90, - 0x15, 0x78, 0xd9, 0x65, 0x41, 0x1c, 0x3a, 0x6e, 0x7c, 0x3f, 0x7d, 0xa5, 0xcf, 0xcb, 0xf5, 0x5b, - 0x58, 0xd8, 0x26, 0x94, 0xd5, 0x31, 0x5e, 0x50, 0x39, 0xef, 0x61, 0x2f, 0xe2, 0x8b, 0xf2, 0x7e, - 0xbe, 0xc0, 0x0c, 0xcc, 0x2c, 0xef, 0xc8, 0x7d, 0x7b, 0xec, 0xda, 0x57, 0xf2, 0xae, 0x3d, 0xe2, - 0x05, 0xfd, 0xe7, 0xb7, 0xfe, 0x03, 0xac, 0xd2, 0xe0, 0xf8, 0xed, 0x1c, 0xd0, 0x20, 0xe6, 0x05, - 0x2a, 0x7a, 0x78, 0xb7, 0xb1, 0xb7, 0x65, 0xa3, 0x91, 0xe8, 0x22, 0xcc, 0xd1, 0xc1, 0xbb, 0xfb, - 0xc3, 0xd5, 0x00, 0x9a, 0x98, 0x5b, 0x37, 0xd1, 0xcb, 0xdd, 0x40, 0x9c, 0x8f, 0xd6, 0xde, 0xe1, - 0x2e, 0x63, 0xed, 0xa2, 0x24, 0x64, 0x97, 0x54, 0xc0, 0x93, 0x2e, 0x39, 0xc7, 0x92, 0x4d, 0x94, - 0x15, 0x5b, 0x2a, 0xb0, 0xe1, 0x8d, 0x61, 0xdc, 0xfa, 0xbf, 0x04, 0xa6, 0x79, 0x34, 0xf2, 0xad, - 0x01, 0x33, 0x62, 0x3c, 0x93, 0x55, 0xa5, 0x9b, 0x71, 0x4d, 0x60, 0x5e, 0x2d, 0x66, 0x2c, 0x68, - 0x5b, 0x97, 0xbe, 0xf9, 0xe3, 0x9f, 0xef, 0xcf, 0x94, 0x49, 0xc9, 0xce, 0x16, 0x2e, 0xb6, 0xd0, - 0x04, 0xe4, 0x47, 0x03, 0xce, 0xa5, 0x46, 0x3e, 0x59, 0xcf, 0x8f, 0x93, 0x25, 0x1e, 0xcc, 0x8d, - 0x89, 0x30, 0x48, 0xb1, 0xca, 0x29, 0x56, 0xc8, 0x25, 0x15, 0x45, 0xd1, 0x30, 0x6d, 0x57, 0xa0, - 0xc9, 0x0f, 0x06, 0x9c, 0x4b, 0x85, 0xd5, 0x51, 0xcd, 0xd2, 0x1c, 0x3a, 0xaa, 0x99, 0xa2, 0x43, - 0x5f, 0x4d, 0x41, 0x95, 0x57, 0x33, 0x35, 0x27, 0x8b, 0x51, 0x4c, 0x8b, 0x91, 0x62, 0x14, 0x47, - 0x34, 0x47, 0xf1, 0x6a, 0x22, 0xb1, 0xdf, 0x0c, 0x78, 0x35, 0x53, 0x1f, 0x90, 0xeb, 0x13, 0x84, - 0x1f, 0xd1, 0x23, 0xe6, 0x8d, 0x13, 0x61, 0x31, 0x85, 0xb7, 0x79, 0x0a, 0x57, 0x48, 0x45, 0x95, - 0x82, 0xec, 0x3e, 0xf6, 0x23, 0xde, 0x12, 0x1e, 0x93, 0x9f, 0x0d, 0x20, 0xe3, 0xaa, 0x82, 0x6c, - 0xe6, 0xb3, 0x50, 0x2a, 0x15, 0xf3, 0xfd, 0xc9, 0x81, 0xc8, 0xdd, 0xe6, 0xdc, 0x57, 0xc8, 0x65, - 0x4d, 0xf9, 0x43, 0xc9, 0xf1, 0x99, 0x01, 0xa5, 0x7c, 0xa9, 0x41, 0xea, 0x7a, 0x36, 0x5a, 0xc1, - 0x63, 0x6e, 0x9f, 0xce, 0x09, 0xa6, 0xb7, 0xca, 0xd3, 0x5b, 0x26, 0x4b, 0x9a, 0xf4, 0xda, 0x4e, - 0x14, 0x93, 0x3f, 0x0d, 0xb8, 0x98, 0x2b, 0x4b, 0x48, 0xad, 0x30, 0x29, 0xa5, 0x34, 0x32, 0xeb, - 0xa7, 0xf2, 0x51, 0x74, 0xdb, 0xf8, 0x68, 0xb0, 0x1f, 0xe1, 0xcc, 0x78, 0x4c, 0x7e, 0x37, 0x60, - 0x3e, 0x6b, 0x6a, 0x91, 0x2d, 0x3d, 0x1d, 0xc5, 0x9c, 0x34, 0xaf, 0x9f, 0x04, 0x8a, 0x09, 0xdc, - 0xe0, 0x09, 0xbc, 0x4b, 0x36, 0x54, 0x09, 0xb0, 0xd0, 0x71, 0xdb, 0xd4, 0xe6, 0x63, 0x93, 0xdf, - 0x9a, 0xa1, 0x64, 0x7e, 0x32, 0xe0, 0x95, 0x31, 0xc1, 0x46, 0xde, 0xcb, 0xa7, 0xa3, 0x92, 0x80, - 0xe6, 0xe6, 0xc4, 0xb8, 0xa2, 0xf7, 0x5e, 0x6c, 0x82, 0x1c, 0xa7, 0xf1, 0x21, 0xf9, 0xd5, 0x80, - 0xf3, 0x23, 0x63, 0x5b, 0xd7, 0xb6, 0xf2, 0x44, 0x82, 0xae, 0x6d, 0xe5, 0x2a, 0x04, 0xeb, 0x1d, - 0x4e, 0xbf, 0x4a, 0xae, 0xaa, 0xe8, 0xf7, 0x24, 0x7c, 0x38, 0x85, 0x5f, 0x0c, 0xb8, 0x90, 0x21, - 0x31, 0x89, 0xa6, 0x05, 0xa9, 0x95, 0xaf, 0xb9, 0x75, 0x02, 0x24, 0xa6, 0x70, 0x8d, 0xa7, 0x70, - 0x99, 0x2c, 0x6b, 0xae, 0x01, 0xb6, 0xdd, 0xc1, 0x98, 0x4b, 0x89, 0x4b, 0xdd, 0x98, 0xcb, 0xd2, - 0xb9, 0xba, 0x31, 0x97, 0xa9, 0x5e, 0xf5, 0x63, 0x4e, 0x30, 0x95, 0x93, 0xa2, 0x46, 0x9f, 0x1c, - 0x95, 0x8c, 0xa7, 0x47, 0x25, 0xe3, 0xef, 0xa3, 0x92, 0xf1, 0xdd, 0x71, 0x69, 0xea, 0xe9, 0x71, - 0x69, 0xea, 0xd9, 0x71, 0x69, 0xea, 0xcb, 0xdb, 0x9e, 0x1f, 0xef, 0xf7, 0x9a, 0x55, 0x97, 0x75, - 0xec, 0x8f, 0xa5, 0xaf, 0x3b, 0x4e, 0x33, 0x7a, 0xee, 0xf9, 0x9a, 0xcb, 0x42, 0x3a, 0xfc, 0xb8, - 0xef, 0xf8, 0x81, 0xdd, 0x61, 0xad, 0x5e, 0x9b, 0x46, 0x18, 0x96, 0x7f, 0x6d, 0x6a, 0xce, 0xf0, - 0xaf, 0x39, 0x1b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x4a, 0x8d, 0xe2, 0xfa, 0x12, 0x00, - 0x00, +func (m *QueryDenomToERC20Request) Reset() { *m = QueryDenomToERC20Request{} } +func (m *QueryDenomToERC20Request) String() string { return proto.CompactTextString(m) } +func (*QueryDenomToERC20Request) ProtoMessage() {} +func (*QueryDenomToERC20Request) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{34} +} +func (m *QueryDenomToERC20Request) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomToERC20Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomToERC20Request.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDenomToERC20Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomToERC20Request.Merge(m, src) +} +func (m *QueryDenomToERC20Request) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomToERC20Request) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomToERC20Request.DiscardUnknown(m) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var xxx_messageInfo_QueryDenomToERC20Request proto.InternalMessageInfo -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +func (m *QueryDenomToERC20Request) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Deployments queries deployments - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - CurrentValset(ctx context.Context, in *QueryCurrentValsetRequest, opts ...grpc.CallOption) (*QueryCurrentValsetResponse, error) - ValsetRequest(ctx context.Context, in *QueryValsetRequestRequest, opts ...grpc.CallOption) (*QueryValsetRequestResponse, error) - ValsetConfirm(ctx context.Context, in *QueryValsetConfirmRequest, opts ...grpc.CallOption) (*QueryValsetConfirmResponse, error) - ValsetConfirmsByNonce(ctx context.Context, in *QueryValsetConfirmsByNonceRequest, opts ...grpc.CallOption) (*QueryValsetConfirmsByNonceResponse, error) - LastValsetRequests(ctx context.Context, in *QueryLastValsetRequestsRequest, opts ...grpc.CallOption) (*QueryLastValsetRequestsResponse, error) - LastPendingValsetRequestByAddr(ctx context.Context, in *QueryLastPendingValsetRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingValsetRequestByAddrResponse, error) +type QueryDenomToERC20Response struct { + Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` +} + +func (m *QueryDenomToERC20Response) Reset() { *m = QueryDenomToERC20Response{} } +func (m *QueryDenomToERC20Response) String() string { return proto.CompactTextString(m) } +func (*QueryDenomToERC20Response) ProtoMessage() {} +func (*QueryDenomToERC20Response) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{35} +} +func (m *QueryDenomToERC20Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomToERC20Response.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDenomToERC20Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomToERC20Response.Merge(m, src) +} +func (m *QueryDenomToERC20Response) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomToERC20Response) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomToERC20Response.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomToERC20Response proto.InternalMessageInfo + +func (m *QueryDenomToERC20Response) GetErc20() string { + if m != nil { + return m.Erc20 + } + return "" +} + +type QueryDelegateKeysByValidatorAddress struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *QueryDelegateKeysByValidatorAddress) Reset() { *m = QueryDelegateKeysByValidatorAddress{} } +func (m *QueryDelegateKeysByValidatorAddress) String() string { return proto.CompactTextString(m) } +func (*QueryDelegateKeysByValidatorAddress) ProtoMessage() {} +func (*QueryDelegateKeysByValidatorAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{36} +} +func (m *QueryDelegateKeysByValidatorAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegateKeysByValidatorAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegateKeysByValidatorAddress.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegateKeysByValidatorAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegateKeysByValidatorAddress.Merge(m, src) +} +func (m *QueryDelegateKeysByValidatorAddress) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegateKeysByValidatorAddress) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegateKeysByValidatorAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegateKeysByValidatorAddress proto.InternalMessageInfo + +func (m *QueryDelegateKeysByValidatorAddress) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +type QueryDelegateKeysByValidatorAddressResponse struct { + EthAddress string `protobuf:"bytes,1,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` + OrchestratorAddress string `protobuf:"bytes,2,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` +} + +func (m *QueryDelegateKeysByValidatorAddressResponse) Reset() { + *m = QueryDelegateKeysByValidatorAddressResponse{} +} +func (m *QueryDelegateKeysByValidatorAddressResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryDelegateKeysByValidatorAddressResponse) ProtoMessage() {} +func (*QueryDelegateKeysByValidatorAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{37} +} +func (m *QueryDelegateKeysByValidatorAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegateKeysByValidatorAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegateKeysByValidatorAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegateKeysByValidatorAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegateKeysByValidatorAddressResponse.Merge(m, src) +} +func (m *QueryDelegateKeysByValidatorAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegateKeysByValidatorAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegateKeysByValidatorAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegateKeysByValidatorAddressResponse proto.InternalMessageInfo + +func (m *QueryDelegateKeysByValidatorAddressResponse) GetEthAddress() string { + if m != nil { + return m.EthAddress + } + return "" +} + +func (m *QueryDelegateKeysByValidatorAddressResponse) GetOrchestratorAddress() string { + if m != nil { + return m.OrchestratorAddress + } + return "" +} + +type QueryDelegateKeysByEthAddress struct { + EthAddress string `protobuf:"bytes,1,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` +} + +func (m *QueryDelegateKeysByEthAddress) Reset() { *m = QueryDelegateKeysByEthAddress{} } +func (m *QueryDelegateKeysByEthAddress) String() string { return proto.CompactTextString(m) } +func (*QueryDelegateKeysByEthAddress) ProtoMessage() {} +func (*QueryDelegateKeysByEthAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{38} +} +func (m *QueryDelegateKeysByEthAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegateKeysByEthAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegateKeysByEthAddress.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegateKeysByEthAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegateKeysByEthAddress.Merge(m, src) +} +func (m *QueryDelegateKeysByEthAddress) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegateKeysByEthAddress) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegateKeysByEthAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegateKeysByEthAddress proto.InternalMessageInfo + +func (m *QueryDelegateKeysByEthAddress) GetEthAddress() string { + if m != nil { + return m.EthAddress + } + return "" +} + +type QueryDelegateKeysByEthAddressResponse struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + OrchestratorAddress string `protobuf:"bytes,2,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` +} + +func (m *QueryDelegateKeysByEthAddressResponse) Reset() { *m = QueryDelegateKeysByEthAddressResponse{} } +func (m *QueryDelegateKeysByEthAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegateKeysByEthAddressResponse) ProtoMessage() {} +func (*QueryDelegateKeysByEthAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{39} +} +func (m *QueryDelegateKeysByEthAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegateKeysByEthAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegateKeysByEthAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegateKeysByEthAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegateKeysByEthAddressResponse.Merge(m, src) +} +func (m *QueryDelegateKeysByEthAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegateKeysByEthAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegateKeysByEthAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegateKeysByEthAddressResponse proto.InternalMessageInfo + +func (m *QueryDelegateKeysByEthAddressResponse) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *QueryDelegateKeysByEthAddressResponse) GetOrchestratorAddress() string { + if m != nil { + return m.OrchestratorAddress + } + return "" +} + +type QueryDelegateKeysByOrchestratorAddress struct { + OrchestratorAddress string `protobuf:"bytes,1,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` +} + +func (m *QueryDelegateKeysByOrchestratorAddress) Reset() { + *m = QueryDelegateKeysByOrchestratorAddress{} +} +func (m *QueryDelegateKeysByOrchestratorAddress) String() string { return proto.CompactTextString(m) } +func (*QueryDelegateKeysByOrchestratorAddress) ProtoMessage() {} +func (*QueryDelegateKeysByOrchestratorAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{40} +} +func (m *QueryDelegateKeysByOrchestratorAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegateKeysByOrchestratorAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegateKeysByOrchestratorAddress.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegateKeysByOrchestratorAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegateKeysByOrchestratorAddress.Merge(m, src) +} +func (m *QueryDelegateKeysByOrchestratorAddress) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegateKeysByOrchestratorAddress) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegateKeysByOrchestratorAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegateKeysByOrchestratorAddress proto.InternalMessageInfo + +func (m *QueryDelegateKeysByOrchestratorAddress) GetOrchestratorAddress() string { + if m != nil { + return m.OrchestratorAddress + } + return "" +} + +type QueryDelegateKeysByOrchestratorAddressResponse struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + EthAddress string `protobuf:"bytes,2,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` +} + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) Reset() { + *m = QueryDelegateKeysByOrchestratorAddressResponse{} +} +func (m *QueryDelegateKeysByOrchestratorAddressResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryDelegateKeysByOrchestratorAddressResponse) ProtoMessage() {} +func (*QueryDelegateKeysByOrchestratorAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{41} +} +func (m *QueryDelegateKeysByOrchestratorAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegateKeysByOrchestratorAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegateKeysByOrchestratorAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegateKeysByOrchestratorAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegateKeysByOrchestratorAddressResponse.Merge(m, src) +} +func (m *QueryDelegateKeysByOrchestratorAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegateKeysByOrchestratorAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegateKeysByOrchestratorAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegateKeysByOrchestratorAddressResponse proto.InternalMessageInfo + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) GetEthAddress() string { + if m != nil { + return m.EthAddress + } + return "" +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "injective.peggy.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "injective.peggy.v1.QueryParamsResponse") + proto.RegisterType((*QueryCurrentValsetRequest)(nil), "injective.peggy.v1.QueryCurrentValsetRequest") + proto.RegisterType((*QueryCurrentValsetResponse)(nil), "injective.peggy.v1.QueryCurrentValsetResponse") + proto.RegisterType((*QueryValsetRequestRequest)(nil), "injective.peggy.v1.QueryValsetRequestRequest") + proto.RegisterType((*QueryValsetRequestResponse)(nil), "injective.peggy.v1.QueryValsetRequestResponse") + proto.RegisterType((*QueryValsetConfirmRequest)(nil), "injective.peggy.v1.QueryValsetConfirmRequest") + proto.RegisterType((*QueryValsetConfirmResponse)(nil), "injective.peggy.v1.QueryValsetConfirmResponse") + proto.RegisterType((*QueryValsetConfirmsByNonceRequest)(nil), "injective.peggy.v1.QueryValsetConfirmsByNonceRequest") + proto.RegisterType((*QueryValsetConfirmsByNonceResponse)(nil), "injective.peggy.v1.QueryValsetConfirmsByNonceResponse") + proto.RegisterType((*QueryLastValsetRequestsRequest)(nil), "injective.peggy.v1.QueryLastValsetRequestsRequest") + proto.RegisterType((*QueryLastValsetRequestsResponse)(nil), "injective.peggy.v1.QueryLastValsetRequestsResponse") + proto.RegisterType((*QueryLastPendingValsetRequestByAddrRequest)(nil), "injective.peggy.v1.QueryLastPendingValsetRequestByAddrRequest") + proto.RegisterType((*QueryLastPendingValsetRequestByAddrResponse)(nil), "injective.peggy.v1.QueryLastPendingValsetRequestByAddrResponse") + proto.RegisterType((*QueryBatchFeeRequest)(nil), "injective.peggy.v1.QueryBatchFeeRequest") + proto.RegisterType((*QueryBatchFeeResponse)(nil), "injective.peggy.v1.QueryBatchFeeResponse") + proto.RegisterType((*QueryLastPendingBatchRequestByAddrRequest)(nil), "injective.peggy.v1.QueryLastPendingBatchRequestByAddrRequest") + proto.RegisterType((*QueryLastPendingBatchRequestByAddrResponse)(nil), "injective.peggy.v1.QueryLastPendingBatchRequestByAddrResponse") + proto.RegisterType((*QueryLastPendingLogicCallByAddrRequest)(nil), "injective.peggy.v1.QueryLastPendingLogicCallByAddrRequest") + proto.RegisterType((*QueryLastPendingLogicCallByAddrResponse)(nil), "injective.peggy.v1.QueryLastPendingLogicCallByAddrResponse") + proto.RegisterType((*QueryOutgoingTxBatchesRequest)(nil), "injective.peggy.v1.QueryOutgoingTxBatchesRequest") + proto.RegisterType((*QueryOutgoingTxBatchesResponse)(nil), "injective.peggy.v1.QueryOutgoingTxBatchesResponse") + proto.RegisterType((*QueryOutgoingLogicCallsRequest)(nil), "injective.peggy.v1.QueryOutgoingLogicCallsRequest") + proto.RegisterType((*QueryOutgoingLogicCallsResponse)(nil), "injective.peggy.v1.QueryOutgoingLogicCallsResponse") + proto.RegisterType((*QueryBatchRequestByNonceRequest)(nil), "injective.peggy.v1.QueryBatchRequestByNonceRequest") + proto.RegisterType((*QueryBatchRequestByNonceResponse)(nil), "injective.peggy.v1.QueryBatchRequestByNonceResponse") + proto.RegisterType((*QueryBatchConfirmsRequest)(nil), "injective.peggy.v1.QueryBatchConfirmsRequest") + proto.RegisterType((*QueryBatchConfirmsResponse)(nil), "injective.peggy.v1.QueryBatchConfirmsResponse") + proto.RegisterType((*QueryLogicConfirmsRequest)(nil), "injective.peggy.v1.QueryLogicConfirmsRequest") + proto.RegisterType((*QueryLogicConfirmsResponse)(nil), "injective.peggy.v1.QueryLogicConfirmsResponse") + proto.RegisterType((*QueryLastEventNonceByAddrRequest)(nil), "injective.peggy.v1.QueryLastEventNonceByAddrRequest") + proto.RegisterType((*QueryLastEventNonceByAddrResponse)(nil), "injective.peggy.v1.QueryLastEventNonceByAddrResponse") + proto.RegisterType((*QueryERC20ToDenomRequest)(nil), "injective.peggy.v1.QueryERC20ToDenomRequest") + proto.RegisterType((*QueryERC20ToDenomResponse)(nil), "injective.peggy.v1.QueryERC20ToDenomResponse") + proto.RegisterType((*QueryDenomToERC20Request)(nil), "injective.peggy.v1.QueryDenomToERC20Request") + proto.RegisterType((*QueryDenomToERC20Response)(nil), "injective.peggy.v1.QueryDenomToERC20Response") + proto.RegisterType((*QueryDelegateKeysByValidatorAddress)(nil), "injective.peggy.v1.QueryDelegateKeysByValidatorAddress") + proto.RegisterType((*QueryDelegateKeysByValidatorAddressResponse)(nil), "injective.peggy.v1.QueryDelegateKeysByValidatorAddressResponse") + proto.RegisterType((*QueryDelegateKeysByEthAddress)(nil), "injective.peggy.v1.QueryDelegateKeysByEthAddress") + proto.RegisterType((*QueryDelegateKeysByEthAddressResponse)(nil), "injective.peggy.v1.QueryDelegateKeysByEthAddressResponse") + proto.RegisterType((*QueryDelegateKeysByOrchestratorAddress)(nil), "injective.peggy.v1.QueryDelegateKeysByOrchestratorAddress") + proto.RegisterType((*QueryDelegateKeysByOrchestratorAddressResponse)(nil), "injective.peggy.v1.QueryDelegateKeysByOrchestratorAddressResponse") +} + +func init() { proto.RegisterFile("injective/peggy/v1/query.proto", fileDescriptor_702b8e5c1503495b) } + +var fileDescriptor_702b8e5c1503495b = []byte{ + // 1659 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x99, 0xcd, 0x6f, 0xdc, 0x44, + 0x1f, 0xc7, 0xe3, 0x3c, 0x4d, 0xf2, 0xf4, 0xd7, 0xf6, 0x69, 0x3b, 0xd9, 0xf6, 0x49, 0x9c, 0x64, + 0x93, 0x3a, 0x6d, 0x93, 0xb4, 0x64, 0x9d, 0x97, 0xb6, 0x10, 0x4a, 0xdf, 0x36, 0x4d, 0x51, 0xd5, + 0x42, 0xcb, 0x2a, 0x02, 0x09, 0x0a, 0x2b, 0xaf, 0x77, 0xea, 0x35, 0x6c, 0x3c, 0x5b, 0xdb, 0x59, + 0xba, 0xaa, 0x8a, 0x54, 0x2e, 0x5c, 0x38, 0x20, 0xc1, 0x5f, 0xc0, 0x8b, 0xc4, 0x89, 0x1b, 0x9c, + 0x38, 0x82, 0xd4, 0x0b, 0x52, 0x25, 0x2e, 0x70, 0x41, 0xa8, 0xe5, 0x6f, 0xe0, 0x8c, 0x3c, 0x1e, + 0x3b, 0x1e, 0xef, 0x78, 0xd6, 0x9b, 0x72, 0x4a, 0x3c, 0xf3, 0x7b, 0xf9, 0xfc, 0xe6, 0xfd, 0xab, + 0x85, 0xa2, 0xed, 0xbc, 0x8f, 0x4d, 0xdf, 0x6e, 0x63, 0xbd, 0x85, 0x2d, 0xab, 0xa3, 0xb7, 0x97, + 0xf5, 0x7b, 0xdb, 0xd8, 0xed, 0x94, 0x5a, 0x2e, 0xf1, 0x09, 0x42, 0x71, 0x7f, 0x89, 0xf6, 0x97, + 0xda, 0xcb, 0xea, 0x8c, 0xc0, 0xc7, 0xc2, 0x0e, 0xf6, 0x6c, 0x2f, 0xf4, 0x52, 0x45, 0x51, 0xfd, + 0x4e, 0x0b, 0x47, 0xfd, 0x53, 0x82, 0xfe, 0x2d, 0xcf, 0x92, 0x75, 0xb7, 0x08, 0x69, 0x4a, 0xa2, + 0xd7, 0x0c, 0xdf, 0x6c, 0xb0, 0xfe, 0x49, 0x8b, 0x10, 0xab, 0x89, 0x75, 0xa3, 0x65, 0xeb, 0x86, + 0xe3, 0x10, 0xdf, 0xf0, 0x6d, 0xe2, 0x44, 0xc1, 0x0b, 0x16, 0xb1, 0x08, 0xfd, 0x57, 0x0f, 0xfe, + 0x0b, 0x5b, 0xb5, 0x02, 0xa0, 0x37, 0x82, 0xb2, 0x6f, 0x1b, 0xae, 0xb1, 0xe5, 0x55, 0xf0, 0xbd, + 0x6d, 0xec, 0xf9, 0xda, 0x2d, 0x18, 0xe5, 0x5a, 0xbd, 0x16, 0x71, 0x3c, 0x8c, 0x5e, 0x82, 0xe1, + 0x16, 0x6d, 0x19, 0x53, 0x66, 0x94, 0xf9, 0x7d, 0x2b, 0x6a, 0xa9, 0x7b, 0x94, 0x4a, 0xa1, 0x4f, + 0x79, 0xcf, 0xe3, 0x3f, 0xa6, 0x07, 0x2a, 0xcc, 0x5e, 0x9b, 0x80, 0x71, 0x1a, 0x70, 0x7d, 0xdb, + 0x75, 0xb1, 0xe3, 0xbf, 0x69, 0x34, 0x3d, 0xec, 0x47, 0xd9, 0x6e, 0x83, 0x2a, 0xea, 0x64, 0x49, + 0x57, 0x60, 0xb8, 0x4d, 0x5b, 0x64, 0x49, 0x99, 0x0f, 0xb3, 0xd4, 0x96, 0x59, 0x3a, 0x2e, 0x0f, + 0xfb, 0x83, 0x0a, 0x30, 0xe4, 0x10, 0xc7, 0xc4, 0x34, 0xde, 0x9e, 0x4a, 0xf8, 0x11, 0x43, 0xa4, + 0x5c, 0x9e, 0x03, 0xe2, 0x06, 0x07, 0xb1, 0x4e, 0x9c, 0xbb, 0xb6, 0xbb, 0x25, 0x85, 0x40, 0x63, + 0x30, 0x62, 0xd4, 0xeb, 0x2e, 0xf6, 0xbc, 0xb1, 0xc1, 0x19, 0x65, 0x7e, 0x6f, 0x25, 0xfa, 0xd4, + 0xee, 0x70, 0x78, 0x71, 0x30, 0x86, 0x77, 0x11, 0x46, 0xcc, 0xb0, 0x89, 0xf1, 0x1d, 0x17, 0xf1, + 0xbd, 0xe6, 0x59, 0xbc, 0x7b, 0xe4, 0xa4, 0xad, 0xc1, 0xb1, 0xee, 0xe8, 0x5e, 0xb9, 0xf3, 0x7a, + 0x40, 0x25, 0x1f, 0xb7, 0xbb, 0xa0, 0xc9, 0x5c, 0x19, 0xe0, 0x65, 0xf8, 0x2f, 0xcb, 0x15, 0xac, + 0x9d, 0xff, 0xe4, 0x26, 0x8c, 0xbd, 0xb4, 0x19, 0x28, 0xd2, 0x3c, 0x37, 0x0d, 0x8f, 0x5f, 0x3e, + 0xf1, 0xa2, 0x7d, 0x0b, 0xa6, 0x33, 0x2d, 0x18, 0xc6, 0x19, 0x18, 0x09, 0x27, 0x27, 0xa2, 0x90, + 0xcd, 0x63, 0x64, 0xaa, 0x5d, 0x83, 0x53, 0x71, 0xe0, 0xdb, 0xd8, 0xa9, 0xdb, 0x8e, 0xc5, 0xc5, + 0x2f, 0x77, 0xae, 0xd4, 0xeb, 0x6e, 0x34, 0x4c, 0x89, 0x39, 0x54, 0xf8, 0x39, 0x34, 0xe1, 0x74, + 0xae, 0x38, 0xcf, 0x05, 0x7b, 0x14, 0x0a, 0x34, 0x49, 0x39, 0x38, 0x18, 0xae, 0xe1, 0x68, 0xf6, + 0xb4, 0x4d, 0x38, 0x92, 0x6a, 0x67, 0x69, 0xce, 0xc3, 0xde, 0x1a, 0x6b, 0x8b, 0x12, 0x4d, 0x89, + 0x12, 0x45, 0x8e, 0x5e, 0x65, 0xc7, 0x5e, 0xdb, 0x80, 0x85, 0x74, 0x49, 0xd4, 0xae, 0xcf, 0x91, + 0xb1, 0xba, 0x47, 0x58, 0x14, 0x86, 0x11, 0xaf, 0xc1, 0x10, 0x25, 0x60, 0x6b, 0x7d, 0x56, 0x44, + 0x7b, 0x6b, 0xdb, 0xb7, 0x88, 0xed, 0x58, 0x9b, 0xf7, 0xc3, 0x40, 0xa1, 0x87, 0x56, 0x86, 0x93, + 0xe9, 0x44, 0x37, 0x89, 0x65, 0x9b, 0xeb, 0x46, 0xb3, 0x99, 0x17, 0xb6, 0x0e, 0x73, 0x3d, 0x63, + 0xc4, 0xa4, 0x7b, 0x4c, 0xa3, 0xd9, 0x64, 0xa0, 0x27, 0x64, 0xa0, 0x71, 0x88, 0x0a, 0x75, 0xd1, + 0xa6, 0x61, 0x8a, 0x66, 0x49, 0x15, 0x82, 0xe3, 0xe5, 0x5e, 0x65, 0x1b, 0x42, 0x60, 0xc0, 0xb2, + 0x5f, 0x80, 0x91, 0x5a, 0xd8, 0xc4, 0xe6, 0x35, 0xd7, 0x48, 0x45, 0x3e, 0xf1, 0x8e, 0xeb, 0x22, + 0x8c, 0x11, 0xde, 0x63, 0x3b, 0x4e, 0x64, 0x11, 0xaf, 0xae, 0xa1, 0xa0, 0x9c, 0x88, 0x20, 0xe7, + 0x10, 0x84, 0x3e, 0x5a, 0x8d, 0xc5, 0xe7, 0xd7, 0x42, 0xef, 0x43, 0x09, 0x2d, 0xc0, 0x21, 0x93, + 0x38, 0xbe, 0x6b, 0x98, 0x7e, 0x95, 0x3f, 0x50, 0x0f, 0x46, 0xed, 0x57, 0xd8, 0x6c, 0xbe, 0x0b, + 0x33, 0xd9, 0x39, 0x9e, 0x7f, 0xc1, 0xdd, 0x61, 0x97, 0x00, 0x6d, 0x8c, 0x4e, 0xc7, 0x7f, 0x11, + 0x5e, 0x15, 0x45, 0x67, 0xd8, 0x97, 0xba, 0x0e, 0xdd, 0xd9, 0x8c, 0x43, 0x97, 0xb9, 0x86, 0xe4, + 0x3b, 0x67, 0xae, 0xc7, 0xe0, 0xc3, 0x89, 0x49, 0xc1, 0xcf, 0xc1, 0x41, 0xdb, 0x69, 0x1b, 0x4d, + 0xbb, 0x4e, 0x9f, 0x19, 0x55, 0xbb, 0x4e, 0xcb, 0xd8, 0x5f, 0xf9, 0x5f, 0xb2, 0xf9, 0x7a, 0x1d, + 0x2d, 0x02, 0xe2, 0x0c, 0xc3, 0x92, 0x07, 0x69, 0xc9, 0x87, 0x93, 0x3d, 0x74, 0xd0, 0x35, 0x83, + 0xd5, 0x94, 0x4a, 0xca, 0x6a, 0x5a, 0xef, 0xaa, 0x69, 0x4e, 0x5e, 0xd3, 0xce, 0xa2, 0xda, 0xa9, + 0xeb, 0x15, 0x36, 0xe7, 0xc1, 0x0e, 0xde, 0x68, 0x63, 0xc7, 0xa7, 0x99, 0xf3, 0xee, 0xff, 0xab, + 0xec, 0xb2, 0x14, 0x7b, 0x33, 0xce, 0x69, 0xd8, 0x87, 0x83, 0xbe, 0x6a, 0x72, 0x82, 0x01, 0xc7, + 0xe6, 0xda, 0x12, 0x8c, 0xd1, 0x28, 0x1b, 0x95, 0xf5, 0x95, 0xa5, 0x4d, 0x72, 0x15, 0x3b, 0x24, + 0xf9, 0x38, 0xc0, 0xae, 0xb9, 0xb2, 0xc4, 0x32, 0x87, 0x1f, 0xf1, 0xa3, 0x86, 0xf7, 0x60, 0xf9, + 0x0a, 0x30, 0x54, 0x0f, 0x1a, 0x22, 0x17, 0xfa, 0x11, 0x27, 0xa1, 0xb6, 0x9b, 0x84, 0x7a, 0x26, + 0x92, 0x08, 0x3c, 0xa2, 0x24, 0xbc, 0xc7, 0x4e, 0x12, 0x01, 0x57, 0x05, 0x66, 0x99, 0x4b, 0x13, + 0x5b, 0x86, 0x8f, 0x6f, 0xe0, 0x8e, 0x57, 0x0e, 0xde, 0x03, 0xc1, 0xb4, 0x12, 0x97, 0xad, 0x55, + 0x74, 0x1a, 0x0e, 0xb7, 0xa3, 0xb6, 0x2a, 0x3f, 0xb4, 0x87, 0xda, 0x29, 0x63, 0xed, 0x91, 0xc2, + 0xee, 0x4a, 0x79, 0x50, 0x6e, 0xb8, 0xfd, 0x46, 0x2a, 0x2c, 0x60, 0xbf, 0x11, 0x65, 0x5f, 0x86, + 0x02, 0x71, 0x83, 0x63, 0xcd, 0x77, 0x39, 0x80, 0x70, 0x63, 0x8d, 0x26, 0xfb, 0x22, 0x86, 0xcb, + 0xec, 0x04, 0xe6, 0x11, 0x36, 0x76, 0x62, 0xf6, 0x4a, 0xaa, 0x7d, 0xa2, 0xc0, 0x09, 0x69, 0x88, + 0x98, 0xbf, 0x9f, 0xc1, 0xd9, 0x4d, 0x2d, 0xef, 0xb0, 0x7b, 0x8f, 0x07, 0xb9, 0xd5, 0x6d, 0x99, + 0x19, 0x5c, 0xc9, 0x0e, 0xfe, 0x11, 0x94, 0xf2, 0x05, 0xdf, 0x5d, 0xb9, 0xa9, 0x61, 0x1e, 0x4c, + 0x0f, 0xf3, 0xca, 0xdf, 0x13, 0x30, 0x44, 0x01, 0xd0, 0x87, 0x30, 0x1c, 0xca, 0x0f, 0x74, 0x52, + 0x74, 0x2a, 0x74, 0x2b, 0x1d, 0x75, 0xae, 0xa7, 0x5d, 0x88, 0xac, 0x4d, 0x7e, 0xfc, 0xeb, 0x5f, + 0x9f, 0x0f, 0x1e, 0x45, 0x85, 0x58, 0x7b, 0xd5, 0xb0, 0x6f, 0xe8, 0xa1, 0xbe, 0x41, 0x5f, 0x28, + 0x70, 0x80, 0x93, 0x2f, 0x68, 0x31, 0x33, 0xb0, 0x48, 0x03, 0xa9, 0xa5, 0xbc, 0xe6, 0x0c, 0xe7, + 0x38, 0xc5, 0x29, 0xa2, 0x49, 0x1e, 0x27, 0x7c, 0x05, 0xea, 0x66, 0xe8, 0x83, 0x3e, 0x55, 0xe0, + 0x00, 0x97, 0x47, 0x82, 0x25, 0xd2, 0x4a, 0x12, 0x2c, 0xa1, 0x4e, 0xca, 0x1a, 0xa5, 0x10, 0x8b, + 0x8e, 0x12, 0xf7, 0xbe, 0xef, 0x89, 0xc3, 0xab, 0xa6, 0x9e, 0x38, 0x29, 0x5d, 0xd4, 0x6b, 0x94, + 0x18, 0xc4, 0x77, 0x0a, 0x1c, 0x11, 0xca, 0x17, 0x74, 0x36, 0x5f, 0xbe, 0x94, 0x52, 0x52, 0xcf, + 0xf5, 0xeb, 0xc6, 0x70, 0x4f, 0x52, 0xdc, 0x19, 0x54, 0xe4, 0x71, 0xa3, 0x7b, 0x4b, 0x7f, 0x40, + 0x2f, 0x93, 0x87, 0xe8, 0x6b, 0x05, 0x50, 0xb7, 0xca, 0x41, 0x2b, 0x99, 0x69, 0x33, 0x45, 0x93, + 0xba, 0xda, 0x97, 0x0f, 0xe3, 0x3c, 0x41, 0x39, 0xa7, 0xd1, 0x94, 0x70, 0x58, 0xdd, 0x88, 0xe7, + 0x27, 0x05, 0x8a, 0x72, 0xad, 0x83, 0x2e, 0x4a, 0xd3, 0xf7, 0x14, 0x5b, 0xea, 0xa5, 0x5d, 0xfb, + 0xb3, 0x52, 0x8e, 0xd1, 0x52, 0x26, 0xd0, 0xb8, 0xb0, 0x94, 0xa6, 0xe1, 0xf9, 0xe8, 0x67, 0x05, + 0xa6, 0xa4, 0xc2, 0x04, 0x5d, 0xc8, 0x43, 0x91, 0xa9, 0x8b, 0xd4, 0x8b, 0xbb, 0x75, 0x97, 0x4f, + 0x07, 0x7d, 0x80, 0xea, 0x0f, 0xd8, 0xb9, 0xf9, 0x10, 0xfd, 0xa8, 0x80, 0x9a, 0xad, 0x59, 0xd0, + 0xcb, 0x79, 0x28, 0xc4, 0x62, 0x49, 0x3d, 0xbf, 0x2b, 0x5f, 0x39, 0x7e, 0x33, 0x30, 0x4f, 0xe0, + 0xff, 0xa0, 0x40, 0x41, 0xf4, 0xe4, 0x42, 0x67, 0xa4, 0xc9, 0x33, 0xde, 0x77, 0xea, 0xd9, 0x3e, + 0xbd, 0x18, 0xec, 0x32, 0x85, 0x3d, 0x8d, 0x16, 0x78, 0x58, 0xe2, 0x1a, 0x66, 0x13, 0xeb, 0xf4, + 0x7d, 0x47, 0x37, 0x69, 0x02, 0xfc, 0x91, 0x02, 0x7b, 0x63, 0xf1, 0x8c, 0xe6, 0x33, 0xf3, 0xa6, + 0x14, 0xbb, 0xba, 0x90, 0xc3, 0x92, 0x51, 0x4d, 0x53, 0xaa, 0x71, 0xf4, 0x7f, 0xc1, 0x0a, 0xb8, + 0x1b, 0x64, 0xfd, 0x52, 0x81, 0xc3, 0x5d, 0x42, 0x11, 0x2d, 0x67, 0x66, 0xc8, 0x52, 0x9d, 0xea, + 0x4a, 0x3f, 0x2e, 0xf2, 0x63, 0x2d, 0x5c, 0x9f, 0x84, 0xb9, 0xf9, 0xf7, 0xd1, 0xb7, 0x0a, 0xa0, + 0x6e, 0x29, 0x89, 0x7a, 0xa7, 0xec, 0x52, 0xa6, 0x92, 0x63, 0x2d, 0x5b, 0xab, 0x6a, 0x0b, 0x94, + 0x73, 0x16, 0x1d, 0x93, 0x71, 0xd2, 0x65, 0x89, 0xbe, 0x51, 0x60, 0x54, 0xa0, 0x18, 0xd1, 0xaa, + 0x7c, 0xce, 0x84, 0x1a, 0x56, 0x3d, 0xd3, 0x9f, 0x13, 0xa3, 0x9d, 0xa5, 0xb4, 0x53, 0x68, 0x42, + 0xb8, 0xeb, 0xd9, 0x4d, 0x11, 0xdc, 0xb8, 0x9c, 0x38, 0x94, 0xdc, 0xb8, 0x22, 0x89, 0x2a, 0xb9, + 0x71, 0x85, 0x9a, 0x33, 0xeb, 0xc6, 0x0d, 0xa9, 0xa2, 0x8b, 0x8c, 0x62, 0x71, 0xfa, 0x4e, 0x82, + 0x25, 0x12, 0x9f, 0x12, 0x2c, 0xa1, 0x6c, 0xcc, 0xc2, 0x0a, 0xcf, 0x98, 0x18, 0xeb, 0x2b, 0x05, + 0xf6, 0x27, 0xd5, 0x15, 0x7a, 0x21, 0x33, 0x8d, 0x40, 0xb6, 0xa9, 0x8b, 0x39, 0xad, 0x19, 0xd3, + 0x39, 0xca, 0xb4, 0x84, 0x4a, 0xe9, 0xdb, 0xde, 0xdb, 0x22, 0x5e, 0x95, 0xb8, 0xb6, 0x65, 0x3b, + 0x86, 0x8f, 0xeb, 0x3a, 0x95, 0x59, 0x55, 0x9f, 0x54, 0xa9, 0x44, 0xa3, 0x94, 0x49, 0x79, 0x26, + 0xa1, 0x14, 0xe8, 0x3e, 0x09, 0xa5, 0x48, 0xf3, 0xe5, 0xa7, 0xa4, 0x70, 0x01, 0x25, 0xc5, 0x45, + 0xbf, 0x28, 0x30, 0xfe, 0x2a, 0xf6, 0x13, 0x9a, 0x20, 0x21, 0xdf, 0xd0, 0x8b, 0x12, 0x08, 0x99, + 0xe0, 0x93, 0x5c, 0xf8, 0xf9, 0x94, 0x62, 0x56, 0x3d, 0xf4, 0xb7, 0x9f, 0x6a, 0x9d, 0xc5, 0xa8, + 0x7e, 0x80, 0x3b, 0x5e, 0xb5, 0xd6, 0xa9, 0xc6, 0x62, 0x04, 0x7d, 0xaf, 0xc0, 0x68, 0xba, 0x9e, + 0x0d, 0xbf, 0x21, 0x39, 0x43, 0xb3, 0x44, 0x9f, 0xba, 0xd6, 0xb7, 0x4b, 0x4c, 0xbf, 0x44, 0xe9, + 0x4f, 0xa1, 0xf9, 0x5c, 0xf4, 0xd8, 0x6f, 0xa0, 0xdf, 0x15, 0x98, 0x4c, 0x73, 0x27, 0xa5, 0x99, + 0xe4, 0xde, 0xef, 0xa9, 0xe7, 0xd4, 0xf2, 0xee, 0x7d, 0xe3, 0x92, 0xd6, 0x68, 0x49, 0xab, 0x68, + 0x39, 0x57, 0x49, 0x49, 0xfd, 0x59, 0xc6, 0x8f, 0x9f, 0x16, 0x95, 0x27, 0x4f, 0x8b, 0xca, 0x9f, + 0x4f, 0x8b, 0xca, 0x67, 0xcf, 0x8a, 0x03, 0x4f, 0x9e, 0x15, 0x07, 0x7e, 0x7b, 0x56, 0x1c, 0x78, + 0xfb, 0x86, 0x65, 0xfb, 0x8d, 0xed, 0x5a, 0xc9, 0x24, 0x5b, 0xfa, 0xf5, 0x08, 0xf1, 0xa6, 0x51, + 0xf3, 0xf4, 0x18, 0x78, 0xd1, 0x24, 0x2e, 0x4e, 0x7e, 0x36, 0x0c, 0xdb, 0xd1, 0xb7, 0x48, 0x7d, + 0xbb, 0x89, 0x3d, 0xc6, 0x42, 0x7f, 0xbb, 0xab, 0x0d, 0xd3, 0x9f, 0xca, 0x56, 0xff, 0x09, 0x00, + 0x00, 0xff, 0xff, 0x70, 0x95, 0x4e, 0x49, 0x34, 0x1c, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Deployments queries deployments + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + CurrentValset(ctx context.Context, in *QueryCurrentValsetRequest, opts ...grpc.CallOption) (*QueryCurrentValsetResponse, error) + ValsetRequest(ctx context.Context, in *QueryValsetRequestRequest, opts ...grpc.CallOption) (*QueryValsetRequestResponse, error) + ValsetConfirm(ctx context.Context, in *QueryValsetConfirmRequest, opts ...grpc.CallOption) (*QueryValsetConfirmResponse, error) + ValsetConfirmsByNonce(ctx context.Context, in *QueryValsetConfirmsByNonceRequest, opts ...grpc.CallOption) (*QueryValsetConfirmsByNonceResponse, error) + LastValsetRequests(ctx context.Context, in *QueryLastValsetRequestsRequest, opts ...grpc.CallOption) (*QueryLastValsetRequestsResponse, error) + LastPendingValsetRequestByAddr(ctx context.Context, in *QueryLastPendingValsetRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingValsetRequestByAddrResponse, error) LastPendingBatchRequestByAddr(ctx context.Context, in *QueryLastPendingBatchRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchRequestByAddrResponse, error) + LastPendingLogicCallByAddr(ctx context.Context, in *QueryLastPendingLogicCallByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingLogicCallByAddrResponse, error) LastEventNonceByAddr(ctx context.Context, in *QueryLastEventNonceByAddrRequest, opts ...grpc.CallOption) (*QueryLastEventNonceByAddrResponse, error) + BatchFees(ctx context.Context, in *QueryBatchFeeRequest, opts ...grpc.CallOption) (*QueryBatchFeeResponse, error) OutgoingTxBatches(ctx context.Context, in *QueryOutgoingTxBatchesRequest, opts ...grpc.CallOption) (*QueryOutgoingTxBatchesResponse, error) - UnbatchedTxPool(ctx context.Context, in *QueryUnbatchedTxPoolByAddrRequest, opts ...grpc.CallOption) (*QueryUnbatchedTxPoolByAddrResponse, error) + OutgoingLogicCalls(ctx context.Context, in *QueryOutgoingLogicCallsRequest, opts ...grpc.CallOption) (*QueryOutgoingLogicCallsResponse, error) BatchRequestByNonce(ctx context.Context, in *QueryBatchRequestByNonceRequest, opts ...grpc.CallOption) (*QueryBatchRequestByNonceResponse, error) BatchConfirms(ctx context.Context, in *QueryBatchConfirmsRequest, opts ...grpc.CallOption) (*QueryBatchConfirmsResponse, error) + LogicConfirms(ctx context.Context, in *QueryLogicConfirmsRequest, opts ...grpc.CallOption) (*QueryLogicConfirmsResponse, error) + ERC20ToDenom(ctx context.Context, in *QueryERC20ToDenomRequest, opts ...grpc.CallOption) (*QueryERC20ToDenomResponse, error) + DenomToERC20(ctx context.Context, in *QueryDenomToERC20Request, opts ...grpc.CallOption) (*QueryDenomToERC20Response, error) + GetDelegateKeyByValidator(ctx context.Context, in *QueryDelegateKeysByValidatorAddress, opts ...grpc.CallOption) (*QueryDelegateKeysByValidatorAddressResponse, error) + GetDelegateKeyByEth(ctx context.Context, in *QueryDelegateKeysByEthAddress, opts ...grpc.CallOption) (*QueryDelegateKeysByEthAddressResponse, error) + GetDelegateKeyByOrchestrator(ctx context.Context, in *QueryDelegateKeysByOrchestratorAddress, opts ...grpc.CallOption) (*QueryDelegateKeysByOrchestratorAddressResponse, error) } type queryClient struct { @@ -1327,7 +2116,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -1336,7 +2125,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) CurrentValset(ctx context.Context, in *QueryCurrentValsetRequest, opts ...grpc.CallOption) (*QueryCurrentValsetResponse, error) { out := new(QueryCurrentValsetResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/CurrentValset", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/CurrentValset", in, out, opts...) if err != nil { return nil, err } @@ -1345,7 +2134,7 @@ func (c *queryClient) CurrentValset(ctx context.Context, in *QueryCurrentValsetR func (c *queryClient) ValsetRequest(ctx context.Context, in *QueryValsetRequestRequest, opts ...grpc.CallOption) (*QueryValsetRequestResponse, error) { out := new(QueryValsetRequestResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/ValsetRequest", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/ValsetRequest", in, out, opts...) if err != nil { return nil, err } @@ -1354,7 +2143,7 @@ func (c *queryClient) ValsetRequest(ctx context.Context, in *QueryValsetRequestR func (c *queryClient) ValsetConfirm(ctx context.Context, in *QueryValsetConfirmRequest, opts ...grpc.CallOption) (*QueryValsetConfirmResponse, error) { out := new(QueryValsetConfirmResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/ValsetConfirm", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/ValsetConfirm", in, out, opts...) if err != nil { return nil, err } @@ -1363,7 +2152,7 @@ func (c *queryClient) ValsetConfirm(ctx context.Context, in *QueryValsetConfirmR func (c *queryClient) ValsetConfirmsByNonce(ctx context.Context, in *QueryValsetConfirmsByNonceRequest, opts ...grpc.CallOption) (*QueryValsetConfirmsByNonceResponse, error) { out := new(QueryValsetConfirmsByNonceResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/ValsetConfirmsByNonce", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/ValsetConfirmsByNonce", in, out, opts...) if err != nil { return nil, err } @@ -1372,7 +2161,7 @@ func (c *queryClient) ValsetConfirmsByNonce(ctx context.Context, in *QueryValset func (c *queryClient) LastValsetRequests(ctx context.Context, in *QueryLastValsetRequestsRequest, opts ...grpc.CallOption) (*QueryLastValsetRequestsResponse, error) { out := new(QueryLastValsetRequestsResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/LastValsetRequests", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastValsetRequests", in, out, opts...) if err != nil { return nil, err } @@ -1381,7 +2170,7 @@ func (c *queryClient) LastValsetRequests(ctx context.Context, in *QueryLastValse func (c *queryClient) LastPendingValsetRequestByAddr(ctx context.Context, in *QueryLastPendingValsetRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingValsetRequestByAddrResponse, error) { out := new(QueryLastPendingValsetRequestByAddrResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/LastPendingValsetRequestByAddr", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastPendingValsetRequestByAddr", in, out, opts...) if err != nil { return nil, err } @@ -1390,7 +2179,16 @@ func (c *queryClient) LastPendingValsetRequestByAddr(ctx context.Context, in *Qu func (c *queryClient) LastPendingBatchRequestByAddr(ctx context.Context, in *QueryLastPendingBatchRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchRequestByAddrResponse, error) { out := new(QueryLastPendingBatchRequestByAddrResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/LastPendingBatchRequestByAddr", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastPendingBatchRequestByAddr", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) LastPendingLogicCallByAddr(ctx context.Context, in *QueryLastPendingLogicCallByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingLogicCallByAddrResponse, error) { + out := new(QueryLastPendingLogicCallByAddrResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastPendingLogicCallByAddr", in, out, opts...) if err != nil { return nil, err } @@ -1399,7 +2197,16 @@ func (c *queryClient) LastPendingBatchRequestByAddr(ctx context.Context, in *Que func (c *queryClient) LastEventNonceByAddr(ctx context.Context, in *QueryLastEventNonceByAddrRequest, opts ...grpc.CallOption) (*QueryLastEventNonceByAddrResponse, error) { out := new(QueryLastEventNonceByAddrResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/LastEventNonceByAddr", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastEventNonceByAddr", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BatchFees(ctx context.Context, in *QueryBatchFeeRequest, opts ...grpc.CallOption) (*QueryBatchFeeResponse, error) { + out := new(QueryBatchFeeResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/BatchFees", in, out, opts...) if err != nil { return nil, err } @@ -1408,16 +2215,16 @@ func (c *queryClient) LastEventNonceByAddr(ctx context.Context, in *QueryLastEve func (c *queryClient) OutgoingTxBatches(ctx context.Context, in *QueryOutgoingTxBatchesRequest, opts ...grpc.CallOption) (*QueryOutgoingTxBatchesResponse, error) { out := new(QueryOutgoingTxBatchesResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/OutgoingTxBatches", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/OutgoingTxBatches", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) UnbatchedTxPool(ctx context.Context, in *QueryUnbatchedTxPoolByAddrRequest, opts ...grpc.CallOption) (*QueryUnbatchedTxPoolByAddrResponse, error) { - out := new(QueryUnbatchedTxPoolByAddrResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/UnbatchedTxPool", in, out, opts...) +func (c *queryClient) OutgoingLogicCalls(ctx context.Context, in *QueryOutgoingLogicCallsRequest, opts ...grpc.CallOption) (*QueryOutgoingLogicCallsResponse, error) { + out := new(QueryOutgoingLogicCallsResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/OutgoingLogicCalls", in, out, opts...) if err != nil { return nil, err } @@ -1426,7 +2233,7 @@ func (c *queryClient) UnbatchedTxPool(ctx context.Context, in *QueryUnbatchedTxP func (c *queryClient) BatchRequestByNonce(ctx context.Context, in *QueryBatchRequestByNonceRequest, opts ...grpc.CallOption) (*QueryBatchRequestByNonceResponse, error) { out := new(QueryBatchRequestByNonceResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/BatchRequestByNonce", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/BatchRequestByNonce", in, out, opts...) if err != nil { return nil, err } @@ -1435,31 +2242,93 @@ func (c *queryClient) BatchRequestByNonce(ctx context.Context, in *QueryBatchReq func (c *queryClient) BatchConfirms(ctx context.Context, in *QueryBatchConfirmsRequest, opts ...grpc.CallOption) (*QueryBatchConfirmsResponse, error) { out := new(QueryBatchConfirmsResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1beta1.Query/BatchConfirms", in, out, opts...) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/BatchConfirms", in, out, opts...) if err != nil { return nil, err } return out, nil } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Deployments queries deployments - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - CurrentValset(context.Context, *QueryCurrentValsetRequest) (*QueryCurrentValsetResponse, error) - ValsetRequest(context.Context, *QueryValsetRequestRequest) (*QueryValsetRequestResponse, error) - ValsetConfirm(context.Context, *QueryValsetConfirmRequest) (*QueryValsetConfirmResponse, error) - ValsetConfirmsByNonce(context.Context, *QueryValsetConfirmsByNonceRequest) (*QueryValsetConfirmsByNonceResponse, error) - LastValsetRequests(context.Context, *QueryLastValsetRequestsRequest) (*QueryLastValsetRequestsResponse, error) - LastPendingValsetRequestByAddr(context.Context, *QueryLastPendingValsetRequestByAddrRequest) (*QueryLastPendingValsetRequestByAddrResponse, error) - LastPendingBatchRequestByAddr(context.Context, *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) - LastEventNonceByAddr(context.Context, *QueryLastEventNonceByAddrRequest) (*QueryLastEventNonceByAddrResponse, error) - OutgoingTxBatches(context.Context, *QueryOutgoingTxBatchesRequest) (*QueryOutgoingTxBatchesResponse, error) - UnbatchedTxPool(context.Context, *QueryUnbatchedTxPoolByAddrRequest) (*QueryUnbatchedTxPoolByAddrResponse, error) - BatchRequestByNonce(context.Context, *QueryBatchRequestByNonceRequest) (*QueryBatchRequestByNonceResponse, error) - BatchConfirms(context.Context, *QueryBatchConfirmsRequest) (*QueryBatchConfirmsResponse, error) -} - +func (c *queryClient) LogicConfirms(ctx context.Context, in *QueryLogicConfirmsRequest, opts ...grpc.CallOption) (*QueryLogicConfirmsResponse, error) { + out := new(QueryLogicConfirmsResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LogicConfirms", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ERC20ToDenom(ctx context.Context, in *QueryERC20ToDenomRequest, opts ...grpc.CallOption) (*QueryERC20ToDenomResponse, error) { + out := new(QueryERC20ToDenomResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/ERC20ToDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DenomToERC20(ctx context.Context, in *QueryDenomToERC20Request, opts ...grpc.CallOption) (*QueryDenomToERC20Response, error) { + out := new(QueryDenomToERC20Response) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/DenomToERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetDelegateKeyByValidator(ctx context.Context, in *QueryDelegateKeysByValidatorAddress, opts ...grpc.CallOption) (*QueryDelegateKeysByValidatorAddressResponse, error) { + out := new(QueryDelegateKeysByValidatorAddressResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/GetDelegateKeyByValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetDelegateKeyByEth(ctx context.Context, in *QueryDelegateKeysByEthAddress, opts ...grpc.CallOption) (*QueryDelegateKeysByEthAddressResponse, error) { + out := new(QueryDelegateKeysByEthAddressResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/GetDelegateKeyByEth", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetDelegateKeyByOrchestrator(ctx context.Context, in *QueryDelegateKeysByOrchestratorAddress, opts ...grpc.CallOption) (*QueryDelegateKeysByOrchestratorAddressResponse, error) { + out := new(QueryDelegateKeysByOrchestratorAddressResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/GetDelegateKeyByOrchestrator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Deployments queries deployments + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + CurrentValset(context.Context, *QueryCurrentValsetRequest) (*QueryCurrentValsetResponse, error) + ValsetRequest(context.Context, *QueryValsetRequestRequest) (*QueryValsetRequestResponse, error) + ValsetConfirm(context.Context, *QueryValsetConfirmRequest) (*QueryValsetConfirmResponse, error) + ValsetConfirmsByNonce(context.Context, *QueryValsetConfirmsByNonceRequest) (*QueryValsetConfirmsByNonceResponse, error) + LastValsetRequests(context.Context, *QueryLastValsetRequestsRequest) (*QueryLastValsetRequestsResponse, error) + LastPendingValsetRequestByAddr(context.Context, *QueryLastPendingValsetRequestByAddrRequest) (*QueryLastPendingValsetRequestByAddrResponse, error) + LastPendingBatchRequestByAddr(context.Context, *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) + LastPendingLogicCallByAddr(context.Context, *QueryLastPendingLogicCallByAddrRequest) (*QueryLastPendingLogicCallByAddrResponse, error) + LastEventNonceByAddr(context.Context, *QueryLastEventNonceByAddrRequest) (*QueryLastEventNonceByAddrResponse, error) + BatchFees(context.Context, *QueryBatchFeeRequest) (*QueryBatchFeeResponse, error) + OutgoingTxBatches(context.Context, *QueryOutgoingTxBatchesRequest) (*QueryOutgoingTxBatchesResponse, error) + OutgoingLogicCalls(context.Context, *QueryOutgoingLogicCallsRequest) (*QueryOutgoingLogicCallsResponse, error) + BatchRequestByNonce(context.Context, *QueryBatchRequestByNonceRequest) (*QueryBatchRequestByNonceResponse, error) + BatchConfirms(context.Context, *QueryBatchConfirmsRequest) (*QueryBatchConfirmsResponse, error) + LogicConfirms(context.Context, *QueryLogicConfirmsRequest) (*QueryLogicConfirmsResponse, error) + ERC20ToDenom(context.Context, *QueryERC20ToDenomRequest) (*QueryERC20ToDenomResponse, error) + DenomToERC20(context.Context, *QueryDenomToERC20Request) (*QueryDenomToERC20Response, error) + GetDelegateKeyByValidator(context.Context, *QueryDelegateKeysByValidatorAddress) (*QueryDelegateKeysByValidatorAddressResponse, error) + GetDelegateKeyByEth(context.Context, *QueryDelegateKeysByEthAddress) (*QueryDelegateKeysByEthAddressResponse, error) + GetDelegateKeyByOrchestrator(context.Context, *QueryDelegateKeysByOrchestratorAddress) (*QueryDelegateKeysByOrchestratorAddressResponse, error) +} + // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } @@ -1488,14 +2357,20 @@ func (*UnimplementedQueryServer) LastPendingValsetRequestByAddr(ctx context.Cont func (*UnimplementedQueryServer) LastPendingBatchRequestByAddr(ctx context.Context, req *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LastPendingBatchRequestByAddr not implemented") } +func (*UnimplementedQueryServer) LastPendingLogicCallByAddr(ctx context.Context, req *QueryLastPendingLogicCallByAddrRequest) (*QueryLastPendingLogicCallByAddrResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastPendingLogicCallByAddr not implemented") +} func (*UnimplementedQueryServer) LastEventNonceByAddr(ctx context.Context, req *QueryLastEventNonceByAddrRequest) (*QueryLastEventNonceByAddrResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LastEventNonceByAddr not implemented") } +func (*UnimplementedQueryServer) BatchFees(ctx context.Context, req *QueryBatchFeeRequest) (*QueryBatchFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchFees not implemented") +} func (*UnimplementedQueryServer) OutgoingTxBatches(ctx context.Context, req *QueryOutgoingTxBatchesRequest) (*QueryOutgoingTxBatchesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OutgoingTxBatches not implemented") } -func (*UnimplementedQueryServer) UnbatchedTxPool(ctx context.Context, req *QueryUnbatchedTxPoolByAddrRequest) (*QueryUnbatchedTxPoolByAddrResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnbatchedTxPool not implemented") +func (*UnimplementedQueryServer) OutgoingLogicCalls(ctx context.Context, req *QueryOutgoingLogicCallsRequest) (*QueryOutgoingLogicCallsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OutgoingLogicCalls not implemented") } func (*UnimplementedQueryServer) BatchRequestByNonce(ctx context.Context, req *QueryBatchRequestByNonceRequest) (*QueryBatchRequestByNonceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BatchRequestByNonce not implemented") @@ -1503,6 +2378,24 @@ func (*UnimplementedQueryServer) BatchRequestByNonce(ctx context.Context, req *Q func (*UnimplementedQueryServer) BatchConfirms(ctx context.Context, req *QueryBatchConfirmsRequest) (*QueryBatchConfirmsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BatchConfirms not implemented") } +func (*UnimplementedQueryServer) LogicConfirms(ctx context.Context, req *QueryLogicConfirmsRequest) (*QueryLogicConfirmsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LogicConfirms not implemented") +} +func (*UnimplementedQueryServer) ERC20ToDenom(ctx context.Context, req *QueryERC20ToDenomRequest) (*QueryERC20ToDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ERC20ToDenom not implemented") +} +func (*UnimplementedQueryServer) DenomToERC20(ctx context.Context, req *QueryDenomToERC20Request) (*QueryDenomToERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20 not implemented") +} +func (*UnimplementedQueryServer) GetDelegateKeyByValidator(ctx context.Context, req *QueryDelegateKeysByValidatorAddress) (*QueryDelegateKeysByValidatorAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDelegateKeyByValidator not implemented") +} +func (*UnimplementedQueryServer) GetDelegateKeyByEth(ctx context.Context, req *QueryDelegateKeysByEthAddress) (*QueryDelegateKeysByEthAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDelegateKeyByEth not implemented") +} +func (*UnimplementedQueryServer) GetDelegateKeyByOrchestrator(ctx context.Context, req *QueryDelegateKeysByOrchestratorAddress) (*QueryDelegateKeysByOrchestratorAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDelegateKeyByOrchestrator not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1518,7 +2411,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/Params", + FullMethod: "/injective.peggy.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -1536,7 +2429,7 @@ func _Query_CurrentValset_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/CurrentValset", + FullMethod: "/injective.peggy.v1.Query/CurrentValset", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).CurrentValset(ctx, req.(*QueryCurrentValsetRequest)) @@ -1554,7 +2447,7 @@ func _Query_ValsetRequest_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/ValsetRequest", + FullMethod: "/injective.peggy.v1.Query/ValsetRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValsetRequest(ctx, req.(*QueryValsetRequestRequest)) @@ -1572,7 +2465,7 @@ func _Query_ValsetConfirm_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/ValsetConfirm", + FullMethod: "/injective.peggy.v1.Query/ValsetConfirm", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValsetConfirm(ctx, req.(*QueryValsetConfirmRequest)) @@ -1590,7 +2483,7 @@ func _Query_ValsetConfirmsByNonce_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/ValsetConfirmsByNonce", + FullMethod: "/injective.peggy.v1.Query/ValsetConfirmsByNonce", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValsetConfirmsByNonce(ctx, req.(*QueryValsetConfirmsByNonceRequest)) @@ -1608,7 +2501,7 @@ func _Query_LastValsetRequests_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/LastValsetRequests", + FullMethod: "/injective.peggy.v1.Query/LastValsetRequests", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LastValsetRequests(ctx, req.(*QueryLastValsetRequestsRequest)) @@ -1626,7 +2519,7 @@ func _Query_LastPendingValsetRequestByAddr_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/LastPendingValsetRequestByAddr", + FullMethod: "/injective.peggy.v1.Query/LastPendingValsetRequestByAddr", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LastPendingValsetRequestByAddr(ctx, req.(*QueryLastPendingValsetRequestByAddrRequest)) @@ -1644,7 +2537,7 @@ func _Query_LastPendingBatchRequestByAddr_Handler(srv interface{}, ctx context.C } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/LastPendingBatchRequestByAddr", + FullMethod: "/injective.peggy.v1.Query/LastPendingBatchRequestByAddr", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LastPendingBatchRequestByAddr(ctx, req.(*QueryLastPendingBatchRequestByAddrRequest)) @@ -1652,6 +2545,24 @@ func _Query_LastPendingBatchRequestByAddr_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _Query_LastPendingLogicCallByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastPendingLogicCallByAddrRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LastPendingLogicCallByAddr(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/LastPendingLogicCallByAddr", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastPendingLogicCallByAddr(ctx, req.(*QueryLastPendingLogicCallByAddrRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_LastEventNonceByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryLastEventNonceByAddrRequest) if err := dec(in); err != nil { @@ -1662,7 +2573,7 @@ func _Query_LastEventNonceByAddr_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/LastEventNonceByAddr", + FullMethod: "/injective.peggy.v1.Query/LastEventNonceByAddr", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LastEventNonceByAddr(ctx, req.(*QueryLastEventNonceByAddrRequest)) @@ -1670,6 +2581,24 @@ func _Query_LastEventNonceByAddr_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Query_BatchFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBatchFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BatchFees(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/BatchFees", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchFees(ctx, req.(*QueryBatchFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_OutgoingTxBatches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryOutgoingTxBatchesRequest) if err := dec(in); err != nil { @@ -1680,7 +2609,7 @@ func _Query_OutgoingTxBatches_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/OutgoingTxBatches", + FullMethod: "/injective.peggy.v1.Query/OutgoingTxBatches", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).OutgoingTxBatches(ctx, req.(*QueryOutgoingTxBatchesRequest)) @@ -1688,20 +2617,20 @@ func _Query_OutgoingTxBatches_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_UnbatchedTxPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUnbatchedTxPoolByAddrRequest) +func _Query_OutgoingLogicCalls_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOutgoingLogicCallsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UnbatchedTxPool(ctx, in) + return srv.(QueryServer).OutgoingLogicCalls(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/UnbatchedTxPool", + FullMethod: "/injective.peggy.v1.Query/OutgoingLogicCalls", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnbatchedTxPool(ctx, req.(*QueryUnbatchedTxPoolByAddrRequest)) + return srv.(QueryServer).OutgoingLogicCalls(ctx, req.(*QueryOutgoingLogicCallsRequest)) } return interceptor(ctx, in, info, handler) } @@ -1716,7 +2645,7 @@ func _Query_BatchRequestByNonce_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/BatchRequestByNonce", + FullMethod: "/injective.peggy.v1.Query/BatchRequestByNonce", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).BatchRequestByNonce(ctx, req.(*QueryBatchRequestByNonceRequest)) @@ -1734,7 +2663,7 @@ func _Query_BatchConfirms_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1beta1.Query/BatchConfirms", + FullMethod: "/injective.peggy.v1.Query/BatchConfirms", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).BatchConfirms(ctx, req.(*QueryBatchConfirmsRequest)) @@ -1742,8 +2671,116 @@ func _Query_BatchConfirms_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_LogicConfirms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLogicConfirmsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LogicConfirms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/LogicConfirms", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LogicConfirms(ctx, req.(*QueryLogicConfirmsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ERC20ToDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryERC20ToDenomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ERC20ToDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/ERC20ToDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ERC20ToDenom(ctx, req.(*QueryERC20ToDenomRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DenomToERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomToERC20Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomToERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/DenomToERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomToERC20(ctx, req.(*QueryDenomToERC20Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetDelegateKeyByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegateKeysByValidatorAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetDelegateKeyByValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/GetDelegateKeyByValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetDelegateKeyByValidator(ctx, req.(*QueryDelegateKeysByValidatorAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetDelegateKeyByEth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegateKeysByEthAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetDelegateKeyByEth(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/GetDelegateKeyByEth", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetDelegateKeyByEth(ctx, req.(*QueryDelegateKeysByEthAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetDelegateKeyByOrchestrator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegateKeysByOrchestratorAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetDelegateKeyByOrchestrator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/GetDelegateKeyByOrchestrator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetDelegateKeyByOrchestrator(ctx, req.(*QueryDelegateKeysByOrchestratorAddress)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "injective.peggy.v1beta1.Query", + ServiceName: "injective.peggy.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1778,17 +2815,25 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "LastPendingBatchRequestByAddr", Handler: _Query_LastPendingBatchRequestByAddr_Handler, }, + { + MethodName: "LastPendingLogicCallByAddr", + Handler: _Query_LastPendingLogicCallByAddr_Handler, + }, { MethodName: "LastEventNonceByAddr", Handler: _Query_LastEventNonceByAddr_Handler, }, + { + MethodName: "BatchFees", + Handler: _Query_BatchFees_Handler, + }, { MethodName: "OutgoingTxBatches", Handler: _Query_OutgoingTxBatches_Handler, }, { - MethodName: "UnbatchedTxPool", - Handler: _Query_UnbatchedTxPool_Handler, + MethodName: "OutgoingLogicCalls", + Handler: _Query_OutgoingLogicCalls_Handler, }, { MethodName: "BatchRequestByNonce", @@ -1798,9 +2843,33 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "BatchConfirms", Handler: _Query_BatchConfirms_Handler, }, + { + MethodName: "LogicConfirms", + Handler: _Query_LogicConfirms_Handler, + }, + { + MethodName: "ERC20ToDenom", + Handler: _Query_ERC20ToDenom_Handler, + }, + { + MethodName: "DenomToERC20", + Handler: _Query_DenomToERC20_Handler, + }, + { + MethodName: "GetDelegateKeyByValidator", + Handler: _Query_GetDelegateKeyByValidator_Handler, + }, + { + MethodName: "GetDelegateKeyByEth", + Handler: _Query_GetDelegateKeyByEth_Handler, + }, + { + MethodName: "GetDelegateKeyByOrchestrator", + Handler: _Query_GetDelegateKeyByOrchestrator_Handler, + }, }, Streams: []grpc.StreamDesc{}, - Metadata: "injective/peggy/v1beta1/query.proto", + Metadata: "injective/peggy/v1/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { @@ -2225,17 +3294,79 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) MarshalToSizedBuffer(dAtA _ = i var l int _ = l - if m.Valset != nil { - { - size, err := m.Valset.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Valsets) > 0 { + for iNdEx := len(m.Valsets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Valsets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryBatchFeeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBatchFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBatchFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryBatchFeeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBatchFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBatchFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BatchFees) > 0 { + for iNdEx := len(m.BatchFees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BatchFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -2305,7 +3436,7 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) MarshalToSizedBuffer(dAtA [ return len(dAtA) - i, nil } -func (m *QueryOutgoingTxBatchesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryLastPendingLogicCallByAddrRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2315,17 +3446,82 @@ func (m *QueryOutgoingTxBatchesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryOutgoingTxBatchesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLastPendingLogicCallByAddrRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryOutgoingTxBatchesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLastPendingLogicCallByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - return len(dAtA) - i, nil + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryLastPendingLogicCallByAddrResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLastPendingLogicCallByAddrResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastPendingLogicCallByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Call != nil { + { + size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryOutgoingTxBatchesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOutgoingTxBatchesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOutgoingTxBatchesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil } func (m *QueryOutgoingTxBatchesResponse) Marshal() (dAtA []byte, err error) { @@ -2365,6 +3561,66 @@ func (m *QueryOutgoingTxBatchesResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QueryOutgoingLogicCallsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOutgoingLogicCallsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOutgoingLogicCallsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryOutgoingLogicCallsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOutgoingLogicCallsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOutgoingLogicCallsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Calls) > 0 { + for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryBatchRequestByNonceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2507,6 +3763,78 @@ func (m *QueryBatchConfirmsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryLogicConfirmsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLogicConfirmsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLogicConfirmsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.InvalidationNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) + i-- + dAtA[i] = 0x10 + } + if len(m.InvalidationId) > 0 { + i -= len(m.InvalidationId) + copy(dAtA[i:], m.InvalidationId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryLogicConfirmsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLogicConfirmsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLogicConfirmsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Confirms) > 0 { + for iNdEx := len(m.Confirms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Confirms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryLastEventNonceByAddrRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2565,7 +3893,7 @@ func (m *QueryLastEventNonceByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QueryUnbatchedTxPoolByAddrRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryERC20ToDenomRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2575,27 +3903,27 @@ func (m *QueryUnbatchedTxPoolByAddrRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUnbatchedTxPoolByAddrRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryERC20ToDenomRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUnbatchedTxPoolByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryERC20ToDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + if len(m.Erc20) > 0 { + i -= len(m.Erc20) + copy(dAtA[i:], m.Erc20) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryUnbatchedTxPoolByAddrResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryERC20ToDenomResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2605,88 +3933,342 @@ func (m *QueryUnbatchedTxPoolByAddrResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryUnbatchedTxPoolByAddrResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryERC20ToDenomResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUnbatchedTxPoolByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryERC20ToDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.OutgoingTxs) > 0 { - for iNdEx := len(m.OutgoingTxs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutgoingTxs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryDenomToERC20Request) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n + +func (m *QueryDenomToERC20Request) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryDenomToERC20Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryCurrentValsetRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryDenomToERC20Response) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryCurrentValsetResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryDenomToERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Valset != nil { - l = m.Valset.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Erc20) > 0 { + i -= len(m.Erc20) + copy(dAtA[i:], m.Erc20) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryValsetRequestRequest) Size() (n int) { - if m == nil { +func (m *QueryDelegateKeysByValidatorAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegateKeysByValidatorAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegateKeysByValidatorAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegateKeysByValidatorAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegateKeysByValidatorAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegateKeysByValidatorAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrchestratorAddress) > 0 { + i -= len(m.OrchestratorAddress) + copy(dAtA[i:], m.OrchestratorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.EthAddress) > 0 { + i -= len(m.EthAddress) + copy(dAtA[i:], m.EthAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegateKeysByEthAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegateKeysByEthAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegateKeysByEthAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EthAddress) > 0 { + i -= len(m.EthAddress) + copy(dAtA[i:], m.EthAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegateKeysByEthAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegateKeysByEthAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegateKeysByEthAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrchestratorAddress) > 0 { + i -= len(m.OrchestratorAddress) + copy(dAtA[i:], m.OrchestratorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegateKeysByOrchestratorAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegateKeysByOrchestratorAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegateKeysByOrchestratorAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrchestratorAddress) > 0 { + i -= len(m.OrchestratorAddress) + copy(dAtA[i:], m.OrchestratorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EthAddress) > 0 { + i -= len(m.EthAddress) + copy(dAtA[i:], m.EthAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryCurrentValsetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentValsetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Valset != nil { + l = m.Valset.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValsetRequestRequest) Size() (n int) { + if m == nil { return 0 } var l int @@ -2809,105 +4391,181 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) Size() (n int) { } var l int _ = l - if m.Valset != nil { - l = m.Valset.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Valsets) > 0 { + for _, e := range m.Valsets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } return n } -func (m *QueryLastPendingBatchRequestByAddrRequest) Size() (n int) { +func (m *QueryBatchFeeRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } return n } -func (m *QueryLastPendingBatchRequestByAddrResponse) Size() (n int) { +func (m *QueryBatchFeeResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Batch != nil { - l = m.Batch.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.BatchFees) > 0 { + for _, e := range m.BatchFees { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } return n } -func (m *QueryOutgoingTxBatchesRequest) Size() (n int) { +func (m *QueryLastPendingBatchRequestByAddrRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } -func (m *QueryOutgoingTxBatchesResponse) Size() (n int) { +func (m *QueryLastPendingBatchRequestByAddrResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if m.Batch != nil { + l = m.Batch.Size() + n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryBatchRequestByNonceRequest) Size() (n int) { +func (m *QueryLastPendingLogicCallByAddrRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Nonce != 0 { - n += 1 + sovQuery(uint64(m.Nonce)) - } - l = len(m.ContractAddress) + l = len(m.Address) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryBatchRequestByNonceResponse) Size() (n int) { +func (m *QueryLastPendingLogicCallByAddrResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Batch != nil { - l = m.Batch.Size() + if m.Call != nil { + l = m.Call.Size() n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryBatchConfirmsRequest) Size() (n int) { +func (m *QueryOutgoingTxBatchesRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Nonce != 0 { - n += 1 + sovQuery(uint64(m.Nonce)) - } - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } + return n +} + +func (m *QueryOutgoingTxBatchesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Batches) > 0 { + for _, e := range m.Batches { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryOutgoingLogicCallsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryOutgoingLogicCallsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Calls) > 0 { + for _, e := range m.Calls { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryBatchRequestByNonceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBatchRequestByNonceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Batch != nil { + l = m.Batch.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBatchConfirmsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2926,6 +4584,37 @@ func (m *QueryBatchConfirmsResponse) Size() (n int) { return n } +func (m *QueryLogicConfirmsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InvalidationId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.InvalidationNonce != 0 { + n += 1 + sovQuery(uint64(m.InvalidationNonce)) + } + return n +} + +func (m *QueryLogicConfirmsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Confirms) > 0 { + for _, e := range m.Confirms { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryLastEventNonceByAddrRequest) Size() (n int) { if m == nil { return 0 @@ -2951,41 +4640,1353 @@ func (m *QueryLastEventNonceByAddrResponse) Size() (n int) { return n } -func (m *QueryUnbatchedTxPoolByAddrRequest) Size() (n int) { +func (m *QueryERC20ToDenomRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Address) + l = len(m.Erc20) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryUnbatchedTxPoolByAddrResponse) Size() (n int) { +func (m *QueryERC20ToDenomResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.OutgoingTxs) > 0 { - for _, e := range m.OutgoingTxs { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDenomToERC20Request) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDenomToERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Erc20) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegateKeysByValidatorAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegateKeysByValidatorAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EthAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.OrchestratorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegateKeysByEthAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EthAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegateKeysByEthAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.OrchestratorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegateKeysByOrchestratorAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrchestratorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegateKeysByOrchestratorAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.EthAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentValsetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentValsetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentValsetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentValsetResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentValsetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentValsetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Valset == nil { + m.Valset = &Valset{} + } + if err := m.Valset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValsetRequestRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValsetRequestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValsetRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValsetRequestResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValsetRequestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValsetRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Valset == nil { + m.Valset = &Valset{} + } + if err := m.Valset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValsetConfirmRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValsetConfirmRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValsetConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValsetConfirmResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValsetConfirmResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValsetConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Confirm", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Confirm == nil { + m.Confirm = &MsgValsetConfirm{} + } + if err := m.Confirm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValsetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValsetConfirmsByNonceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValsetConfirmsByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValsetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValsetConfirmsByNonceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValsetConfirmsByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Confirms = append(m.Confirms, &MsgValsetConfirm{}) + if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLastValsetRequestsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLastValsetRequestsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastValsetRequestsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLastValsetRequestsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLastValsetRequestsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastValsetRequestsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valsets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Valsets = append(m.Valsets, &Valset{}) + if err := m.Valsets[len(m.Valsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLastPendingValsetRequestByAddrRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLastPendingValsetRequestByAddrResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valsets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Valsets = append(m.Valsets, &Valset{}) + if err := m.Valsets[len(m.Valsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBatchFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBatchFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBatchFeeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBatchFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBatchFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchFees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BatchFees = append(m.BatchFees, &BatchFees{}) + if err := m.BatchFees[len(m.BatchFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - return n -} -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3008,12 +6009,44 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3035,7 +6068,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3058,15 +6091,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3093,7 +6126,10 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Batch == nil { + m.Batch = &OutgoingTxBatch{} + } + if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3118,7 +6154,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentValsetRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingLogicCallByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3141,12 +6177,44 @@ func (m *QueryCurrentValsetRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentValsetRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingLogicCallByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentValsetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingLogicCallByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3168,7 +6236,7 @@ func (m *QueryCurrentValsetRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentValsetResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingLogicCallByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3191,15 +6259,15 @@ func (m *QueryCurrentValsetResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentValsetResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingLogicCallByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentValsetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingLogicCallByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3226,10 +6294,10 @@ func (m *QueryCurrentValsetResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Valset == nil { - m.Valset = &Valset{} + if m.Call == nil { + m.Call = &OutgoingLogicCall{} } - if err := m.Valset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Call.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3254,7 +6322,7 @@ func (m *QueryCurrentValsetResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValsetRequestRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3277,17 +6345,67 @@ func (m *QueryValsetRequestRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValsetRequestRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValsetRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } - m.Nonce = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3297,11 +6415,76 @@ func (m *QueryValsetRequestRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Batches = append(m.Batches, &OutgoingTxBatch{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOutgoingLogicCallsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryOutgoingLogicCallsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOutgoingLogicCallsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3323,7 +6506,7 @@ func (m *QueryValsetRequestRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValsetRequestResponse) Unmarshal(dAtA []byte) error { +func (m *QueryOutgoingLogicCallsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3346,15 +6529,15 @@ func (m *QueryValsetRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValsetRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOutgoingLogicCallsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValsetRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOutgoingLogicCallsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3381,10 +6564,8 @@ func (m *QueryValsetRequestResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Valset == nil { - m.Valset = &Valset{} - } - if err := m.Valset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Calls = append(m.Calls, &OutgoingLogicCall{}) + if err := m.Calls[len(m.Calls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3409,7 +6590,7 @@ func (m *QueryValsetRequestResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValsetConfirmRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3432,10 +6613,10 @@ func (m *QueryValsetConfirmRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValsetConfirmRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValsetConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3459,7 +6640,7 @@ func (m *QueryValsetConfirmRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3487,7 +6668,7 @@ func (m *QueryValsetConfirmRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.ContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3510,7 +6691,7 @@ func (m *QueryValsetConfirmRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValsetConfirmResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3533,15 +6714,15 @@ func (m *QueryValsetConfirmResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValsetConfirmResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValsetConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirm", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3568,10 +6749,10 @@ func (m *QueryValsetConfirmResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Confirm == nil { - m.Confirm = &MsgValsetConfirm{} + if m.Batch == nil { + m.Batch = &OutgoingTxBatch{} } - if err := m.Confirm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3596,7 +6777,7 @@ func (m *QueryValsetConfirmResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValsetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3619,10 +6800,10 @@ func (m *QueryValsetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValsetConfirmsByNonceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchConfirmsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValsetConfirmsByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchConfirmsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3644,6 +6825,38 @@ func (m *QueryValsetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3665,7 +6878,7 @@ func (m *QueryValsetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValsetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3688,10 +6901,10 @@ func (m *QueryValsetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValsetConfirmsByNonceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchConfirmsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValsetConfirmsByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchConfirmsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3723,7 +6936,7 @@ func (m *QueryValsetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Confirms = append(m.Confirms, &MsgValsetConfirm{}) + m.Confirms = append(m.Confirms, &MsgConfirmBatch{}) if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3749,57 +6962,7 @@ func (m *QueryValsetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastValsetRequestsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryLastValsetRequestsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastValsetRequestsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLastValsetRequestsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLogicConfirmsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3822,17 +6985,17 @@ func (m *QueryLastValsetRequestsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastValsetRequestsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLogicConfirmsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastValsetRequestsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLogicConfirmsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valsets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationId", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3842,26 +7005,45 @@ func (m *QueryLastValsetRequestsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Valsets = append(m.Valsets, &Valset{}) - if err := m.Valsets[len(m.Valsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.InvalidationId = append(m.InvalidationId[:0], dAtA[iNdEx:postIndex]...) + if m.InvalidationId == nil { + m.InvalidationId = []byte{} } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + } + m.InvalidationNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InvalidationNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3883,7 +7065,7 @@ func (m *QueryLastValsetRequestsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastPendingValsetRequestByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLogicConfirmsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3906,17 +7088,17 @@ func (m *QueryLastPendingValsetRequestByAddrRequest) Unmarshal(dAtA []byte) erro fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLogicConfirmsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLogicConfirmsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3926,23 +7108,25 @@ func (m *QueryLastPendingValsetRequestByAddrRequest) Unmarshal(dAtA []byte) erro } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Confirms = append(m.Confirms, &MsgConfirmLogicCall{}) + if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3965,7 +7149,7 @@ func (m *QueryLastPendingValsetRequestByAddrRequest) Unmarshal(dAtA []byte) erro } return nil } -func (m *QueryLastPendingValsetRequestByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3988,17 +7172,17 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) Unmarshal(dAtA []byte) err fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingValsetRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4008,27 +7192,23 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) Unmarshal(dAtA []byte) err } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Valset == nil { - m.Valset = &Valset{} - } - if err := m.Valset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4051,7 +7231,7 @@ func (m *QueryLastPendingValsetRequestByAddrResponse) Unmarshal(dAtA []byte) err } return nil } -func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4074,17 +7254,17 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) } - var stringLen uint64 + m.EventNonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4094,24 +7274,11 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.EventNonce |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4133,7 +7300,7 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryERC20ToDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4156,17 +7323,17 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) erro fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryERC20ToDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryERC20ToDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4176,27 +7343,23 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) erro } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Batch == nil { - m.Batch = &OutgoingTxBatch{} + return ErrInvalidLengthQuery } - if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Erc20 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4219,7 +7382,7 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) erro } return nil } -func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryERC20ToDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4242,12 +7405,44 @@ func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryERC20ToDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryERC20ToDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4269,7 +7464,7 @@ func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDenomToERC20Request) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4292,17 +7487,17 @@ func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomToERC20Request: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomToERC20Request: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4312,25 +7507,23 @@ func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Batches = append(m.Batches, &OutgoingTxBatch{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4353,7 +7546,7 @@ func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDenomToERC20Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4376,34 +7569,15 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomToERC20Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomToERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4431,7 +7605,7 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContractAddress = string(dAtA[iNdEx:postIndex]) + m.Erc20 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4454,7 +7628,7 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDelegateKeysByValidatorAddress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4477,17 +7651,17 @@ func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegateKeysByValidatorAddress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegateKeysByValidatorAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4497,27 +7671,23 @@ func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Batch == nil { - m.Batch = &OutgoingTxBatch{} - } - if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4540,7 +7710,7 @@ func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegateKeysByValidatorAddressResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4563,17 +7733,17 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchConfirmsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegateKeysByValidatorAddressResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchConfirmsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegateKeysByValidatorAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) } - m.Nonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4583,14 +7753,27 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4618,7 +7801,7 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContractAddress = string(dAtA[iNdEx:postIndex]) + m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4641,7 +7824,7 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDelegateKeysByEthAddress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4664,17 +7847,17 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchConfirmsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegateKeysByEthAddress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchConfirmsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegateKeysByEthAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4684,25 +7867,23 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Confirms = append(m.Confirms, &MsgConfirmBatch{}) - if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.EthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4725,7 +7906,7 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegateKeysByEthAddressResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4748,15 +7929,15 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegateKeysByEthAddressResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegateKeysByEthAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4784,63 +7965,13 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) } - m.EventNonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4850,11 +7981,24 @@ func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4876,7 +8020,7 @@ func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUnbatchedTxPoolByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegateKeysByOrchestratorAddress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4899,15 +8043,15 @@ func (m *QueryUnbatchedTxPoolByAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUnbatchedTxPoolByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegateKeysByOrchestratorAddress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnbatchedTxPoolByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegateKeysByOrchestratorAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4935,7 +8079,7 @@ func (m *QueryUnbatchedTxPoolByAddrRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4958,7 +8102,7 @@ func (m *QueryUnbatchedTxPoolByAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUnbatchedTxPoolByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDelegateKeysByOrchestratorAddressResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4981,17 +8125,17 @@ func (m *QueryUnbatchedTxPoolByAddrResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUnbatchedTxPoolByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegateKeysByOrchestratorAddressResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnbatchedTxPoolByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegateKeysByOrchestratorAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutgoingTxs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5001,25 +8145,55 @@ func (m *QueryUnbatchedTxPoolByAddrResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.OutgoingTxs = append(m.OutgoingTxs, &OutgoingTx{}) - if err := m.OutgoingTxs[len(m.OutgoingTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.EthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/chain/peggy/types/query.pb.gw.go b/chain/peggy/types/query.pb.gw.go new file mode 100644 index 00000000..469e8508 --- /dev/null +++ b/chain/peggy/types/query.pb.gw.go @@ -0,0 +1,1766 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: injective/peggy/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CurrentValset_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentValsetRequest + var metadata runtime.ServerMetadata + + msg, err := client.CurrentValset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CurrentValset_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentValsetRequest + var metadata runtime.ServerMetadata + + msg, err := server.CurrentValset(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ValsetRequest_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ValsetRequest_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValsetRequestRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValsetRequest_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ValsetRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValsetRequest_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValsetRequestRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValsetRequest_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ValsetRequest(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ValsetConfirm_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ValsetConfirm_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValsetConfirmRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValsetConfirm_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ValsetConfirm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValsetConfirm_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValsetConfirmRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValsetConfirm_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ValsetConfirm(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValsetConfirmsByNonce_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValsetConfirmsByNonceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["nonce"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + } + + protoReq.Nonce, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + } + + msg, err := client.ValsetConfirmsByNonce(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValsetConfirmsByNonce_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValsetConfirmsByNonceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["nonce"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + } + + protoReq.Nonce, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + } + + msg, err := server.ValsetConfirmsByNonce(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_LastValsetRequests_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastValsetRequestsRequest + var metadata runtime.ServerMetadata + + msg, err := client.LastValsetRequests(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastValsetRequests_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastValsetRequestsRequest + var metadata runtime.ServerMetadata + + msg, err := server.LastValsetRequests(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_LastPendingValsetRequestByAddr_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_LastPendingValsetRequestByAddr_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingValsetRequestByAddrRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LastPendingValsetRequestByAddr_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LastPendingValsetRequestByAddr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastPendingValsetRequestByAddr_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingValsetRequestByAddrRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LastPendingValsetRequestByAddr_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LastPendingValsetRequestByAddr(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_LastPendingBatchRequestByAddr_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingBatchRequestByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.LastPendingBatchRequestByAddr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastPendingBatchRequestByAddr_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingBatchRequestByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.LastPendingBatchRequestByAddr(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_LastPendingLogicCallByAddr_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingLogicCallByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.LastPendingLogicCallByAddr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastPendingLogicCallByAddr_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingLogicCallByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.LastPendingLogicCallByAddr(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_LastEventNonceByAddr_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastEventNonceByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.LastEventNonceByAddr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastEventNonceByAddr_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastEventNonceByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.LastEventNonceByAddr(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_BatchFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBatchFeeRequest + var metadata runtime.ServerMetadata + + msg, err := client.BatchFees(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BatchFees_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBatchFeeRequest + var metadata runtime.ServerMetadata + + msg, err := server.BatchFees(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_OutgoingTxBatches_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOutgoingTxBatchesRequest + var metadata runtime.ServerMetadata + + msg, err := client.OutgoingTxBatches(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_OutgoingTxBatches_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOutgoingTxBatchesRequest + var metadata runtime.ServerMetadata + + msg, err := server.OutgoingTxBatches(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_OutgoingLogicCalls_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOutgoingLogicCallsRequest + var metadata runtime.ServerMetadata + + msg, err := client.OutgoingLogicCalls(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_OutgoingLogicCalls_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOutgoingLogicCallsRequest + var metadata runtime.ServerMetadata + + msg, err := server.OutgoingLogicCalls(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_BatchRequestByNonce_0 = &utilities.DoubleArray{Encoding: map[string]int{"nonce": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_BatchRequestByNonce_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBatchRequestByNonceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["nonce"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + } + + protoReq.Nonce, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BatchRequestByNonce_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BatchRequestByNonce(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BatchRequestByNonce_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBatchRequestByNonceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["nonce"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + } + + protoReq.Nonce, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BatchRequestByNonce_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.BatchRequestByNonce(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_BatchConfirms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_BatchConfirms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBatchConfirmsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BatchConfirms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BatchConfirms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BatchConfirms_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBatchConfirmsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BatchConfirms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.BatchConfirms(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_LogicConfirms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_LogicConfirms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLogicConfirmsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LogicConfirms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LogicConfirms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LogicConfirms_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLogicConfirmsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LogicConfirms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LogicConfirms(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ERC20ToDenom_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ERC20ToDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryERC20ToDenomRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ERC20ToDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ERC20ToDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ERC20ToDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryERC20ToDenomRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ERC20ToDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ERC20ToDenom(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_DenomToERC20_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_DenomToERC20_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomToERC20Request + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomToERC20_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DenomToERC20(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DenomToERC20_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomToERC20Request + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomToERC20_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DenomToERC20(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_GetDelegateKeyByValidator_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetDelegateKeyByValidator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegateKeysByValidatorAddress + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetDelegateKeyByValidator_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDelegateKeyByValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetDelegateKeyByValidator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegateKeysByValidatorAddress + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetDelegateKeyByValidator_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDelegateKeyByValidator(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_GetDelegateKeyByEth_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetDelegateKeyByEth_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegateKeysByEthAddress + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetDelegateKeyByEth_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDelegateKeyByEth(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetDelegateKeyByEth_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegateKeysByEthAddress + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetDelegateKeyByEth_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDelegateKeyByEth(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_GetDelegateKeyByOrchestrator_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetDelegateKeyByOrchestrator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegateKeysByOrchestratorAddress + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetDelegateKeyByOrchestrator_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDelegateKeyByOrchestrator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetDelegateKeyByOrchestrator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegateKeysByOrchestratorAddress + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetDelegateKeyByOrchestrator_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDelegateKeyByOrchestrator(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentValset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CurrentValset_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentValset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValsetRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValsetRequest_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValsetRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValsetConfirm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValsetConfirm_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValsetConfirm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValsetConfirmsByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValsetConfirmsByNonce_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValsetConfirmsByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastValsetRequests_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastValsetRequests_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastValsetRequests_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingValsetRequestByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastPendingValsetRequestByAddr_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingValsetRequestByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingBatchRequestByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastPendingBatchRequestByAddr_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingBatchRequestByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingLogicCallByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastPendingLogicCallByAddr_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingLogicCallByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastEventNonceByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastEventNonceByAddr_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastEventNonceByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BatchFees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BatchFees_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BatchFees_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OutgoingTxBatches_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_OutgoingTxBatches_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OutgoingTxBatches_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OutgoingLogicCalls_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_OutgoingLogicCalls_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OutgoingLogicCalls_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BatchRequestByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BatchRequestByNonce_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BatchRequestByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BatchConfirms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BatchConfirms_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BatchConfirms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LogicConfirms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LogicConfirms_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LogicConfirms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ERC20ToDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ERC20ToDenom_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ERC20ToDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DenomToERC20_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_DenomToERC20_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DenomToERC20_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetDelegateKeyByValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetDelegateKeyByValidator_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetDelegateKeyByValidator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetDelegateKeyByEth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetDelegateKeyByEth_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetDelegateKeyByEth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetDelegateKeyByOrchestrator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetDelegateKeyByOrchestrator_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetDelegateKeyByOrchestrator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentValset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CurrentValset_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentValset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValsetRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValsetRequest_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValsetRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValsetConfirm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValsetConfirm_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValsetConfirm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValsetConfirmsByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValsetConfirmsByNonce_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValsetConfirmsByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastValsetRequests_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastValsetRequests_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastValsetRequests_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingValsetRequestByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastPendingValsetRequestByAddr_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingValsetRequestByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingBatchRequestByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastPendingBatchRequestByAddr_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingBatchRequestByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingLogicCallByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastPendingLogicCallByAddr_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingLogicCallByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastEventNonceByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastEventNonceByAddr_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastEventNonceByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BatchFees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BatchFees_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BatchFees_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OutgoingTxBatches_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_OutgoingTxBatches_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OutgoingTxBatches_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OutgoingLogicCalls_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_OutgoingLogicCalls_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OutgoingLogicCalls_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BatchRequestByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BatchRequestByNonce_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BatchRequestByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BatchConfirms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BatchConfirms_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BatchConfirms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LogicConfirms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LogicConfirms_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LogicConfirms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ERC20ToDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ERC20ToDenom_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ERC20ToDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DenomToERC20_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_DenomToERC20_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DenomToERC20_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetDelegateKeyByValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetDelegateKeyByValidator_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetDelegateKeyByValidator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetDelegateKeyByEth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetDelegateKeyByEth_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetDelegateKeyByEth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetDelegateKeyByOrchestrator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetDelegateKeyByOrchestrator_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetDelegateKeyByOrchestrator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"peggy", "v1beta", "params"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_CurrentValset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "valset", "current"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_ValsetRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"peggy", "v1beta", "valset"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_ValsetConfirm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "valset", "confirm"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_ValsetConfirmsByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"peggy", "v1beta", "confirms", "nonce"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_LastValsetRequests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "valset", "requests"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_LastPendingValsetRequestByAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "valset", "last"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_LastPendingBatchRequestByAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"peggy", "v1beta", "batch", "address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_LastPendingLogicCallByAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"peggy", "v1beta", "logic", "address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_LastEventNonceByAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"peggy", "v1beta", "oracle", "eventnonce", "address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_BatchFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"peggy", "v1beta", "batchfees"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_OutgoingTxBatches_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "batch", "outgoingtx"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_OutgoingLogicCalls_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "batch", "outgoinglogic"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_BatchRequestByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"peggy", "v1beta", "batch", "nonce"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_BatchConfirms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "batch", "confirms"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_LogicConfirms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "logic", "confirms"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_ERC20ToDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "cosmos_originated", "erc20_to_denom"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_DenomToERC20_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"peggy", "v1beta", "cosmos_originated", "denom_to_erc20"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_GetDelegateKeyByValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"peggy", "v1beta", "query_delegate_keys_by_validator"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_GetDelegateKeyByEth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"peggy", "v1beta", "query_delegate_keys_by_eth"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_GetDelegateKeyByOrchestrator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"peggy", "v1beta", "query_delegate_keys_by_orchestrator"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_CurrentValset_0 = runtime.ForwardResponseMessage + + forward_Query_ValsetRequest_0 = runtime.ForwardResponseMessage + + forward_Query_ValsetConfirm_0 = runtime.ForwardResponseMessage + + forward_Query_ValsetConfirmsByNonce_0 = runtime.ForwardResponseMessage + + forward_Query_LastValsetRequests_0 = runtime.ForwardResponseMessage + + forward_Query_LastPendingValsetRequestByAddr_0 = runtime.ForwardResponseMessage + + forward_Query_LastPendingBatchRequestByAddr_0 = runtime.ForwardResponseMessage + + forward_Query_LastPendingLogicCallByAddr_0 = runtime.ForwardResponseMessage + + forward_Query_LastEventNonceByAddr_0 = runtime.ForwardResponseMessage + + forward_Query_BatchFees_0 = runtime.ForwardResponseMessage + + forward_Query_OutgoingTxBatches_0 = runtime.ForwardResponseMessage + + forward_Query_OutgoingLogicCalls_0 = runtime.ForwardResponseMessage + + forward_Query_BatchRequestByNonce_0 = runtime.ForwardResponseMessage + + forward_Query_BatchConfirms_0 = runtime.ForwardResponseMessage + + forward_Query_LogicConfirms_0 = runtime.ForwardResponseMessage + + forward_Query_ERC20ToDenom_0 = runtime.ForwardResponseMessage + + forward_Query_DenomToERC20_0 = runtime.ForwardResponseMessage + + forward_Query_GetDelegateKeyByValidator_0 = runtime.ForwardResponseMessage + + forward_Query_GetDelegateKeyByEth_0 = runtime.ForwardResponseMessage + + forward_Query_GetDelegateKeyByOrchestrator_0 = runtime.ForwardResponseMessage +) diff --git a/chain/peggy/types/types.go b/chain/peggy/types/types.go index cafdcd25..d6e515c5 100644 --- a/chain/peggy/types/types.go +++ b/chain/peggy/types/types.go @@ -3,6 +3,7 @@ package types import ( "encoding/binary" "fmt" + math "math" "math/big" "sort" "strconv" @@ -62,6 +63,44 @@ func (b BridgeValidators) Sort() { }) } +// PowerDiff returns the difference in power between two bridge validator sets +// TODO: this needs to be potentially refactored +func (b BridgeValidators) PowerDiff(c BridgeValidators) float64 { + powers := map[string]int64{} + var totalB int64 + // loop over b and initialize the map with their powers + for _, bv := range b { + powers[bv.EthereumAddress] = int64(bv.Power) + totalB += int64(bv.Power) + } + + // subtract c powers from powers in the map, initializing + // uninitialized keys with negative numbers + for _, bv := range c { + if val, ok := powers[bv.EthereumAddress]; ok { + powers[bv.EthereumAddress] = val - int64(bv.Power) + } else { + powers[bv.EthereumAddress] = -int64(bv.Power) + } + } + + var delta float64 + for _, v := range powers { + // NOTE: we care about the absolute value of the changes + delta += math.Abs(float64(v)) + } + + return math.Abs(delta / float64(totalB)) +} + +// TotalPower returns the total power in the bridge validator set +func (b BridgeValidators) TotalPower() (out uint64) { + for _, v := range b { + out += v.Power + } + return +} + // HasDuplicates returns true if there are duplicates in the set func (b BridgeValidators) HasDuplicates() bool { m := make(map[string]struct{}, len(b)) @@ -98,13 +137,13 @@ func (b BridgeValidators) ValidateBasic() error { } // NewValset returns a new valset -func NewValset(nonce uint64, members BridgeValidators) *Valset { +func NewValset(nonce, height uint64, members BridgeValidators) *Valset { members.Sort() var mem []*BridgeValidator for _, val := range members { mem = append(mem, val) } - return &Valset{Nonce: uint64(nonce), Members: mem} + return &Valset{Nonce: uint64(nonce), Members: mem, Height: height} } // GetCheckpoint returns the checkpoint @@ -169,3 +208,18 @@ func (v *Valset) WithoutEmptyMembers() *Valset { } return &r } + +// Valsets is a collection of valset +type Valsets []*Valset + +func (v Valsets) Len() int { + return len(v) +} + +func (v Valsets) Less(i, j int) bool { + return v[i].Nonce > v[j].Nonce +} + +func (v Valsets) Swap(i, j int) { + v[i], v[j] = v[j], v[i] +} diff --git a/chain/peggy/types/types.pb.go b/chain/peggy/types/types.pb.go index ff93ecf6..cc1d3094 100644 --- a/chain/peggy/types/types.pb.go +++ b/chain/peggy/types/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: injective/peggy/v1beta1/types.proto +// source: injective/peggy/v1/types.proto package types @@ -32,7 +32,7 @@ func (m *BridgeValidator) Reset() { *m = BridgeValidator{} } func (m *BridgeValidator) String() string { return proto.CompactTextString(m) } func (*BridgeValidator) ProtoMessage() {} func (*BridgeValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_ce9a470490ea9f5c, []int{0} + return fileDescriptor_b641943ad411b503, []int{0} } func (m *BridgeValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -81,13 +81,14 @@ func (m *BridgeValidator) GetEthereumAddress() string { type Valset struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Members []*BridgeValidator `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` } func (m *Valset) Reset() { *m = Valset{} } func (m *Valset) String() string { return proto.CompactTextString(m) } func (*Valset) ProtoMessage() {} func (*Valset) Descriptor() ([]byte, []int) { - return fileDescriptor_ce9a470490ea9f5c, []int{1} + return fileDescriptor_b641943ad411b503, []int{1} } func (m *Valset) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,34 +131,159 @@ func (m *Valset) GetMembers() []*BridgeValidator { return nil } -func init() { - proto.RegisterType((*BridgeValidator)(nil), "injective.peggy.v1beta1.BridgeValidator") - proto.RegisterType((*Valset)(nil), "injective.peggy.v1beta1.Valset") +func (m *Valset) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +// LastObservedEthereumBlockHeight stores the last observed +// Ethereum block height along with the Cosmos block height that +// it was observed at. These two numbers can be used to project +// outward and always produce batches with timeouts in the future +// even if no Ethereum block height has been relayed for a long time +type LastObservedEthereumBlockHeight struct { + CosmosBlockHeight uint64 `protobuf:"varint,1,opt,name=cosmos_block_height,json=cosmosBlockHeight,proto3" json:"cosmos_block_height,omitempty"` + EthereumBlockHeight uint64 `protobuf:"varint,2,opt,name=ethereum_block_height,json=ethereumBlockHeight,proto3" json:"ethereum_block_height,omitempty"` +} + +func (m *LastObservedEthereumBlockHeight) Reset() { *m = LastObservedEthereumBlockHeight{} } +func (m *LastObservedEthereumBlockHeight) String() string { return proto.CompactTextString(m) } +func (*LastObservedEthereumBlockHeight) ProtoMessage() {} +func (*LastObservedEthereumBlockHeight) Descriptor() ([]byte, []int) { + return fileDescriptor_b641943ad411b503, []int{2} +} +func (m *LastObservedEthereumBlockHeight) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastObservedEthereumBlockHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastObservedEthereumBlockHeight.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LastObservedEthereumBlockHeight) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastObservedEthereumBlockHeight.Merge(m, src) +} +func (m *LastObservedEthereumBlockHeight) XXX_Size() int { + return m.Size() +} +func (m *LastObservedEthereumBlockHeight) XXX_DiscardUnknown() { + xxx_messageInfo_LastObservedEthereumBlockHeight.DiscardUnknown(m) +} + +var xxx_messageInfo_LastObservedEthereumBlockHeight proto.InternalMessageInfo + +func (m *LastObservedEthereumBlockHeight) GetCosmosBlockHeight() uint64 { + if m != nil { + return m.CosmosBlockHeight + } + return 0 +} + +func (m *LastObservedEthereumBlockHeight) GetEthereumBlockHeight() uint64 { + if m != nil { + return m.EthereumBlockHeight + } + return 0 +} + +// This records the relationship between an ERC20 token and the denom +// of the corresponding Cosmos originated asset +type ERC20ToDenom struct { + Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *ERC20ToDenom) Reset() { *m = ERC20ToDenom{} } +func (m *ERC20ToDenom) String() string { return proto.CompactTextString(m) } +func (*ERC20ToDenom) ProtoMessage() {} +func (*ERC20ToDenom) Descriptor() ([]byte, []int) { + return fileDescriptor_b641943ad411b503, []int{3} +} +func (m *ERC20ToDenom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ERC20ToDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ERC20ToDenom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ERC20ToDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_ERC20ToDenom.Merge(m, src) +} +func (m *ERC20ToDenom) XXX_Size() int { + return m.Size() +} +func (m *ERC20ToDenom) XXX_DiscardUnknown() { + xxx_messageInfo_ERC20ToDenom.DiscardUnknown(m) +} + +var xxx_messageInfo_ERC20ToDenom proto.InternalMessageInfo + +func (m *ERC20ToDenom) GetErc20() string { + if m != nil { + return m.Erc20 + } + return "" +} + +func (m *ERC20ToDenom) GetDenom() string { + if m != nil { + return m.Denom + } + return "" } func init() { - proto.RegisterFile("injective/peggy/v1beta1/types.proto", fileDescriptor_ce9a470490ea9f5c) -} - -var fileDescriptor_ce9a470490ea9f5c = []byte{ - // 266 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xbf, 0x4e, 0xc3, 0x30, - 0x18, 0xc4, 0x63, 0xfe, 0x14, 0x61, 0x86, 0xa2, 0x08, 0x89, 0x4e, 0x56, 0x55, 0x96, 0x30, 0x60, - 0xab, 0xf0, 0x04, 0x64, 0x43, 0x30, 0x65, 0xe8, 0xc0, 0x82, 0xec, 0xf8, 0x53, 0x62, 0x14, 0xc7, - 0x91, 0xed, 0x14, 0xf5, 0x2d, 0x78, 0x2c, 0xc6, 0x8e, 0x8c, 0x28, 0x79, 0x11, 0xd4, 0xb4, 0xae, - 0x10, 0x52, 0xc7, 0x3b, 0xdd, 0xf7, 0xfb, 0x4e, 0x87, 0x6f, 0x54, 0xfd, 0x0e, 0xb9, 0x57, 0x4b, - 0x60, 0x0d, 0x14, 0xc5, 0x8a, 0x2d, 0xe7, 0x02, 0x3c, 0x9f, 0x33, 0xbf, 0x6a, 0xc0, 0xd1, 0xc6, - 0x1a, 0x6f, 0xe2, 0xeb, 0x7d, 0x88, 0x0e, 0x21, 0xba, 0x0b, 0xcd, 0x32, 0x3c, 0x4e, 0xad, 0x92, - 0x05, 0x2c, 0x78, 0xa5, 0x24, 0xf7, 0xc6, 0xc6, 0x57, 0xf8, 0xb4, 0x31, 0x1f, 0x60, 0x27, 0x68, - 0x8a, 0x92, 0x93, 0x6c, 0x2b, 0xe2, 0x5b, 0x7c, 0x09, 0xbe, 0x04, 0x0b, 0xad, 0x7e, 0xe3, 0x52, - 0x5a, 0x70, 0x6e, 0x72, 0x34, 0x45, 0xc9, 0x79, 0x36, 0x0e, 0xfe, 0xe3, 0xd6, 0x9e, 0x09, 0x3c, - 0x5a, 0xf0, 0xca, 0x81, 0xdf, 0xa0, 0x6a, 0x53, 0xe7, 0x10, 0x50, 0x83, 0x88, 0x53, 0x7c, 0xa6, - 0x41, 0x0b, 0xb0, 0x1b, 0xc2, 0x71, 0x72, 0x71, 0x9f, 0xd0, 0x03, 0xf5, 0xe8, 0xbf, 0x6e, 0x59, - 0x38, 0x4c, 0xe1, 0xab, 0x23, 0x68, 0xdd, 0x11, 0xf4, 0xd3, 0x11, 0xf4, 0xd9, 0x93, 0x68, 0xdd, - 0x93, 0xe8, 0xbb, 0x27, 0xd1, 0xeb, 0x73, 0xa1, 0x7c, 0xd9, 0x0a, 0x9a, 0x1b, 0xcd, 0x9e, 0x02, - 0xf6, 0x85, 0x0b, 0xc7, 0xf6, 0x4f, 0xee, 0x72, 0x63, 0xe1, 0xaf, 0x2c, 0xb9, 0xaa, 0x99, 0x36, - 0xb2, 0xad, 0xc0, 0xed, 0x56, 0x1c, 0xd6, 0x13, 0xa3, 0x61, 0xbe, 0x87, 0xdf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xac, 0x7f, 0x30, 0x35, 0x65, 0x01, 0x00, 0x00, + proto.RegisterType((*BridgeValidator)(nil), "injective.peggy.v1.BridgeValidator") + proto.RegisterType((*Valset)(nil), "injective.peggy.v1.Valset") + proto.RegisterType((*LastObservedEthereumBlockHeight)(nil), "injective.peggy.v1.LastObservedEthereumBlockHeight") + proto.RegisterType((*ERC20ToDenom)(nil), "injective.peggy.v1.ERC20ToDenom") +} + +func init() { proto.RegisterFile("injective/peggy/v1/types.proto", fileDescriptor_b641943ad411b503) } + +var fileDescriptor_b641943ad411b503 = []byte{ + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0x4f, 0x4f, 0xfa, 0x40, + 0x14, 0xa4, 0xf0, 0xfb, 0x61, 0x58, 0x4d, 0xd0, 0xa2, 0x86, 0x53, 0x25, 0xf5, 0x82, 0x07, 0x5b, + 0xa8, 0x37, 0x13, 0x0f, 0xa2, 0x24, 0x1a, 0x49, 0x4c, 0x1a, 0xc3, 0xc1, 0x0b, 0xe9, 0x9f, 0x97, + 0x76, 0xb5, 0xdb, 0x6d, 0x76, 0xb7, 0x35, 0x7c, 0x00, 0xef, 0x7e, 0x2c, 0x8f, 0x1c, 0x3d, 0x1a, + 0xf8, 0x22, 0xa6, 0xdb, 0x96, 0xa0, 0x1c, 0x67, 0x66, 0xdf, 0xbc, 0xd9, 0xc9, 0x43, 0x1a, 0x8e, + 0x5f, 0xc0, 0x13, 0x38, 0x03, 0x33, 0x81, 0x20, 0x98, 0x9b, 0xd9, 0xd0, 0x14, 0xf3, 0x04, 0xb8, + 0x91, 0x30, 0x2a, 0xa8, 0xaa, 0xae, 0x75, 0x43, 0xea, 0x46, 0x36, 0xd4, 0x6d, 0xd4, 0x1e, 0x31, + 0xec, 0x07, 0x30, 0x75, 0x22, 0xec, 0x3b, 0x82, 0x32, 0xf5, 0x10, 0xfd, 0x4f, 0xe8, 0x1b, 0xb0, + 0xae, 0xd2, 0x53, 0xfa, 0xff, 0xec, 0x02, 0xa8, 0x67, 0x68, 0x1f, 0x44, 0x08, 0x0c, 0x52, 0x32, + 0x73, 0x7c, 0x9f, 0x01, 0xe7, 0xdd, 0x7a, 0x4f, 0xe9, 0xb7, 0xec, 0x76, 0xc5, 0x5f, 0x17, 0xb4, + 0x9e, 0xa2, 0xe6, 0xd4, 0x89, 0x38, 0x88, 0xdc, 0x2a, 0xa6, 0xb1, 0x07, 0x95, 0x95, 0x04, 0xea, + 0x15, 0xda, 0x21, 0x40, 0x5c, 0x60, 0xb9, 0x43, 0xa3, 0xbf, 0x6b, 0x9d, 0x1a, 0xdb, 0xc9, 0x8c, + 0x3f, 0xb1, 0xec, 0x6a, 0x46, 0x3d, 0x46, 0xcd, 0x10, 0x70, 0x10, 0x8a, 0x6e, 0x43, 0xba, 0x96, + 0x48, 0x7f, 0x57, 0xd0, 0xc9, 0xc4, 0xe1, 0xe2, 0xd1, 0xe5, 0xc0, 0x32, 0xf0, 0xc7, 0x65, 0xac, + 0x51, 0x44, 0xbd, 0xd7, 0x3b, 0xf9, 0x46, 0x35, 0x50, 0xc7, 0xa3, 0x9c, 0x50, 0x3e, 0x73, 0x73, + 0x76, 0x56, 0x1a, 0x15, 0xf1, 0x0e, 0x0a, 0x69, 0xf3, 0xbd, 0x85, 0x8e, 0xd6, 0xbf, 0xfe, 0x35, + 0x51, 0x97, 0x13, 0x1d, 0xd8, 0xde, 0xa1, 0x5f, 0xa2, 0xbd, 0xb1, 0x7d, 0x63, 0x0d, 0x9e, 0xe8, + 0x2d, 0xc4, 0x94, 0xe4, 0x25, 0x00, 0xf3, 0xac, 0x81, 0xdc, 0xd2, 0xb2, 0x0b, 0x90, 0xb3, 0x7e, + 0x2e, 0x97, 0x25, 0x16, 0x60, 0x04, 0x9f, 0x4b, 0x4d, 0x59, 0x2c, 0x35, 0xe5, 0x7b, 0xa9, 0x29, + 0x1f, 0x2b, 0xad, 0xb6, 0x58, 0x69, 0xb5, 0xaf, 0x95, 0x56, 0x7b, 0x7e, 0x08, 0xb0, 0x08, 0x53, + 0xd7, 0xf0, 0x28, 0x31, 0xef, 0xab, 0xb6, 0x26, 0x8e, 0xcb, 0xcd, 0x75, 0x77, 0xe7, 0x1e, 0x65, + 0xb0, 0x09, 0x43, 0x07, 0xc7, 0x26, 0xa1, 0x7e, 0x1a, 0x01, 0x2f, 0x4f, 0x42, 0xde, 0x83, 0xdb, + 0x94, 0x07, 0x71, 0xf1, 0x13, 0x00, 0x00, 0xff, 0xff, 0x30, 0x7c, 0x0b, 0x35, 0x32, 0x02, 0x00, + 0x00, } func (m *BridgeValidator) Marshal() (dAtA []byte, err error) { @@ -215,6 +341,11 @@ func (m *Valset) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } if len(m.Members) > 0 { for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { { @@ -237,6 +368,76 @@ func (m *Valset) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *LastObservedEthereumBlockHeight) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LastObservedEthereumBlockHeight) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastObservedEthereumBlockHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EthereumBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.EthereumBlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.CosmosBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.CosmosBlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ERC20ToDenom) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ERC20ToDenom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ERC20ToDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Erc20) > 0 { + i -= len(m.Erc20) + copy(dAtA[i:], m.Erc20) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Erc20))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -279,6 +480,41 @@ func (m *Valset) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + return n +} + +func (m *LastObservedEthereumBlockHeight) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CosmosBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.CosmosBlockHeight)) + } + if m.EthereumBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.EthereumBlockHeight)) + } + return n +} + +func (m *ERC20ToDenom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Erc20) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -374,10 +610,7 @@ func (m *BridgeValidator) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -474,16 +707,234 @@ func (m *Valset) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LastObservedEthereumBlockHeight) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LastObservedEthereumBlockHeight: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastObservedEthereumBlockHeight: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosBlockHeight", wireType) + } + m.CosmosBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CosmosBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumBlockHeight", wireType) + } + m.EthereumBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthereumBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ERC20ToDenom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ERC20ToDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ERC20ToDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { diff --git a/chain/peggy/types/types_test.go b/chain/peggy/types/types_test.go new file mode 100644 index 00000000..bfdba36d --- /dev/null +++ b/chain/peggy/types/types_test.go @@ -0,0 +1,188 @@ +package types + +import ( + "bytes" + "encoding/hex" + mrand "math/rand" + "testing" + + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" +) + +func TestValsetConfirmHash(t *testing.T) { + powers := []uint64{3333, 3333, 3333} + ethAddresses := []string{ + "0xc783df8a850f42e7F7e57013759C285caa701eB6", + "0xeAD9C93b79Ae7C1591b1FB5323BD777E86e150d4", + "0xE5904695748fe4A84b40b3fc79De2277660BD1D3", + } + members := make(BridgeValidators, len(powers)) + for i := range powers { + members[i] = &BridgeValidator{ + Power: powers[i], + EthereumAddress: ethAddresses[i], + } + } + + var mem []*BridgeValidator + for _, m := range members { + mem = append(mem, m) + } + v := Valset{Members: mem} + // TODO: this is hardcoded to foo, replace? + hash := v.GetCheckpoint("foo") + hexHash := hex.EncodeToString(hash) + correctHash := "88165860d955aee7dc3e83d9d1156a5864b708841965585d206dbef6e9e1a499" + assert.Equal(t, correctHash, hexHash) +} + +func TestValsetCheckpointGold1(t *testing.T) { + src := NewValset(0xc, 0xc, BridgeValidators{{ + Power: 0xffffffff, + EthereumAddress: gethcommon.Address{0xb4, 0x62, 0x86, 0x4e, 0x39, 0x5d, 0x88, 0xd6, 0xbc, 0x7c, 0x5d, 0xd5, 0xf3, 0xf5, 0xeb, 0x4c, 0xc2, 0x59, 0x92, 0x55}.String(), + }}) + + // TODO: this is hardcoded to foo, replace + ourHash := src.GetCheckpoint("foo") + + // hash from bridge contract + goldHash := "0xf024ab7404464494d3919e5a7f0d8ac40804fb9bd39ad5d16cdb3e66aa219b64"[2:] + assert.Equal(t, goldHash, hex.EncodeToString(ourHash)) +} + +func TestValsetPowerDiff(t *testing.T) { + specs := map[string]struct { + start BridgeValidators + diff BridgeValidators + exp float64 + }{ + "no diff": { + start: BridgeValidators{ + {Power: 1, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 2, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 3, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + }, + diff: BridgeValidators{ + {Power: 1, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 2, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 3, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + }, + exp: 0.0, + }, + "one": { + start: BridgeValidators{ + {Power: 1, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 1, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 2, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + }, + diff: BridgeValidators{ + {Power: 1, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 1, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 3, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + }, + exp: 0.25, + }, + "real world": { + start: BridgeValidators{ + {Power: 678509841, EthereumAddress: "0x6db48cBBCeD754bDc760720e38E456144e83269b"}, + {Power: 671724742, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 685294939, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 671724742, EthereumAddress: "0x0A7254b318dd742A3086882321C27779B4B642a6"}, + {Power: 671724742, EthereumAddress: "0x454330deAaB759468065d08F2b3B0562caBe1dD1"}, + {Power: 617443955, EthereumAddress: "0x3511A211A6759d48d107898302042d1301187BA9"}, + {Power: 6785098, EthereumAddress: "0x37A0603dA2ff6377E5C7f75698dabA8EE4Ba97B8"}, + {Power: 291759231, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + }, + diff: BridgeValidators{ + {Power: 642345266, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 678509841, EthereumAddress: "0x6db48cBBCeD754bDc760720e38E456144e83269b"}, + {Power: 671724742, EthereumAddress: "0x0A7254b318dd742A3086882321C27779B4B642a6"}, + {Power: 671724742, EthereumAddress: "0x454330deAaB759468065d08F2b3B0562caBe1dD1"}, + {Power: 671724742, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 617443955, EthereumAddress: "0x3511A211A6759d48d107898302042d1301187BA9"}, + {Power: 291759231, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + {Power: 6785098, EthereumAddress: "0x37A0603dA2ff6377E5C7f75698dabA8EE4Ba97B8"}, + }, + exp: 0.010000000023283065, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + assert.Equal(t, spec.exp, spec.start.PowerDiff(spec.diff)) + }) + } +} + +func TestValsetSort(t *testing.T) { + specs := map[string]struct { + src BridgeValidators + exp BridgeValidators + }{ + "by power desc": { + src: BridgeValidators{ + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(3)}, 20)).String()}, + {Power: 2, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(1)}, 20)).String()}, + {Power: 3, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(2)}, 20)).String()}, + }, + exp: BridgeValidators{ + {Power: 3, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(2)}, 20)).String()}, + {Power: 2, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(1)}, 20)).String()}, + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(3)}, 20)).String()}, + }, + }, + "by eth addr on same power": { + src: BridgeValidators{ + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(2)}, 20)).String()}, + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(1)}, 20)).String()}, + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(3)}, 20)).String()}, + }, + exp: BridgeValidators{ + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(1)}, 20)).String()}, + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(2)}, 20)).String()}, + {Power: 1, EthereumAddress: gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(3)}, 20)).String()}, + }, + }, + // if you're thinking about changing this due to a change in the sorting algorithm + // you MUST go change this in peggy_utils/types.rs as well. You will also break all + // bridges in production when they try to migrate so use extreme caution! + "real world": { + src: BridgeValidators{ + {Power: 678509841, EthereumAddress: "0x6db48cBBCeD754bDc760720e38E456144e83269b"}, + {Power: 671724742, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 685294939, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 671724742, EthereumAddress: "0x0A7254b318dd742A3086882321C27779B4B642a6"}, + {Power: 671724742, EthereumAddress: "0x454330deAaB759468065d08F2b3B0562caBe1dD1"}, + {Power: 617443955, EthereumAddress: "0x3511A211A6759d48d107898302042d1301187BA9"}, + {Power: 6785098, EthereumAddress: "0x37A0603dA2ff6377E5C7f75698dabA8EE4Ba97B8"}, + {Power: 291759231, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + }, + exp: BridgeValidators{ + {Power: 685294939, EthereumAddress: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"}, + {Power: 678509841, EthereumAddress: "0x6db48cBBCeD754bDc760720e38E456144e83269b"}, + {Power: 671724742, EthereumAddress: "0x0A7254b318dd742A3086882321C27779B4B642a6"}, + {Power: 671724742, EthereumAddress: "0x454330deAaB759468065d08F2b3B0562caBe1dD1"}, + {Power: 671724742, EthereumAddress: "0x8E91960d704Df3fF24ECAb78AB9df1B5D9144140"}, + {Power: 617443955, EthereumAddress: "0x3511A211A6759d48d107898302042d1301187BA9"}, + {Power: 291759231, EthereumAddress: "0xF14879a175A2F1cEFC7c616f35b6d9c2b0Fd8326"}, + {Power: 6785098, EthereumAddress: "0x37A0603dA2ff6377E5C7f75698dabA8EE4Ba97B8"}, + }, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + spec.src.Sort() + assert.Equal(t, spec.src, spec.exp) + shuffled := shuffled(spec.src) + shuffled.Sort() + assert.Equal(t, shuffled, spec.exp) + }) + } +} + +func shuffled(v BridgeValidators) BridgeValidators { + mrand.Shuffle(len(v), func(i, j int) { + v[i], v[j] = v[j], v[i] + }) + return v +}