From 82e8936869df6fe78813685930cf93464e4f3dea Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Mon, 29 Apr 2024 13:37:56 +0900 Subject: [PATCH] feat: initialize fbridge module (#1340) * initialize fbridge module * add all proto files for fbridge * add missing proto files * initialize module structure * modify proto based on discussion * add codec * add CHANGELOG * modify UpdateRole feature --- CHANGELOG.md | 1 + client/docs/config.json | 14 + client/docs/swagger-ui/swagger.yaml | 1195 +++++++ docs/core/proto-docs.md | 1168 ++++++ proto/lbm/fbridge/v1/event.proto | 44 + proto/lbm/fbridge/v1/fbridge.proto | 75 + proto/lbm/fbridge/v1/genesis.proto | 81 + proto/lbm/fbridge/v1/query.proto | 185 + proto/lbm/fbridge/v1/tx.proto | 169 + x/fbridge/client/cli/query.go | 18 + x/fbridge/client/cli/tx.go | 23 + x/fbridge/keeper/genesis.go | 14 + x/fbridge/keeper/grpc_query.go | 61 + x/fbridge/keeper/keeper.go | 3 + x/fbridge/keeper/msg_server.go | 61 + x/fbridge/module/module.go | 164 + x/fbridge/types/codec.go | 63 + x/fbridge/types/event.pb.go | 1292 +++++++ x/fbridge/types/expected_keepers.go | 1 + x/fbridge/types/fbridge.pb.go | 1650 +++++++++ x/fbridge/types/genesis.go | 9 + x/fbridge/types/genesis.pb.go | 2347 ++++++++++++ x/fbridge/types/keys.go | 9 + x/fbridge/types/msgs.go | 127 + x/fbridge/types/query.pb.go | 5094 +++++++++++++++++++++++++++ x/fbridge/types/query.pb.gw.go | 1166 ++++++ x/fbridge/types/tx.pb.go | 4495 +++++++++++++++++++++++ 27 files changed, 19529 insertions(+) create mode 100644 proto/lbm/fbridge/v1/event.proto create mode 100644 proto/lbm/fbridge/v1/fbridge.proto create mode 100644 proto/lbm/fbridge/v1/genesis.proto create mode 100644 proto/lbm/fbridge/v1/query.proto create mode 100644 proto/lbm/fbridge/v1/tx.proto create mode 100644 x/fbridge/client/cli/query.go create mode 100644 x/fbridge/client/cli/tx.go create mode 100644 x/fbridge/keeper/genesis.go create mode 100644 x/fbridge/keeper/grpc_query.go create mode 100644 x/fbridge/keeper/keeper.go create mode 100644 x/fbridge/keeper/msg_server.go create mode 100644 x/fbridge/module/module.go create mode 100644 x/fbridge/types/codec.go create mode 100644 x/fbridge/types/event.pb.go create mode 100644 x/fbridge/types/expected_keepers.go create mode 100644 x/fbridge/types/fbridge.pb.go create mode 100644 x/fbridge/types/genesis.go create mode 100644 x/fbridge/types/genesis.pb.go create mode 100644 x/fbridge/types/keys.go create mode 100644 x/fbridge/types/msgs.go create mode 100644 x/fbridge/types/query.pb.go create mode 100644 x/fbridge/types/query.pb.gw.go create mode 100644 x/fbridge/types/tx.pb.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d2bc136b5..b1613e11c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (consensus) [\#1178](https://github.com/Finschia/finschia-sdk/pull/1178) change the consensus from Ostracon to Tendermint v0.34.24 * (x/fswap) [\#1336](https://github.com/Finschia/finschia-sdk/pull/1336) Initialize fswap module * (x/fswap) [\#1339](https://github.com/Finschia/finschia-sdk/pull/1339) Implement fswap module's genesis +* (x/fbridge) [\#1336](https://github.com/Finschia/finschia-sdk/pull/1340) Initialize fbridge module ### Improvements * (docs) [\#1120](https://github.com/Finschia/finschia-sdk/pull/1120) Update links in x/foundation README.md diff --git a/client/docs/config.json b/client/docs/config.json index 1bf69f7c03..4a1968c6ee 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -164,6 +164,20 @@ }, { "url": "./tmp-swagger-gen/cosmos/base/node/v1beta1/query.swagger.json" + }, + { + "url": "./tmp-swagger-gen/lbm/fbridge/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "FBridgeParams", + "Commitments": "FBridgeCommitments", + "Guardians": "FBridgeGuardians", + "Operators": "FBridgeOperators", + "Judges": "FBridgeJudges", + "Proposals": "FBridgeProposals", + "Proposal": "FBridgeProposal" + } + } } ] } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 0a671c6747..c56e21d150 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -29799,6 +29799,813 @@ paths: format: byte tags: - Service + '/lbm/fbridge/v1/commitments/{seq}': + get: + summary: Commitments queries commitments of a specific sequence number + operationId: FBridgeCommitments + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitments: + type: array + items: + type: string + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: seq + description: the sequence number of the bridge request + in: path + required: true + type: string + format: uint64 + tags: + - Query + /lbm/fbridge/v1/greatest_confirmed_seq: + get: + summary: >- + GreatestConsecutiveConfirmedSeq queries a greatest consecutive sequence + number confirmed by n-of-m operators + operationId: GreatestConsecutiveConfirmedSeq + responses: + '200': + description: A successful response. + schema: + type: object + properties: + seq: + type: string + format: uint64 + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /lbm/fbridge/v1/guardians: + get: + summary: Guardians queries a list of Guardians registered on the bridge + operationId: FBridgeGuardians + responses: + '200': + description: A successful response. + schema: + type: object + properties: + guardians: + type: array + items: + type: string + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /lbm/fbridge/v1/judges: + get: + summary: Judges queries a list of Judges registered on the bridge + operationId: FBridgeJudges + responses: + '200': + description: A successful response. + schema: + type: object + properties: + judges: + type: array + items: + type: string + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /lbm/fbridge/v1/nextseq_send: + get: + summary: NextSeqSend queries the sequence of next bridge request + operationId: NextSeqSend + responses: + '200': + description: A successful response. + schema: + type: object + properties: + seq: + type: string + format: uint64 + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /lbm/fbridge/v1/operators: + get: + summary: Operators queries a list of Operators registered on the bridge + operationId: FBridgeOperators + responses: + '200': + description: A successful response. + schema: + type: object + properties: + operators: + type: array + items: + type: string + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + '/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs': + get: + summary: >- + NeededSubmissionSeqs queries a list of sequence numbers that need to be + submitted by a particular operator + + The search scope is [greatest_consecutive_seq_by_operator, + min(greatest_consecutive_seq_by_operator + range, + + greatest_seq_by_operator)] greatest_consecutive_seq_by_operator can be + replaced with greatest_consecutive_seq if + + the operator is newly added + operationId: NeededSubmissionSeqs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + seqs: + type: array + items: + type: string + format: uint64 + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: operator + description: the address of the operator + in: path + required: true + type: string + - name: range + description: range specifies the size of the range to search. + in: query + required: false + type: string + format: uint64 + tags: + - Query + '/lbm/fbridge/v1/operators/{operator}/provision/{seq}': + get: + summary: >- + SubmittedProvision queries a provision submitted by a particular + operator + operationId: SubmittedProvision + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: object + properties: + seq: + type: string + format: uint64 + title: the sequence number of the bridge request + amount: + type: string + title: the amount of token to be claimed + sender: + type: string + title: the sender address on the source chain + receiver: + type: string + title: the recipient address on the destination chain + description: Provision is a struct that represents a provision internally. + status: + type: object + properties: + timelock_end: + type: string + format: uint64 + title: >- + the unix timestamp the provision will be able to be + claimed (unix timestamp) + confirm_counts: + type: integer + format: int32 + title: >- + a value that tells how many operators have submitted this + provision + is_claimed: + type: boolean + format: boolean + title: whether the provision has been claimed + description: >- + ProvisionStatus is a struct that represents the status of a + provision. + + To optimize computational cost, we have collected frequently + changing values from provision. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: operator + description: the address of the operator + in: path + required: true + type: string + - name: seq + description: the sequence number of the bridge request + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/lbm/fbridge/v1/operators/{operator}/seq': + get: + summary: >- + GreatestSeqByOperator queries a greatest sequence number confirmed by a + particular operator + operationId: GreatestSeqByOperator + responses: + '200': + description: A successful response. + schema: + type: object + properties: + seq: + type: string + format: uint64 + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: operator + description: the address of the operator + in: path + required: true + type: string + tags: + - Query + /lbm/fbridge/v1/params: + get: + summary: Params queries the parameters of x/fbridge module. + operationId: FBridgeParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + operator_trust_level: + description: >- + ratio of how many operators' confirmations are needed to + be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + guardian_trust_level: + description: >- + ratio of how many guardians' confirmations are needed to + be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + judge_trust_level: + description: >- + ratio of how many judges' confirmations are needed to be + valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + timelock_period: + type: string + format: uint64 + title: >- + default timelock period for each provision (unix + timestamp) + proposal_period: + type: string + format: uint64 + title: default period of the proposal to update the role + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + '/lbm/fbridge/v1/provision/{seq}': + get: + summary: ConfirmedProvision queries a particular sequence of confirmed provisions + operationId: ConfirmedProvision + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: object + properties: + seq: + type: string + format: uint64 + title: the sequence number of the bridge request + amount: + type: string + title: the amount of token to be claimed + sender: + type: string + title: the sender address on the source chain + receiver: + type: string + title: the recipient address on the destination chain + description: Provision is a struct that represents a provision internally. + status: + type: object + properties: + timelock_end: + type: string + format: uint64 + title: >- + the unix timestamp the provision will be able to be + claimed (unix timestamp) + confirm_counts: + type: integer + format: int32 + title: >- + a value that tells how many operators have submitted this + provision + is_claimed: + type: boolean + format: boolean + title: whether the provision has been claimed + description: >- + ProvisionStatus is a struct that represents the status of a + provision. + + To optimize computational cost, we have collected frequently + changing values from provision. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: seq + description: the sequence number of the bridge request + in: path + required: true + type: string + format: uint64 + tags: + - Query + /lbm/fbridge/v1/role/proposals: + get: + summary: Proposals queries a list of SuggestRole Proposals + operationId: FBridgeProposals + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + proposer: + type: string + title: the proposer address + target: + type: string + title: the address to update the role + role: + title: >- + the role to be updated + + - unspecified : 0, used to remove the address from a + group + + - guardian : 1 + + - operator : 2 + + - judge : 3 + type: string + enum: + - UNSPECIFIED + - GUARDIAN + - OPERATOR + - JUDGE + default: UNSPECIFIED + description: >- + Role defines the role of the operator, guardian, and + judge. + expired_at: + type: string + format: uint64 + title: >- + the unix timestamp the proposal will be expired (unix + timestamp) + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/lbm/fbridge/v1/role/proposals/{proposal_id}': + get: + summary: Proposal queries a SuggestRole Proposal + operationId: FBridgeProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + proposer: + type: string + title: the proposer address + target: + type: string + title: the address to update the role + role: + title: |- + the role to be updated + - unspecified : 0, used to remove the address from a group + - guardian : 1 + - operator : 2 + - judge : 3 + type: string + enum: + - UNSPECIFIED + - GUARDIAN + - OPERATOR + - JUDGE + default: UNSPECIFIED + description: >- + Role defines the role of the operator, guardian, and + judge. + expired_at: + type: string + format: uint64 + title: >- + the unix timestamp the proposal will be expired (unix + timestamp) + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: proposal_id + description: the proposal id + in: path + required: true + type: string + tags: + - Query definitions: cosmos.auth.v1beta1.Params: type: object @@ -49344,3 +50151,391 @@ definitions: minimum_gas_price: type: string description: ConfigResponse defines the response structure for the Config gRPC query. + lbm.fbridge.v1.Fraction: + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + description: |- + Fraction defines the protobuf message type for tmmath.Fraction that only + supports positive values. + lbm.fbridge.v1.Params: + type: object + properties: + operator_trust_level: + description: ratio of how many operators' confirmations are needed to be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + guardian_trust_level: + description: ratio of how many guardians' confirmations are needed to be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + judge_trust_level: + description: ratio of how many judges' confirmations are needed to be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + timelock_period: + type: string + format: uint64 + title: default timelock period for each provision (unix timestamp) + proposal_period: + type: string + format: uint64 + title: default period of the proposal to update the role + lbm.fbridge.v1.ProvisionData: + type: object + properties: + seq: + type: string + format: uint64 + title: the sequence number of the bridge request + amount: + type: string + title: the amount of token to be claimed + sender: + type: string + title: the sender address on the source chain + receiver: + type: string + title: the recipient address on the destination chain + description: Provision is a struct that represents a provision internally. + lbm.fbridge.v1.ProvisionStatus: + type: object + properties: + timelock_end: + type: string + format: uint64 + title: >- + the unix timestamp the provision will be able to be claimed (unix + timestamp) + confirm_counts: + type: integer + format: int32 + title: a value that tells how many operators have submitted this provision + is_claimed: + type: boolean + format: boolean + title: whether the provision has been claimed + description: >- + ProvisionStatus is a struct that represents the status of a provision. + + To optimize computational cost, we have collected frequently changing + values from provision. + lbm.fbridge.v1.QueryCommitmentsResponse: + type: object + properties: + commitments: + type: array + items: + type: string + lbm.fbridge.v1.QueryConfirmedProvisionResponse: + type: object + properties: + data: + type: object + properties: + seq: + type: string + format: uint64 + title: the sequence number of the bridge request + amount: + type: string + title: the amount of token to be claimed + sender: + type: string + title: the sender address on the source chain + receiver: + type: string + title: the recipient address on the destination chain + description: Provision is a struct that represents a provision internally. + status: + type: object + properties: + timelock_end: + type: string + format: uint64 + title: >- + the unix timestamp the provision will be able to be claimed (unix + timestamp) + confirm_counts: + type: integer + format: int32 + title: >- + a value that tells how many operators have submitted this + provision + is_claimed: + type: boolean + format: boolean + title: whether the provision has been claimed + description: >- + ProvisionStatus is a struct that represents the status of a provision. + + To optimize computational cost, we have collected frequently changing + values from provision. + lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqResponse: + type: object + properties: + seq: + type: string + format: uint64 + lbm.fbridge.v1.QueryGreatestSeqByOperatorResponse: + type: object + properties: + seq: + type: string + format: uint64 + lbm.fbridge.v1.QueryGuardiansResponse: + type: object + properties: + guardians: + type: array + items: + type: string + lbm.fbridge.v1.QueryJudgesResponse: + type: object + properties: + judges: + type: array + items: + type: string + lbm.fbridge.v1.QueryNeededSubmissionSeqsResponse: + type: object + properties: + seqs: + type: array + items: + type: string + format: uint64 + lbm.fbridge.v1.QueryNextSeqSendResponse: + type: object + properties: + seq: + type: string + format: uint64 + lbm.fbridge.v1.QueryOperatorsResponse: + type: object + properties: + operators: + type: array + items: + type: string + lbm.fbridge.v1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + operator_trust_level: + description: ratio of how many operators' confirmations are needed to be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + guardian_trust_level: + description: ratio of how many guardians' confirmations are needed to be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + judge_trust_level: + description: ratio of how many judges' confirmations are needed to be valid. + type: object + properties: + numerator: + type: string + format: uint64 + denominator: + type: string + format: uint64 + timelock_period: + type: string + format: uint64 + title: default timelock period for each provision (unix timestamp) + proposal_period: + type: string + format: uint64 + title: default period of the proposal to update the role + lbm.fbridge.v1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + proposer: + type: string + title: the proposer address + target: + type: string + title: the address to update the role + role: + title: |- + the role to be updated + - unspecified : 0, used to remove the address from a group + - guardian : 1 + - operator : 2 + - judge : 3 + type: string + enum: + - UNSPECIFIED + - GUARDIAN + - OPERATOR + - JUDGE + default: UNSPECIFIED + description: 'Role defines the role of the operator, guardian, and judge.' + expired_at: + type: string + format: uint64 + title: the unix timestamp the proposal will be expired (unix timestamp) + lbm.fbridge.v1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + proposer: + type: string + title: the proposer address + target: + type: string + title: the address to update the role + role: + title: |- + the role to be updated + - unspecified : 0, used to remove the address from a group + - guardian : 1 + - operator : 2 + - judge : 3 + type: string + enum: + - UNSPECIFIED + - GUARDIAN + - OPERATOR + - JUDGE + default: UNSPECIFIED + description: 'Role defines the role of the operator, guardian, and judge.' + expired_at: + type: string + format: uint64 + title: the unix timestamp the proposal will be expired (unix timestamp) + lbm.fbridge.v1.QuerySubmittedProvisionResponse: + type: object + properties: + data: + type: object + properties: + seq: + type: string + format: uint64 + title: the sequence number of the bridge request + amount: + type: string + title: the amount of token to be claimed + sender: + type: string + title: the sender address on the source chain + receiver: + type: string + title: the recipient address on the destination chain + description: Provision is a struct that represents a provision internally. + status: + type: object + properties: + timelock_end: + type: string + format: uint64 + title: >- + the unix timestamp the provision will be able to be claimed (unix + timestamp) + confirm_counts: + type: integer + format: int32 + title: >- + a value that tells how many operators have submitted this + provision + is_claimed: + type: boolean + format: boolean + title: whether the provision has been claimed + description: >- + ProvisionStatus is a struct that represents the status of a provision. + + To optimize computational cost, we have collected frequently changing + values from provision. + lbm.fbridge.v1.Role: + type: string + enum: + - UNSPECIFIED + - GUARDIAN + - OPERATOR + - JUDGE + default: UNSPECIFIED + description: 'Role defines the role of the operator, guardian, and judge.' + lbm.fbridge.v1.RoleProposal: + type: object + properties: + id: + type: string + format: uint64 + proposer: + type: string + title: the proposer address + target: + type: string + title: the address to update the role + role: + title: |- + the role to be updated + - unspecified : 0, used to remove the address from a group + - guardian : 1 + - operator : 2 + - judge : 3 + type: string + enum: + - UNSPECIFIED + - GUARDIAN + - OPERATOR + - JUDGE + default: UNSPECIFIED + description: 'Role defines the role of the operator, guardian, and judge.' + expired_at: + type: string + format: uint64 + title: the unix timestamp the proposal will be expired (unix timestamp) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 7d6e8b010d..8982d795db 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -754,6 +754,87 @@ - [Msg](#lbm.collection.v1.Msg) +- [lbm/fbridge/v1/event.proto](#lbm/fbridge/v1/event.proto) + - [EventClaim](#lbm.fbridge.v1.EventClaim) + - [EventConfirmProvision](#lbm.fbridge.v1.EventConfirmProvision) + - [EventProvision](#lbm.fbridge.v1.EventProvision) + - [EventTransfer](#lbm.fbridge.v1.EventTransfer) + +- [lbm/fbridge/v1/fbridge.proto](#lbm/fbridge/v1/fbridge.proto) + - [Fraction](#lbm.fbridge.v1.Fraction) + - [Params](#lbm.fbridge.v1.Params) + - [ProvisionData](#lbm.fbridge.v1.ProvisionData) + - [ProvisionStatus](#lbm.fbridge.v1.ProvisionStatus) + - [RoleProposal](#lbm.fbridge.v1.RoleProposal) + + - [Role](#lbm.fbridge.v1.Role) + +- [lbm/fbridge/v1/genesis.proto](#lbm/fbridge/v1/genesis.proto) + - [BlockSeqInfo](#lbm.fbridge.v1.BlockSeqInfo) + - [Commitment](#lbm.fbridge.v1.Commitment) + - [ConfirmedProvision](#lbm.fbridge.v1.ConfirmedProvision) + - [GenesisState](#lbm.fbridge.v1.GenesisState) + - [OperatorSeqInfo](#lbm.fbridge.v1.OperatorSeqInfo) + - [Provision](#lbm.fbridge.v1.Provision) + - [ReceivingState](#lbm.fbridge.v1.ReceivingState) + - [SendingState](#lbm.fbridge.v1.SendingState) + +- [lbm/fbridge/v1/query.proto](#lbm/fbridge/v1/query.proto) + - [QueryCommitmentsRequest](#lbm.fbridge.v1.QueryCommitmentsRequest) + - [QueryCommitmentsResponse](#lbm.fbridge.v1.QueryCommitmentsResponse) + - [QueryConfirmedProvisionRequest](#lbm.fbridge.v1.QueryConfirmedProvisionRequest) + - [QueryConfirmedProvisionResponse](#lbm.fbridge.v1.QueryConfirmedProvisionResponse) + - [QueryGreatestConsecutiveConfirmedSeqRequest](#lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqRequest) + - [QueryGreatestConsecutiveConfirmedSeqResponse](#lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqResponse) + - [QueryGreatestSeqByOperatorRequest](#lbm.fbridge.v1.QueryGreatestSeqByOperatorRequest) + - [QueryGreatestSeqByOperatorResponse](#lbm.fbridge.v1.QueryGreatestSeqByOperatorResponse) + - [QueryGuardiansRequest](#lbm.fbridge.v1.QueryGuardiansRequest) + - [QueryGuardiansResponse](#lbm.fbridge.v1.QueryGuardiansResponse) + - [QueryJudgesRequest](#lbm.fbridge.v1.QueryJudgesRequest) + - [QueryJudgesResponse](#lbm.fbridge.v1.QueryJudgesResponse) + - [QueryNeededSubmissionSeqsRequest](#lbm.fbridge.v1.QueryNeededSubmissionSeqsRequest) + - [QueryNeededSubmissionSeqsResponse](#lbm.fbridge.v1.QueryNeededSubmissionSeqsResponse) + - [QueryNextSeqSendRequest](#lbm.fbridge.v1.QueryNextSeqSendRequest) + - [QueryNextSeqSendResponse](#lbm.fbridge.v1.QueryNextSeqSendResponse) + - [QueryOperatorsRequest](#lbm.fbridge.v1.QueryOperatorsRequest) + - [QueryOperatorsResponse](#lbm.fbridge.v1.QueryOperatorsResponse) + - [QueryParamsRequest](#lbm.fbridge.v1.QueryParamsRequest) + - [QueryParamsResponse](#lbm.fbridge.v1.QueryParamsResponse) + - [QueryProposalRequest](#lbm.fbridge.v1.QueryProposalRequest) + - [QueryProposalResponse](#lbm.fbridge.v1.QueryProposalResponse) + - [QueryProposalsRequest](#lbm.fbridge.v1.QueryProposalsRequest) + - [QueryProposalsResponse](#lbm.fbridge.v1.QueryProposalsResponse) + - [QuerySubmittedProvisionRequest](#lbm.fbridge.v1.QuerySubmittedProvisionRequest) + - [QuerySubmittedProvisionResponse](#lbm.fbridge.v1.QuerySubmittedProvisionResponse) + + - [Query](#lbm.fbridge.v1.Query) + +- [lbm/fbridge/v1/tx.proto](#lbm/fbridge/v1/tx.proto) + - [MsgAddVoteForRole](#lbm.fbridge.v1.MsgAddVoteForRole) + - [MsgAddVoteForRoleResponse](#lbm.fbridge.v1.MsgAddVoteForRoleResponse) + - [MsgClaim](#lbm.fbridge.v1.MsgClaim) + - [MsgClaimBatch](#lbm.fbridge.v1.MsgClaimBatch) + - [MsgClaimBatchResponse](#lbm.fbridge.v1.MsgClaimBatchResponse) + - [MsgClaimResponse](#lbm.fbridge.v1.MsgClaimResponse) + - [MsgHalt](#lbm.fbridge.v1.MsgHalt) + - [MsgHaltResponse](#lbm.fbridge.v1.MsgHaltResponse) + - [MsgHoldTransfer](#lbm.fbridge.v1.MsgHoldTransfer) + - [MsgHoldTransferResponse](#lbm.fbridge.v1.MsgHoldTransferResponse) + - [MsgProvision](#lbm.fbridge.v1.MsgProvision) + - [MsgProvisionResponse](#lbm.fbridge.v1.MsgProvisionResponse) + - [MsgReleaseTransfer](#lbm.fbridge.v1.MsgReleaseTransfer) + - [MsgReleaseTransferResponse](#lbm.fbridge.v1.MsgReleaseTransferResponse) + - [MsgRemoveProvision](#lbm.fbridge.v1.MsgRemoveProvision) + - [MsgRemoveProvisionResponse](#lbm.fbridge.v1.MsgRemoveProvisionResponse) + - [MsgResume](#lbm.fbridge.v1.MsgResume) + - [MsgResumeResponse](#lbm.fbridge.v1.MsgResumeResponse) + - [MsgSuggestRole](#lbm.fbridge.v1.MsgSuggestRole) + - [MsgSuggestRoleResponse](#lbm.fbridge.v1.MsgSuggestRoleResponse) + - [MsgTransfer](#lbm.fbridge.v1.MsgTransfer) + - [MsgTransferResponse](#lbm.fbridge.v1.MsgTransferResponse) + + - [Msg](#lbm.fbridge.v1.Msg) + - [lbm/foundation/v1/authz.proto](#lbm/foundation/v1/authz.proto) - [ReceiveFromTreasuryAuthorization](#lbm.foundation.v1.ReceiveFromTreasuryAuthorization) @@ -11300,6 +11381,1093 @@ Msg defines the collection Msg service. + +
+ +## lbm/fbridge/v1/event.proto + + + + + +### EventClaim + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `sender` | [string](#string) | | the sender address on the source chain | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `amount` | [string](#string) | | the amount of token to be claimed | + + + + + + + + +### EventConfirmProvision + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### EventProvision + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `sender` | [string](#string) | | the sender address on the source chain | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `amount` | [string](#string) | | the amount of token to be claimed | +| `operator` | [string](#string) | | the address of the operator | + + + + + + + + +### EventTransfer + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `sender` | [string](#string) | | the sender address on the source chain | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `amount` | [string](#string) | | the amount of token to be transferred | + + + + + + + + + + + + + + + + + + +## lbm/fbridge/v1/fbridge.proto + + + + + +### Fraction +Fraction defines the protobuf message type for tmmath.Fraction that only +supports positive values. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `numerator` | [uint64](#uint64) | | | +| `denominator` | [uint64](#uint64) | | | + + + + + + + + +### Params + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator_trust_level` | [Fraction](#lbm.fbridge.v1.Fraction) | | ratio of how many operators' confirmations are needed to be valid. | +| `guardian_trust_level` | [Fraction](#lbm.fbridge.v1.Fraction) | | ratio of how many guardians' confirmations are needed to be valid. | +| `judge_trust_level` | [Fraction](#lbm.fbridge.v1.Fraction) | | ratio of how many judges' confirmations are needed to be valid. | +| `timelock_period` | [uint64](#uint64) | | default timelock period for each provision (unix timestamp) | +| `proposal_period` | [uint64](#uint64) | | default period of the proposal to update the role | + + + + + + + + +### ProvisionData +Provision is a struct that represents a provision internally. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `amount` | [string](#string) | | the amount of token to be claimed | +| `sender` | [string](#string) | | the sender address on the source chain | +| `receiver` | [string](#string) | | the recipient address on the destination chain | + + + + + + + + +### ProvisionStatus +ProvisionStatus is a struct that represents the status of a provision. +To optimize computational cost, we have collected frequently changing values from provision. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `timelock_end` | [uint64](#uint64) | | the unix timestamp the provision will be able to be claimed (unix timestamp) | +| `confirm_counts` | [int32](#int32) | | a value that tells how many operators have submitted this provision | +| `is_claimed` | [bool](#bool) | | whether the provision has been claimed | + + + + + + + + +### RoleProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | +| `proposer` | [string](#string) | | the proposer address | +| `target` | [string](#string) | | the address to update the role | +| `role` | [Role](#lbm.fbridge.v1.Role) | | the role to be updated - unspecified : 0, used to remove the address from a group - guardian : 1 - operator : 2 - judge : 3 | +| `expired_at` | [uint64](#uint64) | | the unix timestamp the proposal will be expired (unix timestamp) | + + + + + + + + + + +### Role +Role defines the role of the operator, guardian, and judge. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNSPECIFIED | 0 | | +| GUARDIAN | 1 | | +| OPERATOR | 2 | | +| JUDGE | 3 | | + + + + + + + + + + + + + +## lbm/fbridge/v1/genesis.proto + + + + + +### BlockSeqInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | +| `blocknum` | [uint64](#uint64) | | | + + + + + + + + +### Commitment + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the operator address | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `commitment` | [string](#string) | | commitment is the hash value of a provision | + + + + + + + + +### ConfirmedProvision + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `commitment` | [string](#string) | | commitment is the hash value of a provision | + + + + + + + + +### GenesisState +GenesisState defines the fbridge module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#lbm.fbridge.v1.Params) | | params defines all the parameters of the module. | +| `sending_state` | [SendingState](#lbm.fbridge.v1.SendingState) | | sending_state defines status saved when sending tokens to a counterpart chain | +| `receiving_state` | [ReceivingState](#lbm.fbridge.v1.ReceivingState) | | receiving_state defines status saved when receiving tokens from a counterpart chain | + + + + + + + + +### OperatorSeqInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the operator address | +| `seq` | [uint64](#uint64) | | the sequence number | + + + + + + + + +### Provision + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `commitment` | [string](#string) | | | +| `data` | [ProvisionData](#lbm.fbridge.v1.ProvisionData) | | | +| `status` | [ProvisionStatus](#lbm.fbridge.v1.ProvisionStatus) | | | + + + + + + + + +### ReceivingState + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `greatest_consecutive_seq_by_operator` | [OperatorSeqInfo](#lbm.fbridge.v1.OperatorSeqInfo) | repeated | the greatest consecutive sequence number confirmed by each operator | +| `greatest_seq_by_operator` | [OperatorSeqInfo](#lbm.fbridge.v1.OperatorSeqInfo) | repeated | the greatest sequence number confirmed by each operator | +| `greatest_consecutive_seq` | [uint64](#uint64) | | the greatest consecutive sequence numbers confirmed by n-of-m operators consecutiveness is judged starting from the number closest to 0. | +| `pending_claim_seqs` | [uint64](#uint64) | repeated | the set of sequence numbers to be claimed | +| `commitments` | [Commitment](#lbm.fbridge.v1.Commitment) | repeated | commitment is the hash value of a specific provision. | +| `provisions` | [Provision](#lbm.fbridge.v1.Provision) | repeated | provision associated with a specific commitment. | +| `confirmed_seq_to_commitment` | [ConfirmedProvision](#lbm.fbridge.v1.ConfirmedProvision) | repeated | map the sequence number confirmed by n-of-m operators with commitment | + + + + + + + + +### SendingState + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `next_seq` | [uint64](#uint64) | | the next sequence number of the bridge request (greatest sequence number + 1) | +| `seq_to_blocknum` | [BlockSeqInfo](#lbm.fbridge.v1.BlockSeqInfo) | repeated | sequence-per-block number mapping | + + + + + + + + + + + + + + + + + + +## lbm/fbridge/v1/query.proto + + + + + +### QueryCommitmentsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### QueryCommitmentsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `commitments` | [string](#string) | repeated | | + + + + + + + + +### QueryConfirmedProvisionRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### QueryConfirmedProvisionResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [ProvisionData](#lbm.fbridge.v1.ProvisionData) | | | +| `status` | [ProvisionStatus](#lbm.fbridge.v1.ProvisionStatus) | | | + + + + + + + + +### QueryGreatestConsecutiveConfirmedSeqRequest + + + + + + + + + +### QueryGreatestConsecutiveConfirmedSeqResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | + + + + + + + + +### QueryGreatestSeqByOperatorRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the address of the operator | + + + + + + + + +### QueryGreatestSeqByOperatorResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | + + + + + + + + +### QueryGuardiansRequest + + + + + + + + + +### QueryGuardiansResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `guardians` | [string](#string) | repeated | | + + + + + + + + +### QueryJudgesRequest + + + + + + + + + +### QueryJudgesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `judges` | [string](#string) | repeated | | + + + + + + + + +### QueryNeededSubmissionSeqsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the address of the operator | +| `range` | [uint64](#uint64) | | range specifies the size of the range to search | + + + + + + + + +### QueryNeededSubmissionSeqsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seqs` | [uint64](#uint64) | repeated | | + + + + + + + + +### QueryNextSeqSendRequest + + + + + + + + + +### QueryNextSeqSendResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | + + + + + + + + +### QueryOperatorsRequest + + + + + + + + + +### QueryOperatorsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operators` | [string](#string) | repeated | | + + + + + + + + +### QueryParamsRequest + + + + + + + + + +### QueryParamsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#lbm.fbridge.v1.Params) | | | + + + + + + + + +### QueryProposalRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [string](#string) | | the proposal id | + + + + + + + + +### QueryProposalResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal` | [RoleProposal](#lbm.fbridge.v1.RoleProposal) | | | + + + + + + + + +### QueryProposalsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryProposalsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposals` | [RoleProposal](#lbm.fbridge.v1.RoleProposal) | repeated | | + + + + + + + + +### QuerySubmittedProvisionRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the address of the operator | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### QuerySubmittedProvisionResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [ProvisionData](#lbm.fbridge.v1.ProvisionData) | | | +| `status` | [ProvisionStatus](#lbm.fbridge.v1.ProvisionStatus) | | | + + + + + + + + + + + + + + +### Query + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Params` | [QueryParamsRequest](#lbm.fbridge.v1.QueryParamsRequest) | [QueryParamsResponse](#lbm.fbridge.v1.QueryParamsResponse) | Params queries the parameters of x/fbridge module. | GET|/lbm/fbridge/v1/params| +| `NextSeqSend` | [QueryNextSeqSendRequest](#lbm.fbridge.v1.QueryNextSeqSendRequest) | [QueryNextSeqSendResponse](#lbm.fbridge.v1.QueryNextSeqSendResponse) | NextSeqSend queries the sequence of next bridge request | GET|/lbm/fbridge/v1/nextseq_send| +| `GreatestSeqByOperator` | [QueryGreatestSeqByOperatorRequest](#lbm.fbridge.v1.QueryGreatestSeqByOperatorRequest) | [QueryGreatestSeqByOperatorResponse](#lbm.fbridge.v1.QueryGreatestSeqByOperatorResponse) | GreatestSeqByOperator queries a greatest sequence number confirmed by a particular operator | GET|/lbm/fbridge/v1/operators/{operator}/seq| +| `GreatestConsecutiveConfirmedSeq` | [QueryGreatestConsecutiveConfirmedSeqRequest](#lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqRequest) | [QueryGreatestConsecutiveConfirmedSeqResponse](#lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqResponse) | GreatestConsecutiveConfirmedSeq queries a greatest consecutive sequence number confirmed by n-of-m operators | GET|/lbm/fbridge/v1/greatest_confirmed_seq| +| `SubmittedProvision` | [QuerySubmittedProvisionRequest](#lbm.fbridge.v1.QuerySubmittedProvisionRequest) | [QuerySubmittedProvisionResponse](#lbm.fbridge.v1.QuerySubmittedProvisionResponse) | SubmittedProvision queries a provision submitted by a particular operator | GET|/lbm/fbridge/v1/operators/{operator}/provision/{seq}| +| `ConfirmedProvision` | [QueryConfirmedProvisionRequest](#lbm.fbridge.v1.QueryConfirmedProvisionRequest) | [QueryConfirmedProvisionResponse](#lbm.fbridge.v1.QueryConfirmedProvisionResponse) | ConfirmedProvision queries a particular sequence of confirmed provisions | GET|/lbm/fbridge/v1/provision/{seq}| +| `NeededSubmissionSeqs` | [QueryNeededSubmissionSeqsRequest](#lbm.fbridge.v1.QueryNeededSubmissionSeqsRequest) | [QueryNeededSubmissionSeqsResponse](#lbm.fbridge.v1.QueryNeededSubmissionSeqsResponse) | NeededSubmissionSeqs queries a list of sequence numbers that need to be submitted by a particular operator The search scope is [greatest_consecutive_seq_by_operator, min(greatest_consecutive_seq_by_operator + range, greatest_seq_by_operator)] greatest_consecutive_seq_by_operator can be replaced with greatest_consecutive_seq if the operator is newly added | GET|/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs| +| `Commitments` | [QueryCommitmentsRequest](#lbm.fbridge.v1.QueryCommitmentsRequest) | [QueryCommitmentsResponse](#lbm.fbridge.v1.QueryCommitmentsResponse) | Commitments queries commitments of a specific sequence number | GET|/lbm/fbridge/v1/commitments/{seq}| +| `Guardians` | [QueryGuardiansRequest](#lbm.fbridge.v1.QueryGuardiansRequest) | [QueryGuardiansResponse](#lbm.fbridge.v1.QueryGuardiansResponse) | Guardians queries a list of Guardians registered on the bridge | GET|/lbm/fbridge/v1/guardians| +| `Operators` | [QueryOperatorsRequest](#lbm.fbridge.v1.QueryOperatorsRequest) | [QueryOperatorsResponse](#lbm.fbridge.v1.QueryOperatorsResponse) | Operators queries a list of Operators registered on the bridge | GET|/lbm/fbridge/v1/operators| +| `Judges` | [QueryJudgesRequest](#lbm.fbridge.v1.QueryJudgesRequest) | [QueryJudgesResponse](#lbm.fbridge.v1.QueryJudgesResponse) | Judges queries a list of Judges registered on the bridge | GET|/lbm/fbridge/v1/judges| +| `Proposals` | [QueryProposalsRequest](#lbm.fbridge.v1.QueryProposalsRequest) | [QueryProposalsResponse](#lbm.fbridge.v1.QueryProposalsResponse) | Proposals queries a list of SuggestRole Proposals | GET|/lbm/fbridge/v1/role/proposals| +| `Proposal` | [QueryProposalRequest](#lbm.fbridge.v1.QueryProposalRequest) | [QueryProposalResponse](#lbm.fbridge.v1.QueryProposalResponse) | Proposal queries a SuggestRole Proposal | GET|/lbm/fbridge/v1/role/proposals/{proposal_id}| + + + + + + + + +## lbm/fbridge/v1/tx.proto + + + + + +### MsgAddVoteForRole + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the guardian address | +| `proposal_id` | [uint64](#uint64) | | the proposal ID | +| `option` | [bool](#bool) | | the vote option - yes : true - no : false | + + + + + + + + +### MsgAddVoteForRoleResponse + + + + + + + + + +### MsgClaim +MsgClaim is input values required for claiming a provision + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the claimer address | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### MsgClaimBatch +MsgClaimBatch is input values required for claiming multiple claimable provisions + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the claimer address | +| `max_claims` | [uint64](#uint64) | | the maximum number of claims to be made at once | + + + + + + + + +### MsgClaimBatchResponse + + + + + + + + + +### MsgClaimResponse + + + + + + + + + +### MsgHalt +MsgHalt is input values required for halting the bridge module + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `guardian` | [string](#string) | | the guardian address | + + + + + + + + +### MsgHaltResponse + + + + + + + + + +### MsgHoldTransfer +MsgHoldTransfer is input values required for holding transfer + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the judge address | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### MsgHoldTransferResponse + + + + + + + + + +### MsgProvision +MsgProvision is input values required for provisioning + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the operator address | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | +| `sender` | [string](#string) | | the sender address on the source chain | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `amount` | [string](#string) | | the amount of token to be claimed | + + + + + + + + +### MsgProvisionResponse + + + + + + + + + +### MsgReleaseTransfer +MsgReleaseTransfer is input values required for releasing a held transfer by time lock + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the guardian address | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### MsgReleaseTransferResponse + + + + + + + + + +### MsgRemoveProvision +MsgRemoveProvision is input values required for removing a specific confirmed provision + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the judge address | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### MsgRemoveProvisionResponse + + + + + + + + + +### MsgResume +MsgResume is input values required for resuming the bridge module + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the guardian address | + + + + + + + + +### MsgResumeResponse + + + + + + + + + +### MsgSuggestRole +MsgUpdateRole is input values required for updating the role of an address + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the guardian address | +| `target` | [string](#string) | | the address to update the role | +| `role` | [Role](#lbm.fbridge.v1.Role) | | the role to be updated - unspecified : 0, used to remove the address from a group - guardian : 1 - operator : 2 - judge : 3 | + + + + + + + + +### MsgSuggestRoleResponse + + + + + + + + + +### MsgTransfer +MsgTransfer is input values required for bridge transfer + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | the sender address on the source chain | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `amount` | [string](#string) | | the amount of token to be transferred | + + + + + + + + +### MsgTransferResponse + + + + + + + + + + + + + + + +### Msg + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Transfer` | [MsgTransfer](#lbm.fbridge.v1.MsgTransfer) | [MsgTransferResponse](#lbm.fbridge.v1.MsgTransferResponse) | Submit a transfer request to the bridge module. | | +| `Provision` | [MsgProvision](#lbm.fbridge.v1.MsgProvision) | [MsgProvisionResponse](#lbm.fbridge.v1.MsgProvisionResponse) | Submit a provision to the bridge module. | | +| `HoldTransfer` | [MsgHoldTransfer](#lbm.fbridge.v1.MsgHoldTransfer) | [MsgHoldTransferResponse](#lbm.fbridge.v1.MsgHoldTransferResponse) | Set the time lock value from default value to uint64.max for specific confirmed provision. | | +| `ReleaseTransfer` | [MsgReleaseTransfer](#lbm.fbridge.v1.MsgReleaseTransfer) | [MsgReleaseTransferResponse](#lbm.fbridge.v1.MsgReleaseTransferResponse) | Set the time lock value to 0 for specific confirmed provision. | | +| `RemoveProvision` | [MsgRemoveProvision](#lbm.fbridge.v1.MsgRemoveProvision) | [MsgRemoveProvisionResponse](#lbm.fbridge.v1.MsgRemoveProvisionResponse) | Remove a specific confirmed provision (reset for specific sequence number). | | +| `ClaimBatch` | [MsgClaimBatch](#lbm.fbridge.v1.MsgClaimBatch) | [MsgClaimBatchResponse](#lbm.fbridge.v1.MsgClaimBatchResponse) | ClaimBatch processes the claiming of multiple claimable provisions in a single operation | | +| `Claim` | [MsgClaim](#lbm.fbridge.v1.MsgClaim) | [MsgClaimResponse](#lbm.fbridge.v1.MsgClaimResponse) | Claim processes the claiming of a provision with a specific sequence number | | +| `SuggestRole` | [MsgSuggestRole](#lbm.fbridge.v1.MsgSuggestRole) | [MsgSuggestRoleResponse](#lbm.fbridge.v1.MsgSuggestRoleResponse) | SuggestRole suggests updating the role of an address in the bridge module. The role can be one of the following: guardian, operator, judge. The proposal will be passed only with the consent of +2/3 Guardian members. | | +| `AddVoteForRole` | [MsgAddVoteForRole](#lbm.fbridge.v1.MsgAddVoteForRole) | [MsgAddVoteForRoleResponse](#lbm.fbridge.v1.MsgAddVoteForRoleResponse) | AddVoteForRole adds a vote for a role change proposal. | | +| `Halt` | [MsgHalt](#lbm.fbridge.v1.MsgHalt) | [MsgHaltResponse](#lbm.fbridge.v1.MsgHaltResponse) | Halt the bridge module. | | +| `Resume` | [MsgResume](#lbm.fbridge.v1.MsgResume) | [MsgResumeResponse](#lbm.fbridge.v1.MsgResumeResponse) | Resume the bridge module. | | + + + + + diff --git a/proto/lbm/fbridge/v1/event.proto b/proto/lbm/fbridge/v1/event.proto new file mode 100644 index 0000000000..e7594d4dc8 --- /dev/null +++ b/proto/lbm/fbridge/v1/event.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +message EventTransfer { + // the sequence number of the bridge request + uint64 seq = 1; + // the sender address on the source chain + string sender = 2; + // the recipient address on the destination chain + string receiver = 3; + // the amount of token to be transferred + string amount = 4; +} + +message EventProvision { + // the sequence number of the bridge request + uint64 seq = 1; + // the sender address on the source chain + string sender = 2; + // the recipient address on the destination chain + string receiver = 3; + // the amount of token to be claimed + string amount = 4; + // the address of the operator + string operator = 5; +} + +message EventConfirmProvision { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message EventClaim { + // the sequence number of the bridge request + uint64 seq = 1; + // the sender address on the source chain + string sender = 2; + // the recipient address on the destination chain + string receiver = 3; + // the amount of token to be claimed + string amount = 4; +} diff --git a/proto/lbm/fbridge/v1/fbridge.proto b/proto/lbm/fbridge/v1/fbridge.proto new file mode 100644 index 0000000000..58b1054ef3 --- /dev/null +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +import "gogoproto/gogo.proto"; + +message Params { + // ratio of how many operators' confirmations are needed to be valid. + Fraction operator_trust_level = 1; + // ratio of how many guardians' confirmations are needed to be valid. + Fraction guardian_trust_level = 2; + // ratio of how many judges' confirmations are needed to be valid. + Fraction judge_trust_level = 3; + // default timelock period for each provision (unix timestamp) + uint64 timelock_period = 4; + // default period of the proposal to update the role + uint64 proposal_period = 5; +} + +// Provision is a struct that represents a provision internally. +message ProvisionData { + // the sequence number of the bridge request + uint64 seq = 1; + // the amount of token to be claimed + string amount = 2 + [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; + // the sender address on the source chain + string sender = 3; + // the recipient address on the destination chain + string receiver = 4; +} + +// ProvisionStatus is a struct that represents the status of a provision. +// To optimize computational cost, we have collected frequently changing values from provision. +message ProvisionStatus { + // the unix timestamp the provision will be able to be claimed (unix timestamp) + uint64 timelock_end = 1; + // a value that tells how many operators have submitted this provision + int32 confirm_counts = 2; + // whether the provision has been claimed + bool is_claimed = 3; +} + +// Fraction defines the protobuf message type for tmmath.Fraction that only +// supports positive values. +message Fraction { + uint64 numerator = 1; + uint64 denominator = 2; +} + +// Role defines the role of the operator, guardian, and judge. +enum Role { + UNSPECIFIED = 0; + GUARDIAN = 1; + OPERATOR = 2; + JUDGE = 3; +} + +message RoleProposal { + uint64 id = 1; + // the proposer address + string proposer = 2; + // the address to update the role + string target = 3; + // the role to be updated + // - unspecified : 0, used to remove the address from a group + // - guardian : 1 + // - operator : 2 + // - judge : 3 + Role role = 4; + + // the unix timestamp the proposal will be expired (unix timestamp) + uint64 expired_at = 5; +} \ No newline at end of file diff --git a/proto/lbm/fbridge/v1/genesis.proto b/proto/lbm/fbridge/v1/genesis.proto new file mode 100644 index 0000000000..087d1acca9 --- /dev/null +++ b/proto/lbm/fbridge/v1/genesis.proto @@ -0,0 +1,81 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +import "gogoproto/gogo.proto"; +import "lbm/fbridge/v1/fbridge.proto"; + +// GenesisState defines the fbridge module's genesis state. +message GenesisState { + // params defines all the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + // sending_state defines status saved when sending tokens to a counterpart chain + SendingState sending_state = 2 [(gogoproto.nullable) = false]; + // receiving_state defines status saved when receiving tokens from a counterpart chain + ReceivingState receiving_state = 3 [(gogoproto.nullable) = false]; +} + +message SendingState { + option (gogoproto.goproto_getters) = false; + + // the next sequence number of the bridge request (greatest sequence number + 1) + uint64 next_seq = 1; + // sequence-per-block number mapping + repeated BlockSeqInfo seq_to_blocknum = 2; +} + +message BlockSeqInfo { + uint64 seq = 1; + uint64 blocknum = 2; +} + +message ReceivingState { + option (gogoproto.goproto_getters) = false; + + // the greatest consecutive sequence number confirmed by each operator + repeated OperatorSeqInfo greatest_consecutive_seq_by_operator = 1; + // the greatest sequence number confirmed by each operator + repeated OperatorSeqInfo greatest_seq_by_operator = 2; + // the greatest consecutive sequence numbers confirmed by n-of-m operators + // consecutiveness is judged starting from the number closest to 0. + uint64 greatest_consecutive_seq = 3; + // the set of sequence numbers to be claimed + repeated uint64 pending_claim_seqs = 4; + // commitment is the hash value of a specific provision. + repeated Commitment commitments = 6; + // provision associated with a specific commitment. + repeated Provision provisions = 7; + // map the sequence number confirmed by n-of-m operators with commitment + repeated ConfirmedProvision confirmed_seq_to_commitment = 8; +} + +message OperatorSeqInfo { + // the operator address + string operator = 1; + // the sequence number + uint64 seq = 2; +} + +message Commitment { + // the operator address + string operator = 1; + // the sequence number of the bridge request + uint64 seq = 2; + // commitment is the hash value of a provision + string commitment = 3; +} + +message Provision { + string commitment = 1; + ProvisionData data = 2; + ProvisionStatus status = 3; +} + +message ConfirmedProvision { + // the sequence number of the bridge request + uint64 seq = 1; + + // commitment is the hash value of a provision + string commitment = 2; +} diff --git a/proto/lbm/fbridge/v1/query.proto b/proto/lbm/fbridge/v1/query.proto new file mode 100644 index 0000000000..900aac4e8b --- /dev/null +++ b/proto/lbm/fbridge/v1/query.proto @@ -0,0 +1,185 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "lbm/fbridge/v1/fbridge.proto"; + +service Query { + // Params queries the parameters of x/fbridge module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/params"; + } + + // NextSeqSend queries the sequence of next bridge request + rpc NextSeqSend(QueryNextSeqSendRequest) returns (QueryNextSeqSendResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/nextseq_send"; + } + + // GreatestSeqByOperator queries a greatest sequence number confirmed by a particular operator + rpc GreatestSeqByOperator(QueryGreatestSeqByOperatorRequest) returns (QueryGreatestSeqByOperatorResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/seq"; + } + + // GreatestConsecutiveConfirmedSeq queries a greatest consecutive sequence number confirmed by n-of-m operators + rpc GreatestConsecutiveConfirmedSeq(QueryGreatestConsecutiveConfirmedSeqRequest) + returns (QueryGreatestConsecutiveConfirmedSeqResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/greatest_confirmed_seq"; + } + + // SubmittedProvision queries a provision submitted by a particular operator + rpc SubmittedProvision(QuerySubmittedProvisionRequest) returns (QuerySubmittedProvisionResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/provision/{seq}"; + } + + // ConfirmedProvision queries a particular sequence of confirmed provisions + rpc ConfirmedProvision(QueryConfirmedProvisionRequest) returns (QueryConfirmedProvisionResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/provision/{seq}"; + } + + // NeededSubmissionSeqs queries a list of sequence numbers that need to be submitted by a particular operator + // The search scope is [greatest_consecutive_seq_by_operator, min(greatest_consecutive_seq_by_operator + range, + // greatest_seq_by_operator)] greatest_consecutive_seq_by_operator can be replaced with greatest_consecutive_seq if + // the operator is newly added + rpc NeededSubmissionSeqs(QueryNeededSubmissionSeqsRequest) returns (QueryNeededSubmissionSeqsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs"; + } + + // Commitments queries commitments of a specific sequence number + rpc Commitments(QueryCommitmentsRequest) returns (QueryCommitmentsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/commitments/{seq}"; + } + + // Guardians queries a list of Guardians registered on the bridge + rpc Guardians(QueryGuardiansRequest) returns (QueryGuardiansResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/guardians"; + } + + // Operators queries a list of Operators registered on the bridge + rpc Operators(QueryOperatorsRequest) returns (QueryOperatorsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/operators"; + } + + // Judges queries a list of Judges registered on the bridge + rpc Judges(QueryJudgesRequest) returns (QueryJudgesResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/judges"; + } + + // Proposals queries a list of SuggestRole Proposals + rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/role/proposals"; + } + + // Proposal queries a SuggestRole Proposal + rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/role/proposals/{proposal_id}"; + } +} + +message QueryParamsRequest {} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +message QueryNextSeqSendRequest {} + +message QueryNextSeqSendResponse { + uint64 seq = 1; +} + +message QueryGreatestSeqByOperatorRequest { + // the address of the operator + string operator = 1; +} + +message QueryGreatestSeqByOperatorResponse { + uint64 seq = 1; +} + +message QueryGreatestConsecutiveConfirmedSeqRequest {} + +message QueryGreatestConsecutiveConfirmedSeqResponse { + uint64 seq = 1; +} + +message QuerySubmittedProvisionRequest { + // the address of the operator + string operator = 1; + // the sequence number of the bridge request + uint64 seq = 2; +} + +message QuerySubmittedProvisionResponse { + ProvisionData data = 1 [(gogoproto.nullable) = false]; + ProvisionStatus status = 2 [(gogoproto.nullable) = false]; +} + +message QueryNeededSubmissionSeqsRequest { + // the address of the operator + string operator = 1; + // range specifies the size of the range to search + uint64 range = 2; +} + +message QueryNeededSubmissionSeqsResponse { + repeated uint64 seqs = 1; +} + +message QueryConfirmedProvisionRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message QueryConfirmedProvisionResponse { + ProvisionData data = 1 [(gogoproto.nullable) = false]; + ProvisionStatus status = 2 [(gogoproto.nullable) = false]; +} + +message QueryCommitmentsRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message QueryCommitmentsResponse { + repeated string commitments = 1; +} + +message QueryGuardiansRequest {} + +message QueryGuardiansResponse { + repeated string guardians = 1; +} + +message QueryOperatorsRequest {} + +message QueryOperatorsResponse { + repeated string operators = 1; +} + +message QueryJudgesRequest {} + +message QueryJudgesResponse { + repeated string judges = 1; +} + +message QueryProposalsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryProposalsResponse { + repeated RoleProposal proposals = 1; +} + +message QueryProposalRequest { + // the proposal id + string proposal_id = 1; +} + +message QueryProposalResponse { + RoleProposal proposal = 1; +} \ No newline at end of file diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto new file mode 100644 index 0000000000..8b114a8645 --- /dev/null +++ b/proto/lbm/fbridge/v1/tx.proto @@ -0,0 +1,169 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +import "gogoproto/gogo.proto"; +import "lbm/fbridge/v1/fbridge.proto"; + +service Msg { + // Submit a transfer request to the bridge module. + rpc Transfer(MsgTransfer) returns (MsgTransferResponse); + + // Submit a provision to the bridge module. + rpc Provision(MsgProvision) returns (MsgProvisionResponse); + + // Set the time lock value from default value to uint64.max for specific confirmed provision. + rpc HoldTransfer(MsgHoldTransfer) returns (MsgHoldTransferResponse); + + // Set the time lock value to 0 for specific confirmed provision. + rpc ReleaseTransfer(MsgReleaseTransfer) returns (MsgReleaseTransferResponse); + + // Remove a specific confirmed provision (reset for specific sequence number). + rpc RemoveProvision(MsgRemoveProvision) returns (MsgRemoveProvisionResponse); + + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + rpc ClaimBatch(MsgClaimBatch) returns (MsgClaimBatchResponse); + + // Claim processes the claiming of a provision with a specific sequence number + rpc Claim(MsgClaim) returns (MsgClaimResponse); + + // SuggestRole suggests updating the role of an address in the bridge module. + // The role can be one of the following: guardian, operator, judge. + // The proposal will be passed only with the consent of +2/3 Guardian members. + rpc SuggestRole(MsgSuggestRole) returns (MsgSuggestRoleResponse); + + // AddVoteForRole adds a vote for a role change proposal. + rpc AddVoteForRole(MsgAddVoteForRole) returns (MsgAddVoteForRoleResponse); + + // Halt the bridge module. + rpc Halt(MsgHalt) returns (MsgHaltResponse); + + // Resume the bridge module. + rpc Resume(MsgResume) returns (MsgResumeResponse); +} + +// MsgTransfer is input values required for bridge transfer +message MsgTransfer { + // the sender address on the source chain + string sender = 1; + // the recipient address on the destination chain + string receiver = 2; + // the amount of token to be transferred + string amount = 3 + [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; +} + +message MsgTransferResponse {} + +// MsgProvision is input values required for provisioning +message MsgProvision { + // the operator address + string from = 1; + // the sequence number of the bridge request + uint64 seq = 2; + // the sender address on the source chain + string sender = 3; + // the recipient address on the destination chain + string receiver = 4; + // the amount of token to be claimed + string amount = 5 + [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; +} + +message MsgProvisionResponse {} + +// MsgHoldTransfer is input values required for holding transfer +message MsgHoldTransfer { + // the judge address + string from = 1; + // the sequence number of the bridge request + uint64 seq = 2; +} + +message MsgHoldTransferResponse {} + +// MsgReleaseTransfer is input values required for releasing a held transfer by time lock +message MsgReleaseTransfer { + // the guardian address + string from = 1; + // the sequence number of the bridge request + uint64 seq = 2; +} + +message MsgReleaseTransferResponse {} + +// MsgRemoveProvision is input values required for removing a specific confirmed provision +message MsgRemoveProvision { + // the judge address + string from = 1; + // the sequence number of the bridge request + uint64 seq = 2; +} + +message MsgRemoveProvisionResponse {} + +// MsgClaimBatch is input values required for claiming multiple claimable provisions +message MsgClaimBatch { + // the claimer address + string from = 1; + // the maximum number of claims to be made at once + uint64 max_claims = 2; +} + +message MsgClaimBatchResponse {} + +// MsgClaim is input values required for claiming a provision +message MsgClaim { + // the claimer address + string from = 1; + // the sequence number of the bridge request + uint64 seq = 2; +} + +message MsgClaimResponse {} + +// MsgUpdateRole is input values required for updating the role of an address +message MsgSuggestRole { + // the guardian address + string from = 1; + // the address to update the role + string target = 2; + // the role to be updated + // - unspecified : 0, used to remove the address from a group + // - guardian : 1 + // - operator : 2 + // - judge : 3 + Role role = 3; +} + +message MsgSuggestRoleResponse {} + +message MsgAddVoteForRole { + // the guardian address + string from = 1; + // the proposal ID + uint64 proposal_id = 2; + // the vote option + // - yes : true + // - no : false + bool option = 3; +} + +message MsgAddVoteForRoleResponse {} + +// MsgHalt is input values required for halting the bridge module +message MsgHalt { + // the guardian address + string guardian = 1; +} + +message MsgHaltResponse {} + +// MsgResume is input values required for resuming the bridge module +message MsgResume { + // the guardian address + string from = 1; +} + +message MsgResumeResponse {} diff --git a/x/fbridge/client/cli/query.go b/x/fbridge/client/cli/query.go new file mode 100644 index 0000000000..6ef6d0424a --- /dev/null +++ b/x/fbridge/client/cli/query.go @@ -0,0 +1,18 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +func NewQueryCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for the fbridge module", + } + + cmd.AddCommand() + + return cmd +} diff --git a/x/fbridge/client/cli/tx.go b/x/fbridge/client/cli/tx.go new file mode 100644 index 0000000000..ef9ef1f04c --- /dev/null +++ b/x/fbridge/client/cli/tx.go @@ -0,0 +1,23 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/Finschia/finschia-sdk/client" + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +// GetTxCmd returns the transaction commands for this module +func NewTxCmd() *cobra.Command { + TxCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "fbridge transactions subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + TxCmd.AddCommand() + + return TxCmd +} diff --git a/x/fbridge/keeper/genesis.go b/x/fbridge/keeper/genesis.go new file mode 100644 index 0000000000..42ffc544d4 --- /dev/null +++ b/x/fbridge/keeper/genesis.go @@ -0,0 +1,14 @@ +package keeper + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +func (k Keeper) InitGenesis(ctx sdk.Context, gs *types.GenesisState) error { + return nil +} + +func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + return nil +} diff --git a/x/fbridge/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go new file mode 100644 index 0000000000..c157e03e30 --- /dev/null +++ b/x/fbridge/keeper/grpc_query.go @@ -0,0 +1,61 @@ +package keeper + +import ( + "context" + + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +var _ types.QueryServer = Keeper{} + +func (k Keeper) Params(ctx context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + panic("implement me") +} + +func (k Keeper) NextSeqSend(ctx context.Context, request *types.QueryNextSeqSendRequest) (*types.QueryNextSeqSendResponse, error) { + panic("implement me") +} + +func (k Keeper) GreatestSeqByOperator(ctx context.Context, request *types.QueryGreatestSeqByOperatorRequest) (*types.QueryGreatestSeqByOperatorResponse, error) { + panic("implement me") +} + +func (k Keeper) GreatestConsecutiveConfirmedSeq(ctx context.Context, request *types.QueryGreatestConsecutiveConfirmedSeqRequest) (*types.QueryGreatestConsecutiveConfirmedSeqResponse, error) { + panic("implement me") +} + +func (k Keeper) SubmittedProvision(ctx context.Context, request *types.QuerySubmittedProvisionRequest) (*types.QuerySubmittedProvisionResponse, error) { + panic("implement me") +} + +func (k Keeper) ConfirmedProvision(ctx context.Context, request *types.QueryConfirmedProvisionRequest) (*types.QueryConfirmedProvisionResponse, error) { + panic("implement me") +} + +func (k Keeper) NeededSubmissionSeqs(ctx context.Context, request *types.QueryNeededSubmissionSeqsRequest) (*types.QueryNeededSubmissionSeqsResponse, error) { + panic("implement me") +} + +func (k Keeper) Commitments(ctx context.Context, request *types.QueryCommitmentsRequest) (*types.QueryCommitmentsResponse, error) { + panic("implement me") +} + +func (k Keeper) Guardians(ctx context.Context, request *types.QueryGuardiansRequest) (*types.QueryGuardiansResponse, error) { + panic("implement me") +} + +func (k Keeper) Operators(ctx context.Context, request *types.QueryOperatorsRequest) (*types.QueryOperatorsResponse, error) { + panic("implement me") +} + +func (k Keeper) Judges(ctx context.Context, request *types.QueryJudgesRequest) (*types.QueryJudgesResponse, error) { + panic("implement me") +} + +func (k Keeper) Proposals(ctx context.Context, request *types.QueryProposalsRequest) (*types.QueryProposalsResponse, error) { + panic("implement me") +} + +func (k Keeper) Proposal(ctx context.Context, request *types.QueryProposalRequest) (*types.QueryProposalResponse, error) { + panic("implement me") +} diff --git a/x/fbridge/keeper/keeper.go b/x/fbridge/keeper/keeper.go new file mode 100644 index 0000000000..d22a739529 --- /dev/null +++ b/x/fbridge/keeper/keeper.go @@ -0,0 +1,3 @@ +package keeper + +type Keeper struct{} diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go new file mode 100644 index 0000000000..58d79ed1b1 --- /dev/null +++ b/x/fbridge/keeper/msg_server.go @@ -0,0 +1,61 @@ +package keeper + +import ( + "context" + + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +type msgServer struct { + Keeper +} + +var _ types.MsgServer = msgServer{} + +func NewMsgServer(k Keeper) types.MsgServer { + return &msgServer{k} +} + +func (m msgServer) Transfer(ctx context.Context, transfer *types.MsgTransfer) (*types.MsgTransferResponse, error) { + panic("implement me") +} + +func (m msgServer) Provision(ctx context.Context, provision *types.MsgProvision) (*types.MsgProvisionResponse, error) { + panic("implement me") +} + +func (m msgServer) HoldTransfer(ctx context.Context, transfer *types.MsgHoldTransfer) (*types.MsgHoldTransferResponse, error) { + panic("implement me") +} + +func (m msgServer) ReleaseTransfer(ctx context.Context, transfer *types.MsgReleaseTransfer) (*types.MsgReleaseTransferResponse, error) { + panic("implement me") +} + +func (m msgServer) RemoveProvision(ctx context.Context, provision *types.MsgRemoveProvision) (*types.MsgRemoveProvisionResponse, error) { + panic("implement me") +} + +func (m msgServer) ClaimBatch(ctx context.Context, batch *types.MsgClaimBatch) (*types.MsgClaimBatchResponse, error) { + panic("implement me") +} + +func (m msgServer) Claim(ctx context.Context, claim *types.MsgClaim) (*types.MsgClaimResponse, error) { + panic("implement me") +} + +func (m msgServer) SuggestRole(ctx context.Context, role *types.MsgSuggestRole) (*types.MsgSuggestRoleResponse, error) { + panic("implement me") +} + +func (m msgServer) AddVoteForRole(ctx context.Context, role *types.MsgAddVoteForRole) (*types.MsgAddVoteForRoleResponse, error) { + panic("implement me") +} + +func (m msgServer) Halt(ctx context.Context, halt *types.MsgHalt) (*types.MsgHaltResponse, error) { + panic("implement me") +} + +func (m msgServer) Resume(ctx context.Context, resume *types.MsgResume) (*types.MsgResumeResponse, error) { + panic("implement me") +} diff --git a/x/fbridge/module/module.go b/x/fbridge/module/module.go new file mode 100644 index 0000000000..e7f7cfc28c --- /dev/null +++ b/x/fbridge/module/module.go @@ -0,0 +1,164 @@ +package module + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + abci "github.com/tendermint/tendermint/abci/types" + + sdkclient "github.com/Finschia/finschia-sdk/client" + "github.com/Finschia/finschia-sdk/codec" + codectypes "github.com/Finschia/finschia-sdk/codec/types" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/types/module" + "github.com/Finschia/finschia-sdk/x/fbridge/client/cli" + "github.com/Finschia/finschia-sdk/x/fbridge/keeper" + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +const ( + consensusVersion uint64 = 1 +) + +var ( + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleGenesis = AppModule{} + _ module.AppModule = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the fbridge module. +type AppModuleBasic struct{} + +// Name returns the ModuleName +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec registers the fbridge types on the LegacyAmino codec +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} + +// DefaultGenesis returns default genesis state as raw bytes for the fbridge +// module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesisState()) +} + +// ValidateGenesis performs genesis state validation for the fbridge module. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { + var data types.GenesisState + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return types.ValidateGenesis(data) +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the fbridge module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// GetQueryCmd returns the cli query commands for this module +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.NewQueryCmd() +} + +// GetTxCmd returns the transaction commands for this module +func (AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd() +} + +func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// ____________________________________________________________________________ + +// AppModule implements an application module for the fbridge module. +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper +} + +// NewAppModule creates a new AppModule object +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { + return AppModule{ + keeper: keeper, + } +} + +// RegisterServices registers a GRPC query service to respond to the +// module-specific GRPC queries. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServer(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), am.keeper) +} + +// InitGenesis performs genesis initialization for the fbridge module. It returns +// no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { + var genesisState types.GenesisState + cdc.MustUnmarshalJSON(data, &genesisState) + if err := am.keeper.InitGenesis(ctx, &genesisState); err != nil { + panic(err) + } + return []abci.ValidatorUpdate{} +} + +// ExportGenesis returns the exported genesis state as raw bytes for the fbridge +// module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + gs := am.keeper.ExportGenesis(ctx) + return cdc.MustMarshalJSON(gs) +} + +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return consensusVersion } + +// RegisterInvariants does nothing, there are no invariants to enforce +func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { + _ = ir +} + +// Deprecated: Route does nothing. +func (am AppModule) Route() sdk.Route { return sdk.NewRoute("", nil) } + +// Deprecated: QuerierRoute does nothing. +func (am AppModule) QuerierRoute() string { return "" } + +// Deprecated: LegacyQuerierHandler does nothing. +func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { return nil } + +// ____________________________________________________________________________ + +// AppModuleSimulation functions + +// // GenerateGenesisState creates a randomized GenState of the fbridge module. +// func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +// simulation.RandomizedGenState(simState) +// } + +// // ProposalContents returns all the fbridge content functions used to +// // simulate fbridge proposals. +// func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +// return simulation.ProposalContents() +// } + +// // RegisterStoreDecoder registers a decoder for fbridge module's types +// func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +// sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +// } + +//// WeightedOperations returns the all the gov module operations with their respective weights. +// func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +// return simulation.WeightedOperations( +// simState.AppParams, simState.Cdc, simState.TxConfig, +// am.accountKeeper, am.bankKeeper, am.keeper, +// ) +//} diff --git a/x/fbridge/types/codec.go b/x/fbridge/types/codec.go new file mode 100644 index 0000000000..c2edd215be --- /dev/null +++ b/x/fbridge/types/codec.go @@ -0,0 +1,63 @@ +package types + +import ( + "github.com/Finschia/finschia-sdk/codec" + "github.com/Finschia/finschia-sdk/codec/legacy" + "github.com/Finschia/finschia-sdk/codec/types" + cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/types/msgservice" + authzcodec "github.com/Finschia/finschia-sdk/x/authz/codec" + fdncodec "github.com/Finschia/finschia-sdk/x/foundation/codec" + govcodec "github.com/Finschia/finschia-sdk/x/gov/codec" +) + +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgTransfer{}, "lbm-sdk/MsgTransfer") + legacy.RegisterAminoMsg(cdc, &MsgProvision{}, "lbm-sdk/MsgProvision") + legacy.RegisterAminoMsg(cdc, &MsgHoldTransfer{}, "lbm-sdk/MsgHoldTransfer") + legacy.RegisterAminoMsg(cdc, &MsgReleaseTransfer{}, "lbm-sdk/MsgReleaseTransfer") + legacy.RegisterAminoMsg(cdc, &MsgRemoveProvision{}, "lbm-sdk/MsgRemoveProvision") + legacy.RegisterAminoMsg(cdc, &MsgClaimBatch{}, "lbm-sdk/MsgClaimBatch") + legacy.RegisterAminoMsg(cdc, &MsgClaim{}, "lbm-sdk/MsgClaim") + legacy.RegisterAminoMsg(cdc, &MsgSuggestRole{}, "lbm-sdk/MsgSuggestRole") + legacy.RegisterAminoMsg(cdc, &MsgAddVoteForRole{}, "lbm-sdk/MsgAddVoteForRole") + legacy.RegisterAminoMsg(cdc, &MsgHalt{}, "lbm-sdk/MsgHalt") + legacy.RegisterAminoMsg(cdc, &MsgResume{}, "lbm-sdk/MsgResume") +} + +func RegisterInterfaces(registrar types.InterfaceRegistry) { + registrar.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgTransfer{}, + &MsgProvision{}, + &MsgHoldTransfer{}, + &MsgReleaseTransfer{}, + &MsgRemoveProvision{}, + &MsgClaimBatch{}, + &MsgClaim{}, + &MsgSuggestRole{}, + &MsgAddVoteForRole{}, + &MsgHalt{}, + &MsgResume{}, + ) + + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) +} + +var ( + Amino = codec.NewLegacyAmino() + ModuleCdc = codec.NewAminoCodec(Amino) +) + +func init() { + cryptocodec.RegisterCrypto(Amino) + codec.RegisterEvidences(Amino) + sdk.RegisterLegacyAminoCodec(Amino) + + // Register all Amino interfaces and concrete types on the authz and gov Amino codec so that this can later be + // used to properly serialize MsgGrant, MsgExec and MsgSubmitProposal instances + RegisterLegacyAminoCodec(authzcodec.Amino) + RegisterLegacyAminoCodec(govcodec.Amino) + RegisterLegacyAminoCodec(fdncodec.Amino) +} diff --git a/x/fbridge/types/event.pb.go b/x/fbridge/types/event.pb.go new file mode 100644 index 0000000000..0749710deb --- /dev/null +++ b/x/fbridge/types/event.pb.go @@ -0,0 +1,1292 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/fbridge/v1/event.proto + +package types + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventTransfer struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // the sender address on the source chain + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // the recipient address on the destination chain + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + // the amount of token to be transferred + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventTransfer) Reset() { *m = EventTransfer{} } +func (m *EventTransfer) String() string { return proto.CompactTextString(m) } +func (*EventTransfer) ProtoMessage() {} +func (*EventTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_a36aa6e56f2275b8, []int{0} +} +func (m *EventTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTransfer.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 *EventTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransfer.Merge(m, src) +} +func (m *EventTransfer) XXX_Size() int { + return m.Size() +} +func (m *EventTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransfer proto.InternalMessageInfo + +func (m *EventTransfer) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *EventTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventTransfer) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventTransfer) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +type EventProvision struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // the sender address on the source chain + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // the recipient address on the destination chain + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + // the amount of token to be claimed + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // the address of the operator + Operator string `protobuf:"bytes,5,opt,name=operator,proto3" json:"operator,omitempty"` +} + +func (m *EventProvision) Reset() { *m = EventProvision{} } +func (m *EventProvision) String() string { return proto.CompactTextString(m) } +func (*EventProvision) ProtoMessage() {} +func (*EventProvision) Descriptor() ([]byte, []int) { + return fileDescriptor_a36aa6e56f2275b8, []int{1} +} +func (m *EventProvision) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventProvision.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 *EventProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventProvision.Merge(m, src) +} +func (m *EventProvision) XXX_Size() int { + return m.Size() +} +func (m *EventProvision) XXX_DiscardUnknown() { + xxx_messageInfo_EventProvision.DiscardUnknown(m) +} + +var xxx_messageInfo_EventProvision proto.InternalMessageInfo + +func (m *EventProvision) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *EventProvision) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventProvision) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventProvision) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func (m *EventProvision) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +type EventConfirmProvision struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *EventConfirmProvision) Reset() { *m = EventConfirmProvision{} } +func (m *EventConfirmProvision) String() string { return proto.CompactTextString(m) } +func (*EventConfirmProvision) ProtoMessage() {} +func (*EventConfirmProvision) Descriptor() ([]byte, []int) { + return fileDescriptor_a36aa6e56f2275b8, []int{2} +} +func (m *EventConfirmProvision) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConfirmProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConfirmProvision.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 *EventConfirmProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConfirmProvision.Merge(m, src) +} +func (m *EventConfirmProvision) XXX_Size() int { + return m.Size() +} +func (m *EventConfirmProvision) XXX_DiscardUnknown() { + xxx_messageInfo_EventConfirmProvision.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConfirmProvision proto.InternalMessageInfo + +func (m *EventConfirmProvision) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type EventClaim struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // the sender address on the source chain + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // the recipient address on the destination chain + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + // the amount of token to be claimed + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventClaim) Reset() { *m = EventClaim{} } +func (m *EventClaim) String() string { return proto.CompactTextString(m) } +func (*EventClaim) ProtoMessage() {} +func (*EventClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_a36aa6e56f2275b8, []int{3} +} +func (m *EventClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventClaim.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 *EventClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventClaim.Merge(m, src) +} +func (m *EventClaim) XXX_Size() int { + return m.Size() +} +func (m *EventClaim) XXX_DiscardUnknown() { + xxx_messageInfo_EventClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_EventClaim proto.InternalMessageInfo + +func (m *EventClaim) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *EventClaim) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventClaim) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventClaim) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func init() { + proto.RegisterType((*EventTransfer)(nil), "lbm.fbridge.v1.EventTransfer") + proto.RegisterType((*EventProvision)(nil), "lbm.fbridge.v1.EventProvision") + proto.RegisterType((*EventConfirmProvision)(nil), "lbm.fbridge.v1.EventConfirmProvision") + proto.RegisterType((*EventClaim)(nil), "lbm.fbridge.v1.EventClaim") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/event.proto", fileDescriptor_a36aa6e56f2275b8) } + +var fileDescriptor_a36aa6e56f2275b8 = []byte{ + // 276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x91, 0xbd, 0x4e, 0xc3, 0x30, + 0x10, 0xc7, 0x63, 0x5a, 0x2a, 0xb0, 0x44, 0x85, 0x22, 0x81, 0xa2, 0x0e, 0x56, 0x95, 0xa9, 0x0c, + 0xc4, 0x54, 0xbc, 0x01, 0x08, 0x06, 0x26, 0x54, 0x31, 0xb1, 0xe5, 0xe3, 0xd2, 0x1a, 0x62, 0x3b, + 0x9c, 0x5d, 0x0b, 0x5e, 0x81, 0x89, 0xc7, 0x62, 0xec, 0xc8, 0x88, 0x92, 0x17, 0x41, 0xf9, 0xa0, + 0x63, 0xb7, 0x6e, 0xf7, 0xd3, 0xff, 0x7e, 0xba, 0xbf, 0x74, 0x74, 0x52, 0x24, 0x92, 0xe7, 0x09, + 0x8a, 0x6c, 0x09, 0xdc, 0xcd, 0x39, 0x38, 0x50, 0x36, 0x2a, 0x51, 0x5b, 0xed, 0x8f, 0x8b, 0x44, + 0x46, 0x7d, 0x16, 0xb9, 0x79, 0x28, 0xe9, 0xc9, 0x5d, 0x13, 0x3f, 0x61, 0xac, 0x4c, 0x0e, 0xe8, + 0x9f, 0xd2, 0x81, 0x81, 0xb7, 0x80, 0x4c, 0xc9, 0x6c, 0xb8, 0x68, 0x46, 0xff, 0x9c, 0x8e, 0x0c, + 0xa8, 0x0c, 0x30, 0x38, 0x98, 0x92, 0xd9, 0xf1, 0xa2, 0x27, 0x7f, 0x42, 0x8f, 0x10, 0x52, 0x10, + 0x0e, 0x30, 0x18, 0xb4, 0xc9, 0x96, 0x1b, 0x27, 0x96, 0x7a, 0xad, 0x6c, 0x30, 0xec, 0x9c, 0x8e, + 0xc2, 0x4f, 0x42, 0xc7, 0xed, 0xbd, 0x47, 0xd4, 0x4e, 0x18, 0xa1, 0xd5, 0x7e, 0x0f, 0x36, 0x8e, + 0x2e, 0x01, 0x63, 0xab, 0x31, 0x38, 0xec, 0x9c, 0x7f, 0x0e, 0x2f, 0xe8, 0x59, 0xdb, 0xe5, 0x56, + 0xab, 0x5c, 0xa0, 0xdc, 0x51, 0x29, 0x7c, 0xa1, 0xb4, 0x5b, 0x2d, 0x62, 0x21, 0xf7, 0x5b, 0xf9, + 0xe6, 0xe1, 0xbb, 0x62, 0x64, 0x53, 0x31, 0xf2, 0x5b, 0x31, 0xf2, 0x55, 0x33, 0x6f, 0x53, 0x33, + 0xef, 0xa7, 0x66, 0xde, 0xf3, 0xd5, 0x52, 0xd8, 0xd5, 0x3a, 0x89, 0x52, 0x2d, 0xf9, 0xbd, 0x50, + 0x26, 0x5d, 0x89, 0x98, 0xe7, 0xfd, 0x70, 0x69, 0xb2, 0x57, 0xfe, 0xbe, 0xfd, 0xbb, 0xfd, 0x28, + 0xc1, 0x24, 0xa3, 0xf6, 0xeb, 0xd7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x5f, 0xda, 0xeb, + 0x13, 0x02, 0x00, 0x00, +} + +func (m *EventTransfer) 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 *EventTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventProvision) 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 *EventProvision) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0x2a + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventConfirmProvision) 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 *EventConfirmProvision) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConfirmProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventClaim) 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 *EventClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovEvent(uint64(m.Seq)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovEvent(uint64(m.Seq)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventConfirmProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovEvent(uint64(m.Seq)) + } + return n +} + +func (m *EventClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovEvent(uint64(m.Seq)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventTransfer) 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 ErrIntOverflowEvent + } + 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: EventTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventProvision) 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 ErrIntOverflowEvent + } + 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: EventProvision: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventProvision: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConfirmProvision) 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 ErrIntOverflowEvent + } + 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: EventConfirmProvision: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConfirmProvision: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventClaim) 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 ErrIntOverflowEvent + } + 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: EventClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/fbridge/types/expected_keepers.go b/x/fbridge/types/expected_keepers.go new file mode 100644 index 0000000000..ab1254f4c2 --- /dev/null +++ b/x/fbridge/types/expected_keepers.go @@ -0,0 +1 @@ +package types diff --git a/x/fbridge/types/fbridge.pb.go b/x/fbridge/types/fbridge.pb.go new file mode 100644 index 0000000000..9ca2c7a57a --- /dev/null +++ b/x/fbridge/types/fbridge.pb.go @@ -0,0 +1,1650 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/fbridge/v1/fbridge.proto + +package types + +import ( + fmt "fmt" + github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Role defines the role of the operator, guardian, and judge. +type Role int32 + +const ( + Role_UNSPECIFIED Role = 0 + Role_GUARDIAN Role = 1 + Role_OPERATOR Role = 2 + Role_JUDGE Role = 3 +) + +var Role_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "GUARDIAN", + 2: "OPERATOR", + 3: "JUDGE", +} + +var Role_value = map[string]int32{ + "UNSPECIFIED": 0, + "GUARDIAN": 1, + "OPERATOR": 2, + "JUDGE": 3, +} + +func (x Role) String() string { + return proto.EnumName(Role_name, int32(x)) +} + +func (Role) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_62374d75fc6aa1ba, []int{0} +} + +type Params struct { + // ratio of how many operators' confirmations are needed to be valid. + OperatorTrustLevel *Fraction `protobuf:"bytes,1,opt,name=operator_trust_level,json=operatorTrustLevel,proto3" json:"operator_trust_level,omitempty"` + // ratio of how many guardians' confirmations are needed to be valid. + GuardianTrustLevel *Fraction `protobuf:"bytes,2,opt,name=guardian_trust_level,json=guardianTrustLevel,proto3" json:"guardian_trust_level,omitempty"` + // ratio of how many judges' confirmations are needed to be valid. + JudgeTrustLevel *Fraction `protobuf:"bytes,3,opt,name=judge_trust_level,json=judgeTrustLevel,proto3" json:"judge_trust_level,omitempty"` + // default timelock period for each provision (unix timestamp) + TimelockPeriod uint64 `protobuf:"varint,4,opt,name=timelock_period,json=timelockPeriod,proto3" json:"timelock_period,omitempty"` + // default period of the proposal to update the role + ProposalPeriod uint64 `protobuf:"varint,5,opt,name=proposal_period,json=proposalPeriod,proto3" json:"proposal_period,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_62374d75fc6aa1ba, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetOperatorTrustLevel() *Fraction { + if m != nil { + return m.OperatorTrustLevel + } + return nil +} + +func (m *Params) GetGuardianTrustLevel() *Fraction { + if m != nil { + return m.GuardianTrustLevel + } + return nil +} + +func (m *Params) GetJudgeTrustLevel() *Fraction { + if m != nil { + return m.JudgeTrustLevel + } + return nil +} + +func (m *Params) GetTimelockPeriod() uint64 { + if m != nil { + return m.TimelockPeriod + } + return 0 +} + +func (m *Params) GetProposalPeriod() uint64 { + if m != nil { + return m.ProposalPeriod + } + return 0 +} + +// Provision is a struct that represents a provision internally. +type ProvisionData struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // the amount of token to be claimed + Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` + // the sender address on the source chain + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + // the recipient address on the destination chain + Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (m *ProvisionData) Reset() { *m = ProvisionData{} } +func (m *ProvisionData) String() string { return proto.CompactTextString(m) } +func (*ProvisionData) ProtoMessage() {} +func (*ProvisionData) Descriptor() ([]byte, []int) { + return fileDescriptor_62374d75fc6aa1ba, []int{1} +} +func (m *ProvisionData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProvisionData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProvisionData.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 *ProvisionData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProvisionData.Merge(m, src) +} +func (m *ProvisionData) XXX_Size() int { + return m.Size() +} +func (m *ProvisionData) XXX_DiscardUnknown() { + xxx_messageInfo_ProvisionData.DiscardUnknown(m) +} + +var xxx_messageInfo_ProvisionData proto.InternalMessageInfo + +func (m *ProvisionData) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *ProvisionData) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *ProvisionData) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +// ProvisionStatus is a struct that represents the status of a provision. +// To optimize computational cost, we have collected frequently changing values from provision. +type ProvisionStatus struct { + // the unix timestamp the provision will be able to be claimed (unix timestamp) + TimelockEnd uint64 `protobuf:"varint,1,opt,name=timelock_end,json=timelockEnd,proto3" json:"timelock_end,omitempty"` + // a value that tells how many operators have submitted this provision + ConfirmCounts int32 `protobuf:"varint,2,opt,name=confirm_counts,json=confirmCounts,proto3" json:"confirm_counts,omitempty"` + // whether the provision has been claimed + IsClaimed bool `protobuf:"varint,3,opt,name=is_claimed,json=isClaimed,proto3" json:"is_claimed,omitempty"` +} + +func (m *ProvisionStatus) Reset() { *m = ProvisionStatus{} } +func (m *ProvisionStatus) String() string { return proto.CompactTextString(m) } +func (*ProvisionStatus) ProtoMessage() {} +func (*ProvisionStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_62374d75fc6aa1ba, []int{2} +} +func (m *ProvisionStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProvisionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProvisionStatus.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 *ProvisionStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProvisionStatus.Merge(m, src) +} +func (m *ProvisionStatus) XXX_Size() int { + return m.Size() +} +func (m *ProvisionStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ProvisionStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ProvisionStatus proto.InternalMessageInfo + +func (m *ProvisionStatus) GetTimelockEnd() uint64 { + if m != nil { + return m.TimelockEnd + } + return 0 +} + +func (m *ProvisionStatus) GetConfirmCounts() int32 { + if m != nil { + return m.ConfirmCounts + } + return 0 +} + +func (m *ProvisionStatus) GetIsClaimed() bool { + if m != nil { + return m.IsClaimed + } + return false +} + +// Fraction defines the protobuf message type for tmmath.Fraction that only +// supports positive values. +type Fraction struct { + Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` + Denominator uint64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` +} + +func (m *Fraction) Reset() { *m = Fraction{} } +func (m *Fraction) String() string { return proto.CompactTextString(m) } +func (*Fraction) ProtoMessage() {} +func (*Fraction) Descriptor() ([]byte, []int) { + return fileDescriptor_62374d75fc6aa1ba, []int{3} +} +func (m *Fraction) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Fraction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Fraction.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 *Fraction) XXX_Merge(src proto.Message) { + xxx_messageInfo_Fraction.Merge(m, src) +} +func (m *Fraction) XXX_Size() int { + return m.Size() +} +func (m *Fraction) XXX_DiscardUnknown() { + xxx_messageInfo_Fraction.DiscardUnknown(m) +} + +var xxx_messageInfo_Fraction proto.InternalMessageInfo + +func (m *Fraction) GetNumerator() uint64 { + if m != nil { + return m.Numerator + } + return 0 +} + +func (m *Fraction) GetDenominator() uint64 { + if m != nil { + return m.Denominator + } + return 0 +} + +type RoleProposal struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // the proposer address + Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` + // the address to update the role + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // the role to be updated + // - unspecified : 0, used to remove the address from a group + // - guardian : 1 + // - operator : 2 + // - judge : 3 + Role Role `protobuf:"varint,4,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` + // the unix timestamp the proposal will be expired (unix timestamp) + ExpiredAt uint64 `protobuf:"varint,5,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` +} + +func (m *RoleProposal) Reset() { *m = RoleProposal{} } +func (m *RoleProposal) String() string { return proto.CompactTextString(m) } +func (*RoleProposal) ProtoMessage() {} +func (*RoleProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_62374d75fc6aa1ba, []int{4} +} +func (m *RoleProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoleProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoleProposal.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 *RoleProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoleProposal.Merge(m, src) +} +func (m *RoleProposal) XXX_Size() int { + return m.Size() +} +func (m *RoleProposal) XXX_DiscardUnknown() { + xxx_messageInfo_RoleProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_RoleProposal proto.InternalMessageInfo + +func (m *RoleProposal) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *RoleProposal) GetProposer() string { + if m != nil { + return m.Proposer + } + return "" +} + +func (m *RoleProposal) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *RoleProposal) GetRole() Role { + if m != nil { + return m.Role + } + return Role_UNSPECIFIED +} + +func (m *RoleProposal) GetExpiredAt() uint64 { + if m != nil { + return m.ExpiredAt + } + return 0 +} + +func init() { + proto.RegisterEnum("lbm.fbridge.v1.Role", Role_name, Role_value) + proto.RegisterType((*Params)(nil), "lbm.fbridge.v1.Params") + proto.RegisterType((*ProvisionData)(nil), "lbm.fbridge.v1.ProvisionData") + proto.RegisterType((*ProvisionStatus)(nil), "lbm.fbridge.v1.ProvisionStatus") + proto.RegisterType((*Fraction)(nil), "lbm.fbridge.v1.Fraction") + proto.RegisterType((*RoleProposal)(nil), "lbm.fbridge.v1.RoleProposal") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/fbridge.proto", fileDescriptor_62374d75fc6aa1ba) } + +var fileDescriptor_62374d75fc6aa1ba = []byte{ + // 610 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x41, 0x4f, 0xdb, 0x30, + 0x14, 0x6e, 0x4a, 0xa9, 0x9a, 0x57, 0x68, 0x3b, 0x0b, 0x4d, 0x08, 0xb1, 0xc2, 0x2a, 0x4d, 0x43, + 0x48, 0x6b, 0x07, 0xbb, 0x4f, 0x2a, 0xb4, 0xa0, 0x56, 0x13, 0x54, 0x06, 0x2e, 0xbb, 0x44, 0x6e, + 0x62, 0x82, 0x47, 0x62, 0x67, 0xb6, 0x53, 0xb1, 0xfd, 0x8a, 0xdd, 0x77, 0xda, 0xbf, 0xd8, 0x4f, + 0xe0, 0xc8, 0x71, 0xda, 0x01, 0x4d, 0xf0, 0x47, 0x26, 0x3b, 0x49, 0x07, 0xbb, 0x70, 0x7b, 0xef, + 0xf3, 0xf7, 0x3e, 0xbf, 0xf7, 0xf9, 0x25, 0xb0, 0x1e, 0x4d, 0xe3, 0xde, 0xf9, 0x54, 0xb2, 0x20, + 0xa4, 0xbd, 0xd9, 0x4e, 0x11, 0x76, 0x13, 0x29, 0xb4, 0x40, 0x8d, 0x68, 0x1a, 0x77, 0x0b, 0x68, + 0xb6, 0xb3, 0xb6, 0x12, 0x8a, 0x50, 0xd8, 0xa3, 0x9e, 0x89, 0x32, 0x56, 0xe7, 0x67, 0x19, 0xaa, + 0x13, 0x22, 0x49, 0xac, 0xd0, 0x18, 0x56, 0x44, 0x42, 0x25, 0xd1, 0x42, 0x7a, 0x5a, 0xa6, 0x4a, + 0x7b, 0x11, 0x9d, 0xd1, 0x68, 0xd5, 0xd9, 0x74, 0xb6, 0xea, 0xbb, 0xab, 0xdd, 0xc7, 0x7a, 0xdd, + 0x03, 0x49, 0x7c, 0xcd, 0x04, 0xc7, 0xa8, 0xa8, 0x3a, 0x35, 0x45, 0x1f, 0x4c, 0x8d, 0xd1, 0x0a, + 0x53, 0x22, 0x03, 0x46, 0xf8, 0x23, 0xad, 0xf2, 0x53, 0x5a, 0x45, 0xd5, 0x03, 0xad, 0x01, 0x3c, + 0xfb, 0x94, 0x06, 0x21, 0x7d, 0x24, 0xb4, 0xf0, 0x84, 0x50, 0xd3, 0x96, 0x3c, 0x50, 0x79, 0x0d, + 0x4d, 0xcd, 0x62, 0x1a, 0x09, 0xff, 0xd2, 0x4b, 0xa8, 0x64, 0x22, 0x58, 0xad, 0x6c, 0x3a, 0x5b, + 0x15, 0xdc, 0x28, 0xe0, 0x89, 0x45, 0x0d, 0x31, 0x91, 0x22, 0x11, 0x8a, 0x44, 0x05, 0x71, 0x31, + 0x23, 0x16, 0x70, 0x46, 0xec, 0xfc, 0x70, 0x60, 0x79, 0x22, 0xc5, 0x8c, 0x29, 0x26, 0xf8, 0x80, + 0x68, 0x82, 0x5a, 0xb0, 0xa0, 0xe8, 0x67, 0x6b, 0x58, 0x05, 0x9b, 0x10, 0x8d, 0xa1, 0x4a, 0x62, + 0x91, 0x72, 0x6d, 0x27, 0x77, 0xf7, 0x76, 0xaf, 0x6f, 0x37, 0x4a, 0xbf, 0x6f, 0x37, 0xb6, 0x43, + 0xa6, 0x2f, 0xd2, 0x69, 0xd7, 0x17, 0x71, 0xef, 0x80, 0x71, 0xe5, 0x5f, 0x30, 0xd2, 0x3b, 0xcf, + 0x83, 0x37, 0x2a, 0xb8, 0xec, 0xe9, 0x2f, 0x09, 0x55, 0xdd, 0x11, 0xd7, 0x38, 0x57, 0x40, 0xcf, + 0xa1, 0xaa, 0x28, 0x0f, 0xa8, 0xb4, 0xc3, 0xbb, 0x38, 0xcf, 0xd0, 0x1a, 0xd4, 0x24, 0xf5, 0x29, + 0x9b, 0x51, 0x69, 0x47, 0x72, 0xf1, 0x3c, 0xef, 0x7c, 0x85, 0xe6, 0xbc, 0xc5, 0x13, 0x4d, 0x74, + 0xaa, 0xd0, 0x4b, 0x58, 0x9a, 0x1b, 0x41, 0x79, 0x90, 0x77, 0x5b, 0x2f, 0xb0, 0x21, 0x0f, 0xd0, + 0x2b, 0x68, 0xf8, 0x82, 0x9f, 0x33, 0x19, 0x7b, 0xbe, 0xb9, 0x5a, 0xd9, 0xee, 0x17, 0xf1, 0x72, + 0x8e, 0xee, 0x5b, 0x10, 0xbd, 0x00, 0x60, 0xca, 0xf3, 0x23, 0xc2, 0x62, 0x1a, 0xd8, 0xa6, 0x6a, + 0xd8, 0x65, 0x6a, 0x3f, 0x03, 0x3a, 0x63, 0xa8, 0x15, 0xcf, 0x81, 0xd6, 0xc1, 0xe5, 0x69, 0x9c, + 0xad, 0x49, 0x7e, 0xe3, 0x3f, 0x00, 0x6d, 0x42, 0x3d, 0xa0, 0x5c, 0xc4, 0x8c, 0xdb, 0xf3, 0x72, + 0xd6, 0xd1, 0x03, 0xa8, 0xf3, 0xdd, 0x81, 0x25, 0x2c, 0x22, 0x3a, 0xc9, 0x9f, 0x00, 0x35, 0xa0, + 0xcc, 0x8a, 0xde, 0xcb, 0x2c, 0x30, 0x26, 0x64, 0xcf, 0x43, 0xb3, 0x7a, 0x17, 0xcf, 0x73, 0x63, + 0x9c, 0x26, 0x32, 0xa4, 0xba, 0x30, 0x2e, 0xcb, 0xd0, 0x16, 0x54, 0xa4, 0x88, 0xa8, 0x35, 0xad, + 0xb1, 0xbb, 0xf2, 0xff, 0x2e, 0x99, 0xfb, 0xb0, 0x65, 0x98, 0x49, 0xe9, 0x55, 0xc2, 0x24, 0x0d, + 0x3c, 0xa2, 0xf3, 0x75, 0x70, 0x73, 0xa4, 0xaf, 0xb7, 0xdf, 0x43, 0xc5, 0x90, 0x51, 0x13, 0xea, + 0x67, 0x47, 0x27, 0x93, 0xe1, 0xfe, 0xe8, 0x60, 0x34, 0x1c, 0xb4, 0x4a, 0x68, 0x09, 0x6a, 0x87, + 0x67, 0x7d, 0x3c, 0x18, 0xf5, 0x8f, 0x5a, 0x8e, 0xc9, 0x8e, 0x27, 0x43, 0xdc, 0x3f, 0x3d, 0xc6, + 0xad, 0x32, 0x72, 0x61, 0x71, 0x7c, 0x36, 0x38, 0x1c, 0xb6, 0x16, 0xf6, 0xc6, 0xd7, 0x77, 0x6d, + 0xe7, 0xe6, 0xae, 0xed, 0xfc, 0xb9, 0x6b, 0x3b, 0xdf, 0xee, 0xdb, 0xa5, 0x9b, 0xfb, 0x76, 0xe9, + 0xd7, 0x7d, 0xbb, 0xf4, 0xf1, 0xed, 0x93, 0x7b, 0x72, 0x35, 0xff, 0x03, 0xd8, 0x8d, 0x99, 0x56, + 0xed, 0x77, 0xfd, 0xee, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x80, 0x22, 0x79, 0x1d, 0x04, + 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalPeriod != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.ProposalPeriod)) + i-- + dAtA[i] = 0x28 + } + if m.TimelockPeriod != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.TimelockPeriod)) + i-- + dAtA[i] = 0x20 + } + if m.JudgeTrustLevel != nil { + { + size, err := m.JudgeTrustLevel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFbridge(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.GuardianTrustLevel != nil { + { + size, err := m.GuardianTrustLevel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFbridge(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.OperatorTrustLevel != nil { + { + size, err := m.OperatorTrustLevel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFbridge(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ProvisionData) 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 *ProvisionData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProvisionData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintFbridge(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintFbridge(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFbridge(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Seq != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ProvisionStatus) 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 *ProvisionStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProvisionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsClaimed { + i-- + if m.IsClaimed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ConfirmCounts != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.ConfirmCounts)) + i-- + dAtA[i] = 0x10 + } + if m.TimelockEnd != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.TimelockEnd)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Fraction) 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 *Fraction) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Denominator != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.Denominator)) + i-- + dAtA[i] = 0x10 + } + if m.Numerator != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.Numerator)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RoleProposal) 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 *RoleProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoleProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpiredAt != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.ExpiredAt)) + i-- + dAtA[i] = 0x28 + } + if m.Role != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x20 + } + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintFbridge(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0x1a + } + if len(m.Proposer) > 0 { + i -= len(m.Proposer) + copy(dAtA[i:], m.Proposer) + i = encodeVarintFbridge(dAtA, i, uint64(len(m.Proposer))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintFbridge(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintFbridge(dAtA []byte, offset int, v uint64) int { + offset -= sovFbridge(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OperatorTrustLevel != nil { + l = m.OperatorTrustLevel.Size() + n += 1 + l + sovFbridge(uint64(l)) + } + if m.GuardianTrustLevel != nil { + l = m.GuardianTrustLevel.Size() + n += 1 + l + sovFbridge(uint64(l)) + } + if m.JudgeTrustLevel != nil { + l = m.JudgeTrustLevel.Size() + n += 1 + l + sovFbridge(uint64(l)) + } + if m.TimelockPeriod != 0 { + n += 1 + sovFbridge(uint64(m.TimelockPeriod)) + } + if m.ProposalPeriod != 0 { + n += 1 + sovFbridge(uint64(m.ProposalPeriod)) + } + return n +} + +func (m *ProvisionData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovFbridge(uint64(m.Seq)) + } + l = m.Amount.Size() + n += 1 + l + sovFbridge(uint64(l)) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovFbridge(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovFbridge(uint64(l)) + } + return n +} + +func (m *ProvisionStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TimelockEnd != 0 { + n += 1 + sovFbridge(uint64(m.TimelockEnd)) + } + if m.ConfirmCounts != 0 { + n += 1 + sovFbridge(uint64(m.ConfirmCounts)) + } + if m.IsClaimed { + n += 2 + } + return n +} + +func (m *Fraction) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Numerator != 0 { + n += 1 + sovFbridge(uint64(m.Numerator)) + } + if m.Denominator != 0 { + n += 1 + sovFbridge(uint64(m.Denominator)) + } + return n +} + +func (m *RoleProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovFbridge(uint64(m.Id)) + } + l = len(m.Proposer) + if l > 0 { + n += 1 + l + sovFbridge(uint64(l)) + } + l = len(m.Target) + if l > 0 { + n += 1 + l + sovFbridge(uint64(l)) + } + if m.Role != 0 { + n += 1 + sovFbridge(uint64(m.Role)) + } + if m.ExpiredAt != 0 { + n += 1 + sovFbridge(uint64(m.ExpiredAt)) + } + return n +} + +func sovFbridge(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFbridge(x uint64) (n int) { + return sovFbridge(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowFbridge + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorTrustLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFbridge + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OperatorTrustLevel == nil { + m.OperatorTrustLevel = &Fraction{} + } + if err := m.OperatorTrustLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GuardianTrustLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFbridge + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GuardianTrustLevel == nil { + m.GuardianTrustLevel = &Fraction{} + } + if err := m.GuardianTrustLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JudgeTrustLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFbridge + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.JudgeTrustLevel == nil { + m.JudgeTrustLevel = &Fraction{} + } + if err := m.JudgeTrustLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimelockPeriod", wireType) + } + m.TimelockPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimelockPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalPeriod", wireType) + } + m.ProposalPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFbridge(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFbridge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProvisionData) 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 ErrIntOverflowFbridge + } + 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: ProvisionData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProvisionData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + 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 ErrInvalidLengthFbridge + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 ErrIntOverflowFbridge + } + 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 ErrInvalidLengthFbridge + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + 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 ErrInvalidLengthFbridge + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFbridge(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFbridge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProvisionStatus) 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 ErrIntOverflowFbridge + } + 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: ProvisionStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProvisionStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimelockEnd", wireType) + } + m.TimelockEnd = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimelockEnd |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfirmCounts", wireType) + } + m.ConfirmCounts = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConfirmCounts |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsClaimed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsClaimed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipFbridge(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFbridge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Fraction) 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 ErrIntOverflowFbridge + } + 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: Fraction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fraction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Numerator", wireType) + } + m.Numerator = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Numerator |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Denominator", wireType) + } + m.Denominator = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Denominator |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFbridge(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFbridge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleProposal) 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 ErrIntOverflowFbridge + } + 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: RoleProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + 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 ErrInvalidLengthFbridge + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + 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 ErrInvalidLengthFbridge + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= Role(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiredAt", wireType) + } + m.ExpiredAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiredAt |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFbridge(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFbridge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFbridge(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFbridge + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFbridge + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFbridge + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFbridge + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFbridge + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFbridge + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFbridge = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFbridge = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFbridge = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/fbridge/types/genesis.go b/x/fbridge/types/genesis.go new file mode 100644 index 0000000000..58322550d4 --- /dev/null +++ b/x/fbridge/types/genesis.go @@ -0,0 +1,9 @@ +package types + +func DefaultGenesisState() *GenesisState { + return &GenesisState{} +} + +func ValidateGenesis(data GenesisState) error { + return nil +} diff --git a/x/fbridge/types/genesis.pb.go b/x/fbridge/types/genesis.pb.go new file mode 100644 index 0000000000..60dc09d4c7 --- /dev/null +++ b/x/fbridge/types/genesis.pb.go @@ -0,0 +1,2347 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/fbridge/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the fbridge module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // sending_state defines status saved when sending tokens to a counterpart chain + SendingState SendingState `protobuf:"bytes,2,opt,name=sending_state,json=sendingState,proto3" json:"sending_state"` + // receiving_state defines status saved when receiving tokens from a counterpart chain + ReceivingState ReceivingState `protobuf:"bytes,3,opt,name=receiving_state,json=receivingState,proto3" json:"receiving_state"` +} + +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_0fc3cc4535a29f6d, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetSendingState() SendingState { + if m != nil { + return m.SendingState + } + return SendingState{} +} + +func (m *GenesisState) GetReceivingState() ReceivingState { + if m != nil { + return m.ReceivingState + } + return ReceivingState{} +} + +type SendingState struct { + // the next sequence number of the bridge request (greatest sequence number + 1) + NextSeq uint64 `protobuf:"varint,1,opt,name=next_seq,json=nextSeq,proto3" json:"next_seq,omitempty"` + // sequence-per-block number mapping + SeqToBlocknum []*BlockSeqInfo `protobuf:"bytes,2,rep,name=seq_to_blocknum,json=seqToBlocknum,proto3" json:"seq_to_blocknum,omitempty"` +} + +func (m *SendingState) Reset() { *m = SendingState{} } +func (m *SendingState) String() string { return proto.CompactTextString(m) } +func (*SendingState) ProtoMessage() {} +func (*SendingState) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{1} +} +func (m *SendingState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SendingState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SendingState.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 *SendingState) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendingState.Merge(m, src) +} +func (m *SendingState) XXX_Size() int { + return m.Size() +} +func (m *SendingState) XXX_DiscardUnknown() { + xxx_messageInfo_SendingState.DiscardUnknown(m) +} + +var xxx_messageInfo_SendingState proto.InternalMessageInfo + +type BlockSeqInfo struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + Blocknum uint64 `protobuf:"varint,2,opt,name=blocknum,proto3" json:"blocknum,omitempty"` +} + +func (m *BlockSeqInfo) Reset() { *m = BlockSeqInfo{} } +func (m *BlockSeqInfo) String() string { return proto.CompactTextString(m) } +func (*BlockSeqInfo) ProtoMessage() {} +func (*BlockSeqInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{2} +} +func (m *BlockSeqInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockSeqInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockSeqInfo.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 *BlockSeqInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockSeqInfo.Merge(m, src) +} +func (m *BlockSeqInfo) XXX_Size() int { + return m.Size() +} +func (m *BlockSeqInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BlockSeqInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockSeqInfo proto.InternalMessageInfo + +func (m *BlockSeqInfo) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *BlockSeqInfo) GetBlocknum() uint64 { + if m != nil { + return m.Blocknum + } + return 0 +} + +type ReceivingState struct { + // the greatest consecutive sequence number confirmed by each operator + GreatestConsecutiveSeqByOperator []*OperatorSeqInfo `protobuf:"bytes,1,rep,name=greatest_consecutive_seq_by_operator,json=greatestConsecutiveSeqByOperator,proto3" json:"greatest_consecutive_seq_by_operator,omitempty"` + // the greatest sequence number confirmed by each operator + GreatestSeqByOperator []*OperatorSeqInfo `protobuf:"bytes,2,rep,name=greatest_seq_by_operator,json=greatestSeqByOperator,proto3" json:"greatest_seq_by_operator,omitempty"` + // the greatest consecutive sequence numbers confirmed by n-of-m operators + // consecutiveness is judged starting from the number closest to 0. + GreatestConsecutiveSeq uint64 `protobuf:"varint,3,opt,name=greatest_consecutive_seq,json=greatestConsecutiveSeq,proto3" json:"greatest_consecutive_seq,omitempty"` + // the set of sequence numbers to be claimed + PendingClaimSeqs []uint64 `protobuf:"varint,4,rep,packed,name=pending_claim_seqs,json=pendingClaimSeqs,proto3" json:"pending_claim_seqs,omitempty"` + // commitment is the hash value of a specific provision. + Commitments []*Commitment `protobuf:"bytes,6,rep,name=commitments,proto3" json:"commitments,omitempty"` + // provision associated with a specific commitment. + Provisions []*Provision `protobuf:"bytes,7,rep,name=provisions,proto3" json:"provisions,omitempty"` + // map the sequence number confirmed by n-of-m operators with commitment + ConfirmedSeqToCommitment []*ConfirmedProvision `protobuf:"bytes,8,rep,name=confirmed_seq_to_commitment,json=confirmedSeqToCommitment,proto3" json:"confirmed_seq_to_commitment,omitempty"` +} + +func (m *ReceivingState) Reset() { *m = ReceivingState{} } +func (m *ReceivingState) String() string { return proto.CompactTextString(m) } +func (*ReceivingState) ProtoMessage() {} +func (*ReceivingState) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{3} +} +func (m *ReceivingState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReceivingState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReceivingState.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 *ReceivingState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReceivingState.Merge(m, src) +} +func (m *ReceivingState) XXX_Size() int { + return m.Size() +} +func (m *ReceivingState) XXX_DiscardUnknown() { + xxx_messageInfo_ReceivingState.DiscardUnknown(m) +} + +var xxx_messageInfo_ReceivingState proto.InternalMessageInfo + +type OperatorSeqInfo struct { + // the operator address + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // the sequence number + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *OperatorSeqInfo) Reset() { *m = OperatorSeqInfo{} } +func (m *OperatorSeqInfo) String() string { return proto.CompactTextString(m) } +func (*OperatorSeqInfo) ProtoMessage() {} +func (*OperatorSeqInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{4} +} +func (m *OperatorSeqInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperatorSeqInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperatorSeqInfo.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 *OperatorSeqInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperatorSeqInfo.Merge(m, src) +} +func (m *OperatorSeqInfo) XXX_Size() int { + return m.Size() +} +func (m *OperatorSeqInfo) XXX_DiscardUnknown() { + xxx_messageInfo_OperatorSeqInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_OperatorSeqInfo proto.InternalMessageInfo + +func (m *OperatorSeqInfo) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *OperatorSeqInfo) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type Commitment struct { + // the operator address + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` + // commitment is the hash value of a provision + Commitment string `protobuf:"bytes,3,opt,name=commitment,proto3" json:"commitment,omitempty"` +} + +func (m *Commitment) Reset() { *m = Commitment{} } +func (m *Commitment) String() string { return proto.CompactTextString(m) } +func (*Commitment) ProtoMessage() {} +func (*Commitment) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{5} +} +func (m *Commitment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Commitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Commitment.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 *Commitment) XXX_Merge(src proto.Message) { + xxx_messageInfo_Commitment.Merge(m, src) +} +func (m *Commitment) XXX_Size() int { + return m.Size() +} +func (m *Commitment) XXX_DiscardUnknown() { + xxx_messageInfo_Commitment.DiscardUnknown(m) +} + +var xxx_messageInfo_Commitment proto.InternalMessageInfo + +func (m *Commitment) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *Commitment) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *Commitment) GetCommitment() string { + if m != nil { + return m.Commitment + } + return "" +} + +type Provision struct { + Commitment string `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` + Data *ProvisionData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Status *ProvisionStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (m *Provision) Reset() { *m = Provision{} } +func (m *Provision) String() string { return proto.CompactTextString(m) } +func (*Provision) ProtoMessage() {} +func (*Provision) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{6} +} +func (m *Provision) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provision.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 *Provision) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provision.Merge(m, src) +} +func (m *Provision) XXX_Size() int { + return m.Size() +} +func (m *Provision) XXX_DiscardUnknown() { + xxx_messageInfo_Provision.DiscardUnknown(m) +} + +var xxx_messageInfo_Provision proto.InternalMessageInfo + +func (m *Provision) GetCommitment() string { + if m != nil { + return m.Commitment + } + return "" +} + +func (m *Provision) GetData() *ProvisionData { + if m != nil { + return m.Data + } + return nil +} + +func (m *Provision) GetStatus() *ProvisionStatus { + if m != nil { + return m.Status + } + return nil +} + +type ConfirmedProvision struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // commitment is the hash value of a provision + Commitment string `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` +} + +func (m *ConfirmedProvision) Reset() { *m = ConfirmedProvision{} } +func (m *ConfirmedProvision) String() string { return proto.CompactTextString(m) } +func (*ConfirmedProvision) ProtoMessage() {} +func (*ConfirmedProvision) Descriptor() ([]byte, []int) { + return fileDescriptor_0fc3cc4535a29f6d, []int{7} +} +func (m *ConfirmedProvision) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConfirmedProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConfirmedProvision.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 *ConfirmedProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConfirmedProvision.Merge(m, src) +} +func (m *ConfirmedProvision) XXX_Size() int { + return m.Size() +} +func (m *ConfirmedProvision) XXX_DiscardUnknown() { + xxx_messageInfo_ConfirmedProvision.DiscardUnknown(m) +} + +var xxx_messageInfo_ConfirmedProvision proto.InternalMessageInfo + +func (m *ConfirmedProvision) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *ConfirmedProvision) GetCommitment() string { + if m != nil { + return m.Commitment + } + return "" +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "lbm.fbridge.v1.GenesisState") + proto.RegisterType((*SendingState)(nil), "lbm.fbridge.v1.SendingState") + proto.RegisterType((*BlockSeqInfo)(nil), "lbm.fbridge.v1.BlockSeqInfo") + proto.RegisterType((*ReceivingState)(nil), "lbm.fbridge.v1.ReceivingState") + proto.RegisterType((*OperatorSeqInfo)(nil), "lbm.fbridge.v1.OperatorSeqInfo") + proto.RegisterType((*Commitment)(nil), "lbm.fbridge.v1.Commitment") + proto.RegisterType((*Provision)(nil), "lbm.fbridge.v1.Provision") + proto.RegisterType((*ConfirmedProvision)(nil), "lbm.fbridge.v1.ConfirmedProvision") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/genesis.proto", fileDescriptor_0fc3cc4535a29f6d) } + +var fileDescriptor_0fc3cc4535a29f6d = []byte{ + // 665 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0xc7, 0xe3, 0xc4, 0x4a, 0xdb, 0x69, 0xfa, 0xa2, 0xd5, 0xf3, 0x54, 0x6e, 0x28, 0x4e, 0x64, + 0x71, 0xe8, 0x01, 0x62, 0x0a, 0x48, 0xbc, 0xa8, 0x12, 0x52, 0x5a, 0xb5, 0x02, 0x09, 0x81, 0x6c, + 0x0e, 0xa8, 0x17, 0xcb, 0x76, 0x36, 0xee, 0xaa, 0xb1, 0xd7, 0xf6, 0x6e, 0xa2, 0xf6, 0x1b, 0x70, + 0xe4, 0xc6, 0x95, 0x0b, 0xdf, 0xa5, 0xc7, 0x1e, 0x39, 0x20, 0x84, 0xda, 0x2f, 0x82, 0xbc, 0x5d, + 0xbf, 0xc4, 0x6d, 0x25, 0xb8, 0xed, 0xee, 0xfc, 0xe7, 0x37, 0xff, 0x59, 0x8f, 0x17, 0xb6, 0x26, + 0x5e, 0x68, 0x8e, 0xbd, 0x94, 0x8c, 0x02, 0x6c, 0xce, 0x76, 0xcc, 0x00, 0x47, 0x98, 0x11, 0x36, + 0x88, 0x53, 0xca, 0x29, 0x5a, 0x9d, 0x78, 0xe1, 0x40, 0x46, 0x07, 0xb3, 0x9d, 0xee, 0x7f, 0x01, + 0x0d, 0xa8, 0x08, 0x99, 0xd9, 0xea, 0x5a, 0xd5, 0xad, 0x33, 0xf2, 0x04, 0x11, 0x35, 0x7e, 0x2a, + 0xd0, 0x39, 0xbc, 0xa6, 0xda, 0xdc, 0xe5, 0x18, 0x3d, 0x83, 0x76, 0xec, 0xa6, 0x6e, 0xc8, 0x34, + 0xa5, 0xaf, 0x6c, 0x2f, 0x3f, 0xd9, 0x18, 0xcc, 0x57, 0x19, 0x7c, 0x10, 0xd1, 0xa1, 0x7a, 0xfe, + 0xab, 0xd7, 0xb0, 0xa4, 0x16, 0x1d, 0xc2, 0x0a, 0xc3, 0xd1, 0x88, 0x44, 0x81, 0xc3, 0x32, 0x8c, + 0xd6, 0x14, 0xc9, 0x5b, 0xf5, 0x64, 0xfb, 0x5a, 0x24, 0x4a, 0x49, 0x44, 0x87, 0x55, 0xce, 0xd0, + 0x3b, 0x58, 0x4b, 0xb1, 0x8f, 0xc9, 0xac, 0x44, 0xb5, 0x04, 0x4a, 0xaf, 0xa3, 0xac, 0x5c, 0x56, + 0x85, 0xad, 0xa6, 0x73, 0xa7, 0xc6, 0x14, 0x3a, 0xd5, 0x92, 0x68, 0x13, 0x16, 0x23, 0x7c, 0xca, + 0x1d, 0x86, 0x13, 0xd1, 0x9f, 0x6a, 0x2d, 0x64, 0x7b, 0x1b, 0x27, 0x68, 0x1f, 0xd6, 0x18, 0x4e, + 0x1c, 0x4e, 0x1d, 0x6f, 0x42, 0xfd, 0x93, 0x68, 0x1a, 0x6a, 0xcd, 0x7e, 0xeb, 0xb6, 0x26, 0x86, + 0x59, 0xdc, 0xc6, 0xc9, 0x9b, 0x68, 0x4c, 0xad, 0x15, 0x86, 0x93, 0x8f, 0x74, 0x28, 0x53, 0x5e, + 0xa9, 0x9f, 0xbf, 0xf5, 0x1a, 0xc6, 0x2e, 0x74, 0xaa, 0x22, 0xb4, 0x0e, 0xad, 0xb2, 0x62, 0xb6, + 0x44, 0x5d, 0x58, 0xac, 0x94, 0xc9, 0x8e, 0x8b, 0xbd, 0xf1, 0x5d, 0x85, 0xd5, 0xf9, 0xee, 0x10, + 0x85, 0x07, 0x41, 0x8a, 0x5d, 0x8e, 0x19, 0x77, 0x7c, 0x1a, 0x31, 0xec, 0x4f, 0x39, 0x99, 0xe1, + 0xac, 0x0f, 0xc7, 0x3b, 0x73, 0x68, 0x8c, 0x53, 0x97, 0xd3, 0x54, 0x53, 0x84, 0xe3, 0x5e, 0xdd, + 0xf1, 0x7b, 0x19, 0xcf, 0x4d, 0xf7, 0x73, 0xd8, 0x5e, 0xc9, 0xb2, 0x71, 0x32, 0x3c, 0xcb, 0x85, + 0xe8, 0x13, 0x68, 0x45, 0xc1, 0x7a, 0x91, 0xe6, 0xdf, 0x15, 0xf9, 0x3f, 0x07, 0xcc, 0x93, 0x5f, + 0x54, 0xc8, 0xb5, 0x56, 0xc4, 0xa7, 0x56, 0xad, 0x8d, 0xdb, 0xdd, 0xa1, 0x87, 0x80, 0x62, 0x39, + 0x64, 0xfe, 0xc4, 0x25, 0x61, 0x96, 0xc2, 0x34, 0xb5, 0xdf, 0xda, 0x56, 0xad, 0x75, 0x19, 0xd9, + 0xcb, 0x02, 0x36, 0x4e, 0x18, 0xda, 0x85, 0x65, 0x9f, 0x86, 0x21, 0xe1, 0x21, 0x8e, 0x38, 0xd3, + 0xda, 0xc2, 0x74, 0xb7, 0x6e, 0x7a, 0xaf, 0x90, 0x58, 0x55, 0x39, 0x7a, 0x09, 0x10, 0xa7, 0x74, + 0x46, 0x18, 0xa1, 0x11, 0xd3, 0x16, 0x44, 0xf2, 0xe6, 0x8d, 0x5f, 0x21, 0x57, 0x58, 0x15, 0x31, + 0x72, 0xe1, 0x9e, 0x4f, 0xa3, 0x31, 0x49, 0x43, 0x3c, 0x72, 0xe4, 0x48, 0x95, 0x68, 0x6d, 0x51, + 0xb0, 0x8c, 0x9b, 0x46, 0x64, 0x4a, 0x09, 0xd5, 0x0a, 0x8c, 0x9d, 0xcd, 0x58, 0x69, 0x55, 0x4e, + 0xd9, 0x6b, 0x58, 0xab, 0xdd, 0x79, 0x36, 0x56, 0x95, 0x59, 0x50, 0xb6, 0x97, 0xac, 0x62, 0x9f, + 0x0f, 0x61, 0xb3, 0x18, 0x42, 0xe3, 0x08, 0xa0, 0x84, 0xfe, 0x5b, 0x2e, 0xd2, 0x01, 0x2a, 0x4d, + 0xb5, 0x84, 0xbe, 0x72, 0x62, 0x7c, 0x55, 0x60, 0xa9, 0x68, 0xa5, 0xa6, 0x56, 0xea, 0x6a, 0xb4, + 0x03, 0xea, 0xc8, 0xe5, 0xae, 0x7c, 0x36, 0xee, 0xdf, 0x79, 0xd1, 0xfb, 0x2e, 0x77, 0x2d, 0x21, + 0x45, 0xcf, 0xa1, 0x9d, 0xbd, 0x0f, 0x53, 0x26, 0x1f, 0x88, 0xde, 0x9d, 0x49, 0xb6, 0x90, 0x59, + 0x52, 0x6e, 0x1c, 0x00, 0xba, 0x79, 0xd9, 0xb7, 0xfc, 0xa2, 0xf3, 0x9e, 0x9b, 0x75, 0xcf, 0xc3, + 0xb7, 0xe7, 0x97, 0xba, 0x72, 0x71, 0xa9, 0x2b, 0xbf, 0x2f, 0x75, 0xe5, 0xcb, 0x95, 0xde, 0xb8, + 0xb8, 0xd2, 0x1b, 0x3f, 0xae, 0xf4, 0xc6, 0xd1, 0xe3, 0x80, 0xf0, 0xe3, 0xa9, 0x37, 0xf0, 0x69, + 0x68, 0x1e, 0x90, 0x88, 0xf9, 0xc7, 0xc4, 0x35, 0xc7, 0x72, 0xf1, 0x88, 0x8d, 0x4e, 0xcc, 0xd3, + 0xe2, 0x45, 0xe6, 0x67, 0x31, 0x66, 0x5e, 0x5b, 0xbc, 0xc6, 0x4f, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x4e, 0x85, 0xc3, 0xf2, 0xf1, 0x05, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ReceivingState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.SendingState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SendingState) 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 *SendingState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SendingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SeqToBlocknum) > 0 { + for iNdEx := len(m.SeqToBlocknum) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SeqToBlocknum[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.NextSeq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextSeq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BlockSeqInfo) 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 *BlockSeqInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockSeqInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Blocknum != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Blocknum)) + i-- + dAtA[i] = 0x10 + } + if m.Seq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ReceivingState) 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 *ReceivingState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReceivingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConfirmedSeqToCommitment) > 0 { + for iNdEx := len(m.ConfirmedSeqToCommitment) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ConfirmedSeqToCommitment[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.Provisions) > 0 { + for iNdEx := len(m.Provisions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Provisions[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.Commitments) > 0 { + for iNdEx := len(m.Commitments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Commitments[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.PendingClaimSeqs) > 0 { + dAtA5 := make([]byte, len(m.PendingClaimSeqs)*10) + var j4 int + for _, num := range m.PendingClaimSeqs { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintGenesis(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0x22 + } + if m.GreatestConsecutiveSeq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.GreatestConsecutiveSeq)) + i-- + dAtA[i] = 0x18 + } + if len(m.GreatestSeqByOperator) > 0 { + for iNdEx := len(m.GreatestSeqByOperator) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GreatestSeqByOperator[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.GreatestConsecutiveSeqByOperator) > 0 { + for iNdEx := len(m.GreatestConsecutiveSeqByOperator) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GreatestConsecutiveSeqByOperator[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *OperatorSeqInfo) 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 *OperatorSeqInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperatorSeqInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Commitment) 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 *Commitment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Commitment) > 0 { + i -= len(m.Commitment) + copy(dAtA[i:], m.Commitment) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Commitment))) + i-- + dAtA[i] = 0x1a + } + if m.Seq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Provision) 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 *Provision) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provision) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != nil { + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Data != nil { + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Commitment) > 0 { + i -= len(m.Commitment) + copy(dAtA[i:], m.Commitment) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Commitment))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConfirmedProvision) 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 *ConfirmedProvision) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfirmedProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Commitment) > 0 { + i -= len(m.Commitment) + copy(dAtA[i:], m.Commitment) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Commitment))) + i-- + dAtA[i] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.SendingState.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.ReceivingState.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *SendingState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NextSeq != 0 { + n += 1 + sovGenesis(uint64(m.NextSeq)) + } + if len(m.SeqToBlocknum) > 0 { + for _, e := range m.SeqToBlocknum { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *BlockSeqInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovGenesis(uint64(m.Seq)) + } + if m.Blocknum != 0 { + n += 1 + sovGenesis(uint64(m.Blocknum)) + } + return n +} + +func (m *ReceivingState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GreatestConsecutiveSeqByOperator) > 0 { + for _, e := range m.GreatestConsecutiveSeqByOperator { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.GreatestSeqByOperator) > 0 { + for _, e := range m.GreatestSeqByOperator { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.GreatestConsecutiveSeq != 0 { + n += 1 + sovGenesis(uint64(m.GreatestConsecutiveSeq)) + } + if len(m.PendingClaimSeqs) > 0 { + l = 0 + for _, e := range m.PendingClaimSeqs { + l += sovGenesis(uint64(e)) + } + n += 1 + sovGenesis(uint64(l)) + l + } + if len(m.Commitments) > 0 { + for _, e := range m.Commitments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Provisions) > 0 { + for _, e := range m.Provisions { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ConfirmedSeqToCommitment) > 0 { + for _, e := range m.ConfirmedSeqToCommitment { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *OperatorSeqInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovGenesis(uint64(m.Seq)) + } + return n +} + +func (m *Commitment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovGenesis(uint64(m.Seq)) + } + l = len(m.Commitment) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *Provision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Commitment) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *ConfirmedProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovGenesis(uint64(m.Seq)) + } + l = len(m.Commitment) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: 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 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SendingState", 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 + } + if err := m.SendingState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceivingState", 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 + } + if err := m.ReceivingState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SendingState) 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 ErrIntOverflowGenesis + } + 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: SendingState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SendingState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextSeq", wireType) + } + m.NextSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeqToBlocknum", 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.SeqToBlocknum = append(m.SeqToBlocknum, &BlockSeqInfo{}) + if err := m.SeqToBlocknum[len(m.SeqToBlocknum)-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 (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockSeqInfo) 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 ErrIntOverflowGenesis + } + 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: BlockSeqInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockSeqInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Blocknum", wireType) + } + m.Blocknum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Blocknum |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReceivingState) 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 ErrIntOverflowGenesis + } + 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: ReceivingState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReceivingState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GreatestConsecutiveSeqByOperator", 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.GreatestConsecutiveSeqByOperator = append(m.GreatestConsecutiveSeqByOperator, &OperatorSeqInfo{}) + if err := m.GreatestConsecutiveSeqByOperator[len(m.GreatestConsecutiveSeqByOperator)-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 GreatestSeqByOperator", 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.GreatestSeqByOperator = append(m.GreatestSeqByOperator, &OperatorSeqInfo{}) + if err := m.GreatestSeqByOperator[len(m.GreatestSeqByOperator)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GreatestConsecutiveSeq", wireType) + } + m.GreatestConsecutiveSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GreatestConsecutiveSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PendingClaimSeqs = append(m.PendingClaimSeqs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.PendingClaimSeqs) == 0 { + m.PendingClaimSeqs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PendingClaimSeqs = append(m.PendingClaimSeqs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field PendingClaimSeqs", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitments", 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.Commitments = append(m.Commitments, &Commitment{}) + if err := m.Commitments[len(m.Commitments)-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 Provisions", 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.Provisions = append(m.Provisions, &Provision{}) + if err := m.Provisions[len(m.Provisions)-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 ConfirmedSeqToCommitment", 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.ConfirmedSeqToCommitment = append(m.ConfirmedSeqToCommitment, &ConfirmedProvision{}) + if err := m.ConfirmedSeqToCommitment[len(m.ConfirmedSeqToCommitment)-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 (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperatorSeqInfo) 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 ErrIntOverflowGenesis + } + 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: OperatorSeqInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperatorSeqInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commitment) 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 ErrIntOverflowGenesis + } + 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: Commitment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commitment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitment", 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.Commitment = 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 + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Provision) 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 ErrIntOverflowGenesis + } + 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: Provision: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provision: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitment", 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.Commitment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", 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 + } + if m.Data == nil { + m.Data = &ProvisionData{} + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", 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 + } + if m.Status == nil { + m.Status = &ProvisionStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfirmedProvision) 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 ErrIntOverflowGenesis + } + 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: ConfirmedProvision: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfirmedProvision: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitment", 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.Commitment = 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 + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/fbridge/types/keys.go b/x/fbridge/types/keys.go new file mode 100644 index 0000000000..db369517f7 --- /dev/null +++ b/x/fbridge/types/keys.go @@ -0,0 +1,9 @@ +package types + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "fbridge" + + // StoreKey is the store key string for distribution + StoreKey = ModuleName +) diff --git a/x/fbridge/types/msgs.go b/x/fbridge/types/msgs.go new file mode 100644 index 0000000000..fce2320548 --- /dev/null +++ b/x/fbridge/types/msgs.go @@ -0,0 +1,127 @@ +package types + +import sdk "github.com/Finschia/finschia-sdk/types" + +var ( + _ sdk.Msg = &MsgTransfer{} + _ sdk.Msg = &MsgProvision{} + _ sdk.Msg = &MsgHoldTransfer{} + _ sdk.Msg = &MsgReleaseTransfer{} + _ sdk.Msg = &MsgRemoveProvision{} + _ sdk.Msg = &MsgClaimBatch{} + _ sdk.Msg = &MsgClaim{} + _ sdk.Msg = &MsgSuggestRole{} + _ sdk.Msg = &MsgAddVoteForRole{} + _ sdk.Msg = &MsgHalt{} + _ sdk.Msg = &MsgResume{} +) + +func (m MsgTransfer) ValidateBasic() error { return nil } + +func (m MsgTransfer) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Sender)} +} + +func (m MsgTransfer) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgProvision) ValidateBasic() error { return nil } + +func (m MsgProvision) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgProvision) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgHoldTransfer) ValidateBasic() error { return nil } + +func (m MsgHoldTransfer) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgHoldTransfer) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgReleaseTransfer) ValidateBasic() error { return nil } + +func (m MsgReleaseTransfer) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgReleaseTransfer) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgRemoveProvision) ValidateBasic() error { return nil } + +func (m MsgRemoveProvision) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgRemoveProvision) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgClaimBatch) ValidateBasic() error { return nil } + +func (m MsgClaimBatch) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgClaimBatch) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgClaim) ValidateBasic() error { return nil } + +func (m MsgClaim) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgClaim) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgSuggestRole) ValidateBasic() error { return nil } + +func (m MsgSuggestRole) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgSuggestRole) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgAddVoteForRole) ValidateBasic() error { return nil } + +func (m MsgAddVoteForRole) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgAddVoteForRole) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgHalt) ValidateBasic() error { return nil } + +func (m MsgHalt) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Guardian)} +} + +func (m MsgHalt) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgResume) ValidateBasic() error { return nil } + +func (m MsgResume) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgResume) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} diff --git a/x/fbridge/types/query.pb.go b/x/fbridge/types/query.pb.go new file mode 100644 index 0000000000..d43ba5168b --- /dev/null +++ b/x/fbridge/types/query.pb.go @@ -0,0 +1,5094 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/fbridge/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + query "github.com/Finschia/finschia-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QueryParamsRequest struct { +} + +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_5e7780f9db9d346e, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +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_5e7780f9db9d346e, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryNextSeqSendRequest struct { +} + +func (m *QueryNextSeqSendRequest) Reset() { *m = QueryNextSeqSendRequest{} } +func (m *QueryNextSeqSendRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNextSeqSendRequest) ProtoMessage() {} +func (*QueryNextSeqSendRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{2} +} +func (m *QueryNextSeqSendRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNextSeqSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNextSeqSendRequest.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 *QueryNextSeqSendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNextSeqSendRequest.Merge(m, src) +} +func (m *QueryNextSeqSendRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNextSeqSendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNextSeqSendRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNextSeqSendRequest proto.InternalMessageInfo + +type QueryNextSeqSendResponse struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *QueryNextSeqSendResponse) Reset() { *m = QueryNextSeqSendResponse{} } +func (m *QueryNextSeqSendResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNextSeqSendResponse) ProtoMessage() {} +func (*QueryNextSeqSendResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{3} +} +func (m *QueryNextSeqSendResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNextSeqSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNextSeqSendResponse.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 *QueryNextSeqSendResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNextSeqSendResponse.Merge(m, src) +} +func (m *QueryNextSeqSendResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNextSeqSendResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNextSeqSendResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNextSeqSendResponse proto.InternalMessageInfo + +func (m *QueryNextSeqSendResponse) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type QueryGreatestSeqByOperatorRequest struct { + // the address of the operator + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` +} + +func (m *QueryGreatestSeqByOperatorRequest) Reset() { *m = QueryGreatestSeqByOperatorRequest{} } +func (m *QueryGreatestSeqByOperatorRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGreatestSeqByOperatorRequest) ProtoMessage() {} +func (*QueryGreatestSeqByOperatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{4} +} +func (m *QueryGreatestSeqByOperatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGreatestSeqByOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGreatestSeqByOperatorRequest.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 *QueryGreatestSeqByOperatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestSeqByOperatorRequest.Merge(m, src) +} +func (m *QueryGreatestSeqByOperatorRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGreatestSeqByOperatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestSeqByOperatorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGreatestSeqByOperatorRequest proto.InternalMessageInfo + +func (m *QueryGreatestSeqByOperatorRequest) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +type QueryGreatestSeqByOperatorResponse struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *QueryGreatestSeqByOperatorResponse) Reset() { *m = QueryGreatestSeqByOperatorResponse{} } +func (m *QueryGreatestSeqByOperatorResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGreatestSeqByOperatorResponse) ProtoMessage() {} +func (*QueryGreatestSeqByOperatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{5} +} +func (m *QueryGreatestSeqByOperatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGreatestSeqByOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGreatestSeqByOperatorResponse.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 *QueryGreatestSeqByOperatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestSeqByOperatorResponse.Merge(m, src) +} +func (m *QueryGreatestSeqByOperatorResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGreatestSeqByOperatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestSeqByOperatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGreatestSeqByOperatorResponse proto.InternalMessageInfo + +func (m *QueryGreatestSeqByOperatorResponse) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type QueryGreatestConsecutiveConfirmedSeqRequest struct { +} + +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) Reset() { + *m = QueryGreatestConsecutiveConfirmedSeqRequest{} +} +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryGreatestConsecutiveConfirmedSeqRequest) ProtoMessage() {} +func (*QueryGreatestConsecutiveConfirmedSeqRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{6} +} +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest.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 *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest.Merge(m, src) +} +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest proto.InternalMessageInfo + +type QueryGreatestConsecutiveConfirmedSeqResponse struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) Reset() { + *m = QueryGreatestConsecutiveConfirmedSeqResponse{} +} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryGreatestConsecutiveConfirmedSeqResponse) ProtoMessage() {} +func (*QueryGreatestConsecutiveConfirmedSeqResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{7} +} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse.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 *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse.Merge(m, src) +} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse proto.InternalMessageInfo + +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type QuerySubmittedProvisionRequest struct { + // the address of the operator + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *QuerySubmittedProvisionRequest) Reset() { *m = QuerySubmittedProvisionRequest{} } +func (m *QuerySubmittedProvisionRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubmittedProvisionRequest) ProtoMessage() {} +func (*QuerySubmittedProvisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{8} +} +func (m *QuerySubmittedProvisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubmittedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubmittedProvisionRequest.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 *QuerySubmittedProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubmittedProvisionRequest.Merge(m, src) +} +func (m *QuerySubmittedProvisionRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubmittedProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubmittedProvisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubmittedProvisionRequest proto.InternalMessageInfo + +func (m *QuerySubmittedProvisionRequest) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *QuerySubmittedProvisionRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type QuerySubmittedProvisionResponse struct { + Data ProvisionData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Status ProvisionStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status"` +} + +func (m *QuerySubmittedProvisionResponse) Reset() { *m = QuerySubmittedProvisionResponse{} } +func (m *QuerySubmittedProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubmittedProvisionResponse) ProtoMessage() {} +func (*QuerySubmittedProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{9} +} +func (m *QuerySubmittedProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubmittedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubmittedProvisionResponse.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 *QuerySubmittedProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubmittedProvisionResponse.Merge(m, src) +} +func (m *QuerySubmittedProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubmittedProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubmittedProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubmittedProvisionResponse proto.InternalMessageInfo + +func (m *QuerySubmittedProvisionResponse) GetData() ProvisionData { + if m != nil { + return m.Data + } + return ProvisionData{} +} + +func (m *QuerySubmittedProvisionResponse) GetStatus() ProvisionStatus { + if m != nil { + return m.Status + } + return ProvisionStatus{} +} + +type QueryNeededSubmissionSeqsRequest struct { + // the address of the operator + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // range specifies the size of the range to search + Range uint64 `protobuf:"varint,2,opt,name=range,proto3" json:"range,omitempty"` +} + +func (m *QueryNeededSubmissionSeqsRequest) Reset() { *m = QueryNeededSubmissionSeqsRequest{} } +func (m *QueryNeededSubmissionSeqsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNeededSubmissionSeqsRequest) ProtoMessage() {} +func (*QueryNeededSubmissionSeqsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{10} +} +func (m *QueryNeededSubmissionSeqsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNeededSubmissionSeqsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNeededSubmissionSeqsRequest.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 *QueryNeededSubmissionSeqsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNeededSubmissionSeqsRequest.Merge(m, src) +} +func (m *QueryNeededSubmissionSeqsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNeededSubmissionSeqsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNeededSubmissionSeqsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNeededSubmissionSeqsRequest proto.InternalMessageInfo + +func (m *QueryNeededSubmissionSeqsRequest) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *QueryNeededSubmissionSeqsRequest) GetRange() uint64 { + if m != nil { + return m.Range + } + return 0 +} + +type QueryNeededSubmissionSeqsResponse struct { + Seqs []uint64 `protobuf:"varint,1,rep,packed,name=seqs,proto3" json:"seqs,omitempty"` +} + +func (m *QueryNeededSubmissionSeqsResponse) Reset() { *m = QueryNeededSubmissionSeqsResponse{} } +func (m *QueryNeededSubmissionSeqsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNeededSubmissionSeqsResponse) ProtoMessage() {} +func (*QueryNeededSubmissionSeqsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{11} +} +func (m *QueryNeededSubmissionSeqsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNeededSubmissionSeqsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNeededSubmissionSeqsResponse.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 *QueryNeededSubmissionSeqsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNeededSubmissionSeqsResponse.Merge(m, src) +} +func (m *QueryNeededSubmissionSeqsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNeededSubmissionSeqsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNeededSubmissionSeqsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNeededSubmissionSeqsResponse proto.InternalMessageInfo + +func (m *QueryNeededSubmissionSeqsResponse) GetSeqs() []uint64 { + if m != nil { + return m.Seqs + } + return nil +} + +type QueryConfirmedProvisionRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *QueryConfirmedProvisionRequest) Reset() { *m = QueryConfirmedProvisionRequest{} } +func (m *QueryConfirmedProvisionRequest) String() string { return proto.CompactTextString(m) } +func (*QueryConfirmedProvisionRequest) ProtoMessage() {} +func (*QueryConfirmedProvisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{12} +} +func (m *QueryConfirmedProvisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConfirmedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConfirmedProvisionRequest.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 *QueryConfirmedProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConfirmedProvisionRequest.Merge(m, src) +} +func (m *QueryConfirmedProvisionRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryConfirmedProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConfirmedProvisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConfirmedProvisionRequest proto.InternalMessageInfo + +func (m *QueryConfirmedProvisionRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type QueryConfirmedProvisionResponse struct { + Data ProvisionData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Status ProvisionStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status"` +} + +func (m *QueryConfirmedProvisionResponse) Reset() { *m = QueryConfirmedProvisionResponse{} } +func (m *QueryConfirmedProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*QueryConfirmedProvisionResponse) ProtoMessage() {} +func (*QueryConfirmedProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{13} +} +func (m *QueryConfirmedProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConfirmedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConfirmedProvisionResponse.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 *QueryConfirmedProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConfirmedProvisionResponse.Merge(m, src) +} +func (m *QueryConfirmedProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryConfirmedProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConfirmedProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConfirmedProvisionResponse proto.InternalMessageInfo + +func (m *QueryConfirmedProvisionResponse) GetData() ProvisionData { + if m != nil { + return m.Data + } + return ProvisionData{} +} + +func (m *QueryConfirmedProvisionResponse) GetStatus() ProvisionStatus { + if m != nil { + return m.Status + } + return ProvisionStatus{} +} + +type QueryCommitmentsRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *QueryCommitmentsRequest) Reset() { *m = QueryCommitmentsRequest{} } +func (m *QueryCommitmentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCommitmentsRequest) ProtoMessage() {} +func (*QueryCommitmentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{14} +} +func (m *QueryCommitmentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCommitmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommitmentsRequest.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 *QueryCommitmentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommitmentsRequest.Merge(m, src) +} +func (m *QueryCommitmentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCommitmentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommitmentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommitmentsRequest proto.InternalMessageInfo + +func (m *QueryCommitmentsRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type QueryCommitmentsResponse struct { + Commitments []string `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` +} + +func (m *QueryCommitmentsResponse) Reset() { *m = QueryCommitmentsResponse{} } +func (m *QueryCommitmentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCommitmentsResponse) ProtoMessage() {} +func (*QueryCommitmentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{15} +} +func (m *QueryCommitmentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCommitmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommitmentsResponse.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 *QueryCommitmentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommitmentsResponse.Merge(m, src) +} +func (m *QueryCommitmentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCommitmentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommitmentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommitmentsResponse proto.InternalMessageInfo + +func (m *QueryCommitmentsResponse) GetCommitments() []string { + if m != nil { + return m.Commitments + } + return nil +} + +type QueryGuardiansRequest struct { +} + +func (m *QueryGuardiansRequest) Reset() { *m = QueryGuardiansRequest{} } +func (m *QueryGuardiansRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGuardiansRequest) ProtoMessage() {} +func (*QueryGuardiansRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{16} +} +func (m *QueryGuardiansRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGuardiansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGuardiansRequest.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 *QueryGuardiansRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGuardiansRequest.Merge(m, src) +} +func (m *QueryGuardiansRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGuardiansRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGuardiansRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGuardiansRequest proto.InternalMessageInfo + +type QueryGuardiansResponse struct { + Guardians []string `protobuf:"bytes,1,rep,name=guardians,proto3" json:"guardians,omitempty"` +} + +func (m *QueryGuardiansResponse) Reset() { *m = QueryGuardiansResponse{} } +func (m *QueryGuardiansResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGuardiansResponse) ProtoMessage() {} +func (*QueryGuardiansResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{17} +} +func (m *QueryGuardiansResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGuardiansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGuardiansResponse.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 *QueryGuardiansResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGuardiansResponse.Merge(m, src) +} +func (m *QueryGuardiansResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGuardiansResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGuardiansResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGuardiansResponse proto.InternalMessageInfo + +func (m *QueryGuardiansResponse) GetGuardians() []string { + if m != nil { + return m.Guardians + } + return nil +} + +type QueryOperatorsRequest struct { +} + +func (m *QueryOperatorsRequest) Reset() { *m = QueryOperatorsRequest{} } +func (m *QueryOperatorsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOperatorsRequest) ProtoMessage() {} +func (*QueryOperatorsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{18} +} +func (m *QueryOperatorsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOperatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOperatorsRequest.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 *QueryOperatorsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOperatorsRequest.Merge(m, src) +} +func (m *QueryOperatorsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOperatorsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOperatorsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOperatorsRequest proto.InternalMessageInfo + +type QueryOperatorsResponse struct { + Operators []string `protobuf:"bytes,1,rep,name=operators,proto3" json:"operators,omitempty"` +} + +func (m *QueryOperatorsResponse) Reset() { *m = QueryOperatorsResponse{} } +func (m *QueryOperatorsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOperatorsResponse) ProtoMessage() {} +func (*QueryOperatorsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{19} +} +func (m *QueryOperatorsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOperatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOperatorsResponse.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 *QueryOperatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOperatorsResponse.Merge(m, src) +} +func (m *QueryOperatorsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOperatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOperatorsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOperatorsResponse proto.InternalMessageInfo + +func (m *QueryOperatorsResponse) GetOperators() []string { + if m != nil { + return m.Operators + } + return nil +} + +type QueryJudgesRequest struct { +} + +func (m *QueryJudgesRequest) Reset() { *m = QueryJudgesRequest{} } +func (m *QueryJudgesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryJudgesRequest) ProtoMessage() {} +func (*QueryJudgesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{20} +} +func (m *QueryJudgesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryJudgesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryJudgesRequest.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 *QueryJudgesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJudgesRequest.Merge(m, src) +} +func (m *QueryJudgesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryJudgesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJudgesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryJudgesRequest proto.InternalMessageInfo + +type QueryJudgesResponse struct { + Judges []string `protobuf:"bytes,1,rep,name=judges,proto3" json:"judges,omitempty"` +} + +func (m *QueryJudgesResponse) Reset() { *m = QueryJudgesResponse{} } +func (m *QueryJudgesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryJudgesResponse) ProtoMessage() {} +func (*QueryJudgesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{21} +} +func (m *QueryJudgesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryJudgesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryJudgesResponse.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 *QueryJudgesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJudgesResponse.Merge(m, src) +} +func (m *QueryJudgesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryJudgesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJudgesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryJudgesResponse proto.InternalMessageInfo + +func (m *QueryJudgesResponse) GetJudges() []string { + if m != nil { + return m.Judges + } + return nil +} + +type QueryProposalsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProposalsRequest) Reset() { *m = QueryProposalsRequest{} } +func (m *QueryProposalsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsRequest) ProtoMessage() {} +func (*QueryProposalsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{22} +} +func (m *QueryProposalsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalsRequest.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 *QueryProposalsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsRequest.Merge(m, src) +} +func (m *QueryProposalsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalsRequest proto.InternalMessageInfo + +func (m *QueryProposalsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryProposalsResponse struct { + Proposals []*RoleProposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` +} + +func (m *QueryProposalsResponse) Reset() { *m = QueryProposalsResponse{} } +func (m *QueryProposalsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsResponse) ProtoMessage() {} +func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{23} +} +func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalsResponse.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 *QueryProposalsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsResponse.Merge(m, src) +} +func (m *QueryProposalsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalsResponse proto.InternalMessageInfo + +func (m *QueryProposalsResponse) GetProposals() []*RoleProposal { + if m != nil { + return m.Proposals + } + return nil +} + +type QueryProposalRequest struct { + // the proposal id + ProposalId string `protobuf:"bytes,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *QueryProposalRequest) Reset() { *m = QueryProposalRequest{} } +func (m *QueryProposalRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProposalRequest) ProtoMessage() {} +func (*QueryProposalRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{24} +} +func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalRequest.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 *QueryProposalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalRequest.Merge(m, src) +} +func (m *QueryProposalRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalRequest proto.InternalMessageInfo + +func (m *QueryProposalRequest) GetProposalId() string { + if m != nil { + return m.ProposalId + } + return "" +} + +type QueryProposalResponse struct { + Proposal *RoleProposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` +} + +func (m *QueryProposalResponse) Reset() { *m = QueryProposalResponse{} } +func (m *QueryProposalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalResponse) ProtoMessage() {} +func (*QueryProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{25} +} +func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalResponse.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 *QueryProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalResponse.Merge(m, src) +} +func (m *QueryProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalResponse proto.InternalMessageInfo + +func (m *QueryProposalResponse) GetProposal() *RoleProposal { + if m != nil { + return m.Proposal + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "lbm.fbridge.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "lbm.fbridge.v1.QueryParamsResponse") + proto.RegisterType((*QueryNextSeqSendRequest)(nil), "lbm.fbridge.v1.QueryNextSeqSendRequest") + proto.RegisterType((*QueryNextSeqSendResponse)(nil), "lbm.fbridge.v1.QueryNextSeqSendResponse") + proto.RegisterType((*QueryGreatestSeqByOperatorRequest)(nil), "lbm.fbridge.v1.QueryGreatestSeqByOperatorRequest") + proto.RegisterType((*QueryGreatestSeqByOperatorResponse)(nil), "lbm.fbridge.v1.QueryGreatestSeqByOperatorResponse") + proto.RegisterType((*QueryGreatestConsecutiveConfirmedSeqRequest)(nil), "lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqRequest") + proto.RegisterType((*QueryGreatestConsecutiveConfirmedSeqResponse)(nil), "lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqResponse") + proto.RegisterType((*QuerySubmittedProvisionRequest)(nil), "lbm.fbridge.v1.QuerySubmittedProvisionRequest") + proto.RegisterType((*QuerySubmittedProvisionResponse)(nil), "lbm.fbridge.v1.QuerySubmittedProvisionResponse") + proto.RegisterType((*QueryNeededSubmissionSeqsRequest)(nil), "lbm.fbridge.v1.QueryNeededSubmissionSeqsRequest") + proto.RegisterType((*QueryNeededSubmissionSeqsResponse)(nil), "lbm.fbridge.v1.QueryNeededSubmissionSeqsResponse") + proto.RegisterType((*QueryConfirmedProvisionRequest)(nil), "lbm.fbridge.v1.QueryConfirmedProvisionRequest") + proto.RegisterType((*QueryConfirmedProvisionResponse)(nil), "lbm.fbridge.v1.QueryConfirmedProvisionResponse") + proto.RegisterType((*QueryCommitmentsRequest)(nil), "lbm.fbridge.v1.QueryCommitmentsRequest") + proto.RegisterType((*QueryCommitmentsResponse)(nil), "lbm.fbridge.v1.QueryCommitmentsResponse") + proto.RegisterType((*QueryGuardiansRequest)(nil), "lbm.fbridge.v1.QueryGuardiansRequest") + proto.RegisterType((*QueryGuardiansResponse)(nil), "lbm.fbridge.v1.QueryGuardiansResponse") + proto.RegisterType((*QueryOperatorsRequest)(nil), "lbm.fbridge.v1.QueryOperatorsRequest") + proto.RegisterType((*QueryOperatorsResponse)(nil), "lbm.fbridge.v1.QueryOperatorsResponse") + proto.RegisterType((*QueryJudgesRequest)(nil), "lbm.fbridge.v1.QueryJudgesRequest") + proto.RegisterType((*QueryJudgesResponse)(nil), "lbm.fbridge.v1.QueryJudgesResponse") + proto.RegisterType((*QueryProposalsRequest)(nil), "lbm.fbridge.v1.QueryProposalsRequest") + proto.RegisterType((*QueryProposalsResponse)(nil), "lbm.fbridge.v1.QueryProposalsResponse") + proto.RegisterType((*QueryProposalRequest)(nil), "lbm.fbridge.v1.QueryProposalRequest") + proto.RegisterType((*QueryProposalResponse)(nil), "lbm.fbridge.v1.QueryProposalResponse") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/query.proto", fileDescriptor_5e7780f9db9d346e) } + +var fileDescriptor_5e7780f9db9d346e = []byte{ + // 1152 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xb6, 0x69, 0x14, 0x3f, 0x4b, 0x80, 0x86, 0x34, 0x4d, 0x4d, 0xb0, 0x93, 0x6d, 0x9b, + 0x86, 0x36, 0xd9, 0x8d, 0x4d, 0x94, 0x20, 0x9a, 0x0a, 0x94, 0xa0, 0x22, 0x8a, 0x54, 0x52, 0xa7, + 0x27, 0x2e, 0xd6, 0xda, 0x3b, 0xd9, 0x2e, 0xd8, 0x3b, 0xde, 0x9d, 0x75, 0x94, 0x28, 0xca, 0xa5, + 0x07, 0x2e, 0x08, 0x09, 0x89, 0x13, 0x17, 0xfe, 0x06, 0xa4, 0xfe, 0x03, 0x1c, 0x7b, 0xe0, 0x50, + 0x89, 0x0b, 0x27, 0x84, 0x12, 0xfe, 0x10, 0xb4, 0xb3, 0x6f, 0xc6, 0xf6, 0xae, 0xc7, 0x71, 0xb9, + 0x70, 0x9b, 0x7d, 0xf3, 0xbe, 0xef, 0x7d, 0x6f, 0x7e, 0x7d, 0x36, 0x94, 0xda, 0xcd, 0x8e, 0x7d, + 0xd8, 0x8c, 0x7c, 0xd7, 0xa3, 0xf6, 0x51, 0xd5, 0x0e, 0x7b, 0x34, 0x3a, 0xb1, 0xba, 0x11, 0x8b, + 0x19, 0x79, 0xab, 0xdd, 0xec, 0x58, 0x38, 0x67, 0x1d, 0x55, 0x4b, 0x8b, 0x1e, 0x63, 0x5e, 0x9b, + 0xda, 0x4e, 0xd7, 0xb7, 0x9d, 0x20, 0x60, 0xb1, 0x13, 0xfb, 0x2c, 0xe0, 0x69, 0x76, 0x69, 0xce, + 0x63, 0x1e, 0x13, 0x43, 0x3b, 0x19, 0x61, 0xf4, 0x5e, 0x8b, 0xf1, 0x0e, 0xe3, 0x76, 0xd3, 0xe1, + 0x34, 0x25, 0xb7, 0x8f, 0xaa, 0x4d, 0x1a, 0x3b, 0x55, 0xbb, 0xeb, 0x78, 0x7e, 0x20, 0x28, 0x30, + 0x77, 0x31, 0xa3, 0x45, 0x96, 0x16, 0xb3, 0xe6, 0x1c, 0x90, 0xa7, 0x09, 0x7e, 0xdf, 0x89, 0x9c, + 0x0e, 0xaf, 0xd3, 0xb0, 0x47, 0x79, 0x6c, 0x7e, 0x09, 0xef, 0x0e, 0x45, 0x79, 0x97, 0x05, 0x9c, + 0x92, 0x4d, 0x98, 0xe9, 0x8a, 0xc8, 0x82, 0xb1, 0x64, 0xac, 0x16, 0x6b, 0xf3, 0xd6, 0x70, 0x2f, + 0x56, 0x9a, 0xbf, 0x3b, 0xfd, 0xea, 0xaf, 0xca, 0x54, 0x1d, 0x73, 0xcd, 0x9b, 0x70, 0x43, 0x90, + 0x3d, 0xa1, 0xc7, 0xf1, 0x01, 0x0d, 0x0f, 0x68, 0xe0, 0xca, 0x3a, 0x6b, 0xb0, 0x90, 0x9f, 0xc2, + 0x62, 0xef, 0xc0, 0x55, 0x4e, 0x43, 0x51, 0x69, 0xba, 0x9e, 0x0c, 0xcd, 0x4f, 0x60, 0x59, 0x64, + 0x7f, 0x1e, 0x51, 0x27, 0xa6, 0x3c, 0x41, 0xec, 0x9e, 0x7c, 0xd5, 0xa5, 0x91, 0x13, 0xb3, 0x08, + 0x29, 0x49, 0x09, 0x66, 0x19, 0x86, 0x04, 0xb6, 0x50, 0x57, 0xdf, 0xe6, 0x16, 0x98, 0xe3, 0x08, + 0xb4, 0x85, 0xd7, 0xe1, 0xfe, 0x10, 0x6e, 0x2f, 0xc9, 0x6b, 0xf5, 0x62, 0xff, 0x88, 0xee, 0xb1, + 0xe0, 0xd0, 0x8f, 0x3a, 0xd4, 0x3d, 0xa0, 0xa1, 0xec, 0xea, 0x53, 0x58, 0x9b, 0x2c, 0x5d, 0x5b, + 0xf0, 0x09, 0x94, 0x05, 0xc3, 0x41, 0xaf, 0xd9, 0xf1, 0xe3, 0x98, 0xba, 0xfb, 0x11, 0x3b, 0xf2, + 0xb9, 0xcf, 0x82, 0x09, 0xda, 0x94, 0x7c, 0x57, 0xfa, 0x7c, 0x3f, 0x1b, 0x50, 0xd1, 0x12, 0xa2, + 0x8a, 0x6d, 0x98, 0x76, 0x9d, 0xd8, 0xc1, 0xad, 0x7d, 0x3f, 0xb7, 0xb5, 0x12, 0xf0, 0x99, 0x13, + 0x3b, 0xb8, 0xc3, 0x02, 0x40, 0x1e, 0xc2, 0x0c, 0x8f, 0x9d, 0xb8, 0xc7, 0x45, 0xc5, 0x62, 0xad, + 0xa2, 0x85, 0x1e, 0x88, 0x34, 0x79, 0x3c, 0x52, 0x90, 0xf9, 0x0c, 0x96, 0xf0, 0x0c, 0x50, 0x97, + 0xba, 0x42, 0x20, 0x17, 0xc9, 0x34, 0xe4, 0x93, 0x74, 0x3b, 0x07, 0xd7, 0x22, 0x27, 0xf0, 0x28, + 0xf6, 0x9b, 0x7e, 0x98, 0xdb, 0x78, 0x56, 0x46, 0xb3, 0x62, 0xcb, 0x04, 0xa6, 0x39, 0x0d, 0x93, + 0xd3, 0x7c, 0x75, 0x75, 0xba, 0x2e, 0xc6, 0x66, 0x0d, 0x97, 0x5e, 0xed, 0x54, 0x6e, 0xe9, 0xf3, + 0xdb, 0xa5, 0x96, 0x77, 0x14, 0xe8, 0x7f, 0x5e, 0xde, 0xfb, 0x78, 0xfb, 0xf6, 0x58, 0xa7, 0xe3, + 0xc7, 0x1d, 0x1a, 0xc4, 0x5c, 0xdf, 0xc8, 0x0e, 0xde, 0xc7, 0xa1, 0x64, 0x6c, 0x60, 0x09, 0x8a, + 0xad, 0x7e, 0x58, 0xac, 0x59, 0xa1, 0x3e, 0x18, 0x32, 0x6f, 0xc0, 0xf5, 0xf4, 0xdc, 0xf7, 0x9c, + 0xc8, 0xf5, 0x9d, 0x40, 0x3d, 0x27, 0x5b, 0x30, 0x9f, 0x9d, 0x40, 0xd2, 0x45, 0x28, 0x78, 0x32, + 0x88, 0x94, 0xfd, 0x80, 0x22, 0x94, 0x57, 0x34, 0x47, 0x38, 0x30, 0xd1, 0x27, 0x94, 0x27, 0x43, + 0x11, 0xaa, 0x80, 0x7a, 0xed, 0x1e, 0xf7, 0x5c, 0x8f, 0x2a, 0xb6, 0x75, 0x7c, 0xed, 0x64, 0x14, + 0xa9, 0xe6, 0x61, 0xe6, 0x1b, 0x11, 0x41, 0x1e, 0xfc, 0x32, 0x1b, 0xa8, 0x6a, 0x3f, 0x62, 0x5d, + 0xc6, 0x9d, 0xb6, 0x5a, 0xcf, 0x47, 0x00, 0xfd, 0xd7, 0x17, 0x37, 0x7a, 0xc5, 0x4a, 0x9f, 0x6a, + 0x2b, 0x79, 0xaa, 0xad, 0xd4, 0x07, 0xf0, 0xa9, 0xb6, 0xf6, 0x1d, 0x8f, 0x22, 0xb6, 0x3e, 0x80, + 0x34, 0x9f, 0x61, 0x77, 0x03, 0x05, 0x50, 0xd2, 0xc7, 0x50, 0xe8, 0xca, 0xa0, 0x50, 0x55, 0xac, + 0x2d, 0x66, 0x8f, 0x43, 0x9d, 0xb5, 0xa9, 0x44, 0xd6, 0xfb, 0xe9, 0xe6, 0x36, 0xcc, 0x0d, 0xb1, + 0x4a, 0xd5, 0x15, 0x28, 0xca, 0xa4, 0x86, 0xef, 0xe2, 0xf5, 0x02, 0x19, 0xfa, 0xc2, 0x35, 0x9f, + 0x66, 0xfa, 0x55, 0x6a, 0x3e, 0x82, 0x59, 0x99, 0x86, 0xdd, 0x8e, 0x17, 0xa3, 0xb2, 0x6b, 0x2f, + 0xdf, 0x86, 0x6b, 0x82, 0x93, 0x84, 0x30, 0x93, 0x9a, 0x06, 0x31, 0xb3, 0xd8, 0xbc, 0x2f, 0x95, + 0x6e, 0x8d, 0xcd, 0x49, 0x65, 0x99, 0xe5, 0x17, 0x7f, 0xfc, 0xf3, 0xd3, 0x95, 0x05, 0x32, 0x6f, + 0x67, 0x9c, 0x2f, 0xf5, 0x23, 0xf2, 0x9d, 0x01, 0xc5, 0x01, 0xc3, 0x21, 0x77, 0x47, 0x92, 0xe6, + 0xdd, 0xaa, 0xb4, 0x7a, 0x79, 0x22, 0x4a, 0xb8, 0x2d, 0x24, 0x94, 0xc9, 0x62, 0x56, 0x42, 0x40, + 0x8f, 0x63, 0x4e, 0xc3, 0x06, 0x4f, 0x0a, 0xff, 0x6a, 0xc0, 0xf5, 0x91, 0x56, 0x44, 0xaa, 0x23, + 0x2b, 0x8d, 0xf3, 0xbd, 0x52, 0xed, 0x4d, 0x20, 0x28, 0x73, 0x43, 0xc8, 0xbc, 0x47, 0x56, 0xb3, + 0x32, 0xd5, 0x8d, 0xb1, 0x4f, 0xe5, 0xf0, 0xcc, 0xe6, 0x34, 0x24, 0xbf, 0x1b, 0x50, 0xb9, 0xc4, + 0xd6, 0xc8, 0x83, 0xb1, 0x4a, 0xc6, 0x7b, 0x67, 0x69, 0xe7, 0xbf, 0x81, 0xb1, 0x21, 0x4b, 0x34, + 0xb4, 0x4a, 0x56, 0xb2, 0x0d, 0x79, 0x48, 0xd0, 0x68, 0x49, 0x58, 0x23, 0x69, 0xe7, 0xa5, 0x01, + 0x24, 0x6f, 0x89, 0xc4, 0x1a, 0x29, 0x42, 0x6b, 0xc6, 0x25, 0x7b, 0xe2, 0x7c, 0xd4, 0xb9, 0x23, + 0x74, 0x6e, 0x91, 0xcd, 0x89, 0x16, 0xbe, 0x2b, 0xf1, 0xf6, 0x29, 0xa7, 0xe1, 0x19, 0xf9, 0xc5, + 0x00, 0x92, 0x77, 0x1a, 0x8d, 0x6a, 0xad, 0x8f, 0x69, 0x54, 0xeb, 0x2d, 0xcc, 0xbc, 0x2b, 0x54, + 0x2f, 0x93, 0x4a, 0xee, 0x62, 0x65, 0x04, 0xfe, 0x66, 0xc0, 0xdc, 0x28, 0xe3, 0x25, 0x1b, 0x9a, + 0x1b, 0xa4, 0x75, 0xfe, 0x52, 0xf5, 0x0d, 0x10, 0x28, 0x73, 0x4f, 0xc8, 0x7c, 0x48, 0x1e, 0x4c, + 0xb4, 0xb8, 0x81, 0xa0, 0x6a, 0x70, 0xc5, 0x95, 0x1c, 0x0c, 0x4e, 0xbe, 0x37, 0xa0, 0x38, 0xe0, + 0x82, 0x9a, 0x47, 0x22, 0x6f, 0xaa, 0x9a, 0x47, 0x62, 0x84, 0xa1, 0x9a, 0x1f, 0x08, 0x9d, 0xb7, + 0xc8, 0x72, 0x56, 0xe7, 0x80, 0xa7, 0xe2, 0x82, 0x9e, 0x41, 0x41, 0x79, 0x27, 0xb9, 0x33, 0xfa, + 0x8a, 0x64, 0x4c, 0xb7, 0xb4, 0x72, 0x59, 0x1a, 0xca, 0x58, 0x16, 0x32, 0xde, 0x23, 0x37, 0x73, + 0x77, 0x46, 0x55, 0x3c, 0x83, 0x82, 0x72, 0x5a, 0x4d, 0xf9, 0xac, 0x45, 0x6b, 0xca, 0xe7, 0x0c, + 0x5b, 0x5f, 0x5e, 0xed, 0x56, 0xe2, 0x11, 0xa9, 0x35, 0x6b, 0x3c, 0x62, 0xc8, 0xcd, 0x35, 0x1e, + 0x31, 0xec, 0xed, 0x7a, 0x8f, 0x48, 0x3d, 0x9e, 0xbc, 0x30, 0xa0, 0xa0, 0xec, 0x57, 0xd3, 0x72, + 0xd6, 0xff, 0x35, 0x2d, 0xe7, 0x5c, 0xdc, 0x5c, 0x11, 0xc5, 0x97, 0x48, 0x39, 0x5b, 0x3c, 0x62, + 0x6d, 0x6a, 0x2b, 0xc7, 0x26, 0x3f, 0x18, 0x30, 0x2b, 0xd1, 0xe4, 0xf6, 0x58, 0x72, 0x29, 0xe1, + 0xce, 0x25, 0x59, 0xa8, 0x60, 0x53, 0x28, 0xb0, 0xc8, 0xda, 0x78, 0x05, 0xf6, 0xe9, 0xc0, 0x2f, + 0x83, 0xb3, 0xdd, 0xc7, 0xaf, 0xce, 0xcb, 0xc6, 0xeb, 0xf3, 0xb2, 0xf1, 0xf7, 0x79, 0xd9, 0xf8, + 0xf1, 0xa2, 0x3c, 0xf5, 0xfa, 0xa2, 0x3c, 0xf5, 0xe7, 0x45, 0x79, 0xea, 0xeb, 0x0d, 0xcf, 0x8f, + 0x9f, 0xf7, 0x9a, 0x56, 0x8b, 0x75, 0xec, 0x47, 0x7e, 0xc0, 0x5b, 0xcf, 0x7d, 0xc7, 0x3e, 0xc4, + 0xc1, 0x3a, 0x77, 0xbf, 0xb5, 0x8f, 0x55, 0x95, 0xf8, 0xa4, 0x4b, 0x79, 0x73, 0x46, 0xfc, 0xfd, + 0xfc, 0xf0, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0xe7, 0x3d, 0x95, 0x2a, 0x0f, 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 { + // Params queries the parameters of x/fbridge module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // NextSeqSend queries the sequence of next bridge request + NextSeqSend(ctx context.Context, in *QueryNextSeqSendRequest, opts ...grpc.CallOption) (*QueryNextSeqSendResponse, error) + // GreatestSeqByOperator queries a greatest sequence number confirmed by a particular operator + GreatestSeqByOperator(ctx context.Context, in *QueryGreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*QueryGreatestSeqByOperatorResponse, error) + // GreatestConsecutiveConfirmedSeq queries a greatest consecutive sequence number confirmed by n-of-m operators + GreatestConsecutiveConfirmedSeq(ctx context.Context, in *QueryGreatestConsecutiveConfirmedSeqRequest, opts ...grpc.CallOption) (*QueryGreatestConsecutiveConfirmedSeqResponse, error) + // SubmittedProvision queries a provision submitted by a particular operator + SubmittedProvision(ctx context.Context, in *QuerySubmittedProvisionRequest, opts ...grpc.CallOption) (*QuerySubmittedProvisionResponse, error) + // ConfirmedProvision queries a particular sequence of confirmed provisions + ConfirmedProvision(ctx context.Context, in *QueryConfirmedProvisionRequest, opts ...grpc.CallOption) (*QueryConfirmedProvisionResponse, error) + // NeededSubmissionSeqs queries a list of sequence numbers that need to be submitted by a particular operator + // The search scope is [greatest_consecutive_seq_by_operator, min(greatest_consecutive_seq_by_operator + range, + // greatest_seq_by_operator)] greatest_consecutive_seq_by_operator can be replaced with greatest_consecutive_seq if + // the operator is newly added + NeededSubmissionSeqs(ctx context.Context, in *QueryNeededSubmissionSeqsRequest, opts ...grpc.CallOption) (*QueryNeededSubmissionSeqsResponse, error) + // Commitments queries commitments of a specific sequence number + Commitments(ctx context.Context, in *QueryCommitmentsRequest, opts ...grpc.CallOption) (*QueryCommitmentsResponse, error) + // Guardians queries a list of Guardians registered on the bridge + Guardians(ctx context.Context, in *QueryGuardiansRequest, opts ...grpc.CallOption) (*QueryGuardiansResponse, error) + // Operators queries a list of Operators registered on the bridge + Operators(ctx context.Context, in *QueryOperatorsRequest, opts ...grpc.CallOption) (*QueryOperatorsResponse, error) + // Judges queries a list of Judges registered on the bridge + Judges(ctx context.Context, in *QueryJudgesRequest, opts ...grpc.CallOption) (*QueryJudgesResponse, error) + // Proposals queries a list of SuggestRole Proposals + Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) + // Proposal queries a SuggestRole Proposal + Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) NextSeqSend(ctx context.Context, in *QueryNextSeqSendRequest, opts ...grpc.CallOption) (*QueryNextSeqSendResponse, error) { + out := new(QueryNextSeqSendResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/NextSeqSend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GreatestSeqByOperator(ctx context.Context, in *QueryGreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*QueryGreatestSeqByOperatorResponse, error) { + out := new(QueryGreatestSeqByOperatorResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/GreatestSeqByOperator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GreatestConsecutiveConfirmedSeq(ctx context.Context, in *QueryGreatestConsecutiveConfirmedSeqRequest, opts ...grpc.CallOption) (*QueryGreatestConsecutiveConfirmedSeqResponse, error) { + out := new(QueryGreatestConsecutiveConfirmedSeqResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/GreatestConsecutiveConfirmedSeq", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubmittedProvision(ctx context.Context, in *QuerySubmittedProvisionRequest, opts ...grpc.CallOption) (*QuerySubmittedProvisionResponse, error) { + out := new(QuerySubmittedProvisionResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/SubmittedProvision", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ConfirmedProvision(ctx context.Context, in *QueryConfirmedProvisionRequest, opts ...grpc.CallOption) (*QueryConfirmedProvisionResponse, error) { + out := new(QueryConfirmedProvisionResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/ConfirmedProvision", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) NeededSubmissionSeqs(ctx context.Context, in *QueryNeededSubmissionSeqsRequest, opts ...grpc.CallOption) (*QueryNeededSubmissionSeqsResponse, error) { + out := new(QueryNeededSubmissionSeqsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/NeededSubmissionSeqs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Commitments(ctx context.Context, in *QueryCommitmentsRequest, opts ...grpc.CallOption) (*QueryCommitmentsResponse, error) { + out := new(QueryCommitmentsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Commitments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Guardians(ctx context.Context, in *QueryGuardiansRequest, opts ...grpc.CallOption) (*QueryGuardiansResponse, error) { + out := new(QueryGuardiansResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Guardians", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Operators(ctx context.Context, in *QueryOperatorsRequest, opts ...grpc.CallOption) (*QueryOperatorsResponse, error) { + out := new(QueryOperatorsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Operators", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Judges(ctx context.Context, in *QueryJudgesRequest, opts ...grpc.CallOption) (*QueryJudgesResponse, error) { + out := new(QueryJudgesResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Judges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) { + out := new(QueryProposalsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Proposals", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) { + out := new(QueryProposalResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Proposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries the parameters of x/fbridge module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // NextSeqSend queries the sequence of next bridge request + NextSeqSend(context.Context, *QueryNextSeqSendRequest) (*QueryNextSeqSendResponse, error) + // GreatestSeqByOperator queries a greatest sequence number confirmed by a particular operator + GreatestSeqByOperator(context.Context, *QueryGreatestSeqByOperatorRequest) (*QueryGreatestSeqByOperatorResponse, error) + // GreatestConsecutiveConfirmedSeq queries a greatest consecutive sequence number confirmed by n-of-m operators + GreatestConsecutiveConfirmedSeq(context.Context, *QueryGreatestConsecutiveConfirmedSeqRequest) (*QueryGreatestConsecutiveConfirmedSeqResponse, error) + // SubmittedProvision queries a provision submitted by a particular operator + SubmittedProvision(context.Context, *QuerySubmittedProvisionRequest) (*QuerySubmittedProvisionResponse, error) + // ConfirmedProvision queries a particular sequence of confirmed provisions + ConfirmedProvision(context.Context, *QueryConfirmedProvisionRequest) (*QueryConfirmedProvisionResponse, error) + // NeededSubmissionSeqs queries a list of sequence numbers that need to be submitted by a particular operator + // The search scope is [greatest_consecutive_seq_by_operator, min(greatest_consecutive_seq_by_operator + range, + // greatest_seq_by_operator)] greatest_consecutive_seq_by_operator can be replaced with greatest_consecutive_seq if + // the operator is newly added + NeededSubmissionSeqs(context.Context, *QueryNeededSubmissionSeqsRequest) (*QueryNeededSubmissionSeqsResponse, error) + // Commitments queries commitments of a specific sequence number + Commitments(context.Context, *QueryCommitmentsRequest) (*QueryCommitmentsResponse, error) + // Guardians queries a list of Guardians registered on the bridge + Guardians(context.Context, *QueryGuardiansRequest) (*QueryGuardiansResponse, error) + // Operators queries a list of Operators registered on the bridge + Operators(context.Context, *QueryOperatorsRequest) (*QueryOperatorsResponse, error) + // Judges queries a list of Judges registered on the bridge + Judges(context.Context, *QueryJudgesRequest) (*QueryJudgesResponse, error) + // Proposals queries a list of SuggestRole Proposals + Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error) + // Proposal queries a SuggestRole Proposal + Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) NextSeqSend(ctx context.Context, req *QueryNextSeqSendRequest) (*QueryNextSeqSendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NextSeqSend not implemented") +} +func (*UnimplementedQueryServer) GreatestSeqByOperator(ctx context.Context, req *QueryGreatestSeqByOperatorRequest) (*QueryGreatestSeqByOperatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GreatestSeqByOperator not implemented") +} +func (*UnimplementedQueryServer) GreatestConsecutiveConfirmedSeq(ctx context.Context, req *QueryGreatestConsecutiveConfirmedSeqRequest) (*QueryGreatestConsecutiveConfirmedSeqResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GreatestConsecutiveConfirmedSeq not implemented") +} +func (*UnimplementedQueryServer) SubmittedProvision(ctx context.Context, req *QuerySubmittedProvisionRequest) (*QuerySubmittedProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmittedProvision not implemented") +} +func (*UnimplementedQueryServer) ConfirmedProvision(ctx context.Context, req *QueryConfirmedProvisionRequest) (*QueryConfirmedProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConfirmedProvision not implemented") +} +func (*UnimplementedQueryServer) NeededSubmissionSeqs(ctx context.Context, req *QueryNeededSubmissionSeqsRequest) (*QueryNeededSubmissionSeqsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NeededSubmissionSeqs not implemented") +} +func (*UnimplementedQueryServer) Commitments(ctx context.Context, req *QueryCommitmentsRequest) (*QueryCommitmentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Commitments not implemented") +} +func (*UnimplementedQueryServer) Guardians(ctx context.Context, req *QueryGuardiansRequest) (*QueryGuardiansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Guardians not implemented") +} +func (*UnimplementedQueryServer) Operators(ctx context.Context, req *QueryOperatorsRequest) (*QueryOperatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Operators not implemented") +} +func (*UnimplementedQueryServer) Judges(ctx context.Context, req *QueryJudgesRequest) (*QueryJudgesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Judges not implemented") +} +func (*UnimplementedQueryServer) Proposals(ctx context.Context, req *QueryProposalsRequest) (*QueryProposalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proposals not implemented") +} +func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NextSeqSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNextSeqSendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NextSeqSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/NextSeqSend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NextSeqSend(ctx, req.(*QueryNextSeqSendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GreatestSeqByOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGreatestSeqByOperatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GreatestSeqByOperator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/GreatestSeqByOperator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GreatestSeqByOperator(ctx, req.(*QueryGreatestSeqByOperatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GreatestConsecutiveConfirmedSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGreatestConsecutiveConfirmedSeqRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GreatestConsecutiveConfirmedSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/GreatestConsecutiveConfirmedSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GreatestConsecutiveConfirmedSeq(ctx, req.(*QueryGreatestConsecutiveConfirmedSeqRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubmittedProvision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubmittedProvisionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubmittedProvision(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/SubmittedProvision", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubmittedProvision(ctx, req.(*QuerySubmittedProvisionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ConfirmedProvision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryConfirmedProvisionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConfirmedProvision(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/ConfirmedProvision", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConfirmedProvision(ctx, req.(*QueryConfirmedProvisionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NeededSubmissionSeqs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNeededSubmissionSeqsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NeededSubmissionSeqs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/NeededSubmissionSeqs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NeededSubmissionSeqs(ctx, req.(*QueryNeededSubmissionSeqsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Commitments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCommitmentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Commitments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Commitments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Commitments(ctx, req.(*QueryCommitmentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Guardians_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGuardiansRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Guardians(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Guardians", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Guardians(ctx, req.(*QueryGuardiansRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Operators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOperatorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Operators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Operators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Operators(ctx, req.(*QueryOperatorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Judges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryJudgesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Judges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Judges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Judges(ctx, req.(*QueryJudgesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Proposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Proposals(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Proposals", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Proposals(ctx, req.(*QueryProposalsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Proposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/Proposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Proposal(ctx, req.(*QueryProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lbm.fbridge.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "NextSeqSend", + Handler: _Query_NextSeqSend_Handler, + }, + { + MethodName: "GreatestSeqByOperator", + Handler: _Query_GreatestSeqByOperator_Handler, + }, + { + MethodName: "GreatestConsecutiveConfirmedSeq", + Handler: _Query_GreatestConsecutiveConfirmedSeq_Handler, + }, + { + MethodName: "SubmittedProvision", + Handler: _Query_SubmittedProvision_Handler, + }, + { + MethodName: "ConfirmedProvision", + Handler: _Query_ConfirmedProvision_Handler, + }, + { + MethodName: "NeededSubmissionSeqs", + Handler: _Query_NeededSubmissionSeqs_Handler, + }, + { + MethodName: "Commitments", + Handler: _Query_Commitments_Handler, + }, + { + MethodName: "Guardians", + Handler: _Query_Guardians_Handler, + }, + { + MethodName: "Operators", + Handler: _Query_Operators_Handler, + }, + { + MethodName: "Judges", + Handler: _Query_Judges_Handler, + }, + { + MethodName: "Proposals", + Handler: _Query_Proposals_Handler, + }, + { + MethodName: "Proposal", + Handler: _Query_Proposal_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lbm/fbridge/v1/query.proto", +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QueryNextSeqSendRequest) 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 *QueryNextSeqSendRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNextSeqSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryNextSeqSendResponse) 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 *QueryNextSeqSendResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNextSeqSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGreatestSeqByOperatorRequest) 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 *QueryGreatestSeqByOperatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGreatestSeqByOperatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGreatestSeqByOperatorResponse) 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 *QueryGreatestSeqByOperatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGreatestSeqByOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) 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 *QueryGreatestConsecutiveConfirmedSeqRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) 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 *QueryGreatestConsecutiveConfirmedSeqResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QuerySubmittedProvisionRequest) 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 *QuerySubmittedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubmittedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubmittedProvisionResponse) 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 *QuerySubmittedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubmittedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Data.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 *QueryNeededSubmissionSeqsRequest) 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 *QueryNeededSubmissionSeqsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNeededSubmissionSeqsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Range != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Range)) + i-- + dAtA[i] = 0x10 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryNeededSubmissionSeqsResponse) 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 *QueryNeededSubmissionSeqsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNeededSubmissionSeqsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Seqs) > 0 { + dAtA5 := make([]byte, len(m.Seqs)*10) + var j4 int + for _, num := range m.Seqs { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintQuery(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryConfirmedProvisionRequest) 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 *QueryConfirmedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConfirmedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryConfirmedProvisionResponse) 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 *QueryConfirmedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConfirmedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Data.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 *QueryCommitmentsRequest) 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 *QueryCommitmentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommitmentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryCommitmentsResponse) 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 *QueryCommitmentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Commitments) > 0 { + for iNdEx := len(m.Commitments) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Commitments[iNdEx]) + copy(dAtA[i:], m.Commitments[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Commitments[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGuardiansRequest) 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 *QueryGuardiansRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGuardiansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryGuardiansResponse) 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 *QueryGuardiansResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGuardiansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Guardians) > 0 { + for iNdEx := len(m.Guardians) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Guardians[iNdEx]) + copy(dAtA[i:], m.Guardians[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Guardians[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryOperatorsRequest) 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 *QueryOperatorsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOperatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryOperatorsResponse) 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 *QueryOperatorsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOperatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Operators) > 0 { + for iNdEx := len(m.Operators) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Operators[iNdEx]) + copy(dAtA[i:], m.Operators[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Operators[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryJudgesRequest) 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 *QueryJudgesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryJudgesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryJudgesResponse) 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 *QueryJudgesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryJudgesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Judges) > 0 { + for iNdEx := len(m.Judges) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Judges[iNdEx]) + copy(dAtA[i:], m.Judges[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Judges[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalsRequest) 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 *QueryProposalsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.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 *QueryProposalsResponse) 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 *QueryProposalsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Proposals) > 0 { + for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Proposals[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 *QueryProposalRequest) 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 *QueryProposalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProposalId) > 0 { + i -= len(m.ProposalId) + copy(dAtA[i:], m.ProposalId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposalId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalResponse) 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 *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Proposal != nil { + { + size, err := m.Proposal.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 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 *QueryNextSeqSendRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryNextSeqSendResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + return n +} + +func (m *QueryGreatestSeqByOperatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGreatestSeqByOperatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + return n +} + +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + return n +} + +func (m *QuerySubmittedProvisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + return n +} + +func (m *QuerySubmittedProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Data.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryNeededSubmissionSeqsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Range != 0 { + n += 1 + sovQuery(uint64(m.Range)) + } + return n +} + +func (m *QueryNeededSubmissionSeqsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Seqs) > 0 { + l = 0 + for _, e := range m.Seqs { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + return n +} + +func (m *QueryConfirmedProvisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + return n +} + +func (m *QueryConfirmedProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Data.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryCommitmentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + return n +} + +func (m *QueryCommitmentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Commitments) > 0 { + for _, s := range m.Commitments { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryGuardiansRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGuardiansResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Guardians) > 0 { + for _, s := range m.Guardians { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryOperatorsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryOperatorsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Operators) > 0 { + for _, s := range m.Operators { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryJudgesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryJudgesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Judges) > 0 { + for _, s := range m.Judges { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryProposalsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProposalsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Proposals) > 0 { + for _, e := range m.Proposals { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryProposalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProposalId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != nil { + l = m.Proposal.Size() + 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 *QueryNextSeqSendRequest) 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: QueryNextSeqSendRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNextSeqSendRequest: 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 *QueryNextSeqSendResponse) 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: QueryNextSeqSendResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNextSeqSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= 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 *QueryGreatestSeqByOperatorRequest) 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: QueryGreatestSeqByOperatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGreatestSeqByOperatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", 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.Operator = 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 *QueryGreatestSeqByOperatorResponse) 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: QueryGreatestSeqByOperatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGreatestSeqByOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= 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 *QueryGreatestConsecutiveConfirmedSeqRequest) 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: QueryGreatestConsecutiveConfirmedSeqRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGreatestConsecutiveConfirmedSeqRequest: 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 *QueryGreatestConsecutiveConfirmedSeqResponse) 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: QueryGreatestConsecutiveConfirmedSeqResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGreatestConsecutiveConfirmedSeqResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= 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 *QuerySubmittedProvisionRequest) 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: QuerySubmittedProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubmittedProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= 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 *QuerySubmittedProvisionResponse) 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: QuerySubmittedProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubmittedProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status.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 *QueryNeededSubmissionSeqsRequest) 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: QueryNeededSubmissionSeqsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNeededSubmissionSeqsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + m.Range = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Range |= 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 *QueryNeededSubmissionSeqsResponse) 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: QueryNeededSubmissionSeqsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNeededSubmissionSeqsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Seqs = append(m.Seqs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Seqs) == 0 { + m.Seqs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Seqs = append(m.Seqs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Seqs", wireType) + } + 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 *QueryConfirmedProvisionRequest) 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: QueryConfirmedProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConfirmedProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= 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 *QueryConfirmedProvisionResponse) 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: QueryConfirmedProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConfirmedProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status.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 *QueryCommitmentsRequest) 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: QueryCommitmentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommitmentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= 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 *QueryCommitmentsResponse) 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: QueryCommitmentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommitmentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitments", 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.Commitments = append(m.Commitments, 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 *QueryGuardiansRequest) 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: QueryGuardiansRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGuardiansRequest: 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 *QueryGuardiansResponse) 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: QueryGuardiansResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGuardiansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Guardians", 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.Guardians = append(m.Guardians, 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 *QueryOperatorsRequest) 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: QueryOperatorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOperatorsRequest: 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 *QueryOperatorsResponse) 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: QueryOperatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOperatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operators", 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.Operators = append(m.Operators, 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 *QueryJudgesRequest) 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: QueryJudgesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryJudgesRequest: 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 *QueryJudgesResponse) 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: QueryJudgesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryJudgesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Judges", 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.Judges = append(m.Judges, 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 *QueryProposalsRequest) 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: QueryProposalsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.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 *QueryProposalsResponse) 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: QueryProposalsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposals", 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.Proposals = append(m.Proposals, &RoleProposal{}) + if err := m.Proposals[len(m.Proposals)-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 *QueryProposalRequest) 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: QueryProposalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", 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.ProposalId = 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 *QueryProposalResponse) 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: QueryProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", 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.Proposal == nil { + m.Proposal = &RoleProposal{} + } + if err := m.Proposal.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 skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/fbridge/types/query.pb.gw.go b/x/fbridge/types/query.pb.gw.go new file mode 100644 index 0000000000..8de3ab8ffe --- /dev/null +++ b/x/fbridge/types/query.pb.gw.go @@ -0,0 +1,1166 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: lbm/fbridge/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_NextSeqSend_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNextSeqSendRequest + var metadata runtime.ServerMetadata + + msg, err := client.NextSeqSend(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NextSeqSend_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNextSeqSendRequest + var metadata runtime.ServerMetadata + + msg, err := server.NextSeqSend(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_GreatestSeqByOperator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGreatestSeqByOperatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator") + } + + protoReq.Operator, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator", err) + } + + msg, err := client.GreatestSeqByOperator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GreatestSeqByOperator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGreatestSeqByOperatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator") + } + + protoReq.Operator, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator", err) + } + + msg, err := server.GreatestSeqByOperator(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_GreatestConsecutiveConfirmedSeq_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGreatestConsecutiveConfirmedSeqRequest + var metadata runtime.ServerMetadata + + msg, err := client.GreatestConsecutiveConfirmedSeq(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GreatestConsecutiveConfirmedSeq_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGreatestConsecutiveConfirmedSeqRequest + var metadata runtime.ServerMetadata + + msg, err := server.GreatestConsecutiveConfirmedSeq(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_SubmittedProvision_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubmittedProvisionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator") + } + + protoReq.Operator, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator", err) + } + + val, ok = pathParams["seq"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "seq") + } + + protoReq.Seq, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "seq", err) + } + + msg, err := client.SubmittedProvision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SubmittedProvision_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubmittedProvisionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator") + } + + protoReq.Operator, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator", err) + } + + val, ok = pathParams["seq"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "seq") + } + + protoReq.Seq, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "seq", err) + } + + msg, err := server.SubmittedProvision(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ConfirmedProvision_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryConfirmedProvisionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["seq"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "seq") + } + + protoReq.Seq, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "seq", err) + } + + msg, err := client.ConfirmedProvision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ConfirmedProvision_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryConfirmedProvisionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["seq"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "seq") + } + + protoReq.Seq, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "seq", err) + } + + msg, err := server.ConfirmedProvision(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_NeededSubmissionSeqs_0 = &utilities.DoubleArray{Encoding: map[string]int{"operator": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_NeededSubmissionSeqs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNeededSubmissionSeqsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator") + } + + protoReq.Operator, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator", 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_NeededSubmissionSeqs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.NeededSubmissionSeqs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NeededSubmissionSeqs_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNeededSubmissionSeqsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator") + } + + protoReq.Operator, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator", 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_NeededSubmissionSeqs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.NeededSubmissionSeqs(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Commitments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCommitmentsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["seq"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "seq") + } + + protoReq.Seq, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "seq", err) + } + + msg, err := client.Commitments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Commitments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCommitmentsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["seq"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "seq") + } + + protoReq.Seq, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "seq", err) + } + + msg, err := server.Commitments(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Guardians_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGuardiansRequest + var metadata runtime.ServerMetadata + + msg, err := client.Guardians(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Guardians_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGuardiansRequest + var metadata runtime.ServerMetadata + + msg, err := server.Guardians(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Operators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOperatorsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Operators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Operators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOperatorsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Operators(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Judges_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryJudgesRequest + var metadata runtime.ServerMetadata + + msg, err := client.Judges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Judges_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryJudgesRequest + var metadata runtime.ServerMetadata + + msg, err := server.Judges(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Proposals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalsRequest + 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_Proposals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Proposals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalsRequest + 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_Proposals_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Proposals(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["proposal_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "proposal_id") + } + + protoReq.ProposalId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + msg, err := client.Proposal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["proposal_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "proposal_id") + } + + protoReq.ProposalId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + msg, err := server.Proposal(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_NextSeqSend_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_NextSeqSend_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_NextSeqSend_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GreatestSeqByOperator_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_GreatestSeqByOperator_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_GreatestSeqByOperator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GreatestConsecutiveConfirmedSeq_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_GreatestConsecutiveConfirmedSeq_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_GreatestConsecutiveConfirmedSeq_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SubmittedProvision_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_SubmittedProvision_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_SubmittedProvision_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ConfirmedProvision_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_ConfirmedProvision_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_ConfirmedProvision_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NeededSubmissionSeqs_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_NeededSubmissionSeqs_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_NeededSubmissionSeqs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Commitments_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_Commitments_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_Commitments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Guardians_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_Guardians_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_Guardians_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Operators_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_Operators_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_Operators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Judges_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_Judges_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_Judges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Proposals_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_Proposals_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_Proposals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Proposal_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_Proposal_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_Proposal_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_NextSeqSend_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_NextSeqSend_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_NextSeqSend_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GreatestSeqByOperator_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_GreatestSeqByOperator_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_GreatestSeqByOperator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GreatestConsecutiveConfirmedSeq_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_GreatestConsecutiveConfirmedSeq_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_GreatestConsecutiveConfirmedSeq_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SubmittedProvision_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_SubmittedProvision_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_SubmittedProvision_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ConfirmedProvision_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_ConfirmedProvision_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_ConfirmedProvision_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NeededSubmissionSeqs_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_NeededSubmissionSeqs_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_NeededSubmissionSeqs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Commitments_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_Commitments_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_Commitments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Guardians_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_Guardians_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_Guardians_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Operators_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_Operators_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_Operators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Judges_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_Judges_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_Judges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Proposals_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_Proposals_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_Proposals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Proposal_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_Proposal_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_Proposal_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, 2, 3}, []string{"lbm", "fbridge", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_NextSeqSend_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "nextseq_send"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GreatestSeqByOperator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"lbm", "fbridge", "v1", "operators", "operator", "seq"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GreatestConsecutiveConfirmedSeq_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "greatest_confirmed_seq"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SubmittedProvision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"lbm", "fbridge", "v1", "operators", "operator", "provision", "seq"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ConfirmedProvision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"lbm", "fbridge", "v1", "provision", "seq"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_NeededSubmissionSeqs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"lbm", "fbridge", "v1", "operators", "operator", "needed_submission_seqs"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Commitments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"lbm", "fbridge", "v1", "commitments", "seq"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Guardians_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "guardians"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Operators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "operators"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Judges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "judges"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Proposals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"lbm", "fbridge", "v1", "role", "proposals"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Proposal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "fbridge", "v1", "role", "proposals", "proposal_id"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_NextSeqSend_0 = runtime.ForwardResponseMessage + + forward_Query_GreatestSeqByOperator_0 = runtime.ForwardResponseMessage + + forward_Query_GreatestConsecutiveConfirmedSeq_0 = runtime.ForwardResponseMessage + + forward_Query_SubmittedProvision_0 = runtime.ForwardResponseMessage + + forward_Query_ConfirmedProvision_0 = runtime.ForwardResponseMessage + + forward_Query_NeededSubmissionSeqs_0 = runtime.ForwardResponseMessage + + forward_Query_Commitments_0 = runtime.ForwardResponseMessage + + forward_Query_Guardians_0 = runtime.ForwardResponseMessage + + forward_Query_Operators_0 = runtime.ForwardResponseMessage + + forward_Query_Judges_0 = runtime.ForwardResponseMessage + + forward_Query_Proposals_0 = runtime.ForwardResponseMessage + + forward_Query_Proposal_0 = runtime.ForwardResponseMessage +) diff --git a/x/fbridge/types/tx.pb.go b/x/fbridge/types/tx.pb.go new file mode 100644 index 0000000000..91346052d5 --- /dev/null +++ b/x/fbridge/types/tx.pb.go @@ -0,0 +1,4495 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/fbridge/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgTransfer is input values required for bridge transfer +type MsgTransfer struct { + // the sender address on the source chain + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the recipient address on the destination chain + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // the amount of token to be transferred + Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` +} + +func (m *MsgTransfer) Reset() { *m = MsgTransfer{} } +func (m *MsgTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgTransfer) ProtoMessage() {} +func (*MsgTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{0} +} +func (m *MsgTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransfer.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 *MsgTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransfer.Merge(m, src) +} +func (m *MsgTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransfer proto.InternalMessageInfo + +func (m *MsgTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgTransfer) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +type MsgTransferResponse struct { +} + +func (m *MsgTransferResponse) Reset() { *m = MsgTransferResponse{} } +func (m *MsgTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransferResponse) ProtoMessage() {} +func (*MsgTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{1} +} +func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferResponse.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 *MsgTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferResponse.Merge(m, src) +} +func (m *MsgTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferResponse proto.InternalMessageInfo + +// MsgProvision is input values required for provisioning +type MsgProvision struct { + // the operator address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` + // the sender address on the source chain + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + // the recipient address on the destination chain + Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` + // the amount of token to be claimed + Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` +} + +func (m *MsgProvision) Reset() { *m = MsgProvision{} } +func (m *MsgProvision) String() string { return proto.CompactTextString(m) } +func (*MsgProvision) ProtoMessage() {} +func (*MsgProvision) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{2} +} +func (m *MsgProvision) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgProvision.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 *MsgProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProvision.Merge(m, src) +} +func (m *MsgProvision) XXX_Size() int { + return m.Size() +} +func (m *MsgProvision) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProvision.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgProvision proto.InternalMessageInfo + +func (m *MsgProvision) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgProvision) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *MsgProvision) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgProvision) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +type MsgProvisionResponse struct { +} + +func (m *MsgProvisionResponse) Reset() { *m = MsgProvisionResponse{} } +func (m *MsgProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgProvisionResponse) ProtoMessage() {} +func (*MsgProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{3} +} +func (m *MsgProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgProvisionResponse.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 *MsgProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProvisionResponse.Merge(m, src) +} +func (m *MsgProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgProvisionResponse proto.InternalMessageInfo + +// MsgHoldTransfer is input values required for holding transfer +type MsgHoldTransfer struct { + // the judge address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *MsgHoldTransfer) Reset() { *m = MsgHoldTransfer{} } +func (m *MsgHoldTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgHoldTransfer) ProtoMessage() {} +func (*MsgHoldTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{4} +} +func (m *MsgHoldTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgHoldTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgHoldTransfer.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 *MsgHoldTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgHoldTransfer.Merge(m, src) +} +func (m *MsgHoldTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgHoldTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgHoldTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgHoldTransfer proto.InternalMessageInfo + +func (m *MsgHoldTransfer) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgHoldTransfer) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type MsgHoldTransferResponse struct { +} + +func (m *MsgHoldTransferResponse) Reset() { *m = MsgHoldTransferResponse{} } +func (m *MsgHoldTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgHoldTransferResponse) ProtoMessage() {} +func (*MsgHoldTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{5} +} +func (m *MsgHoldTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgHoldTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgHoldTransferResponse.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 *MsgHoldTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgHoldTransferResponse.Merge(m, src) +} +func (m *MsgHoldTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgHoldTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgHoldTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgHoldTransferResponse proto.InternalMessageInfo + +// MsgReleaseTransfer is input values required for releasing a held transfer by time lock +type MsgReleaseTransfer struct { + // the guardian address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *MsgReleaseTransfer) Reset() { *m = MsgReleaseTransfer{} } +func (m *MsgReleaseTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgReleaseTransfer) ProtoMessage() {} +func (*MsgReleaseTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{6} +} +func (m *MsgReleaseTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReleaseTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReleaseTransfer.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 *MsgReleaseTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReleaseTransfer.Merge(m, src) +} +func (m *MsgReleaseTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgReleaseTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReleaseTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgReleaseTransfer proto.InternalMessageInfo + +func (m *MsgReleaseTransfer) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgReleaseTransfer) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type MsgReleaseTransferResponse struct { +} + +func (m *MsgReleaseTransferResponse) Reset() { *m = MsgReleaseTransferResponse{} } +func (m *MsgReleaseTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgReleaseTransferResponse) ProtoMessage() {} +func (*MsgReleaseTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{7} +} +func (m *MsgReleaseTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReleaseTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReleaseTransferResponse.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 *MsgReleaseTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReleaseTransferResponse.Merge(m, src) +} +func (m *MsgReleaseTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgReleaseTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReleaseTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgReleaseTransferResponse proto.InternalMessageInfo + +// MsgRemoveProvision is input values required for removing a specific confirmed provision +type MsgRemoveProvision struct { + // the judge address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *MsgRemoveProvision) Reset() { *m = MsgRemoveProvision{} } +func (m *MsgRemoveProvision) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveProvision) ProtoMessage() {} +func (*MsgRemoveProvision) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{8} +} +func (m *MsgRemoveProvision) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveProvision.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 *MsgRemoveProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveProvision.Merge(m, src) +} +func (m *MsgRemoveProvision) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveProvision) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveProvision.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveProvision proto.InternalMessageInfo + +func (m *MsgRemoveProvision) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgRemoveProvision) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type MsgRemoveProvisionResponse struct { +} + +func (m *MsgRemoveProvisionResponse) Reset() { *m = MsgRemoveProvisionResponse{} } +func (m *MsgRemoveProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveProvisionResponse) ProtoMessage() {} +func (*MsgRemoveProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{9} +} +func (m *MsgRemoveProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveProvisionResponse.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 *MsgRemoveProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveProvisionResponse.Merge(m, src) +} +func (m *MsgRemoveProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveProvisionResponse proto.InternalMessageInfo + +// MsgClaimBatch is input values required for claiming multiple claimable provisions +type MsgClaimBatch struct { + // the claimer address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the maximum number of claims to be made at once + MaxClaims uint64 `protobuf:"varint,2,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"` +} + +func (m *MsgClaimBatch) Reset() { *m = MsgClaimBatch{} } +func (m *MsgClaimBatch) String() string { return proto.CompactTextString(m) } +func (*MsgClaimBatch) ProtoMessage() {} +func (*MsgClaimBatch) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{10} +} +func (m *MsgClaimBatch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimBatch.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 *MsgClaimBatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBatch.Merge(m, src) +} +func (m *MsgClaimBatch) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimBatch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBatch.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimBatch proto.InternalMessageInfo + +func (m *MsgClaimBatch) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgClaimBatch) GetMaxClaims() uint64 { + if m != nil { + return m.MaxClaims + } + return 0 +} + +type MsgClaimBatchResponse struct { +} + +func (m *MsgClaimBatchResponse) Reset() { *m = MsgClaimBatchResponse{} } +func (m *MsgClaimBatchResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimBatchResponse) ProtoMessage() {} +func (*MsgClaimBatchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{11} +} +func (m *MsgClaimBatchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimBatchResponse.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 *MsgClaimBatchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBatchResponse.Merge(m, src) +} +func (m *MsgClaimBatchResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimBatchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBatchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimBatchResponse proto.InternalMessageInfo + +// MsgClaim is input values required for claiming a provision +type MsgClaim struct { + // the claimer address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *MsgClaim) Reset() { *m = MsgClaim{} } +func (m *MsgClaim) String() string { return proto.CompactTextString(m) } +func (*MsgClaim) ProtoMessage() {} +func (*MsgClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{12} +} +func (m *MsgClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaim.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 *MsgClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaim.Merge(m, src) +} +func (m *MsgClaim) XXX_Size() int { + return m.Size() +} +func (m *MsgClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaim proto.InternalMessageInfo + +func (m *MsgClaim) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgClaim) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type MsgClaimResponse struct { +} + +func (m *MsgClaimResponse) Reset() { *m = MsgClaimResponse{} } +func (m *MsgClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimResponse) ProtoMessage() {} +func (*MsgClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{13} +} +func (m *MsgClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimResponse.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 *MsgClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimResponse.Merge(m, src) +} +func (m *MsgClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimResponse proto.InternalMessageInfo + +// MsgUpdateRole is input values required for updating the role of an address +type MsgSuggestRole struct { + // the guardian address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the address to update the role + Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + // the role to be updated + // - unspecified : 0, used to remove the address from a group + // - guardian : 1 + // - operator : 2 + // - judge : 3 + Role Role `protobuf:"varint,3,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` +} + +func (m *MsgSuggestRole) Reset() { *m = MsgSuggestRole{} } +func (m *MsgSuggestRole) String() string { return proto.CompactTextString(m) } +func (*MsgSuggestRole) ProtoMessage() {} +func (*MsgSuggestRole) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{14} +} +func (m *MsgSuggestRole) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSuggestRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSuggestRole.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 *MsgSuggestRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSuggestRole.Merge(m, src) +} +func (m *MsgSuggestRole) XXX_Size() int { + return m.Size() +} +func (m *MsgSuggestRole) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSuggestRole.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSuggestRole proto.InternalMessageInfo + +func (m *MsgSuggestRole) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgSuggestRole) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *MsgSuggestRole) GetRole() Role { + if m != nil { + return m.Role + } + return Role_UNSPECIFIED +} + +type MsgSuggestRoleResponse struct { +} + +func (m *MsgSuggestRoleResponse) Reset() { *m = MsgSuggestRoleResponse{} } +func (m *MsgSuggestRoleResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSuggestRoleResponse) ProtoMessage() {} +func (*MsgSuggestRoleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{15} +} +func (m *MsgSuggestRoleResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSuggestRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSuggestRoleResponse.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 *MsgSuggestRoleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSuggestRoleResponse.Merge(m, src) +} +func (m *MsgSuggestRoleResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSuggestRoleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSuggestRoleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSuggestRoleResponse proto.InternalMessageInfo + +type MsgAddVoteForRole struct { + // the guardian address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // the proposal ID + ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // the vote option + // - yes : true + // - no : false + Option bool `protobuf:"varint,3,opt,name=option,proto3" json:"option,omitempty"` +} + +func (m *MsgAddVoteForRole) Reset() { *m = MsgAddVoteForRole{} } +func (m *MsgAddVoteForRole) String() string { return proto.CompactTextString(m) } +func (*MsgAddVoteForRole) ProtoMessage() {} +func (*MsgAddVoteForRole) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{16} +} +func (m *MsgAddVoteForRole) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddVoteForRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddVoteForRole.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 *MsgAddVoteForRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddVoteForRole.Merge(m, src) +} +func (m *MsgAddVoteForRole) XXX_Size() int { + return m.Size() +} +func (m *MsgAddVoteForRole) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddVoteForRole.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddVoteForRole proto.InternalMessageInfo + +func (m *MsgAddVoteForRole) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgAddVoteForRole) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *MsgAddVoteForRole) GetOption() bool { + if m != nil { + return m.Option + } + return false +} + +type MsgAddVoteForRoleResponse struct { +} + +func (m *MsgAddVoteForRoleResponse) Reset() { *m = MsgAddVoteForRoleResponse{} } +func (m *MsgAddVoteForRoleResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddVoteForRoleResponse) ProtoMessage() {} +func (*MsgAddVoteForRoleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{17} +} +func (m *MsgAddVoteForRoleResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddVoteForRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddVoteForRoleResponse.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 *MsgAddVoteForRoleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddVoteForRoleResponse.Merge(m, src) +} +func (m *MsgAddVoteForRoleResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddVoteForRoleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddVoteForRoleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddVoteForRoleResponse proto.InternalMessageInfo + +// MsgHalt is input values required for halting the bridge module +type MsgHalt struct { + // the guardian address + Guardian string `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` +} + +func (m *MsgHalt) Reset() { *m = MsgHalt{} } +func (m *MsgHalt) String() string { return proto.CompactTextString(m) } +func (*MsgHalt) ProtoMessage() {} +func (*MsgHalt) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{18} +} +func (m *MsgHalt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgHalt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgHalt.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 *MsgHalt) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgHalt.Merge(m, src) +} +func (m *MsgHalt) XXX_Size() int { + return m.Size() +} +func (m *MsgHalt) XXX_DiscardUnknown() { + xxx_messageInfo_MsgHalt.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgHalt proto.InternalMessageInfo + +func (m *MsgHalt) GetGuardian() string { + if m != nil { + return m.Guardian + } + return "" +} + +type MsgHaltResponse struct { +} + +func (m *MsgHaltResponse) Reset() { *m = MsgHaltResponse{} } +func (m *MsgHaltResponse) String() string { return proto.CompactTextString(m) } +func (*MsgHaltResponse) ProtoMessage() {} +func (*MsgHaltResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{19} +} +func (m *MsgHaltResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgHaltResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgHaltResponse.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 *MsgHaltResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgHaltResponse.Merge(m, src) +} +func (m *MsgHaltResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgHaltResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgHaltResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgHaltResponse proto.InternalMessageInfo + +// MsgResume is input values required for resuming the bridge module +type MsgResume struct { + // the guardian address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` +} + +func (m *MsgResume) Reset() { *m = MsgResume{} } +func (m *MsgResume) String() string { return proto.CompactTextString(m) } +func (*MsgResume) ProtoMessage() {} +func (*MsgResume) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{20} +} +func (m *MsgResume) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgResume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgResume.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 *MsgResume) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgResume.Merge(m, src) +} +func (m *MsgResume) XXX_Size() int { + return m.Size() +} +func (m *MsgResume) XXX_DiscardUnknown() { + xxx_messageInfo_MsgResume.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgResume proto.InternalMessageInfo + +func (m *MsgResume) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +type MsgResumeResponse struct { +} + +func (m *MsgResumeResponse) Reset() { *m = MsgResumeResponse{} } +func (m *MsgResumeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgResumeResponse) ProtoMessage() {} +func (*MsgResumeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{21} +} +func (m *MsgResumeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgResumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgResumeResponse.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 *MsgResumeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgResumeResponse.Merge(m, src) +} +func (m *MsgResumeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgResumeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgResumeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgResumeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgTransfer)(nil), "lbm.fbridge.v1.MsgTransfer") + proto.RegisterType((*MsgTransferResponse)(nil), "lbm.fbridge.v1.MsgTransferResponse") + proto.RegisterType((*MsgProvision)(nil), "lbm.fbridge.v1.MsgProvision") + proto.RegisterType((*MsgProvisionResponse)(nil), "lbm.fbridge.v1.MsgProvisionResponse") + proto.RegisterType((*MsgHoldTransfer)(nil), "lbm.fbridge.v1.MsgHoldTransfer") + proto.RegisterType((*MsgHoldTransferResponse)(nil), "lbm.fbridge.v1.MsgHoldTransferResponse") + proto.RegisterType((*MsgReleaseTransfer)(nil), "lbm.fbridge.v1.MsgReleaseTransfer") + proto.RegisterType((*MsgReleaseTransferResponse)(nil), "lbm.fbridge.v1.MsgReleaseTransferResponse") + proto.RegisterType((*MsgRemoveProvision)(nil), "lbm.fbridge.v1.MsgRemoveProvision") + proto.RegisterType((*MsgRemoveProvisionResponse)(nil), "lbm.fbridge.v1.MsgRemoveProvisionResponse") + proto.RegisterType((*MsgClaimBatch)(nil), "lbm.fbridge.v1.MsgClaimBatch") + proto.RegisterType((*MsgClaimBatchResponse)(nil), "lbm.fbridge.v1.MsgClaimBatchResponse") + proto.RegisterType((*MsgClaim)(nil), "lbm.fbridge.v1.MsgClaim") + proto.RegisterType((*MsgClaimResponse)(nil), "lbm.fbridge.v1.MsgClaimResponse") + proto.RegisterType((*MsgSuggestRole)(nil), "lbm.fbridge.v1.MsgSuggestRole") + proto.RegisterType((*MsgSuggestRoleResponse)(nil), "lbm.fbridge.v1.MsgSuggestRoleResponse") + proto.RegisterType((*MsgAddVoteForRole)(nil), "lbm.fbridge.v1.MsgAddVoteForRole") + proto.RegisterType((*MsgAddVoteForRoleResponse)(nil), "lbm.fbridge.v1.MsgAddVoteForRoleResponse") + proto.RegisterType((*MsgHalt)(nil), "lbm.fbridge.v1.MsgHalt") + proto.RegisterType((*MsgHaltResponse)(nil), "lbm.fbridge.v1.MsgHaltResponse") + proto.RegisterType((*MsgResume)(nil), "lbm.fbridge.v1.MsgResume") + proto.RegisterType((*MsgResumeResponse)(nil), "lbm.fbridge.v1.MsgResumeResponse") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } + +var fileDescriptor_54a336bc5ea063bb = []byte{ + // 757 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, + 0x14, 0x4e, 0x6e, 0x42, 0x48, 0x0e, 0xdc, 0x00, 0x06, 0x92, 0x60, 0x20, 0x01, 0xdf, 0xcb, 0xbd, + 0x14, 0xa9, 0x09, 0xd0, 0x45, 0xa5, 0xae, 0xda, 0x20, 0xa1, 0x82, 0x6a, 0xb5, 0x72, 0x7f, 0x54, + 0x75, 0x51, 0x3a, 0x89, 0x27, 0x83, 0x55, 0xdb, 0x93, 0x7a, 0x26, 0x51, 0xfa, 0x10, 0x95, 0xfa, + 0x04, 0x7d, 0x8a, 0x3e, 0x04, 0x4b, 0x96, 0x55, 0x17, 0xa8, 0x82, 0x17, 0xa9, 0xec, 0xd8, 0x83, + 0x1d, 0xec, 0x04, 0xd4, 0xdd, 0x4c, 0xbe, 0x9f, 0x73, 0x8e, 0x67, 0xbe, 0xd8, 0x50, 0x36, 0x5b, + 0x56, 0xa3, 0xd3, 0x72, 0x0c, 0x9d, 0xe0, 0x46, 0x7f, 0xaf, 0xc1, 0x07, 0xf5, 0xae, 0x43, 0x39, + 0x95, 0x8a, 0x66, 0xcb, 0xaa, 0xfb, 0x40, 0xbd, 0xbf, 0x27, 0x2f, 0x11, 0x4a, 0xa8, 0x07, 0x35, + 0xdc, 0xd5, 0x90, 0x25, 0xaf, 0x8d, 0xc8, 0x03, 0x81, 0x87, 0x2a, 0x5f, 0xd2, 0x30, 0xa3, 0x32, + 0xf2, 0xca, 0x41, 0x36, 0xeb, 0x60, 0x47, 0x2a, 0x41, 0x8e, 0x61, 0x5b, 0xc7, 0x4e, 0x25, 0xbd, + 0x91, 0xde, 0x2e, 0x68, 0xfe, 0x4e, 0x92, 0x21, 0xef, 0xe0, 0x36, 0x36, 0xfa, 0xd8, 0xa9, 0xfc, + 0xe5, 0x21, 0x62, 0x2f, 0x1d, 0x43, 0x0e, 0x59, 0xb4, 0x67, 0xf3, 0x4a, 0xc6, 0x45, 0x9a, 0xfb, + 0x67, 0x17, 0xb5, 0xd4, 0xcf, 0x8b, 0xda, 0x0e, 0x31, 0xf8, 0x69, 0xaf, 0x55, 0x6f, 0x53, 0xab, + 0x71, 0x68, 0xd8, 0xac, 0x7d, 0x6a, 0xa0, 0x46, 0xc7, 0x5f, 0xdc, 0x67, 0xfa, 0xc7, 0x06, 0xff, + 0xdc, 0xc5, 0xac, 0x7e, 0x64, 0x73, 0xcd, 0x77, 0x50, 0x96, 0x61, 0x31, 0xd4, 0x8e, 0x86, 0x59, + 0x97, 0xda, 0x0c, 0x2b, 0xdf, 0xd3, 0x30, 0xab, 0x32, 0xf2, 0xc2, 0xa1, 0x7d, 0x83, 0x19, 0xd4, + 0x96, 0x24, 0xc8, 0x76, 0x1c, 0x6a, 0xf9, 0x5d, 0x7a, 0x6b, 0x69, 0x1e, 0x32, 0x0c, 0x7f, 0xf2, + 0xda, 0xcb, 0x6a, 0xee, 0x32, 0x34, 0x4d, 0x26, 0x71, 0x9a, 0x6c, 0xe2, 0x34, 0x53, 0x7f, 0x3c, + 0x4d, 0x09, 0x96, 0xc2, 0x5d, 0x8b, 0x71, 0x1e, 0xc2, 0x9c, 0xca, 0xc8, 0x53, 0x6a, 0xea, 0xe2, + 0xc1, 0xdf, 0x6a, 0x20, 0x65, 0x05, 0xca, 0x23, 0x42, 0xe1, 0xf9, 0x08, 0x24, 0x95, 0x11, 0x0d, + 0x9b, 0x18, 0x31, 0x7c, 0x47, 0xdb, 0x35, 0x90, 0x6f, 0x6a, 0x6f, 0x38, 0x5b, 0xb4, 0x8f, 0xef, + 0x78, 0x02, 0xc2, 0x39, 0xa2, 0x15, 0xce, 0x4d, 0xf8, 0x5b, 0x65, 0xe4, 0xc0, 0x44, 0x86, 0xd5, + 0x44, 0xbc, 0x7d, 0x1a, 0x6b, 0xba, 0x0e, 0x60, 0xa1, 0xc1, 0x49, 0xdb, 0x65, 0x31, 0xdf, 0xbb, + 0x60, 0xa1, 0x81, 0x27, 0x63, 0x4a, 0x19, 0x96, 0x23, 0x1e, 0xc2, 0x7c, 0x17, 0xf2, 0x01, 0x70, + 0xcb, 0x66, 0x25, 0x98, 0x0f, 0x14, 0xc2, 0xa5, 0x03, 0x45, 0x95, 0x91, 0x97, 0x3d, 0x42, 0x30, + 0xe3, 0x1a, 0x35, 0x71, 0xac, 0x57, 0x09, 0x72, 0x1c, 0x39, 0x04, 0x73, 0x3f, 0x1c, 0xfe, 0x4e, + 0xda, 0x86, 0xac, 0x43, 0x4d, 0xec, 0x5d, 0xbf, 0xe2, 0xfe, 0x52, 0x3d, 0x9a, 0xd8, 0xba, 0xeb, + 0xa7, 0x79, 0x0c, 0xa5, 0x02, 0xa5, 0x68, 0x1d, 0xd1, 0xc1, 0x07, 0x58, 0x50, 0x19, 0x79, 0xa2, + 0xeb, 0x6f, 0x28, 0xc7, 0x87, 0xd4, 0x49, 0x6c, 0xa2, 0x06, 0x33, 0x5d, 0x87, 0x76, 0x29, 0x43, + 0xe6, 0x89, 0xa1, 0xfb, 0x83, 0x41, 0xf0, 0xd3, 0x91, 0xee, 0x76, 0x49, 0xbb, 0xdc, 0xa0, 0xb6, + 0xd7, 0x4f, 0x5e, 0xf3, 0x77, 0xca, 0x2a, 0xac, 0xdc, 0xa8, 0x20, 0xca, 0x6f, 0xc1, 0xb4, 0x7b, + 0xe5, 0x90, 0xc9, 0xdd, 0xd8, 0x90, 0x1e, 0x72, 0x74, 0x03, 0xd9, 0x7e, 0x61, 0xb1, 0x57, 0x16, + 0x86, 0x57, 0x1a, 0x99, 0x5c, 0x28, 0x6b, 0x50, 0xf0, 0xce, 0x9e, 0xf5, 0xac, 0xd8, 0x86, 0x95, + 0x45, 0x6f, 0xb2, 0x21, 0x21, 0x50, 0xed, 0x7f, 0x9b, 0x86, 0x8c, 0xca, 0x88, 0xf4, 0x0c, 0xf2, + 0xe2, 0x16, 0xaf, 0x8e, 0x3e, 0xb8, 0xd0, 0x7f, 0x84, 0xfc, 0xcf, 0x18, 0x30, 0x70, 0x95, 0x9e, + 0x43, 0xe1, 0xfa, 0xea, 0xae, 0xc5, 0x28, 0x04, 0x2a, 0xff, 0x3b, 0x0e, 0x15, 0x86, 0x6f, 0x61, + 0x36, 0x92, 0xdf, 0x5a, 0x8c, 0x2a, 0x4c, 0x90, 0xff, 0x9f, 0x40, 0x10, 0xce, 0x08, 0xe6, 0x46, + 0x53, 0xac, 0xc4, 0x68, 0x47, 0x38, 0xf2, 0xce, 0x64, 0x4e, 0xb4, 0x44, 0x34, 0xce, 0xf1, 0x25, + 0x22, 0x9c, 0x84, 0x12, 0xb1, 0xd1, 0x96, 0x34, 0x80, 0x50, 0xae, 0xd7, 0x63, 0x94, 0xd7, 0xb0, + 0xbc, 0x35, 0x16, 0x16, 0x9e, 0x07, 0x30, 0x35, 0x8c, 0x73, 0x25, 0x89, 0x2f, 0x6f, 0x24, 0x21, + 0xc2, 0xe4, 0x35, 0xcc, 0x84, 0xd3, 0x5c, 0x8d, 0x11, 0x84, 0x70, 0xf9, 0xbf, 0xf1, 0xb8, 0xb0, + 0x7d, 0x0f, 0xc5, 0x91, 0x88, 0x6e, 0xc6, 0x28, 0xa3, 0x14, 0xf9, 0xde, 0x44, 0x8a, 0xf0, 0x7f, + 0x0c, 0x59, 0x2f, 0x83, 0xe5, 0xb8, 0x6b, 0x84, 0x4c, 0x2e, 0xd7, 0x12, 0x00, 0xe1, 0x70, 0x08, + 0x39, 0x3f, 0x8b, 0x2b, 0xb1, 0xe7, 0xe8, 0x42, 0xf2, 0x66, 0x22, 0x14, 0xf8, 0x34, 0x8f, 0xcf, + 0x2e, 0xab, 0xe9, 0xf3, 0xcb, 0x6a, 0xfa, 0xd7, 0x65, 0x35, 0xfd, 0xf5, 0xaa, 0x9a, 0x3a, 0xbf, + 0xaa, 0xa6, 0x7e, 0x5c, 0x55, 0x53, 0xef, 0x76, 0x27, 0xbe, 0x22, 0x07, 0xe2, 0x4b, 0xc4, 0x7b, + 0x59, 0xb6, 0x72, 0xde, 0x57, 0xc8, 0x83, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x35, 0x3e, 0xad, + 0x09, 0xe4, 0x08, 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 + +// MsgClient is the client API for Msg service. +// +// 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 { + // Submit a transfer request to the bridge module. + Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, error) + // Submit a provision to the bridge module. + Provision(ctx context.Context, in *MsgProvision, opts ...grpc.CallOption) (*MsgProvisionResponse, error) + // Set the time lock value from default value to uint64.max for specific confirmed provision. + HoldTransfer(ctx context.Context, in *MsgHoldTransfer, opts ...grpc.CallOption) (*MsgHoldTransferResponse, error) + // Set the time lock value to 0 for specific confirmed provision. + ReleaseTransfer(ctx context.Context, in *MsgReleaseTransfer, opts ...grpc.CallOption) (*MsgReleaseTransferResponse, error) + // Remove a specific confirmed provision (reset for specific sequence number). + RemoveProvision(ctx context.Context, in *MsgRemoveProvision, opts ...grpc.CallOption) (*MsgRemoveProvisionResponse, error) + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + ClaimBatch(ctx context.Context, in *MsgClaimBatch, opts ...grpc.CallOption) (*MsgClaimBatchResponse, error) + // Claim processes the claiming of a provision with a specific sequence number + Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOption) (*MsgClaimResponse, error) + // SuggestRole suggests updating the role of an address in the bridge module. + // The role can be one of the following: guardian, operator, judge. + // The proposal will be passed only with the consent of +2/3 Guardian members. + SuggestRole(ctx context.Context, in *MsgSuggestRole, opts ...grpc.CallOption) (*MsgSuggestRoleResponse, error) + // AddVoteForRole adds a vote for a role change proposal. + AddVoteForRole(ctx context.Context, in *MsgAddVoteForRole, opts ...grpc.CallOption) (*MsgAddVoteForRoleResponse, error) + // Halt the bridge module. + Halt(ctx context.Context, in *MsgHalt, opts ...grpc.CallOption) (*MsgHaltResponse, error) + // Resume the bridge module. + Resume(ctx context.Context, in *MsgResume, opts ...grpc.CallOption) (*MsgResumeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, error) { + out := new(MsgTransferResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Transfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Provision(ctx context.Context, in *MsgProvision, opts ...grpc.CallOption) (*MsgProvisionResponse, error) { + out := new(MsgProvisionResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Provision", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) HoldTransfer(ctx context.Context, in *MsgHoldTransfer, opts ...grpc.CallOption) (*MsgHoldTransferResponse, error) { + out := new(MsgHoldTransferResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/HoldTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ReleaseTransfer(ctx context.Context, in *MsgReleaseTransfer, opts ...grpc.CallOption) (*MsgReleaseTransferResponse, error) { + out := new(MsgReleaseTransferResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/ReleaseTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveProvision(ctx context.Context, in *MsgRemoveProvision, opts ...grpc.CallOption) (*MsgRemoveProvisionResponse, error) { + out := new(MsgRemoveProvisionResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveProvision", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClaimBatch(ctx context.Context, in *MsgClaimBatch, opts ...grpc.CallOption) (*MsgClaimBatchResponse, error) { + out := new(MsgClaimBatchResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/ClaimBatch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOption) (*MsgClaimResponse, error) { + out := new(MsgClaimResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Claim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SuggestRole(ctx context.Context, in *MsgSuggestRole, opts ...grpc.CallOption) (*MsgSuggestRoleResponse, error) { + out := new(MsgSuggestRoleResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/SuggestRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AddVoteForRole(ctx context.Context, in *MsgAddVoteForRole, opts ...grpc.CallOption) (*MsgAddVoteForRoleResponse, error) { + out := new(MsgAddVoteForRoleResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddVoteForRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Halt(ctx context.Context, in *MsgHalt, opts ...grpc.CallOption) (*MsgHaltResponse, error) { + out := new(MsgHaltResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Halt", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Resume(ctx context.Context, in *MsgResume, opts ...grpc.CallOption) (*MsgResumeResponse, error) { + out := new(MsgResumeResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Resume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Submit a transfer request to the bridge module. + Transfer(context.Context, *MsgTransfer) (*MsgTransferResponse, error) + // Submit a provision to the bridge module. + Provision(context.Context, *MsgProvision) (*MsgProvisionResponse, error) + // Set the time lock value from default value to uint64.max for specific confirmed provision. + HoldTransfer(context.Context, *MsgHoldTransfer) (*MsgHoldTransferResponse, error) + // Set the time lock value to 0 for specific confirmed provision. + ReleaseTransfer(context.Context, *MsgReleaseTransfer) (*MsgReleaseTransferResponse, error) + // Remove a specific confirmed provision (reset for specific sequence number). + RemoveProvision(context.Context, *MsgRemoveProvision) (*MsgRemoveProvisionResponse, error) + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + ClaimBatch(context.Context, *MsgClaimBatch) (*MsgClaimBatchResponse, error) + // Claim processes the claiming of a provision with a specific sequence number + Claim(context.Context, *MsgClaim) (*MsgClaimResponse, error) + // SuggestRole suggests updating the role of an address in the bridge module. + // The role can be one of the following: guardian, operator, judge. + // The proposal will be passed only with the consent of +2/3 Guardian members. + SuggestRole(context.Context, *MsgSuggestRole) (*MsgSuggestRoleResponse, error) + // AddVoteForRole adds a vote for a role change proposal. + AddVoteForRole(context.Context, *MsgAddVoteForRole) (*MsgAddVoteForRoleResponse, error) + // Halt the bridge module. + Halt(context.Context, *MsgHalt) (*MsgHaltResponse, error) + // Resume the bridge module. + Resume(context.Context, *MsgResume) (*MsgResumeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *MsgTransfer) (*MsgTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") +} +func (*UnimplementedMsgServer) Provision(ctx context.Context, req *MsgProvision) (*MsgProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Provision not implemented") +} +func (*UnimplementedMsgServer) HoldTransfer(ctx context.Context, req *MsgHoldTransfer) (*MsgHoldTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HoldTransfer not implemented") +} +func (*UnimplementedMsgServer) ReleaseTransfer(ctx context.Context, req *MsgReleaseTransfer) (*MsgReleaseTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReleaseTransfer not implemented") +} +func (*UnimplementedMsgServer) RemoveProvision(ctx context.Context, req *MsgRemoveProvision) (*MsgRemoveProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveProvision not implemented") +} +func (*UnimplementedMsgServer) ClaimBatch(ctx context.Context, req *MsgClaimBatch) (*MsgClaimBatchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimBatch not implemented") +} +func (*UnimplementedMsgServer) Claim(ctx context.Context, req *MsgClaim) (*MsgClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") +} +func (*UnimplementedMsgServer) SuggestRole(ctx context.Context, req *MsgSuggestRole) (*MsgSuggestRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SuggestRole not implemented") +} +func (*UnimplementedMsgServer) AddVoteForRole(ctx context.Context, req *MsgAddVoteForRole) (*MsgAddVoteForRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddVoteForRole not implemented") +} +func (*UnimplementedMsgServer) Halt(ctx context.Context, req *MsgHalt) (*MsgHaltResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Halt not implemented") +} +func (*UnimplementedMsgServer) Resume(ctx context.Context, req *MsgResume) (*MsgResumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Resume not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Transfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/Transfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Transfer(ctx, req.(*MsgTransfer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Provision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgProvision) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Provision(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/Provision", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Provision(ctx, req.(*MsgProvision)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_HoldTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgHoldTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).HoldTransfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/HoldTransfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).HoldTransfer(ctx, req.(*MsgHoldTransfer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ReleaseTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgReleaseTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ReleaseTransfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/ReleaseTransfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ReleaseTransfer(ctx, req.(*MsgReleaseTransfer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveProvision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveProvision) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveProvision(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/RemoveProvision", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveProvision(ctx, req.(*MsgRemoveProvision)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ClaimBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaimBatch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClaimBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/ClaimBatch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimBatch(ctx, req.(*MsgClaimBatch)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaim) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Claim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/Claim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Claim(ctx, req.(*MsgClaim)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SuggestRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSuggestRole) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SuggestRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/SuggestRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SuggestRole(ctx, req.(*MsgSuggestRole)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AddVoteForRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddVoteForRole) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddVoteForRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/AddVoteForRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddVoteForRole(ctx, req.(*MsgAddVoteForRole)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Halt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgHalt) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Halt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/Halt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Halt(ctx, req.(*MsgHalt)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Resume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgResume) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Resume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/Resume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Resume(ctx, req.(*MsgResume)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lbm.fbridge.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Transfer", + Handler: _Msg_Transfer_Handler, + }, + { + MethodName: "Provision", + Handler: _Msg_Provision_Handler, + }, + { + MethodName: "HoldTransfer", + Handler: _Msg_HoldTransfer_Handler, + }, + { + MethodName: "ReleaseTransfer", + Handler: _Msg_ReleaseTransfer_Handler, + }, + { + MethodName: "RemoveProvision", + Handler: _Msg_RemoveProvision_Handler, + }, + { + MethodName: "ClaimBatch", + Handler: _Msg_ClaimBatch_Handler, + }, + { + MethodName: "Claim", + Handler: _Msg_Claim_Handler, + }, + { + MethodName: "SuggestRole", + Handler: _Msg_SuggestRole_Handler, + }, + { + MethodName: "AddVoteForRole", + Handler: _Msg_AddVoteForRole_Handler, + }, + { + MethodName: "Halt", + Handler: _Msg_Halt_Handler, + }, + { + MethodName: "Resume", + Handler: _Msg_Resume_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lbm/fbridge/v1/tx.proto", +} + +func (m *MsgTransfer) 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 *MsgTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferResponse) 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 *MsgTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgProvision) 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 *MsgProvision) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x1a + } + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgProvisionResponse) 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 *MsgProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgHoldTransfer) 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 *MsgHoldTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgHoldTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgHoldTransferResponse) 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 *MsgHoldTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgHoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgReleaseTransfer) 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 *MsgReleaseTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReleaseTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgReleaseTransferResponse) 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 *MsgReleaseTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemoveProvision) 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 *MsgRemoveProvision) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveProvisionResponse) 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 *MsgRemoveProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgClaimBatch) 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 *MsgClaimBatch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxClaims != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.MaxClaims)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimBatchResponse) 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 *MsgClaimBatchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgClaim) 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 *MsgClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimResponse) 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 *MsgClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSuggestRole) 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 *MsgSuggestRole) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSuggestRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Role != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x18 + } + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintTx(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSuggestRoleResponse) 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 *MsgSuggestRoleResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSuggestRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAddVoteForRole) 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 *MsgAddVoteForRole) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddVoteForRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Option { + i-- + if m.Option { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddVoteForRoleResponse) 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 *MsgAddVoteForRoleResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddVoteForRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgHalt) 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 *MsgHalt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgHalt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Guardian) > 0 { + i -= len(m.Guardian) + copy(dAtA[i:], m.Guardian) + i = encodeVarintTx(dAtA, i, uint64(len(m.Guardian))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgHaltResponse) 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 *MsgHaltResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgHaltResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgResume) 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 *MsgResume) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgResume) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgResumeResponse) 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 *MsgResumeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgResumeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgHoldTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *MsgHoldTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgReleaseTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *MsgReleaseTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemoveProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *MsgRemoveProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgClaimBatch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.MaxClaims != 0 { + n += 1 + sovTx(uint64(m.MaxClaims)) + } + return n +} + +func (m *MsgClaimBatchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *MsgClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSuggestRole) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Target) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Role != 0 { + n += 1 + sovTx(uint64(m.Role)) + } + return n +} + +func (m *MsgSuggestRoleResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAddVoteForRole) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + if m.Option { + n += 2 + } + return n +} + +func (m *MsgAddVoteForRoleResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgHalt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Guardian) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgHaltResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgResume) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgResumeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgTransfer) 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 ErrIntOverflowTx + } + 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: MsgTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransfer: 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + 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 Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferResponse) 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 ErrIntOverflowTx + } + 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: MsgTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgProvision) 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 ErrIntOverflowTx + } + 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: MsgProvision: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgProvision: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgProvisionResponse) 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 ErrIntOverflowTx + } + 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: MsgProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgHoldTransfer) 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 ErrIntOverflowTx + } + 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: MsgHoldTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgHoldTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgHoldTransferResponse) 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 ErrIntOverflowTx + } + 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: MsgHoldTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgHoldTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgReleaseTransfer) 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 ErrIntOverflowTx + } + 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: MsgReleaseTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgReleaseTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgReleaseTransferResponse) 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 ErrIntOverflowTx + } + 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: MsgReleaseTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgReleaseTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveProvision) 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 ErrIntOverflowTx + } + 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: MsgRemoveProvision: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveProvision: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveProvisionResponse) 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 ErrIntOverflowTx + } + 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: MsgRemoveProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimBatch) 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 ErrIntOverflowTx + } + 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: MsgClaimBatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimBatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxClaims", wireType) + } + m.MaxClaims = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxClaims |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimBatchResponse) 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 ErrIntOverflowTx + } + 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: MsgClaimBatchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaim) 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 ErrIntOverflowTx + } + 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: MsgClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimResponse) 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 ErrIntOverflowTx + } + 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: MsgClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSuggestRole) 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 ErrIntOverflowTx + } + 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: MsgSuggestRole: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSuggestRole: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= Role(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSuggestRoleResponse) 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 ErrIntOverflowTx + } + 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: MsgSuggestRoleResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSuggestRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddVoteForRole) 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 ErrIntOverflowTx + } + 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: MsgAddVoteForRole: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddVoteForRole: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Option = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddVoteForRoleResponse) 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 ErrIntOverflowTx + } + 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: MsgAddVoteForRoleResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddVoteForRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgHalt) 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 ErrIntOverflowTx + } + 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: MsgHalt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgHalt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Guardian", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Guardian = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgHaltResponse) 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 ErrIntOverflowTx + } + 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: MsgHaltResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgHaltResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgResume) 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 ErrIntOverflowTx + } + 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: MsgResume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgResume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgResumeResponse) 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 ErrIntOverflowTx + } + 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: MsgResumeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgResumeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +)