From a3aa28078cf461eed247765d4ddb7862da9ea494 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Mon, 22 Apr 2024 19:32:56 +0900 Subject: [PATCH 01/12] initialize fbridge module --- proto/lbm/fbridge/v1/event.proto | 6 ++++++ proto/lbm/fbridge/v1/fbridge.proto | 6 ++++++ proto/lbm/fbridge/v1/genesis.proto | 13 +++++++++++++ proto/lbm/fbridge/v1/query.proto | 6 ++++++ proto/lbm/fbridge/v1/tx.proto | 6 ++++++ x/fbridge/client/cli/query.go | 1 + x/fbridge/client/cli/tx.go | 1 + x/fbridge/keeper/genesis.go | 1 + x/fbridge/keeper/grpc_query.go | 1 + x/fbridge/keeper/keeper.go | 1 + x/fbridge/keeper/msg_server.go | 1 + x/fbridge/module/module.go | 1 + x/fbridge/types/expected_keepers.go | 1 + x/fbridge/types/genesis.go | 1 + 14 files changed, 46 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/expected_keepers.go create mode 100644 x/fbridge/types/genesis.go diff --git a/proto/lbm/fbridge/v1/event.proto b/proto/lbm/fbridge/v1/event.proto new file mode 100644 index 0000000000..7e9ba4348a --- /dev/null +++ b/proto/lbm/fbridge/v1/event.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +message EventDummy {} diff --git a/proto/lbm/fbridge/v1/fbridge.proto b/proto/lbm/fbridge/v1/fbridge.proto new file mode 100644 index 0000000000..fb2eba454f --- /dev/null +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +message Params {} diff --git a/proto/lbm/fbridge/v1/genesis.proto b/proto/lbm/fbridge/v1/genesis.proto new file mode 100644 index 0000000000..f57faf370b --- /dev/null +++ b/proto/lbm/fbridge/v1/genesis.proto @@ -0,0 +1,13 @@ +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. + repeated Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/lbm/fbridge/v1/query.proto b/proto/lbm/fbridge/v1/query.proto new file mode 100644 index 0000000000..72e062e4c5 --- /dev/null +++ b/proto/lbm/fbridge/v1/query.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +service Query {} diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto new file mode 100644 index 0000000000..c3239e10e5 --- /dev/null +++ b/proto/lbm/fbridge/v1/tx.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package lbm.fbridge.v1; + +option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; + +service Msg {} diff --git a/x/fbridge/client/cli/query.go b/x/fbridge/client/cli/query.go new file mode 100644 index 0000000000..7f1e458cd3 --- /dev/null +++ b/x/fbridge/client/cli/query.go @@ -0,0 +1 @@ +package cli diff --git a/x/fbridge/client/cli/tx.go b/x/fbridge/client/cli/tx.go new file mode 100644 index 0000000000..7f1e458cd3 --- /dev/null +++ b/x/fbridge/client/cli/tx.go @@ -0,0 +1 @@ +package cli diff --git a/x/fbridge/keeper/genesis.go b/x/fbridge/keeper/genesis.go new file mode 100644 index 0000000000..b55569d4a4 --- /dev/null +++ b/x/fbridge/keeper/genesis.go @@ -0,0 +1 @@ +package keeper diff --git a/x/fbridge/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go new file mode 100644 index 0000000000..b55569d4a4 --- /dev/null +++ b/x/fbridge/keeper/grpc_query.go @@ -0,0 +1 @@ +package keeper diff --git a/x/fbridge/keeper/keeper.go b/x/fbridge/keeper/keeper.go new file mode 100644 index 0000000000..b55569d4a4 --- /dev/null +++ b/x/fbridge/keeper/keeper.go @@ -0,0 +1 @@ +package keeper diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go new file mode 100644 index 0000000000..b55569d4a4 --- /dev/null +++ b/x/fbridge/keeper/msg_server.go @@ -0,0 +1 @@ +package keeper diff --git a/x/fbridge/module/module.go b/x/fbridge/module/module.go new file mode 100644 index 0000000000..b0b78bfd7a --- /dev/null +++ b/x/fbridge/module/module.go @@ -0,0 +1 @@ +package module 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/genesis.go b/x/fbridge/types/genesis.go new file mode 100644 index 0000000000..ab1254f4c2 --- /dev/null +++ b/x/fbridge/types/genesis.go @@ -0,0 +1 @@ +package types From a25a71f506093a4fd4454ec1ef1c4b3f5f55ee47 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Tue, 23 Apr 2024 23:40:26 +0900 Subject: [PATCH 02/12] add all proto files for fbridge --- client/docs/config.json | 9 + client/docs/swagger-ui/swagger.yaml | 610 ++++++ docs/core/proto-docs.md | 796 ++++++++ proto/lbm/fbridge/v1/event.proto | 40 +- proto/lbm/fbridge/v1/fbridge.proto | 44 +- proto/lbm/fbridge/v1/genesis.proto | 67 +- proto/lbm/fbridge/v1/query.proto | 88 +- proto/lbm/fbridge/v1/tx.proto | 93 +- x/fbridge/types/event.pb.go | 1292 +++++++++++++ x/fbridge/types/fbridge.pb.go | 1238 +++++++++++++ x/fbridge/types/genesis.pb.go | 2214 ++++++++++++++++++++++ x/fbridge/types/query.pb.go | 2486 +++++++++++++++++++++++++ x/fbridge/types/query.pb.gw.go | 624 +++++++ x/fbridge/types/tx.pb.go | 2677 +++++++++++++++++++++++++++ 14 files changed, 12273 insertions(+), 5 deletions(-) create mode 100644 x/fbridge/types/event.pb.go create mode 100644 x/fbridge/types/fbridge.pb.go create mode 100644 x/fbridge/types/genesis.pb.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/client/docs/config.json b/client/docs/config.json index 1bf69f7c03..db38cbba69 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -164,6 +164,15 @@ }, { "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" + } + } } ] } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 0a671c6747..1e88c28f20 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -29799,6 +29799,381 @@ paths: format: byte tags: - Service + '/lbm/fbridge/v1/commitments/{seq}': + get: + summary: Get 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/confirmed_provision/{seq}': + get: + summary: Get a specific confirmed provision + 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/greatest_seq_by_operator/{operator}': + get: + summary: Get a greatest sequence number to be 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/next_seq_to_confirm: + get: + summary: Get a next sequence number to be confirmed by n-of-m operators + operationId: NextSeqToConfirm + 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/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) + 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/submitted_provision/{operator}/{seq}': + get: + summary: Get 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 definitions: cosmos.auth.v1beta1.Params: type: object @@ -49344,3 +49719,238 @@ definitions: minimum_gas_price: type: string description: ConfigResponse defines the response structure for the Config gRPC query. + lbm.fbridge.v1.CommitmentsResponse: + type: object + properties: + commitments: + type: array + items: + type: string + lbm.fbridge.v1.ConfirmedProvisionResponse: + 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.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.GreatestSeqByOperatorResponse: + type: object + properties: + seq: + type: string + format: uint64 + lbm.fbridge.v1.NextSeqToConfirmResponse: + type: object + properties: + seq: + type: string + format: uint64 + 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) + 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.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) + lbm.fbridge.v1.SubmittedProvisionResponse: + 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. diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index e9718495d8..2dae6bf266 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -754,6 +754,62 @@ - [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) + +- [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) + - [CommitmentsRequest](#lbm.fbridge.v1.CommitmentsRequest) + - [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) + - [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) + - [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) + - [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) + - [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) + - [NextSeqToConfirmRequest](#lbm.fbridge.v1.NextSeqToConfirmRequest) + - [NextSeqToConfirmResponse](#lbm.fbridge.v1.NextSeqToConfirmResponse) + - [QueryParamsRequest](#lbm.fbridge.v1.QueryParamsRequest) + - [QueryParamsResponse](#lbm.fbridge.v1.QueryParamsResponse) + - [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) + - [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) + + - [Query](#lbm.fbridge.v1.Query) + +- [lbm/fbridge/v1/tx.proto](#lbm/fbridge/v1/tx.proto) + - [ClaimBatchRequest](#lbm.fbridge.v1.ClaimBatchRequest) + - [ClaimBatchResponse](#lbm.fbridge.v1.ClaimBatchResponse) + - [ClaimRequest](#lbm.fbridge.v1.ClaimRequest) + - [ClaimResponse](#lbm.fbridge.v1.ClaimResponse) + - [HoldTransferRequest](#lbm.fbridge.v1.HoldTransferRequest) + - [HoldTransferResponse](#lbm.fbridge.v1.HoldTransferResponse) + - [ProvisionRequest](#lbm.fbridge.v1.ProvisionRequest) + - [ProvisionResponse](#lbm.fbridge.v1.ProvisionResponse) + - [ReleaseTransferRequest](#lbm.fbridge.v1.ReleaseTransferRequest) + - [ReleaseTransferResponse](#lbm.fbridge.v1.ReleaseTransferResponse) + - [RemoveProvisionRequest](#lbm.fbridge.v1.RemoveProvisionRequest) + - [RemoveProvisionResponse](#lbm.fbridge.v1.RemoveProvisionResponse) + - [TransferRequest](#lbm.fbridge.v1.TransferRequest) + - [TransferResponse](#lbm.fbridge.v1.TransferResponse) + + - [Msg](#lbm.fbridge.v1.Msg) + - [lbm/foundation/v1/authz.proto](#lbm/foundation/v1/authz.proto) - [ReceiveFromTreasuryAuthorization](#lbm.foundation.v1.ReceiveFromTreasuryAuthorization) @@ -11300,6 +11356,746 @@ 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) | + + + + + + + + +### 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 | + + + + + + + + + + + + + + + + + + +## 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 | +| `greatest_seq` | [uint64](#uint64) | | the greatest sequence number confirmed by the operator | + + + + + + + + +### 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_seq_per_operator` | [OperatorSeqInfo](#lbm.fbridge.v1.OperatorSeqInfo) | repeated | the greatest sequence number confirmed by each operator | +| `next_seq_to_confirm` | [uint64](#uint64) | | the next sequence numbers to confirm. (next_seq_to_confirm - 1) is confirmed by n-of-m operators | +| `next_seq_to_claim` | [uint64](#uint64) | | the next sequence numbers confirmed by n-of-m operators that have not been claimed yet | +| `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 + + + + + +### CommitmentsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### CommitmentsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `commitments` | [string](#string) | repeated | | + + + + + + + + +### ConfirmedProvisionRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### ConfirmedProvisionResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [ProvisionData](#lbm.fbridge.v1.ProvisionData) | | | +| `status` | [ProvisionStatus](#lbm.fbridge.v1.ProvisionStatus) | | | + + + + + + + + +### GreatestSeqByOperatorRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the address of the operator | + + + + + + + + +### GreatestSeqByOperatorResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | + + + + + + + + +### NextSeqToConfirmRequest + + + + + + + + + +### NextSeqToConfirmResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | + + + + + + + + +### QueryParamsRequest + + + + + + + + + +### QueryParamsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#lbm.fbridge.v1.Params) | | | + + + + + + + + +### SubmittedProvisionRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the address of the operator | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### SubmittedProvisionResponse + + + +| 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| +| `GreatestSeqByOperator` | [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) | [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) | Get a greatest sequence number to be confirmed by a particular operator | GET|/lbm/fbridge/v1/greatest_seq_by_operator/{operator}| +| `NextSeqToConfirm` | [NextSeqToConfirmRequest](#lbm.fbridge.v1.NextSeqToConfirmRequest) | [NextSeqToConfirmResponse](#lbm.fbridge.v1.NextSeqToConfirmResponse) | Get a next sequence number to be confirmed by n-of-m operators | GET|/lbm/fbridge/v1/next_seq_to_confirm| +| `SubmittedProvision` | [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) | [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) | Get a provision submitted by a particular operator | GET|/lbm/fbridge/v1/submitted_provision/{operator}/{seq}| +| `ConfirmedProvision` | [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) | [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) | Get a specific confirmed provision | GET|/lbm/fbridge/v1/confirmed_provision/{seq}| +| `Commitments` | [CommitmentsRequest](#lbm.fbridge.v1.CommitmentsRequest) | [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) | Get commitments of a specific sequence number | GET|/lbm/fbridge/v1/commitments/{seq}| + + + + + + + + +## lbm/fbridge/v1/tx.proto + + + + + +### ClaimBatchRequest +ClaimBatchRequest is input values required for claiming multiple claimable provisions + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `max_claims` | [uint64](#uint64) | | the maximum number of claims to be made at once | + + + + + + + + +### ClaimBatchResponse + + + + + + + + + +### ClaimRequest +ClaimRequest is input values required for claiming a provision + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### ClaimResponse + + + + + + + + + +### HoldTransferRequest +HoldTransferRequest is input values required for holding transfer + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### HoldTransferResponse + + + + + + + + + +### ProvisionRequest +ProvisionRequest is input values required for provisioning + + +| 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 | + + + + + + + + +### ProvisionResponse + + + + + + + + + +### ReleaseTransferRequest +ReleaseTransferRequest is input values required for releasing a held transfer by time lock + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### ReleaseTransferResponse + + + + + + + + + +### RemoveProvisionRequest +RemoveProvisionRequest is input values required for removing a specific confirmed provision + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | + + + + + + + + +### RemoveProvisionResponse + + + + + + + + + +### TransferRequest +TransferRequest 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 | + + + + + + + + +### TransferResponse + + + + + + + + + + + + + + + +### Msg + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Transfer` | [TransferRequest](#lbm.fbridge.v1.TransferRequest) | [TransferResponse](#lbm.fbridge.v1.TransferResponse) | Submit a transfer request to the bridge module. | | +| `Provision` | [ProvisionRequest](#lbm.fbridge.v1.ProvisionRequest) | [ProvisionResponse](#lbm.fbridge.v1.ProvisionResponse) | Submit a provision to the bridge module. | | +| `HoldTransfer` | [HoldTransferRequest](#lbm.fbridge.v1.HoldTransferRequest) | [HoldTransferResponse](#lbm.fbridge.v1.HoldTransferResponse) | Set the time lock value from default value to uint64.max for specific confirmed provision. | | +| `ReleaseTransfer` | [ReleaseTransferRequest](#lbm.fbridge.v1.ReleaseTransferRequest) | [ReleaseTransferResponse](#lbm.fbridge.v1.ReleaseTransferResponse) | Set the time lock value to 0 for specific confirmed provision. | | +| `RemoveProvision` | [RemoveProvisionRequest](#lbm.fbridge.v1.RemoveProvisionRequest) | [RemoveProvisionResponse](#lbm.fbridge.v1.RemoveProvisionResponse) | Remove a specific confirmed provision (reset for specific sequence number). | | +| `ClaimBatch` | [ClaimBatchRequest](#lbm.fbridge.v1.ClaimBatchRequest) | [ClaimBatchResponse](#lbm.fbridge.v1.ClaimBatchResponse) | ClaimBatch processes the claiming of multiple claimable provisions in a single operation | | +| `Claim` | [ClaimRequest](#lbm.fbridge.v1.ClaimRequest) | [ClaimResponse](#lbm.fbridge.v1.ClaimResponse) | Claim processes the claiming of a provision with a specific sequence number | | + + + + + diff --git a/proto/lbm/fbridge/v1/event.proto b/proto/lbm/fbridge/v1/event.proto index 7e9ba4348a..e7594d4dc8 100644 --- a/proto/lbm/fbridge/v1/event.proto +++ b/proto/lbm/fbridge/v1/event.proto @@ -3,4 +3,42 @@ package lbm.fbridge.v1; option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; -message EventDummy {} +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 index fb2eba454f..6116662cb9 100644 --- a/proto/lbm/fbridge/v1/fbridge.proto +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -3,4 +3,46 @@ package lbm.fbridge.v1; option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; -message Params {} +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; +} + +// 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; +} diff --git a/proto/lbm/fbridge/v1/genesis.proto b/proto/lbm/fbridge/v1/genesis.proto index f57faf370b..3e637d4ce9 100644 --- a/proto/lbm/fbridge/v1/genesis.proto +++ b/proto/lbm/fbridge/v1/genesis.proto @@ -9,5 +9,70 @@ import "lbm/fbridge/v1/fbridge.proto"; // GenesisState defines the fbridge module's genesis state. message GenesisState { // params defines all the parameters of the module. - repeated Params params = 1 [(gogoproto.nullable) = false]; + 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 sequence number confirmed by each operator + repeated OperatorSeqInfo greatest_seq_per_operator = 1; + // the next sequence numbers to confirm. (next_seq_to_confirm - 1) is confirmed by n-of-m operators + uint64 next_seq_to_confirm = 2; + // the next sequence numbers confirmed by n-of-m operators that have not been claimed yet + uint64 next_seq_to_claim = 3; + // commitment is the hash value of a specific provision. + repeated Commitment commitments = 4; + // provision associated with a specific commitment. + repeated Provision provisions = 5; + // map the sequence number confirmed by n-of-m operators with commitment + repeated ConfirmedProvision confirmed_seq_to_commitment = 7; +} + +message OperatorSeqInfo { + // the operator address + string operator = 1; + // the greatest sequence number confirmed by the operator + uint64 greatest_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 index 72e062e4c5..4893364dd5 100644 --- a/proto/lbm/fbridge/v1/query.proto +++ b/proto/lbm/fbridge/v1/query.proto @@ -3,4 +3,90 @@ package lbm.fbridge.v1; option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; -service Query {} +import "google/api/annotations.proto"; +import "gogoproto/gogo.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"; + } + + // Get a greatest sequence number to be confirmed by a particular operator + rpc GreatestSeqByOperator(GreatestSeqByOperatorRequest) returns (GreatestSeqByOperatorResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/greatest_seq_by_operator/{operator}"; + } + + // Get a next sequence number to be confirmed by n-of-m operators + rpc NextSeqToConfirm(NextSeqToConfirmRequest) returns (NextSeqToConfirmResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/next_seq_to_confirm"; + } + + // Get a provision submitted by a particular operator + rpc SubmittedProvision(SubmittedProvisionRequest) returns (SubmittedProvisionResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/submitted_provision/{operator}/{seq}"; + } + + // Get a specific confirmed provision + rpc ConfirmedProvision(ConfirmedProvisionRequest) returns (ConfirmedProvisionResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/confirmed_provision/{seq}"; + } + + // Get commitments of a specific sequence number + rpc Commitments(CommitmentsRequest) returns (CommitmentsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/commitments/{seq}"; + } +} + +message QueryParamsRequest {} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +message GreatestSeqByOperatorRequest { + // the address of the operator + string operator = 1; +} + +message GreatestSeqByOperatorResponse { + uint64 seq = 1; +} + +message NextSeqToConfirmRequest {} + +message NextSeqToConfirmResponse { + uint64 seq = 1; +} + +message SubmittedProvisionRequest { + // the address of the operator + string operator = 1; + // the sequence number of the bridge request + uint64 seq = 2; +} + +message SubmittedProvisionResponse { + ProvisionData data = 1 [(gogoproto.nullable) = false]; + ProvisionStatus status = 2 [(gogoproto.nullable) = false]; +} + +message ConfirmedProvisionRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message ConfirmedProvisionResponse { + ProvisionData data = 1 [(gogoproto.nullable) = false]; + ProvisionStatus status = 2 [(gogoproto.nullable) = false]; +} + +message CommitmentsRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message CommitmentsResponse { + repeated string commitments = 1; +} \ No newline at end of file diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto index c3239e10e5..49f9f1a6a1 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -3,4 +3,95 @@ package lbm.fbridge.v1; option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; -service Msg {} +import "gogoproto/gogo.proto"; + +service Msg { + // Submit a transfer request to the bridge module. + rpc Transfer(TransferRequest) returns (TransferResponse); + + // Submit a provision to the bridge module. + rpc Provision(ProvisionRequest) returns (ProvisionResponse); + + // Set the time lock value from default value to uint64.max for specific confirmed provision. + rpc HoldTransfer(HoldTransferRequest) returns (HoldTransferResponse); + + // Set the time lock value to 0 for specific confirmed provision. + rpc ReleaseTransfer(ReleaseTransferRequest) returns (ReleaseTransferResponse); + + // Remove a specific confirmed provision (reset for specific sequence number). + rpc RemoveProvision(RemoveProvisionRequest) returns (RemoveProvisionResponse); + + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + rpc ClaimBatch(ClaimBatchRequest) returns (ClaimBatchResponse); + + // Claim processes the claiming of a provision with a specific sequence number + rpc Claim(ClaimRequest) returns (ClaimResponse); +} + +// TransferRequest is input values required for bridge transfer +message TransferRequest { + // 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 TransferResponse {} + +// ProvisionRequest is input values required for provisioning +message ProvisionRequest { + // 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 + [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; +} + +message ProvisionResponse {} + +// HoldTransferRequest is input values required for holding transfer +message HoldTransferRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message HoldTransferResponse {} + +// ReleaseTransferRequest is input values required for releasing a held transfer by time lock +message ReleaseTransferRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message ReleaseTransferResponse {} + +// RemoveProvisionRequest is input values required for removing a specific confirmed provision +message RemoveProvisionRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message RemoveProvisionResponse {} + +// ClaimBatchRequest is input values required for claiming multiple claimable provisions +message ClaimBatchRequest { + // the maximum number of claims to be made at once + uint64 max_claims = 1; +} + +message ClaimBatchResponse {} + +// ClaimRequest is input values required for claiming a provision +message ClaimRequest { + // the sequence number of the bridge request + uint64 seq = 1; +} + +message ClaimResponse {} 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/fbridge.pb.go b/x/fbridge/types/fbridge.pb.go new file mode 100644 index 0000000000..77a6a7ee45 --- /dev/null +++ b/x/fbridge/types/fbridge.pb.go @@ -0,0 +1,1238 @@ +// 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 + +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"` +} + +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 +} + +// 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 +} + +func init() { + 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") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/fbridge.proto", fileDescriptor_62374d75fc6aa1ba) } + +var fileDescriptor_62374d75fc6aa1ba = []byte{ + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xd1, 0x6e, 0xd3, 0x30, + 0x14, 0x86, 0x9b, 0xae, 0x54, 0xcd, 0x29, 0x6b, 0xc1, 0x9a, 0x50, 0x35, 0x8d, 0xac, 0x54, 0x42, + 0x4c, 0x48, 0x24, 0x6c, 0xbc, 0xc1, 0x36, 0x26, 0x51, 0x71, 0x51, 0x05, 0xae, 0xb8, 0x89, 0x9c, + 0xd8, 0xcd, 0xcc, 0x62, 0xbb, 0xd8, 0x4e, 0x04, 0xbc, 0x04, 0xbc, 0x02, 0x6f, 0xb3, 0xcb, 0x5d, + 0x22, 0x2e, 0x26, 0xd4, 0xbe, 0x08, 0x8a, 0x9b, 0x84, 0xf6, 0xaa, 0x77, 0xc7, 0xbf, 0xf3, 0x7f, + 0xfe, 0xcf, 0xc9, 0x81, 0xa3, 0x2c, 0xe6, 0xc1, 0x3c, 0x56, 0x8c, 0xa4, 0x34, 0x28, 0x4e, 0xeb, + 0xd2, 0x5f, 0x28, 0x69, 0x24, 0x1a, 0x64, 0x31, 0xf7, 0x6b, 0xa9, 0x38, 0x3d, 0x3c, 0x48, 0x65, + 0x2a, 0xed, 0x55, 0x50, 0x56, 0xeb, 0xaf, 0x26, 0x3f, 0xda, 0xd0, 0x9d, 0x61, 0x85, 0xb9, 0x46, + 0x53, 0x38, 0x90, 0x0b, 0xaa, 0xb0, 0x91, 0x2a, 0x32, 0x2a, 0xd7, 0x26, 0xca, 0x68, 0x41, 0xb3, + 0x91, 0x33, 0x76, 0x4e, 0xfa, 0x67, 0x23, 0x7f, 0x9b, 0xe7, 0x5f, 0x29, 0x9c, 0x18, 0x26, 0x45, + 0x88, 0x6a, 0xd7, 0xc7, 0xd2, 0xf4, 0xbe, 0xf4, 0x94, 0xac, 0x34, 0xc7, 0x8a, 0x30, 0x2c, 0xb6, + 0x58, 0xed, 0x5d, 0xac, 0xda, 0xb5, 0xc1, 0xba, 0x84, 0xc7, 0x9f, 0x73, 0x92, 0xd2, 0x2d, 0xd0, + 0xde, 0x0e, 0xd0, 0xd0, 0x5a, 0x36, 0x28, 0x2f, 0x60, 0x68, 0x18, 0xa7, 0x99, 0x4c, 0x6e, 0xa2, + 0x05, 0x55, 0x4c, 0x92, 0x51, 0x67, 0xec, 0x9c, 0x74, 0xc2, 0x41, 0x2d, 0xcf, 0xac, 0x3a, 0xf9, + 0xe5, 0xc0, 0xfe, 0x4c, 0xc9, 0x82, 0x69, 0x26, 0xc5, 0x25, 0x36, 0x18, 0x3d, 0x82, 0x3d, 0x4d, + 0xbf, 0xd8, 0x39, 0x74, 0xc2, 0xb2, 0x44, 0x53, 0xe8, 0x62, 0x2e, 0x73, 0x61, 0x6c, 0x43, 0xee, + 0xf9, 0xd9, 0xed, 0xfd, 0x71, 0xeb, 0xcf, 0xfd, 0xf1, 0xcb, 0x94, 0x99, 0xeb, 0x3c, 0xf6, 0x13, + 0xc9, 0x83, 0x2b, 0x26, 0x74, 0x72, 0xcd, 0x70, 0x30, 0xaf, 0x8a, 0x57, 0x9a, 0xdc, 0x04, 0xe6, + 0xdb, 0x82, 0x6a, 0xff, 0x9d, 0x30, 0x61, 0x45, 0x40, 0x4f, 0xa0, 0xab, 0xa9, 0x20, 0x54, 0xd9, + 0x9e, 0xdc, 0xb0, 0x3a, 0xa1, 0x43, 0xe8, 0x29, 0x9a, 0x50, 0x56, 0x50, 0x65, 0x93, 0xba, 0x61, + 0x73, 0x9e, 0x7c, 0x87, 0x61, 0x13, 0xf1, 0x83, 0xc1, 0x26, 0xd7, 0xe8, 0x19, 0x3c, 0x6c, 0xfa, + 0xa3, 0x82, 0x54, 0x69, 0xfb, 0xb5, 0xf6, 0x56, 0x10, 0xf4, 0x1c, 0x06, 0x89, 0x14, 0x73, 0xa6, + 0x78, 0x94, 0x94, 0x4f, 0x6b, 0x9b, 0xfe, 0x41, 0xb8, 0x5f, 0xa9, 0x17, 0x56, 0x44, 0x4f, 0x01, + 0x98, 0x8e, 0x92, 0x0c, 0x33, 0x4e, 0x89, 0x0d, 0xd5, 0x0b, 0x5d, 0xa6, 0x2f, 0xd6, 0xc2, 0x64, + 0x0a, 0xbd, 0x7a, 0xca, 0xe8, 0x08, 0x5c, 0x91, 0xf3, 0xf5, 0xdf, 0xaf, 0x5e, 0xfc, 0x2f, 0xa0, + 0x31, 0xf4, 0x09, 0x15, 0x92, 0x33, 0x61, 0xef, 0xdb, 0xeb, 0x44, 0x1b, 0xd2, 0xf9, 0xf4, 0x76, + 0xe9, 0x39, 0x77, 0x4b, 0xcf, 0xf9, 0xbb, 0xf4, 0x9c, 0x9f, 0x2b, 0xaf, 0x75, 0xb7, 0xf2, 0x5a, + 0xbf, 0x57, 0x5e, 0xeb, 0xd3, 0xeb, 0x9d, 0x93, 0xfc, 0xda, 0xac, 0xbe, 0x9d, 0x69, 0xdc, 0xb5, + 0x0b, 0xfd, 0xe6, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x90, 0x4f, 0xd7, 0x16, 0x03, 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.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 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)) + } + 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 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 + } + } + 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 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.pb.go b/x/fbridge/types/genesis.pb.go new file mode 100644 index 0000000000..5e48364820 --- /dev/null +++ b/x/fbridge/types/genesis.pb.go @@ -0,0 +1,2214 @@ +// 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 sequence number confirmed by each operator + GreatestSeqPerOperator []*OperatorSeqInfo `protobuf:"bytes,1,rep,name=greatest_seq_per_operator,json=greatestSeqPerOperator,proto3" json:"greatest_seq_per_operator,omitempty"` + // the next sequence numbers to confirm. (next_seq_to_confirm - 1) is confirmed by n-of-m operators + NextSeqToConfirm uint64 `protobuf:"varint,2,opt,name=next_seq_to_confirm,json=nextSeqToConfirm,proto3" json:"next_seq_to_confirm,omitempty"` + // the next sequence numbers confirmed by n-of-m operators that have not been claimed yet + NextSeqToClaim uint64 `protobuf:"varint,3,opt,name=next_seq_to_claim,json=nextSeqToClaim,proto3" json:"next_seq_to_claim,omitempty"` + // commitment is the hash value of a specific provision. + Commitments []*Commitment `protobuf:"bytes,4,rep,name=commitments,proto3" json:"commitments,omitempty"` + // provision associated with a specific commitment. + Provisions []*Provision `protobuf:"bytes,5,rep,name=provisions,proto3" json:"provisions,omitempty"` + // map the sequence number confirmed by n-of-m operators with commitment + ConfirmedSeqToCommitment []*ConfirmedProvision `protobuf:"bytes,7,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 greatest sequence number confirmed by the operator + GreatestSeq uint64 `protobuf:"varint,2,opt,name=greatest_seq,json=greatestSeq,proto3" json:"greatest_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) GetGreatestSeq() uint64 { + if m != nil { + return m.GreatestSeq + } + 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{ + // 639 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0x8e, 0x93, 0xfc, 0xf8, 0x33, 0x84, 0xc0, 0x6f, 0x5b, 0x21, 0x93, 0x52, 0x87, 0xfa, 0x44, + 0x0f, 0xc4, 0xa5, 0xad, 0x54, 0xb5, 0xe2, 0x14, 0x10, 0xa8, 0x95, 0xaa, 0x22, 0x87, 0x13, 0x97, + 0x68, 0x93, 0x6c, 0xcc, 0x8a, 0xd8, 0x1b, 0xef, 0x6e, 0x22, 0xfa, 0x06, 0x3d, 0xf6, 0xd6, 0x6b, + 0x8f, 0x7d, 0x14, 0x8e, 0x1c, 0x7b, 0xa8, 0xaa, 0x0a, 0x5e, 0xa4, 0xf2, 0x66, 0x6d, 0x6f, 0x0c, + 0xf4, 0xb6, 0x3b, 0xf3, 0xcd, 0x37, 0xdf, 0xcc, 0xec, 0x2c, 0x6c, 0x8d, 0x7a, 0xa1, 0x37, 0xec, + 0x71, 0x3a, 0x08, 0x88, 0x37, 0xdd, 0xf3, 0x02, 0x12, 0x11, 0x41, 0x45, 0x6b, 0xcc, 0x99, 0x64, + 0xa8, 0x3e, 0xea, 0x85, 0x2d, 0xed, 0x6d, 0x4d, 0xf7, 0x1a, 0x8f, 0x03, 0x16, 0x30, 0xe5, 0xf2, + 0x92, 0xd3, 0x0c, 0xd5, 0x28, 0x72, 0xa4, 0x01, 0xca, 0xeb, 0xfe, 0xb2, 0xa0, 0x76, 0x3c, 0x63, + 0xed, 0x48, 0x2c, 0x09, 0x7a, 0x0d, 0x0b, 0x63, 0xcc, 0x71, 0x28, 0x6c, 0x6b, 0xdb, 0xda, 0x59, + 0x79, 0xb9, 0xd1, 0x9a, 0xcf, 0xd2, 0x3a, 0x51, 0xde, 0x76, 0xf5, 0xea, 0x77, 0xb3, 0xe4, 0x6b, + 0x2c, 0x3a, 0x86, 0x55, 0x41, 0xa2, 0x01, 0x8d, 0x82, 0xae, 0x48, 0x68, 0xec, 0xb2, 0x0a, 0xde, + 0x2a, 0x06, 0x77, 0x66, 0x20, 0x95, 0x4a, 0x53, 0xd4, 0x84, 0x61, 0x43, 0x1f, 0x61, 0x8d, 0x93, + 0x3e, 0xa1, 0xd3, 0x9c, 0xaa, 0xa2, 0xa8, 0x9c, 0x22, 0x95, 0x9f, 0xc2, 0x4c, 0xb2, 0x3a, 0x9f, + 0xb3, 0xba, 0x13, 0xa8, 0x99, 0x29, 0xd1, 0x26, 0x2c, 0x45, 0xe4, 0x52, 0x76, 0x05, 0x89, 0x55, + 0x7d, 0x55, 0x7f, 0x31, 0xb9, 0x77, 0x48, 0x8c, 0x0e, 0x61, 0x4d, 0x90, 0xb8, 0x2b, 0x59, 0xb7, + 0x37, 0x62, 0xfd, 0x8b, 0x68, 0x12, 0xda, 0xe5, 0xed, 0xca, 0x7d, 0x45, 0xb4, 0x13, 0x7f, 0x87, + 0xc4, 0xef, 0xa3, 0x21, 0xf3, 0x57, 0x05, 0x89, 0x4f, 0x59, 0x5b, 0x87, 0xbc, 0xab, 0x7e, 0xf9, + 0xde, 0x2c, 0xb9, 0xfb, 0x50, 0x33, 0x41, 0x68, 0x1d, 0x2a, 0x79, 0xc6, 0xe4, 0x88, 0x1a, 0xb0, + 0x64, 0xa4, 0x49, 0xcc, 0xd9, 0xdd, 0xfd, 0x51, 0x81, 0xfa, 0x7c, 0x75, 0xe8, 0x0c, 0x36, 0x03, + 0x4e, 0xb0, 0x24, 0x42, 0x69, 0xef, 0x8e, 0x09, 0xef, 0xb2, 0x31, 0xe1, 0x58, 0x32, 0x6e, 0x5b, + 0x4a, 0x66, 0xb3, 0x28, 0xf3, 0x93, 0xf6, 0xa7, 0x4a, 0x37, 0x52, 0x86, 0x0e, 0x89, 0x4f, 0x08, + 0x4f, 0xdd, 0x68, 0x17, 0x1e, 0xa5, 0x3d, 0x49, 0xaa, 0xef, 0xb3, 0x68, 0x48, 0x79, 0xaa, 0x6a, + 0x5d, 0xb7, 0xe7, 0x94, 0x1d, 0xcc, 0xec, 0xe8, 0x39, 0xfc, 0x3f, 0x07, 0x1f, 0x61, 0x1a, 0xaa, + 0x19, 0x55, 0xfd, 0x7a, 0x0e, 0x4e, 0xac, 0x68, 0x1f, 0x56, 0xfa, 0x2c, 0x0c, 0xa9, 0x0c, 0x49, + 0x24, 0x85, 0x5d, 0x55, 0x3a, 0x1b, 0x45, 0x9d, 0x07, 0x19, 0xc4, 0x37, 0xe1, 0xe8, 0x2d, 0xc0, + 0x98, 0xb3, 0x29, 0x15, 0x94, 0x45, 0xc2, 0xfe, 0x4f, 0x05, 0x6f, 0xde, 0x79, 0x8d, 0x29, 0xc2, + 0x37, 0xc0, 0x08, 0xc3, 0x13, 0x5d, 0x06, 0x19, 0xe4, 0x75, 0xa5, 0xd4, 0xf6, 0xa2, 0xe2, 0x72, + 0xef, 0x0a, 0xd1, 0x21, 0x39, 0xa9, 0x9d, 0xd1, 0xe8, 0x1e, 0xa4, 0x1c, 0x7a, 0xd0, 0x27, 0xb0, + 0x56, 0x68, 0x73, 0x32, 0x59, 0x63, 0x32, 0xd6, 0xce, 0xb2, 0x9f, 0xdd, 0xd1, 0x33, 0xa8, 0x99, + 0x63, 0xd4, 0x3d, 0x5e, 0x31, 0x06, 0xe3, 0x9e, 0x01, 0xe4, 0x59, 0xfe, 0x49, 0xa6, 0x1f, 0x55, + 0x39, 0x7f, 0x54, 0x0e, 0x80, 0x51, 0x65, 0x45, 0xe1, 0x0d, 0x8b, 0xfb, 0xcd, 0x82, 0xe5, 0xac, + 0xb6, 0x02, 0xda, 0x2a, 0xa2, 0xd1, 0x1e, 0x54, 0x07, 0x58, 0x62, 0xbd, 0xca, 0x4f, 0x1f, 0xec, + 0xfc, 0x21, 0x96, 0xd8, 0x57, 0x50, 0xf4, 0x06, 0x16, 0x92, 0x9d, 0x9d, 0x08, 0xbd, 0xb4, 0xcd, + 0x07, 0x83, 0x3a, 0x0a, 0xe6, 0x6b, 0xb8, 0x7b, 0x04, 0xe8, 0x6e, 0xf7, 0xef, 0x59, 0x9b, 0x79, + 0xcd, 0xe5, 0xa2, 0xe6, 0xf6, 0x87, 0xab, 0x1b, 0xc7, 0xba, 0xbe, 0x71, 0xac, 0x3f, 0x37, 0x8e, + 0xf5, 0xf5, 0xd6, 0x29, 0x5d, 0xdf, 0x3a, 0xa5, 0x9f, 0xb7, 0x4e, 0xe9, 0xec, 0x45, 0x40, 0xe5, + 0xf9, 0xa4, 0xd7, 0xea, 0xb3, 0xd0, 0x3b, 0xa2, 0x91, 0xe8, 0x9f, 0x53, 0xec, 0x0d, 0xf5, 0x61, + 0x57, 0x0c, 0x2e, 0xbc, 0xcb, 0xec, 0x97, 0x94, 0x9f, 0xc7, 0x44, 0xf4, 0x16, 0xd4, 0x0f, 0xf9, + 0xea, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x98, 0x82, 0x29, 0x85, 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] = 0x3a + } + } + 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] = 0x2a + } + } + 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] = 0x22 + } + } + if m.NextSeqToClaim != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextSeqToClaim)) + i-- + dAtA[i] = 0x18 + } + if m.NextSeqToConfirm != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextSeqToConfirm)) + i-- + dAtA[i] = 0x10 + } + if len(m.GreatestSeqPerOperator) > 0 { + for iNdEx := len(m.GreatestSeqPerOperator) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GreatestSeqPerOperator[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.GreatestSeq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.GreatestSeq)) + 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.GreatestSeqPerOperator) > 0 { + for _, e := range m.GreatestSeqPerOperator { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.NextSeqToConfirm != 0 { + n += 1 + sovGenesis(uint64(m.NextSeqToConfirm)) + } + if m.NextSeqToClaim != 0 { + n += 1 + sovGenesis(uint64(m.NextSeqToClaim)) + } + 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.GreatestSeq != 0 { + n += 1 + sovGenesis(uint64(m.GreatestSeq)) + } + 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 GreatestSeqPerOperator", 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.GreatestSeqPerOperator = append(m.GreatestSeqPerOperator, &OperatorSeqInfo{}) + if err := m.GreatestSeqPerOperator[len(m.GreatestSeqPerOperator)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextSeqToConfirm", wireType) + } + m.NextSeqToConfirm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextSeqToConfirm |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextSeqToClaim", wireType) + } + m.NextSeqToClaim = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextSeqToClaim |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + 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 5: + 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 7: + 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 GreatestSeq", wireType) + } + m.GreatestSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GreatestSeq |= 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/query.pb.go b/x/fbridge/types/query.pb.go new file mode 100644 index 0000000000..53fffd6deb --- /dev/null +++ b/x/fbridge/types/query.pb.go @@ -0,0 +1,2486 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/fbridge/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "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 GreatestSeqByOperatorRequest struct { + // the address of the operator + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` +} + +func (m *GreatestSeqByOperatorRequest) Reset() { *m = GreatestSeqByOperatorRequest{} } +func (m *GreatestSeqByOperatorRequest) String() string { return proto.CompactTextString(m) } +func (*GreatestSeqByOperatorRequest) ProtoMessage() {} +func (*GreatestSeqByOperatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{2} +} +func (m *GreatestSeqByOperatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GreatestSeqByOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GreatestSeqByOperatorRequest.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 *GreatestSeqByOperatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GreatestSeqByOperatorRequest.Merge(m, src) +} +func (m *GreatestSeqByOperatorRequest) XXX_Size() int { + return m.Size() +} +func (m *GreatestSeqByOperatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GreatestSeqByOperatorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GreatestSeqByOperatorRequest proto.InternalMessageInfo + +func (m *GreatestSeqByOperatorRequest) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +type GreatestSeqByOperatorResponse struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *GreatestSeqByOperatorResponse) Reset() { *m = GreatestSeqByOperatorResponse{} } +func (m *GreatestSeqByOperatorResponse) String() string { return proto.CompactTextString(m) } +func (*GreatestSeqByOperatorResponse) ProtoMessage() {} +func (*GreatestSeqByOperatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{3} +} +func (m *GreatestSeqByOperatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GreatestSeqByOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GreatestSeqByOperatorResponse.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 *GreatestSeqByOperatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GreatestSeqByOperatorResponse.Merge(m, src) +} +func (m *GreatestSeqByOperatorResponse) XXX_Size() int { + return m.Size() +} +func (m *GreatestSeqByOperatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GreatestSeqByOperatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GreatestSeqByOperatorResponse proto.InternalMessageInfo + +func (m *GreatestSeqByOperatorResponse) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type NextSeqToConfirmRequest struct { +} + +func (m *NextSeqToConfirmRequest) Reset() { *m = NextSeqToConfirmRequest{} } +func (m *NextSeqToConfirmRequest) String() string { return proto.CompactTextString(m) } +func (*NextSeqToConfirmRequest) ProtoMessage() {} +func (*NextSeqToConfirmRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{4} +} +func (m *NextSeqToConfirmRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NextSeqToConfirmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NextSeqToConfirmRequest.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 *NextSeqToConfirmRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextSeqToConfirmRequest.Merge(m, src) +} +func (m *NextSeqToConfirmRequest) XXX_Size() int { + return m.Size() +} +func (m *NextSeqToConfirmRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NextSeqToConfirmRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NextSeqToConfirmRequest proto.InternalMessageInfo + +type NextSeqToConfirmResponse struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *NextSeqToConfirmResponse) Reset() { *m = NextSeqToConfirmResponse{} } +func (m *NextSeqToConfirmResponse) String() string { return proto.CompactTextString(m) } +func (*NextSeqToConfirmResponse) ProtoMessage() {} +func (*NextSeqToConfirmResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{5} +} +func (m *NextSeqToConfirmResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NextSeqToConfirmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NextSeqToConfirmResponse.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 *NextSeqToConfirmResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextSeqToConfirmResponse.Merge(m, src) +} +func (m *NextSeqToConfirmResponse) XXX_Size() int { + return m.Size() +} +func (m *NextSeqToConfirmResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NextSeqToConfirmResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NextSeqToConfirmResponse proto.InternalMessageInfo + +func (m *NextSeqToConfirmResponse) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type SubmittedProvisionRequest 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 *SubmittedProvisionRequest) Reset() { *m = SubmittedProvisionRequest{} } +func (m *SubmittedProvisionRequest) String() string { return proto.CompactTextString(m) } +func (*SubmittedProvisionRequest) ProtoMessage() {} +func (*SubmittedProvisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{6} +} +func (m *SubmittedProvisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubmittedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubmittedProvisionRequest.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 *SubmittedProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubmittedProvisionRequest.Merge(m, src) +} +func (m *SubmittedProvisionRequest) XXX_Size() int { + return m.Size() +} +func (m *SubmittedProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubmittedProvisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubmittedProvisionRequest proto.InternalMessageInfo + +func (m *SubmittedProvisionRequest) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *SubmittedProvisionRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type SubmittedProvisionResponse 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 *SubmittedProvisionResponse) Reset() { *m = SubmittedProvisionResponse{} } +func (m *SubmittedProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*SubmittedProvisionResponse) ProtoMessage() {} +func (*SubmittedProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{7} +} +func (m *SubmittedProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubmittedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubmittedProvisionResponse.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 *SubmittedProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubmittedProvisionResponse.Merge(m, src) +} +func (m *SubmittedProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *SubmittedProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SubmittedProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SubmittedProvisionResponse proto.InternalMessageInfo + +func (m *SubmittedProvisionResponse) GetData() ProvisionData { + if m != nil { + return m.Data + } + return ProvisionData{} +} + +func (m *SubmittedProvisionResponse) GetStatus() ProvisionStatus { + if m != nil { + return m.Status + } + return ProvisionStatus{} +} + +type ConfirmedProvisionRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *ConfirmedProvisionRequest) Reset() { *m = ConfirmedProvisionRequest{} } +func (m *ConfirmedProvisionRequest) String() string { return proto.CompactTextString(m) } +func (*ConfirmedProvisionRequest) ProtoMessage() {} +func (*ConfirmedProvisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{8} +} +func (m *ConfirmedProvisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConfirmedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConfirmedProvisionRequest.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 *ConfirmedProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConfirmedProvisionRequest.Merge(m, src) +} +func (m *ConfirmedProvisionRequest) XXX_Size() int { + return m.Size() +} +func (m *ConfirmedProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ConfirmedProvisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ConfirmedProvisionRequest proto.InternalMessageInfo + +func (m *ConfirmedProvisionRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type ConfirmedProvisionResponse 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 *ConfirmedProvisionResponse) Reset() { *m = ConfirmedProvisionResponse{} } +func (m *ConfirmedProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*ConfirmedProvisionResponse) ProtoMessage() {} +func (*ConfirmedProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{9} +} +func (m *ConfirmedProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConfirmedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConfirmedProvisionResponse.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 *ConfirmedProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConfirmedProvisionResponse.Merge(m, src) +} +func (m *ConfirmedProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *ConfirmedProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConfirmedProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConfirmedProvisionResponse proto.InternalMessageInfo + +func (m *ConfirmedProvisionResponse) GetData() ProvisionData { + if m != nil { + return m.Data + } + return ProvisionData{} +} + +func (m *ConfirmedProvisionResponse) GetStatus() ProvisionStatus { + if m != nil { + return m.Status + } + return ProvisionStatus{} +} + +type CommitmentsRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *CommitmentsRequest) Reset() { *m = CommitmentsRequest{} } +func (m *CommitmentsRequest) String() string { return proto.CompactTextString(m) } +func (*CommitmentsRequest) ProtoMessage() {} +func (*CommitmentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{10} +} +func (m *CommitmentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitmentsRequest.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 *CommitmentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitmentsRequest.Merge(m, src) +} +func (m *CommitmentsRequest) XXX_Size() int { + return m.Size() +} +func (m *CommitmentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CommitmentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitmentsRequest proto.InternalMessageInfo + +func (m *CommitmentsRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type CommitmentsResponse struct { + Commitments []string `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` +} + +func (m *CommitmentsResponse) Reset() { *m = CommitmentsResponse{} } +func (m *CommitmentsResponse) String() string { return proto.CompactTextString(m) } +func (*CommitmentsResponse) ProtoMessage() {} +func (*CommitmentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{11} +} +func (m *CommitmentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitmentsResponse.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 *CommitmentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitmentsResponse.Merge(m, src) +} +func (m *CommitmentsResponse) XXX_Size() int { + return m.Size() +} +func (m *CommitmentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CommitmentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitmentsResponse proto.InternalMessageInfo + +func (m *CommitmentsResponse) GetCommitments() []string { + if m != nil { + return m.Commitments + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "lbm.fbridge.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "lbm.fbridge.v1.QueryParamsResponse") + proto.RegisterType((*GreatestSeqByOperatorRequest)(nil), "lbm.fbridge.v1.GreatestSeqByOperatorRequest") + proto.RegisterType((*GreatestSeqByOperatorResponse)(nil), "lbm.fbridge.v1.GreatestSeqByOperatorResponse") + proto.RegisterType((*NextSeqToConfirmRequest)(nil), "lbm.fbridge.v1.NextSeqToConfirmRequest") + proto.RegisterType((*NextSeqToConfirmResponse)(nil), "lbm.fbridge.v1.NextSeqToConfirmResponse") + proto.RegisterType((*SubmittedProvisionRequest)(nil), "lbm.fbridge.v1.SubmittedProvisionRequest") + proto.RegisterType((*SubmittedProvisionResponse)(nil), "lbm.fbridge.v1.SubmittedProvisionResponse") + proto.RegisterType((*ConfirmedProvisionRequest)(nil), "lbm.fbridge.v1.ConfirmedProvisionRequest") + proto.RegisterType((*ConfirmedProvisionResponse)(nil), "lbm.fbridge.v1.ConfirmedProvisionResponse") + proto.RegisterType((*CommitmentsRequest)(nil), "lbm.fbridge.v1.CommitmentsRequest") + proto.RegisterType((*CommitmentsResponse)(nil), "lbm.fbridge.v1.CommitmentsResponse") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/query.proto", fileDescriptor_5e7780f9db9d346e) } + +var fileDescriptor_5e7780f9db9d346e = []byte{ + // 680 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xcf, 0x4f, 0xd4, 0x40, + 0x14, 0xc7, 0xb7, 0x80, 0xab, 0xbc, 0x4d, 0x0c, 0x19, 0x10, 0x97, 0x06, 0x0a, 0x96, 0xa8, 0x20, + 0xb0, 0x75, 0x01, 0x25, 0xf1, 0xc7, 0x05, 0x8c, 0x46, 0x4d, 0x14, 0x17, 0x4f, 0x5e, 0x36, 0xd3, + 0xdd, 0xa1, 0x34, 0xd2, 0x4e, 0xdb, 0x99, 0x25, 0x6c, 0x08, 0x07, 0xfd, 0x0b, 0x8c, 0x72, 0xf6, + 0xee, 0xd1, 0xff, 0x82, 0x23, 0x89, 0x17, 0x4f, 0xc6, 0x80, 0x7f, 0x88, 0xe9, 0x74, 0x0a, 0xcb, + 0x74, 0x8b, 0x7b, 0xf3, 0xf6, 0xf6, 0xcd, 0xf7, 0xbd, 0xf7, 0x99, 0xb7, 0xf3, 0x4d, 0x41, 0xdf, + 0xb6, 0x3d, 0x6b, 0xd3, 0x8e, 0xdc, 0xa6, 0x43, 0xac, 0x9d, 0xaa, 0x15, 0xb6, 0x48, 0xd4, 0xae, + 0x04, 0x11, 0xe5, 0x14, 0x5d, 0xdd, 0xb6, 0xbd, 0x8a, 0x3c, 0xab, 0xec, 0x54, 0xf5, 0x71, 0x87, + 0x52, 0x67, 0x9b, 0x58, 0x38, 0x70, 0x2d, 0xec, 0xfb, 0x94, 0x63, 0xee, 0x52, 0x9f, 0x25, 0x6a, + 0x7d, 0xc4, 0xa1, 0x0e, 0x15, 0xa1, 0x15, 0x47, 0x32, 0x3b, 0xae, 0xf4, 0x4f, 0xdb, 0x89, 0x53, + 0x73, 0x04, 0xd0, 0x9b, 0x78, 0xe0, 0x3a, 0x8e, 0xb0, 0xc7, 0x6a, 0x24, 0x6c, 0x11, 0xc6, 0xcd, + 0x97, 0x30, 0x7c, 0x2e, 0xcb, 0x02, 0xea, 0x33, 0x82, 0x96, 0xa1, 0x18, 0x88, 0x4c, 0x59, 0x9b, + 0xd2, 0x66, 0x4a, 0x8b, 0xa3, 0x95, 0xf3, 0x7c, 0x95, 0x44, 0xbf, 0x3a, 0x70, 0xf8, 0x6b, 0xb2, + 0x50, 0x93, 0x5a, 0xf3, 0x01, 0x8c, 0x3f, 0x8b, 0x08, 0xe6, 0x84, 0xf1, 0x0d, 0x12, 0xae, 0xb6, + 0x5f, 0x07, 0x24, 0xc2, 0x9c, 0x46, 0x72, 0x18, 0xd2, 0xe1, 0x0a, 0x95, 0x29, 0xd1, 0x77, 0xb0, + 0x76, 0xfa, 0xdb, 0xac, 0xc2, 0x44, 0x4e, 0xad, 0x44, 0x1a, 0x82, 0x7e, 0x46, 0x42, 0x51, 0x37, + 0x50, 0x8b, 0x43, 0x73, 0x0c, 0xae, 0xbf, 0x22, 0xbb, 0xb1, 0xfc, 0x2d, 0x5d, 0xa3, 0xfe, 0xa6, + 0x1b, 0x79, 0xe9, 0xb5, 0xe6, 0xa1, 0x9c, 0x3d, 0xca, 0x6d, 0xf4, 0x1c, 0xc6, 0x36, 0x5a, 0xb6, + 0xe7, 0x72, 0x4e, 0x9a, 0xeb, 0x11, 0xdd, 0x71, 0x99, 0x4b, 0xfd, 0x1e, 0xa0, 0xd3, 0x56, 0x7d, + 0x67, 0xad, 0x0e, 0x34, 0xd0, 0xbb, 0xf5, 0x92, 0xb3, 0x57, 0x60, 0xa0, 0x89, 0x39, 0x96, 0x5b, + 0x9d, 0xc8, 0x6c, 0x35, 0x2d, 0x78, 0x82, 0x39, 0x96, 0xcb, 0x15, 0x05, 0xe8, 0x31, 0x14, 0x19, + 0xc7, 0xbc, 0xc5, 0xc4, 0xb0, 0xd2, 0xe2, 0x64, 0x6e, 0xe9, 0x86, 0x90, 0xa5, 0xff, 0x4c, 0x52, + 0x64, 0x2e, 0xc0, 0x98, 0x5c, 0x43, 0x97, 0x1b, 0x66, 0x17, 0x12, 0xdf, 0xa2, 0x9b, 0xfe, 0x3f, + 0xdf, 0xe2, 0x16, 0xa0, 0x35, 0xea, 0x79, 0x2e, 0xf7, 0x88, 0xcf, 0x59, 0x3e, 0xfe, 0x0a, 0x0c, + 0x9f, 0xd3, 0x49, 0xec, 0x29, 0x28, 0x35, 0xce, 0xd2, 0x65, 0x6d, 0xaa, 0x7f, 0x66, 0xb0, 0xd6, + 0x99, 0x5a, 0x3c, 0xb8, 0x0c, 0x97, 0x84, 0x1d, 0x50, 0x08, 0xc5, 0xe4, 0x89, 0x23, 0x53, 0x65, + 0xcc, 0xba, 0x48, 0x9f, 0xbe, 0x50, 0x93, 0x8c, 0x37, 0x8d, 0x8f, 0x3f, 0xfe, 0x7c, 0xe9, 0x2b, + 0xa3, 0x51, 0x4b, 0xf1, 0x69, 0xe2, 0x1e, 0xf4, 0x5d, 0x83, 0x6b, 0x5d, 0x2d, 0x80, 0xe6, 0xd5, + 0xf6, 0x17, 0xb9, 0x4c, 0x5f, 0xe8, 0x51, 0x2d, 0xb1, 0x1e, 0x0a, 0xac, 0x7b, 0x68, 0x49, 0xc5, + 0x72, 0x64, 0x59, 0x9d, 0x91, 0xb0, 0x6e, 0xb7, 0xeb, 0xe9, 0xab, 0xb7, 0xf6, 0xd2, 0x68, 0x1f, + 0x7d, 0xd6, 0x60, 0x48, 0x35, 0x1a, 0xba, 0xad, 0x02, 0xe4, 0xb8, 0x54, 0x9f, 0xf9, 0xb7, 0x50, + 0x42, 0xce, 0x09, 0xc8, 0x9b, 0x68, 0x5a, 0x85, 0xf4, 0xc9, 0x6e, 0x02, 0xc8, 0x69, 0xbd, 0x21, + 0xe7, 0x7f, 0xd3, 0x00, 0x65, 0x3d, 0x88, 0x66, 0xd5, 0x69, 0xb9, 0x9e, 0xd7, 0xef, 0xf4, 0x22, + 0x95, 0x68, 0x8f, 0x04, 0xda, 0x7d, 0xb4, 0xac, 0xa2, 0xb1, 0xb4, 0xa6, 0x1e, 0xa4, 0x45, 0x1d, + 0xab, 0xb3, 0xf6, 0x18, 0x09, 0xf7, 0xd1, 0x57, 0x2d, 0x7e, 0xd3, 0xaa, 0xd3, 0xb2, 0xac, 0xb9, + 0xee, 0xcd, 0xb2, 0xe6, 0x1b, 0xd7, 0xac, 0x0a, 0xd6, 0x39, 0x34, 0xab, 0xb2, 0x36, 0xd2, 0x9a, + 0x4e, 0x56, 0x01, 0xf8, 0x41, 0x83, 0x52, 0x87, 0x99, 0xb2, 0x76, 0xc8, 0x3a, 0x32, 0x6b, 0x87, + 0x2e, 0x6e, 0x34, 0x67, 0x05, 0xcb, 0x34, 0xba, 0x91, 0x65, 0x39, 0x15, 0x27, 0x0c, 0xab, 0x2f, + 0x0e, 0x8f, 0x0d, 0xed, 0xe8, 0xd8, 0xd0, 0x7e, 0x1f, 0x1b, 0xda, 0xa7, 0x13, 0xa3, 0x70, 0x74, + 0x62, 0x14, 0x7e, 0x9e, 0x18, 0x85, 0x77, 0x77, 0x1d, 0x97, 0x6f, 0xb5, 0xec, 0x4a, 0x83, 0x7a, + 0xd6, 0x53, 0xd7, 0x67, 0x8d, 0x2d, 0x17, 0x5b, 0x9b, 0x32, 0x58, 0x60, 0xcd, 0xf7, 0xd6, 0xee, + 0x69, 0x6b, 0xde, 0x0e, 0x08, 0xb3, 0x8b, 0xe2, 0x6b, 0xb8, 0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, + 0xca, 0xda, 0x4f, 0xed, 0x8d, 0x07, 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) + // Get a greatest sequence number to be confirmed by a particular operator + GreatestSeqByOperator(ctx context.Context, in *GreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*GreatestSeqByOperatorResponse, error) + // Get a next sequence number to be confirmed by n-of-m operators + NextSeqToConfirm(ctx context.Context, in *NextSeqToConfirmRequest, opts ...grpc.CallOption) (*NextSeqToConfirmResponse, error) + // Get a provision submitted by a particular operator + SubmittedProvision(ctx context.Context, in *SubmittedProvisionRequest, opts ...grpc.CallOption) (*SubmittedProvisionResponse, error) + // Get a specific confirmed provision + ConfirmedProvision(ctx context.Context, in *ConfirmedProvisionRequest, opts ...grpc.CallOption) (*ConfirmedProvisionResponse, error) + // Get commitments of a specific sequence number + Commitments(ctx context.Context, in *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, 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) GreatestSeqByOperator(ctx context.Context, in *GreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*GreatestSeqByOperatorResponse, error) { + out := new(GreatestSeqByOperatorResponse) + 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) NextSeqToConfirm(ctx context.Context, in *NextSeqToConfirmRequest, opts ...grpc.CallOption) (*NextSeqToConfirmResponse, error) { + out := new(NextSeqToConfirmResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/NextSeqToConfirm", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubmittedProvision(ctx context.Context, in *SubmittedProvisionRequest, opts ...grpc.CallOption) (*SubmittedProvisionResponse, error) { + out := new(SubmittedProvisionResponse) + 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 *ConfirmedProvisionRequest, opts ...grpc.CallOption) (*ConfirmedProvisionResponse, error) { + out := new(ConfirmedProvisionResponse) + 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) Commitments(ctx context.Context, in *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, error) { + out := new(CommitmentsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Commitments", 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) + // Get a greatest sequence number to be confirmed by a particular operator + GreatestSeqByOperator(context.Context, *GreatestSeqByOperatorRequest) (*GreatestSeqByOperatorResponse, error) + // Get a next sequence number to be confirmed by n-of-m operators + NextSeqToConfirm(context.Context, *NextSeqToConfirmRequest) (*NextSeqToConfirmResponse, error) + // Get a provision submitted by a particular operator + SubmittedProvision(context.Context, *SubmittedProvisionRequest) (*SubmittedProvisionResponse, error) + // Get a specific confirmed provision + ConfirmedProvision(context.Context, *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) + // Get commitments of a specific sequence number + Commitments(context.Context, *CommitmentsRequest) (*CommitmentsResponse, 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) GreatestSeqByOperator(ctx context.Context, req *GreatestSeqByOperatorRequest) (*GreatestSeqByOperatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GreatestSeqByOperator not implemented") +} +func (*UnimplementedQueryServer) NextSeqToConfirm(ctx context.Context, req *NextSeqToConfirmRequest) (*NextSeqToConfirmResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NextSeqToConfirm not implemented") +} +func (*UnimplementedQueryServer) SubmittedProvision(ctx context.Context, req *SubmittedProvisionRequest) (*SubmittedProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmittedProvision not implemented") +} +func (*UnimplementedQueryServer) ConfirmedProvision(ctx context.Context, req *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConfirmedProvision not implemented") +} +func (*UnimplementedQueryServer) Commitments(ctx context.Context, req *CommitmentsRequest) (*CommitmentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Commitments 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_GreatestSeqByOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GreatestSeqByOperatorRequest) + 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.(*GreatestSeqByOperatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NextSeqToConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NextSeqToConfirmRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NextSeqToConfirm(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Query/NextSeqToConfirm", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NextSeqToConfirm(ctx, req.(*NextSeqToConfirmRequest)) + } + 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(SubmittedProvisionRequest) + 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.(*SubmittedProvisionRequest)) + } + 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(ConfirmedProvisionRequest) + 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.(*ConfirmedProvisionRequest)) + } + 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(CommitmentsRequest) + 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.(*CommitmentsRequest)) + } + 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: "GreatestSeqByOperator", + Handler: _Query_GreatestSeqByOperator_Handler, + }, + { + MethodName: "NextSeqToConfirm", + Handler: _Query_NextSeqToConfirm_Handler, + }, + { + MethodName: "SubmittedProvision", + Handler: _Query_SubmittedProvision_Handler, + }, + { + MethodName: "ConfirmedProvision", + Handler: _Query_ConfirmedProvision_Handler, + }, + { + MethodName: "Commitments", + Handler: _Query_Commitments_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 *GreatestSeqByOperatorRequest) 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 *GreatestSeqByOperatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GreatestSeqByOperatorRequest) 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 *GreatestSeqByOperatorResponse) 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 *GreatestSeqByOperatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GreatestSeqByOperatorResponse) 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 *NextSeqToConfirmRequest) 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 *NextSeqToConfirmRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NextSeqToConfirmRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *NextSeqToConfirmResponse) 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 *NextSeqToConfirmResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NextSeqToConfirmResponse) 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 *SubmittedProvisionRequest) 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 *SubmittedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubmittedProvisionRequest) 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 *SubmittedProvisionResponse) 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 *SubmittedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubmittedProvisionResponse) 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 *ConfirmedProvisionRequest) 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 *ConfirmedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfirmedProvisionRequest) 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 *ConfirmedProvisionResponse) 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 *ConfirmedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfirmedProvisionResponse) 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 *CommitmentsRequest) 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 *CommitmentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitmentsRequest) 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 *CommitmentsResponse) 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 *CommitmentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitmentsResponse) 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 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 *GreatestSeqByOperatorRequest) 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 *GreatestSeqByOperatorResponse) 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 *NextSeqToConfirmRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *NextSeqToConfirmResponse) 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 *SubmittedProvisionRequest) 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 *SubmittedProvisionResponse) 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 *ConfirmedProvisionRequest) 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 *ConfirmedProvisionResponse) 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 *CommitmentsRequest) 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 *CommitmentsResponse) 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 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 *GreatestSeqByOperatorRequest) 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: GreatestSeqByOperatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GreatestSeqByOperatorRequest: 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 *GreatestSeqByOperatorResponse) 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: GreatestSeqByOperatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GreatestSeqByOperatorResponse: 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 *NextSeqToConfirmRequest) 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: NextSeqToConfirmRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NextSeqToConfirmRequest: 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 *NextSeqToConfirmResponse) 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: NextSeqToConfirmResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NextSeqToConfirmResponse: 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 *SubmittedProvisionRequest) 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: SubmittedProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubmittedProvisionRequest: 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 *SubmittedProvisionResponse) 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: SubmittedProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubmittedProvisionResponse: 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 *ConfirmedProvisionRequest) 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: ConfirmedProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfirmedProvisionRequest: 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 *ConfirmedProvisionResponse) 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: ConfirmedProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfirmedProvisionResponse: 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 *CommitmentsRequest) 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: CommitmentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitmentsRequest: 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 *CommitmentsResponse) 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: CommitmentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitmentsResponse: 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 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..8dc109a27b --- /dev/null +++ b/x/fbridge/types/query.pb.gw.go @@ -0,0 +1,624 @@ +// 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_GreatestSeqByOperator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GreatestSeqByOperatorRequest + 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 GreatestSeqByOperatorRequest + 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_NextSeqToConfirm_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq NextSeqToConfirmRequest + var metadata runtime.ServerMetadata + + msg, err := client.NextSeqToConfirm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NextSeqToConfirm_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq NextSeqToConfirmRequest + var metadata runtime.ServerMetadata + + msg, err := server.NextSeqToConfirm(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 SubmittedProvisionRequest + 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 SubmittedProvisionRequest + 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 ConfirmedProvisionRequest + 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 ConfirmedProvisionRequest + 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 + +} + +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 CommitmentsRequest + 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 CommitmentsRequest + 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 + +} + +// 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_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_NextSeqToConfirm_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_NextSeqToConfirm_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_NextSeqToConfirm_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_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()...) + + }) + + 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_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_NextSeqToConfirm_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_NextSeqToConfirm_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_NextSeqToConfirm_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_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()...) + + }) + + 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_GreatestSeqByOperator_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", "greatest_seq_by_operator", "operator"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_NextSeqToConfirm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "next_seq_to_confirm"}, "", 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, 1, 0, 4, 1, 5, 5}, []string{"lbm", "fbridge", "v1", "submitted_provision", "operator", "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", "confirmed_provision", "seq"}, "", 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))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_GreatestSeqByOperator_0 = runtime.ForwardResponseMessage + + forward_Query_NextSeqToConfirm_0 = runtime.ForwardResponseMessage + + forward_Query_SubmittedProvision_0 = runtime.ForwardResponseMessage + + forward_Query_ConfirmedProvision_0 = runtime.ForwardResponseMessage + + forward_Query_Commitments_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..9ef35bdffc --- /dev/null +++ b/x/fbridge/types/tx.pb.go @@ -0,0 +1,2677 @@ +// 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 + +// TransferRequest is input values required for bridge transfer +type TransferRequest 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 *TransferRequest) Reset() { *m = TransferRequest{} } +func (m *TransferRequest) String() string { return proto.CompactTextString(m) } +func (*TransferRequest) ProtoMessage() {} +func (*TransferRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{0} +} +func (m *TransferRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TransferRequest.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 *TransferRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferRequest.Merge(m, src) +} +func (m *TransferRequest) XXX_Size() int { + return m.Size() +} +func (m *TransferRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TransferRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferRequest proto.InternalMessageInfo + +func (m *TransferRequest) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *TransferRequest) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +type TransferResponse struct { +} + +func (m *TransferResponse) Reset() { *m = TransferResponse{} } +func (m *TransferResponse) String() string { return proto.CompactTextString(m) } +func (*TransferResponse) ProtoMessage() {} +func (*TransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{1} +} +func (m *TransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TransferResponse.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 *TransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferResponse.Merge(m, src) +} +func (m *TransferResponse) XXX_Size() int { + return m.Size() +} +func (m *TransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferResponse proto.InternalMessageInfo + +// ProvisionRequest is input values required for provisioning +type ProvisionRequest 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 github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` +} + +func (m *ProvisionRequest) Reset() { *m = ProvisionRequest{} } +func (m *ProvisionRequest) String() string { return proto.CompactTextString(m) } +func (*ProvisionRequest) ProtoMessage() {} +func (*ProvisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{2} +} +func (m *ProvisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProvisionRequest.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 *ProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProvisionRequest.Merge(m, src) +} +func (m *ProvisionRequest) XXX_Size() int { + return m.Size() +} +func (m *ProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ProvisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ProvisionRequest proto.InternalMessageInfo + +func (m *ProvisionRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *ProvisionRequest) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *ProvisionRequest) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +type ProvisionResponse struct { +} + +func (m *ProvisionResponse) Reset() { *m = ProvisionResponse{} } +func (m *ProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*ProvisionResponse) ProtoMessage() {} +func (*ProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{3} +} +func (m *ProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProvisionResponse.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 *ProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProvisionResponse.Merge(m, src) +} +func (m *ProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *ProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ProvisionResponse proto.InternalMessageInfo + +// HoldTransferRequest is input values required for holding transfer +type HoldTransferRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *HoldTransferRequest) Reset() { *m = HoldTransferRequest{} } +func (m *HoldTransferRequest) String() string { return proto.CompactTextString(m) } +func (*HoldTransferRequest) ProtoMessage() {} +func (*HoldTransferRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{4} +} +func (m *HoldTransferRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HoldTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HoldTransferRequest.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 *HoldTransferRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HoldTransferRequest.Merge(m, src) +} +func (m *HoldTransferRequest) XXX_Size() int { + return m.Size() +} +func (m *HoldTransferRequest) XXX_DiscardUnknown() { + xxx_messageInfo_HoldTransferRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_HoldTransferRequest proto.InternalMessageInfo + +func (m *HoldTransferRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type HoldTransferResponse struct { +} + +func (m *HoldTransferResponse) Reset() { *m = HoldTransferResponse{} } +func (m *HoldTransferResponse) String() string { return proto.CompactTextString(m) } +func (*HoldTransferResponse) ProtoMessage() {} +func (*HoldTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{5} +} +func (m *HoldTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HoldTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HoldTransferResponse.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 *HoldTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HoldTransferResponse.Merge(m, src) +} +func (m *HoldTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *HoldTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HoldTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_HoldTransferResponse proto.InternalMessageInfo + +// ReleaseTransferRequest is input values required for releasing a held transfer by time lock +type ReleaseTransferRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *ReleaseTransferRequest) Reset() { *m = ReleaseTransferRequest{} } +func (m *ReleaseTransferRequest) String() string { return proto.CompactTextString(m) } +func (*ReleaseTransferRequest) ProtoMessage() {} +func (*ReleaseTransferRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{6} +} +func (m *ReleaseTransferRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReleaseTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReleaseTransferRequest.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 *ReleaseTransferRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReleaseTransferRequest.Merge(m, src) +} +func (m *ReleaseTransferRequest) XXX_Size() int { + return m.Size() +} +func (m *ReleaseTransferRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReleaseTransferRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReleaseTransferRequest proto.InternalMessageInfo + +func (m *ReleaseTransferRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type ReleaseTransferResponse struct { +} + +func (m *ReleaseTransferResponse) Reset() { *m = ReleaseTransferResponse{} } +func (m *ReleaseTransferResponse) String() string { return proto.CompactTextString(m) } +func (*ReleaseTransferResponse) ProtoMessage() {} +func (*ReleaseTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{7} +} +func (m *ReleaseTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReleaseTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReleaseTransferResponse.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 *ReleaseTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReleaseTransferResponse.Merge(m, src) +} +func (m *ReleaseTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *ReleaseTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReleaseTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReleaseTransferResponse proto.InternalMessageInfo + +// RemoveProvisionRequest is input values required for removing a specific confirmed provision +type RemoveProvisionRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *RemoveProvisionRequest) Reset() { *m = RemoveProvisionRequest{} } +func (m *RemoveProvisionRequest) String() string { return proto.CompactTextString(m) } +func (*RemoveProvisionRequest) ProtoMessage() {} +func (*RemoveProvisionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{8} +} +func (m *RemoveProvisionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveProvisionRequest.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 *RemoveProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveProvisionRequest.Merge(m, src) +} +func (m *RemoveProvisionRequest) XXX_Size() int { + return m.Size() +} +func (m *RemoveProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveProvisionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveProvisionRequest proto.InternalMessageInfo + +func (m *RemoveProvisionRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type RemoveProvisionResponse struct { +} + +func (m *RemoveProvisionResponse) Reset() { *m = RemoveProvisionResponse{} } +func (m *RemoveProvisionResponse) String() string { return proto.CompactTextString(m) } +func (*RemoveProvisionResponse) ProtoMessage() {} +func (*RemoveProvisionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{9} +} +func (m *RemoveProvisionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveProvisionResponse.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 *RemoveProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveProvisionResponse.Merge(m, src) +} +func (m *RemoveProvisionResponse) XXX_Size() int { + return m.Size() +} +func (m *RemoveProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveProvisionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveProvisionResponse proto.InternalMessageInfo + +// ClaimBatchRequest is input values required for claiming multiple claimable provisions +type ClaimBatchRequest struct { + // the maximum number of claims to be made at once + MaxClaims uint64 `protobuf:"varint,1,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"` +} + +func (m *ClaimBatchRequest) Reset() { *m = ClaimBatchRequest{} } +func (m *ClaimBatchRequest) String() string { return proto.CompactTextString(m) } +func (*ClaimBatchRequest) ProtoMessage() {} +func (*ClaimBatchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{10} +} +func (m *ClaimBatchRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClaimBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClaimBatchRequest.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 *ClaimBatchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClaimBatchRequest.Merge(m, src) +} +func (m *ClaimBatchRequest) XXX_Size() int { + return m.Size() +} +func (m *ClaimBatchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ClaimBatchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ClaimBatchRequest proto.InternalMessageInfo + +func (m *ClaimBatchRequest) GetMaxClaims() uint64 { + if m != nil { + return m.MaxClaims + } + return 0 +} + +type ClaimBatchResponse struct { +} + +func (m *ClaimBatchResponse) Reset() { *m = ClaimBatchResponse{} } +func (m *ClaimBatchResponse) String() string { return proto.CompactTextString(m) } +func (*ClaimBatchResponse) ProtoMessage() {} +func (*ClaimBatchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{11} +} +func (m *ClaimBatchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClaimBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClaimBatchResponse.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 *ClaimBatchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClaimBatchResponse.Merge(m, src) +} +func (m *ClaimBatchResponse) XXX_Size() int { + return m.Size() +} +func (m *ClaimBatchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ClaimBatchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ClaimBatchResponse proto.InternalMessageInfo + +// ClaimRequest is input values required for claiming a provision +type ClaimRequest struct { + // the sequence number of the bridge request + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *ClaimRequest) Reset() { *m = ClaimRequest{} } +func (m *ClaimRequest) String() string { return proto.CompactTextString(m) } +func (*ClaimRequest) ProtoMessage() {} +func (*ClaimRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{12} +} +func (m *ClaimRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClaimRequest.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 *ClaimRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClaimRequest.Merge(m, src) +} +func (m *ClaimRequest) XXX_Size() int { + return m.Size() +} +func (m *ClaimRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ClaimRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ClaimRequest proto.InternalMessageInfo + +func (m *ClaimRequest) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +type ClaimResponse struct { +} + +func (m *ClaimResponse) Reset() { *m = ClaimResponse{} } +func (m *ClaimResponse) String() string { return proto.CompactTextString(m) } +func (*ClaimResponse) ProtoMessage() {} +func (*ClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{13} +} +func (m *ClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClaimResponse.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 *ClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClaimResponse.Merge(m, src) +} +func (m *ClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *ClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ClaimResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*TransferRequest)(nil), "lbm.fbridge.v1.TransferRequest") + proto.RegisterType((*TransferResponse)(nil), "lbm.fbridge.v1.TransferResponse") + proto.RegisterType((*ProvisionRequest)(nil), "lbm.fbridge.v1.ProvisionRequest") + proto.RegisterType((*ProvisionResponse)(nil), "lbm.fbridge.v1.ProvisionResponse") + proto.RegisterType((*HoldTransferRequest)(nil), "lbm.fbridge.v1.HoldTransferRequest") + proto.RegisterType((*HoldTransferResponse)(nil), "lbm.fbridge.v1.HoldTransferResponse") + proto.RegisterType((*ReleaseTransferRequest)(nil), "lbm.fbridge.v1.ReleaseTransferRequest") + proto.RegisterType((*ReleaseTransferResponse)(nil), "lbm.fbridge.v1.ReleaseTransferResponse") + proto.RegisterType((*RemoveProvisionRequest)(nil), "lbm.fbridge.v1.RemoveProvisionRequest") + proto.RegisterType((*RemoveProvisionResponse)(nil), "lbm.fbridge.v1.RemoveProvisionResponse") + proto.RegisterType((*ClaimBatchRequest)(nil), "lbm.fbridge.v1.ClaimBatchRequest") + proto.RegisterType((*ClaimBatchResponse)(nil), "lbm.fbridge.v1.ClaimBatchResponse") + proto.RegisterType((*ClaimRequest)(nil), "lbm.fbridge.v1.ClaimRequest") + proto.RegisterType((*ClaimResponse)(nil), "lbm.fbridge.v1.ClaimResponse") +} + +func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } + +var fileDescriptor_54a336bc5ea063bb = []byte{ + // 523 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x6e, 0xd3, 0x40, + 0x10, 0xc6, 0xe3, 0x26, 0x44, 0xcd, 0xa8, 0x90, 0x74, 0x1b, 0xa5, 0xc1, 0xa2, 0x4e, 0x30, 0x88, + 0xa2, 0x4a, 0xd8, 0x34, 0xbc, 0x41, 0x40, 0x08, 0x2a, 0x55, 0xaa, 0x0c, 0x17, 0xb8, 0x20, 0xdb, + 0x99, 0x38, 0x16, 0xb6, 0x37, 0xf5, 0x3a, 0x56, 0x78, 0x0b, 0x78, 0x07, 0x1e, 0xa6, 0xc7, 0x1e, + 0x11, 0x87, 0x0a, 0x25, 0x3c, 0x08, 0x8a, 0xbd, 0x49, 0x1c, 0xff, 0x49, 0x0e, 0xdc, 0x76, 0x77, + 0xbe, 0xf9, 0xed, 0xb7, 0xb3, 0xa3, 0x81, 0x63, 0xc7, 0x70, 0xd5, 0xa1, 0xe1, 0xdb, 0x03, 0x0b, + 0xd5, 0xf0, 0x5c, 0x0d, 0xa6, 0xca, 0xd8, 0xa7, 0x01, 0x25, 0x0f, 0x1c, 0xc3, 0x55, 0x78, 0x40, + 0x09, 0xcf, 0xc5, 0xa6, 0x45, 0x2d, 0x1a, 0x85, 0xd4, 0xc5, 0x2a, 0x56, 0xc9, 0x3f, 0x04, 0xa8, + 0x7f, 0xf4, 0x75, 0x8f, 0x0d, 0xd1, 0xd7, 0xf0, 0x7a, 0x82, 0x2c, 0x20, 0x2d, 0xa8, 0x32, 0xf4, + 0x06, 0xe8, 0xb7, 0x85, 0xae, 0xf0, 0xbc, 0xa6, 0xf1, 0x1d, 0x11, 0x61, 0xdf, 0x47, 0x13, 0xed, + 0x10, 0xfd, 0xf6, 0x5e, 0x14, 0x59, 0xed, 0xc9, 0x05, 0x54, 0x75, 0x97, 0x4e, 0xbc, 0xa0, 0x5d, + 0x5e, 0x44, 0xfa, 0xbd, 0x9b, 0xbb, 0x4e, 0xe9, 0xf7, 0x5d, 0xe7, 0xcc, 0xb2, 0x83, 0xd1, 0xc4, + 0x50, 0x4c, 0xea, 0xaa, 0x6f, 0x6d, 0x8f, 0x99, 0x23, 0x5b, 0x57, 0x87, 0x7c, 0xf1, 0x82, 0x0d, + 0xbe, 0xaa, 0xc1, 0xb7, 0x31, 0x32, 0xe5, 0xbd, 0x17, 0x68, 0x9c, 0x20, 0x13, 0x68, 0xac, 0x2d, + 0xb1, 0x31, 0xf5, 0x18, 0xca, 0x3f, 0x05, 0x68, 0x5c, 0xf9, 0x34, 0xb4, 0x99, 0x4d, 0xbd, 0xa5, + 0xd1, 0x06, 0x94, 0x19, 0x5e, 0x47, 0x2e, 0x2b, 0xda, 0x62, 0x99, 0xb0, 0xbe, 0x57, 0x68, 0xbd, + 0x5c, 0x68, 0xbd, 0xf2, 0xdf, 0xd6, 0x8f, 0xe0, 0x30, 0xe1, 0x92, 0x7b, 0x3f, 0x85, 0xa3, 0x77, + 0xd4, 0x19, 0xa4, 0xcb, 0x9c, 0x71, 0x2f, 0xb7, 0xa0, 0xb9, 0x29, 0xe4, 0x80, 0x33, 0x68, 0x69, + 0xe8, 0xa0, 0xce, 0x70, 0x37, 0xe3, 0x21, 0x1c, 0x67, 0xb4, 0x49, 0x8c, 0x4b, 0x43, 0xdc, 0x5d, + 0xc8, 0x18, 0x93, 0xd2, 0x72, 0x4c, 0x0f, 0x0e, 0x5f, 0x3b, 0xba, 0xed, 0xf6, 0xf5, 0xc0, 0x1c, + 0x2d, 0x09, 0x27, 0x00, 0xae, 0x3e, 0xfd, 0x62, 0x2e, 0x02, 0x8c, 0x83, 0x6a, 0xae, 0x3e, 0x8d, + 0x94, 0x4c, 0x6e, 0x02, 0x49, 0xe6, 0x70, 0x52, 0x17, 0x0e, 0xa2, 0xd3, 0x62, 0x1b, 0x75, 0xb8, + 0xcf, 0x15, 0x71, 0x4a, 0xef, 0x6f, 0x05, 0xca, 0x97, 0xcc, 0x22, 0x97, 0xb0, 0xbf, 0x7c, 0x1f, + 0xe9, 0x28, 0x9b, 0xad, 0xae, 0xa4, 0xaa, 0x24, 0x76, 0x8b, 0x05, 0x31, 0x96, 0x5c, 0x41, 0x6d, + 0xf5, 0x50, 0x92, 0x91, 0xa7, 0xeb, 0x25, 0x3e, 0xde, 0xa2, 0xe0, 0xc4, 0x4f, 0x70, 0x90, 0xfc, + 0x4b, 0xf2, 0x24, 0x9d, 0x92, 0xd3, 0x12, 0xe2, 0xd3, 0xed, 0x22, 0x8e, 0x36, 0xa0, 0x9e, 0xfa, + 0x62, 0xf2, 0x2c, 0x9d, 0x98, 0xdf, 0x2f, 0xe2, 0xe9, 0x4e, 0x5d, 0xf2, 0x8e, 0x8d, 0xff, 0xcf, + 0xbb, 0x23, 0xaf, 0x99, 0xf2, 0xee, 0xc8, 0x6d, 0x24, 0xf2, 0x01, 0x60, 0xdd, 0x14, 0x24, 0x53, + 0xd3, 0x4c, 0x93, 0x89, 0xf2, 0x36, 0x09, 0x87, 0xbe, 0x81, 0x7b, 0xd1, 0x29, 0x79, 0x94, 0x2b, + 0x5e, 0xa2, 0x4e, 0x0a, 0xa2, 0x31, 0xa5, 0x7f, 0x71, 0x33, 0x93, 0x84, 0xdb, 0x99, 0x24, 0xfc, + 0x99, 0x49, 0xc2, 0xf7, 0xb9, 0x54, 0xba, 0x9d, 0x4b, 0xa5, 0x5f, 0x73, 0xa9, 0xf4, 0xf9, 0xe5, + 0xce, 0xa9, 0x30, 0x5d, 0x8d, 0xe3, 0x68, 0x3e, 0x18, 0xd5, 0x68, 0xd2, 0xbe, 0xfa, 0x17, 0x00, + 0x00, 0xff, 0xff, 0x3e, 0x4d, 0xae, 0x45, 0xaa, 0x05, 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 *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) + // Submit a provision to the bridge module. + Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) + // Set the time lock value from default value to uint64.max for specific confirmed provision. + HoldTransfer(ctx context.Context, in *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) + // Set the time lock value to 0 for specific confirmed provision. + ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) + // Remove a specific confirmed provision (reset for specific sequence number). + RemoveProvision(ctx context.Context, in *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) + // Claim processes the claiming of a provision with a specific sequence number + Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) { + out := new(TransferResponse) + 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 *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) { + out := new(ProvisionResponse) + 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 *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) { + out := new(HoldTransferResponse) + 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 *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) { + out := new(ReleaseTransferResponse) + 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 *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) { + out := new(RemoveProvisionResponse) + 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 *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) { + out := new(ClaimBatchResponse) + 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 *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) { + out := new(ClaimResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Claim", 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, *TransferRequest) (*TransferResponse, error) + // Submit a provision to the bridge module. + Provision(context.Context, *ProvisionRequest) (*ProvisionResponse, error) + // Set the time lock value from default value to uint64.max for specific confirmed provision. + HoldTransfer(context.Context, *HoldTransferRequest) (*HoldTransferResponse, error) + // Set the time lock value to 0 for specific confirmed provision. + ReleaseTransfer(context.Context, *ReleaseTransferRequest) (*ReleaseTransferResponse, error) + // Remove a specific confirmed provision (reset for specific sequence number). + RemoveProvision(context.Context, *RemoveProvisionRequest) (*RemoveProvisionResponse, error) + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + ClaimBatch(context.Context, *ClaimBatchRequest) (*ClaimBatchResponse, error) + // Claim processes the claiming of a provision with a specific sequence number + Claim(context.Context, *ClaimRequest) (*ClaimResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *TransferRequest) (*TransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") +} +func (*UnimplementedMsgServer) Provision(ctx context.Context, req *ProvisionRequest) (*ProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Provision not implemented") +} +func (*UnimplementedMsgServer) HoldTransfer(ctx context.Context, req *HoldTransferRequest) (*HoldTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HoldTransfer not implemented") +} +func (*UnimplementedMsgServer) ReleaseTransfer(ctx context.Context, req *ReleaseTransferRequest) (*ReleaseTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReleaseTransfer not implemented") +} +func (*UnimplementedMsgServer) RemoveProvision(ctx context.Context, req *RemoveProvisionRequest) (*RemoveProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveProvision not implemented") +} +func (*UnimplementedMsgServer) ClaimBatch(ctx context.Context, req *ClaimBatchRequest) (*ClaimBatchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimBatch not implemented") +} +func (*UnimplementedMsgServer) Claim(ctx context.Context, req *ClaimRequest) (*ClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Claim 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(TransferRequest) + 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.(*TransferRequest)) + } + 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(ProvisionRequest) + 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.(*ProvisionRequest)) + } + 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(HoldTransferRequest) + 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.(*HoldTransferRequest)) + } + 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(ReleaseTransferRequest) + 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.(*ReleaseTransferRequest)) + } + 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(RemoveProvisionRequest) + 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.(*RemoveProvisionRequest)) + } + 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(ClaimBatchRequest) + 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.(*ClaimBatchRequest)) + } + 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(ClaimRequest) + 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.(*ClaimRequest)) + } + 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, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lbm/fbridge/v1/tx.proto", +} + +func (m *TransferRequest) 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 *TransferRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferRequest) 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 *TransferResponse) 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 *TransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ProvisionRequest) 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 *ProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProvisionRequest) 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] = 0x22 + 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] = 0x1a + } + 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] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ProvisionResponse) 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 *ProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *HoldTransferRequest) 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 *HoldTransferRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HoldTransferRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *HoldTransferResponse) 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 *HoldTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ReleaseTransferRequest) 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 *ReleaseTransferRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReleaseTransferRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ReleaseTransferResponse) 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 *ReleaseTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RemoveProvisionRequest) 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 *RemoveProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveProvisionRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RemoveProvisionResponse) 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 *RemoveProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ClaimBatchRequest) 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 *ClaimBatchRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimBatchRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ClaimBatchResponse) 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 *ClaimBatchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ClaimRequest) 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 *ClaimRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ClaimResponse) 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 *ClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimResponse) 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 *TransferRequest) 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 *TransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ProvisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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 *ProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *HoldTransferRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *HoldTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ReleaseTransferRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *ReleaseTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RemoveProvisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *RemoveProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ClaimBatchRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxClaims != 0 { + n += 1 + sovTx(uint64(m.MaxClaims)) + } + return n +} + +func (m *ClaimBatchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ClaimRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *ClaimResponse) 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 *TransferRequest) 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: TransferRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferRequest: 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 *TransferResponse) 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: TransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferResponse: 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 *ProvisionRequest) 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: ProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProvisionRequest: 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 ErrIntOverflowTx + } + 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 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 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 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 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 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 *ProvisionResponse) 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: ProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProvisionResponse: 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 *HoldTransferRequest) 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: HoldTransferRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HoldTransferRequest: 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 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 *HoldTransferResponse) 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: HoldTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HoldTransferResponse: 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 *ReleaseTransferRequest) 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: ReleaseTransferRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReleaseTransferRequest: 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 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 *ReleaseTransferResponse) 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: ReleaseTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReleaseTransferResponse: 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 *RemoveProvisionRequest) 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: RemoveProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveProvisionRequest: 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 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 *RemoveProvisionResponse) 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: RemoveProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveProvisionResponse: 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 *ClaimBatchRequest) 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: ClaimBatchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimBatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 *ClaimBatchResponse) 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: ClaimBatchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimBatchResponse: 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 *ClaimRequest) 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: ClaimRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimRequest: 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 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 *ClaimResponse) 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: ClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimResponse: 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") +) From 1e6e34e5618919424deb3686dbb208baf95027b7 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:30:42 +0900 Subject: [PATCH 03/12] add missing proto files --- client/docs/config.json | 5 +- client/docs/swagger-ui/swagger.yaml | 135 + docs/core/proto-docs.md | 252 ++ proto/lbm/fbridge/v1/query.proto | 33 + proto/lbm/fbridge/v1/tx.proto | 66 + x/fbridge/types/query.pb.go | 1166 +++++++- x/fbridge/types/query.pb.gw.go | 186 ++ x/fbridge/types/tx.pb.go | 3850 ++++++++++++++++++++------- 8 files changed, 4678 insertions(+), 1015 deletions(-) diff --git a/client/docs/config.json b/client/docs/config.json index db38cbba69..05239a6e53 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -170,7 +170,10 @@ "operationIds": { "rename": { "Params": "FBridgeParams", - "Commitments": "FBridgeCommitments" + "Commitments": "FBridgeCommitments", + "Guardians": "FBridgeGuardians", + "Operators": "FBridgeOperators", + "Judges": "FBridgeJudges" } } } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 1e88c28f20..c329811dfb 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -29970,6 +29970,82 @@ paths: type: string tags: - Query + /lbm/fbridge/v1/guardians: + get: + summary: Get 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: Get 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/next_seq_to_confirm: get: summary: Get a next sequence number to be confirmed by n-of-m operators @@ -30007,6 +30083,44 @@ paths: format: byte tags: - Query + /lbm/fbridge/v1/operators: + get: + summary: Get 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/params: get: summary: Params queries the parameters of x/fbridge module. @@ -49788,12 +49902,33 @@ definitions: seq: type: string format: uint64 + lbm.fbridge.v1.GuardiansResponse: + type: object + properties: + guardians: + type: array + items: + type: string + lbm.fbridge.v1.JudgesResponse: + type: object + properties: + judges: + type: array + items: + type: string lbm.fbridge.v1.NextSeqToConfirmResponse: type: object properties: seq: type: string format: uint64 + lbm.fbridge.v1.OperatorsResponse: + type: object + properties: + operators: + type: array + items: + type: string lbm.fbridge.v1.Params: type: object properties: diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 2dae6bf266..1eae22170a 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -783,8 +783,14 @@ - [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) - [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) - [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) + - [GuardiansRequest](#lbm.fbridge.v1.GuardiansRequest) + - [GuardiansResponse](#lbm.fbridge.v1.GuardiansResponse) + - [JudgesRequest](#lbm.fbridge.v1.JudgesRequest) + - [JudgesResponse](#lbm.fbridge.v1.JudgesResponse) - [NextSeqToConfirmRequest](#lbm.fbridge.v1.NextSeqToConfirmRequest) - [NextSeqToConfirmResponse](#lbm.fbridge.v1.NextSeqToConfirmResponse) + - [OperatorsRequest](#lbm.fbridge.v1.OperatorsRequest) + - [OperatorsResponse](#lbm.fbridge.v1.OperatorsResponse) - [QueryParamsRequest](#lbm.fbridge.v1.QueryParamsRequest) - [QueryParamsResponse](#lbm.fbridge.v1.QueryParamsResponse) - [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) @@ -793,6 +799,12 @@ - [Query](#lbm.fbridge.v1.Query) - [lbm/fbridge/v1/tx.proto](#lbm/fbridge/v1/tx.proto) + - [AddGuardianRequest](#lbm.fbridge.v1.AddGuardianRequest) + - [AddGuardianResponse](#lbm.fbridge.v1.AddGuardianResponse) + - [AddJudgeRequest](#lbm.fbridge.v1.AddJudgeRequest) + - [AddJudgeResponse](#lbm.fbridge.v1.AddJudgeResponse) + - [AddOperatorRequest](#lbm.fbridge.v1.AddOperatorRequest) + - [AddOperatorResponse](#lbm.fbridge.v1.AddOperatorResponse) - [ClaimBatchRequest](#lbm.fbridge.v1.ClaimBatchRequest) - [ClaimBatchResponse](#lbm.fbridge.v1.ClaimBatchResponse) - [ClaimRequest](#lbm.fbridge.v1.ClaimRequest) @@ -803,6 +815,12 @@ - [ProvisionResponse](#lbm.fbridge.v1.ProvisionResponse) - [ReleaseTransferRequest](#lbm.fbridge.v1.ReleaseTransferRequest) - [ReleaseTransferResponse](#lbm.fbridge.v1.ReleaseTransferResponse) + - [RemoveGuardianRequest](#lbm.fbridge.v1.RemoveGuardianRequest) + - [RemoveGuardianResponse](#lbm.fbridge.v1.RemoveGuardianResponse) + - [RemoveJudgeRequest](#lbm.fbridge.v1.RemoveJudgeRequest) + - [RemoveJudgeResponse](#lbm.fbridge.v1.RemoveJudgeResponse) + - [RemoveOperatorRequest](#lbm.fbridge.v1.RemoveOperatorRequest) + - [RemoveOperatorResponse](#lbm.fbridge.v1.RemoveOperatorResponse) - [RemoveProvisionRequest](#lbm.fbridge.v1.RemoveProvisionRequest) - [RemoveProvisionResponse](#lbm.fbridge.v1.RemoveProvisionResponse) - [TransferRequest](#lbm.fbridge.v1.TransferRequest) @@ -11778,6 +11796,56 @@ GenesisState defines the fbridge module's genesis state. + + +### GuardiansRequest + + + + + + + + + +### GuardiansResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `guardians` | [string](#string) | repeated | | + + + + + + + + +### JudgesRequest + + + + + + + + + +### JudgesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `judges` | [string](#string) | repeated | | + + + + + + ### NextSeqToConfirmRequest @@ -11803,6 +11871,31 @@ GenesisState defines the fbridge module's genesis state. + + +### OperatorsRequest + + + + + + + + + +### OperatorsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operators` | [string](#string) | repeated | | + + + + + + ### QueryParamsRequest @@ -11879,6 +11972,9 @@ GenesisState defines the fbridge module's genesis state. | `SubmittedProvision` | [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) | [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) | Get a provision submitted by a particular operator | GET|/lbm/fbridge/v1/submitted_provision/{operator}/{seq}| | `ConfirmedProvision` | [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) | [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) | Get a specific confirmed provision | GET|/lbm/fbridge/v1/confirmed_provision/{seq}| | `Commitments` | [CommitmentsRequest](#lbm.fbridge.v1.CommitmentsRequest) | [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) | Get commitments of a specific sequence number | GET|/lbm/fbridge/v1/commitments/{seq}| +| `Guardians` | [GuardiansRequest](#lbm.fbridge.v1.GuardiansRequest) | [GuardiansResponse](#lbm.fbridge.v1.GuardiansResponse) | Get a list of Guardians registered on the bridge | GET|/lbm/fbridge/v1/guardians| +| `Operators` | [OperatorsRequest](#lbm.fbridge.v1.OperatorsRequest) | [OperatorsResponse](#lbm.fbridge.v1.OperatorsResponse) | Get a list of Operators registered on the bridge | GET|/lbm/fbridge/v1/operators| +| `Judges` | [JudgesRequest](#lbm.fbridge.v1.JudgesRequest) | [JudgesResponse](#lbm.fbridge.v1.JudgesResponse) | Get a list of Judges registered on the bridge | GET|/lbm/fbridge/v1/judges| @@ -11891,6 +11987,81 @@ GenesisState defines the fbridge module's genesis state. + + +### AddGuardianRequest +AddGuardianRequest is input values required for adding a guardian + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `guardian` | [string](#string) | | the guardian address to be added | + + + + + + + + +### AddGuardianResponse + + + + + + + + + +### AddJudgeRequest +AddJudgeRequest is input values required for adding a judge + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `judge` | [string](#string) | | the judge address to be added | + + + + + + + + +### AddJudgeResponse + + + + + + + + + +### AddOperatorRequest +AddOperatorRequest is input values required for adding an operator + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the operator address to be added | + + + + + + + + +### AddOperatorResponse + + + + + + + ### ClaimBatchRequest @@ -12019,6 +12190,81 @@ ReleaseTransferRequest is input values required for releasing a held transfer by + + +### RemoveGuardianRequest +RemoveGuardianRequest is input values required for removing a guardian + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `guardian` | [string](#string) | | the guardian address to be removed | + + + + + + + + +### RemoveGuardianResponse + + + + + + + + + +### RemoveJudgeRequest +RemoveJudgeRequest is input values required for removing a judge + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `judge` | [string](#string) | | the judge address to be removed | + + + + + + + + +### RemoveJudgeResponse + + + + + + + + + +### RemoveOperatorRequest +RemoveOperatorRequest is input values required for removing an operator + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the operator address to be removed | + + + + + + + + +### RemoveOperatorResponse + + + + + + + ### RemoveProvisionRequest @@ -12091,6 +12337,12 @@ TransferRequest is input values required for bridge transfer | `RemoveProvision` | [RemoveProvisionRequest](#lbm.fbridge.v1.RemoveProvisionRequest) | [RemoveProvisionResponse](#lbm.fbridge.v1.RemoveProvisionResponse) | Remove a specific confirmed provision (reset for specific sequence number). | | | `ClaimBatch` | [ClaimBatchRequest](#lbm.fbridge.v1.ClaimBatchRequest) | [ClaimBatchResponse](#lbm.fbridge.v1.ClaimBatchResponse) | ClaimBatch processes the claiming of multiple claimable provisions in a single operation | | | `Claim` | [ClaimRequest](#lbm.fbridge.v1.ClaimRequest) | [ClaimResponse](#lbm.fbridge.v1.ClaimResponse) | Claim processes the claiming of a provision with a specific sequence number | | +| `AddGuardian` | [AddGuardianRequest](#lbm.fbridge.v1.AddGuardianRequest) | [AddGuardianResponse](#lbm.fbridge.v1.AddGuardianResponse) | AddGuardian adds a guardian to the bridge module. | | +| `RemoveGuardian` | [RemoveGuardianRequest](#lbm.fbridge.v1.RemoveGuardianRequest) | [RemoveGuardianResponse](#lbm.fbridge.v1.RemoveGuardianResponse) | RemoveGuardian removes a guardian from the bridge module. | | +| `AddOperator` | [AddOperatorRequest](#lbm.fbridge.v1.AddOperatorRequest) | [AddOperatorResponse](#lbm.fbridge.v1.AddOperatorResponse) | AddOperator adds an operator to the bridge module. | | +| `RemoveOperator` | [RemoveOperatorRequest](#lbm.fbridge.v1.RemoveOperatorRequest) | [RemoveOperatorResponse](#lbm.fbridge.v1.RemoveOperatorResponse) | RemoveOperator removes an operator from the bridge module. | | +| `AddJudge` | [AddJudgeRequest](#lbm.fbridge.v1.AddJudgeRequest) | [AddJudgeResponse](#lbm.fbridge.v1.AddJudgeResponse) | AddJudge adds a judge to the bridge module. | | +| `RemoveJudge` | [RemoveJudgeRequest](#lbm.fbridge.v1.RemoveJudgeRequest) | [RemoveJudgeResponse](#lbm.fbridge.v1.RemoveJudgeResponse) | RemoveJudge removes a judge from the bridge module. | | diff --git a/proto/lbm/fbridge/v1/query.proto b/proto/lbm/fbridge/v1/query.proto index 4893364dd5..a44319fc1d 100644 --- a/proto/lbm/fbridge/v1/query.proto +++ b/proto/lbm/fbridge/v1/query.proto @@ -37,6 +37,21 @@ service Query { rpc Commitments(CommitmentsRequest) returns (CommitmentsResponse) { option (google.api.http).get = "/lbm/fbridge/v1/commitments/{seq}"; } + + // Get a list of Guardians registered on the bridge + rpc Guardians(GuardiansRequest) returns (GuardiansResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/guardians"; + } + + // Get a list of Operators registered on the bridge + rpc Operators(OperatorsRequest) returns (OperatorsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/operators"; + } + + // Get a list of Judges registered on the bridge + rpc Judges(JudgesRequest) returns (JudgesResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/judges"; + } } message QueryParamsRequest {} @@ -89,4 +104,22 @@ message CommitmentsRequest { message CommitmentsResponse { repeated string commitments = 1; +} + +message GuardiansRequest {} + +message GuardiansResponse { + repeated string guardians = 1; +} + +message OperatorsRequest {} + +message OperatorsResponse { + repeated string operators = 1; +} + +message JudgesRequest {} + +message JudgesResponse { + repeated string judges = 1; } \ No newline at end of file diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto index 49f9f1a6a1..f295e6c028 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -26,6 +26,24 @@ service Msg { // Claim processes the claiming of a provision with a specific sequence number rpc Claim(ClaimRequest) returns (ClaimResponse); + + // AddGuardian adds a guardian to the bridge module. + rpc AddGuardian(AddGuardianRequest) returns (AddGuardianResponse); + + // RemoveGuardian removes a guardian from the bridge module. + rpc RemoveGuardian(RemoveGuardianRequest) returns (RemoveGuardianResponse); + + // AddOperator adds an operator to the bridge module. + rpc AddOperator(AddOperatorRequest) returns (AddOperatorResponse); + + // RemoveOperator removes an operator from the bridge module. + rpc RemoveOperator(RemoveOperatorRequest) returns (RemoveOperatorResponse); + + // AddJudge adds a judge to the bridge module. + rpc AddJudge(AddJudgeRequest) returns (AddJudgeResponse); + + // RemoveJudge removes a judge from the bridge module. + rpc RemoveJudge(RemoveJudgeRequest) returns (RemoveJudgeResponse); } // TransferRequest is input values required for bridge transfer @@ -95,3 +113,51 @@ message ClaimRequest { } message ClaimResponse {} + +// AddGuardianRequest is input values required for adding a guardian +message AddGuardianRequest { + // the guardian address to be added + string guardian = 1; +} + +message AddGuardianResponse {} + +// RemoveGuardianRequest is input values required for removing a guardian +message RemoveGuardianRequest { + // the guardian address to be removed + string guardian = 1; +} + +message RemoveGuardianResponse {} + +// AddOperatorRequest is input values required for adding an operator +message AddOperatorRequest { + // the operator address to be added + string operator = 1; +} + +message AddOperatorResponse {} + +// RemoveOperatorRequest is input values required for removing an operator +message RemoveOperatorRequest { + // the operator address to be removed + string operator = 1; +} + +message RemoveOperatorResponse {} + +// AddJudgeRequest is input values required for adding a judge +message AddJudgeRequest { + // the judge address to be added + string judge = 1; +} + +message AddJudgeResponse {} + +// RemoveJudgeRequest is input values required for removing a judge +message RemoveJudgeRequest { + // the judge address to be removed + string judge = 1; +} + +message RemoveJudgeResponse {} diff --git a/x/fbridge/types/query.pb.go b/x/fbridge/types/query.pb.go index 53fffd6deb..bb1f91bc2d 100644 --- a/x/fbridge/types/query.pb.go +++ b/x/fbridge/types/query.pb.go @@ -570,6 +570,246 @@ func (m *CommitmentsResponse) GetCommitments() []string { return nil } +type GuardiansRequest struct { +} + +func (m *GuardiansRequest) Reset() { *m = GuardiansRequest{} } +func (m *GuardiansRequest) String() string { return proto.CompactTextString(m) } +func (*GuardiansRequest) ProtoMessage() {} +func (*GuardiansRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{12} +} +func (m *GuardiansRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GuardiansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GuardiansRequest.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 *GuardiansRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GuardiansRequest.Merge(m, src) +} +func (m *GuardiansRequest) XXX_Size() int { + return m.Size() +} +func (m *GuardiansRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GuardiansRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GuardiansRequest proto.InternalMessageInfo + +type GuardiansResponse struct { + Guardians []string `protobuf:"bytes,1,rep,name=guardians,proto3" json:"guardians,omitempty"` +} + +func (m *GuardiansResponse) Reset() { *m = GuardiansResponse{} } +func (m *GuardiansResponse) String() string { return proto.CompactTextString(m) } +func (*GuardiansResponse) ProtoMessage() {} +func (*GuardiansResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{13} +} +func (m *GuardiansResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GuardiansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GuardiansResponse.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 *GuardiansResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GuardiansResponse.Merge(m, src) +} +func (m *GuardiansResponse) XXX_Size() int { + return m.Size() +} +func (m *GuardiansResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GuardiansResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GuardiansResponse proto.InternalMessageInfo + +func (m *GuardiansResponse) GetGuardians() []string { + if m != nil { + return m.Guardians + } + return nil +} + +type OperatorsRequest struct { +} + +func (m *OperatorsRequest) Reset() { *m = OperatorsRequest{} } +func (m *OperatorsRequest) String() string { return proto.CompactTextString(m) } +func (*OperatorsRequest) ProtoMessage() {} +func (*OperatorsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{14} +} +func (m *OperatorsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperatorsRequest.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 *OperatorsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperatorsRequest.Merge(m, src) +} +func (m *OperatorsRequest) XXX_Size() int { + return m.Size() +} +func (m *OperatorsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_OperatorsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_OperatorsRequest proto.InternalMessageInfo + +type OperatorsResponse struct { + Operators []string `protobuf:"bytes,1,rep,name=operators,proto3" json:"operators,omitempty"` +} + +func (m *OperatorsResponse) Reset() { *m = OperatorsResponse{} } +func (m *OperatorsResponse) String() string { return proto.CompactTextString(m) } +func (*OperatorsResponse) ProtoMessage() {} +func (*OperatorsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{15} +} +func (m *OperatorsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperatorsResponse.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 *OperatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperatorsResponse.Merge(m, src) +} +func (m *OperatorsResponse) XXX_Size() int { + return m.Size() +} +func (m *OperatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OperatorsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_OperatorsResponse proto.InternalMessageInfo + +func (m *OperatorsResponse) GetOperators() []string { + if m != nil { + return m.Operators + } + return nil +} + +type JudgesRequest struct { +} + +func (m *JudgesRequest) Reset() { *m = JudgesRequest{} } +func (m *JudgesRequest) String() string { return proto.CompactTextString(m) } +func (*JudgesRequest) ProtoMessage() {} +func (*JudgesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{16} +} +func (m *JudgesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JudgesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_JudgesRequest.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 *JudgesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_JudgesRequest.Merge(m, src) +} +func (m *JudgesRequest) XXX_Size() int { + return m.Size() +} +func (m *JudgesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_JudgesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_JudgesRequest proto.InternalMessageInfo + +type JudgesResponse struct { + Judges []string `protobuf:"bytes,1,rep,name=judges,proto3" json:"judges,omitempty"` +} + +func (m *JudgesResponse) Reset() { *m = JudgesResponse{} } +func (m *JudgesResponse) String() string { return proto.CompactTextString(m) } +func (*JudgesResponse) ProtoMessage() {} +func (*JudgesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{17} +} +func (m *JudgesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JudgesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_JudgesResponse.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 *JudgesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JudgesResponse.Merge(m, src) +} +func (m *JudgesResponse) XXX_Size() int { + return m.Size() +} +func (m *JudgesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_JudgesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_JudgesResponse proto.InternalMessageInfo + +func (m *JudgesResponse) GetJudges() []string { + if m != nil { + return m.Judges + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "lbm.fbridge.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "lbm.fbridge.v1.QueryParamsResponse") @@ -583,55 +823,70 @@ func init() { proto.RegisterType((*ConfirmedProvisionResponse)(nil), "lbm.fbridge.v1.ConfirmedProvisionResponse") proto.RegisterType((*CommitmentsRequest)(nil), "lbm.fbridge.v1.CommitmentsRequest") proto.RegisterType((*CommitmentsResponse)(nil), "lbm.fbridge.v1.CommitmentsResponse") + proto.RegisterType((*GuardiansRequest)(nil), "lbm.fbridge.v1.GuardiansRequest") + proto.RegisterType((*GuardiansResponse)(nil), "lbm.fbridge.v1.GuardiansResponse") + proto.RegisterType((*OperatorsRequest)(nil), "lbm.fbridge.v1.OperatorsRequest") + proto.RegisterType((*OperatorsResponse)(nil), "lbm.fbridge.v1.OperatorsResponse") + proto.RegisterType((*JudgesRequest)(nil), "lbm.fbridge.v1.JudgesRequest") + proto.RegisterType((*JudgesResponse)(nil), "lbm.fbridge.v1.JudgesResponse") } func init() { proto.RegisterFile("lbm/fbridge/v1/query.proto", fileDescriptor_5e7780f9db9d346e) } var fileDescriptor_5e7780f9db9d346e = []byte{ - // 680 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xcf, 0x4f, 0xd4, 0x40, - 0x14, 0xc7, 0xb7, 0x80, 0xab, 0xbc, 0x4d, 0x0c, 0x19, 0x10, 0x97, 0x06, 0x0a, 0x96, 0xa8, 0x20, - 0xb0, 0x75, 0x01, 0x25, 0xf1, 0xc7, 0x05, 0x8c, 0x46, 0x4d, 0x14, 0x17, 0x4f, 0x5e, 0x36, 0xd3, - 0xdd, 0xa1, 0x34, 0xd2, 0x4e, 0xdb, 0x99, 0x25, 0x6c, 0x08, 0x07, 0xfd, 0x0b, 0x8c, 0x72, 0xf6, - 0xee, 0xd1, 0xff, 0x82, 0x23, 0x89, 0x17, 0x4f, 0xc6, 0x80, 0x7f, 0x88, 0xe9, 0x74, 0x0a, 0xcb, - 0x74, 0x8b, 0x7b, 0xf3, 0xf6, 0xf6, 0xcd, 0xf7, 0xbd, 0xf7, 0x99, 0xb7, 0xf3, 0x4d, 0x41, 0xdf, - 0xb6, 0x3d, 0x6b, 0xd3, 0x8e, 0xdc, 0xa6, 0x43, 0xac, 0x9d, 0xaa, 0x15, 0xb6, 0x48, 0xd4, 0xae, - 0x04, 0x11, 0xe5, 0x14, 0x5d, 0xdd, 0xb6, 0xbd, 0x8a, 0x3c, 0xab, 0xec, 0x54, 0xf5, 0x71, 0x87, - 0x52, 0x67, 0x9b, 0x58, 0x38, 0x70, 0x2d, 0xec, 0xfb, 0x94, 0x63, 0xee, 0x52, 0x9f, 0x25, 0x6a, - 0x7d, 0xc4, 0xa1, 0x0e, 0x15, 0xa1, 0x15, 0x47, 0x32, 0x3b, 0xae, 0xf4, 0x4f, 0xdb, 0x89, 0x53, - 0x73, 0x04, 0xd0, 0x9b, 0x78, 0xe0, 0x3a, 0x8e, 0xb0, 0xc7, 0x6a, 0x24, 0x6c, 0x11, 0xc6, 0xcd, - 0x97, 0x30, 0x7c, 0x2e, 0xcb, 0x02, 0xea, 0x33, 0x82, 0x96, 0xa1, 0x18, 0x88, 0x4c, 0x59, 0x9b, - 0xd2, 0x66, 0x4a, 0x8b, 0xa3, 0x95, 0xf3, 0x7c, 0x95, 0x44, 0xbf, 0x3a, 0x70, 0xf8, 0x6b, 0xb2, - 0x50, 0x93, 0x5a, 0xf3, 0x01, 0x8c, 0x3f, 0x8b, 0x08, 0xe6, 0x84, 0xf1, 0x0d, 0x12, 0xae, 0xb6, - 0x5f, 0x07, 0x24, 0xc2, 0x9c, 0x46, 0x72, 0x18, 0xd2, 0xe1, 0x0a, 0x95, 0x29, 0xd1, 0x77, 0xb0, - 0x76, 0xfa, 0xdb, 0xac, 0xc2, 0x44, 0x4e, 0xad, 0x44, 0x1a, 0x82, 0x7e, 0x46, 0x42, 0x51, 0x37, - 0x50, 0x8b, 0x43, 0x73, 0x0c, 0xae, 0xbf, 0x22, 0xbb, 0xb1, 0xfc, 0x2d, 0x5d, 0xa3, 0xfe, 0xa6, - 0x1b, 0x79, 0xe9, 0xb5, 0xe6, 0xa1, 0x9c, 0x3d, 0xca, 0x6d, 0xf4, 0x1c, 0xc6, 0x36, 0x5a, 0xb6, - 0xe7, 0x72, 0x4e, 0x9a, 0xeb, 0x11, 0xdd, 0x71, 0x99, 0x4b, 0xfd, 0x1e, 0xa0, 0xd3, 0x56, 0x7d, - 0x67, 0xad, 0x0e, 0x34, 0xd0, 0xbb, 0xf5, 0x92, 0xb3, 0x57, 0x60, 0xa0, 0x89, 0x39, 0x96, 0x5b, - 0x9d, 0xc8, 0x6c, 0x35, 0x2d, 0x78, 0x82, 0x39, 0x96, 0xcb, 0x15, 0x05, 0xe8, 0x31, 0x14, 0x19, - 0xc7, 0xbc, 0xc5, 0xc4, 0xb0, 0xd2, 0xe2, 0x64, 0x6e, 0xe9, 0x86, 0x90, 0xa5, 0xff, 0x4c, 0x52, - 0x64, 0x2e, 0xc0, 0x98, 0x5c, 0x43, 0x97, 0x1b, 0x66, 0x17, 0x12, 0xdf, 0xa2, 0x9b, 0xfe, 0x3f, - 0xdf, 0xe2, 0x16, 0xa0, 0x35, 0xea, 0x79, 0x2e, 0xf7, 0x88, 0xcf, 0x59, 0x3e, 0xfe, 0x0a, 0x0c, - 0x9f, 0xd3, 0x49, 0xec, 0x29, 0x28, 0x35, 0xce, 0xd2, 0x65, 0x6d, 0xaa, 0x7f, 0x66, 0xb0, 0xd6, - 0x99, 0x5a, 0x3c, 0xb8, 0x0c, 0x97, 0x84, 0x1d, 0x50, 0x08, 0xc5, 0xe4, 0x89, 0x23, 0x53, 0x65, - 0xcc, 0xba, 0x48, 0x9f, 0xbe, 0x50, 0x93, 0x8c, 0x37, 0x8d, 0x8f, 0x3f, 0xfe, 0x7c, 0xe9, 0x2b, - 0xa3, 0x51, 0x4b, 0xf1, 0x69, 0xe2, 0x1e, 0xf4, 0x5d, 0x83, 0x6b, 0x5d, 0x2d, 0x80, 0xe6, 0xd5, - 0xf6, 0x17, 0xb9, 0x4c, 0x5f, 0xe8, 0x51, 0x2d, 0xb1, 0x1e, 0x0a, 0xac, 0x7b, 0x68, 0x49, 0xc5, - 0x72, 0x64, 0x59, 0x9d, 0x91, 0xb0, 0x6e, 0xb7, 0xeb, 0xe9, 0xab, 0xb7, 0xf6, 0xd2, 0x68, 0x1f, - 0x7d, 0xd6, 0x60, 0x48, 0x35, 0x1a, 0xba, 0xad, 0x02, 0xe4, 0xb8, 0x54, 0x9f, 0xf9, 0xb7, 0x50, - 0x42, 0xce, 0x09, 0xc8, 0x9b, 0x68, 0x5a, 0x85, 0xf4, 0xc9, 0x6e, 0x02, 0xc8, 0x69, 0xbd, 0x21, - 0xe7, 0x7f, 0xd3, 0x00, 0x65, 0x3d, 0x88, 0x66, 0xd5, 0x69, 0xb9, 0x9e, 0xd7, 0xef, 0xf4, 0x22, - 0x95, 0x68, 0x8f, 0x04, 0xda, 0x7d, 0xb4, 0xac, 0xa2, 0xb1, 0xb4, 0xa6, 0x1e, 0xa4, 0x45, 0x1d, - 0xab, 0xb3, 0xf6, 0x18, 0x09, 0xf7, 0xd1, 0x57, 0x2d, 0x7e, 0xd3, 0xaa, 0xd3, 0xb2, 0xac, 0xb9, - 0xee, 0xcd, 0xb2, 0xe6, 0x1b, 0xd7, 0xac, 0x0a, 0xd6, 0x39, 0x34, 0xab, 0xb2, 0x36, 0xd2, 0x9a, - 0x4e, 0x56, 0x01, 0xf8, 0x41, 0x83, 0x52, 0x87, 0x99, 0xb2, 0x76, 0xc8, 0x3a, 0x32, 0x6b, 0x87, - 0x2e, 0x6e, 0x34, 0x67, 0x05, 0xcb, 0x34, 0xba, 0x91, 0x65, 0x39, 0x15, 0x27, 0x0c, 0xab, 0x2f, - 0x0e, 0x8f, 0x0d, 0xed, 0xe8, 0xd8, 0xd0, 0x7e, 0x1f, 0x1b, 0xda, 0xa7, 0x13, 0xa3, 0x70, 0x74, - 0x62, 0x14, 0x7e, 0x9e, 0x18, 0x85, 0x77, 0x77, 0x1d, 0x97, 0x6f, 0xb5, 0xec, 0x4a, 0x83, 0x7a, - 0xd6, 0x53, 0xd7, 0x67, 0x8d, 0x2d, 0x17, 0x5b, 0x9b, 0x32, 0x58, 0x60, 0xcd, 0xf7, 0xd6, 0xee, - 0x69, 0x6b, 0xde, 0x0e, 0x08, 0xb3, 0x8b, 0xe2, 0x6b, 0xb8, 0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, - 0xca, 0xda, 0x4f, 0xed, 0x8d, 0x07, 0x00, 0x00, + // 818 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x4f, 0x13, 0x4d, + 0x18, 0xee, 0x02, 0x5f, 0xf3, 0xf5, 0x6d, 0x3e, 0x3e, 0xbe, 0x81, 0x0f, 0xdb, 0xb5, 0x2c, 0x65, + 0x89, 0x5a, 0x04, 0xba, 0x16, 0x50, 0x12, 0x7f, 0x5c, 0xc0, 0x48, 0xc4, 0x44, 0xb1, 0x78, 0xf2, + 0xd2, 0x6c, 0xdb, 0x61, 0x59, 0x65, 0x77, 0xda, 0x9d, 0x29, 0xa1, 0x21, 0x1c, 0xf4, 0x2f, 0x30, + 0xea, 0xd9, 0xbb, 0x47, 0xff, 0x0b, 0x8e, 0x24, 0x5e, 0x3c, 0x19, 0x03, 0x26, 0xfe, 0x1b, 0xa6, + 0xb3, 0xb3, 0xdb, 0x76, 0xa7, 0x0b, 0xdc, 0xbc, 0xcd, 0xbe, 0xf3, 0xbc, 0xcf, 0xf3, 0xcc, 0xcb, + 0xcc, 0x43, 0x41, 0xdd, 0xab, 0x3a, 0xc6, 0x4e, 0xd5, 0xb3, 0xeb, 0x16, 0x36, 0xf6, 0x4b, 0x46, + 0xb3, 0x85, 0xbd, 0x76, 0xb1, 0xe1, 0x11, 0x46, 0xd0, 0xe8, 0x5e, 0xd5, 0x29, 0x8a, 0xbd, 0xe2, + 0x7e, 0x49, 0xcd, 0x59, 0x84, 0x58, 0x7b, 0xd8, 0x30, 0x1b, 0xb6, 0x61, 0xba, 0x2e, 0x61, 0x26, + 0xb3, 0x89, 0x4b, 0x7d, 0xb4, 0x3a, 0x61, 0x11, 0x8b, 0xf0, 0xa5, 0xd1, 0x59, 0x89, 0x6a, 0x2e, + 0xc2, 0x1f, 0xd0, 0xf1, 0x5d, 0x7d, 0x02, 0xd0, 0xf3, 0x8e, 0xe0, 0x96, 0xe9, 0x99, 0x0e, 0x2d, + 0xe3, 0x66, 0x0b, 0x53, 0xa6, 0x3f, 0x81, 0xf1, 0xbe, 0x2a, 0x6d, 0x10, 0x97, 0x62, 0xb4, 0x02, + 0xc9, 0x06, 0xaf, 0x64, 0x94, 0xbc, 0x52, 0x48, 0x2f, 0x4d, 0x16, 0xfb, 0xfd, 0x15, 0x7d, 0xfc, + 0xda, 0xc8, 0xf1, 0xf7, 0xe9, 0x44, 0x59, 0x60, 0xf5, 0xbb, 0x90, 0xdb, 0xf0, 0xb0, 0xc9, 0x30, + 0x65, 0xdb, 0xb8, 0xb9, 0xd6, 0x7e, 0xd6, 0xc0, 0x9e, 0xc9, 0x88, 0x27, 0xc4, 0x90, 0x0a, 0x7f, + 0x13, 0x51, 0xe2, 0xbc, 0xa9, 0x72, 0xf8, 0xad, 0x97, 0x60, 0x2a, 0xa6, 0x57, 0x58, 0x1a, 0x83, + 0x61, 0x8a, 0x9b, 0xbc, 0x6f, 0xa4, 0xdc, 0x59, 0xea, 0x59, 0xb8, 0xf2, 0x14, 0x1f, 0x74, 0xe0, + 0x2f, 0xc8, 0x3a, 0x71, 0x77, 0x6c, 0xcf, 0x09, 0x8e, 0xb5, 0x00, 0x19, 0x79, 0x2b, 0x96, 0xe8, + 0x31, 0x64, 0xb7, 0x5b, 0x55, 0xc7, 0x66, 0x0c, 0xd7, 0xb7, 0x3c, 0xb2, 0x6f, 0x53, 0x9b, 0xb8, + 0x97, 0x30, 0x1d, 0x50, 0x0d, 0x75, 0xa9, 0x3e, 0x2a, 0xa0, 0x0e, 0xe2, 0x12, 0xda, 0xab, 0x30, + 0x52, 0x37, 0x99, 0x29, 0xa6, 0x3a, 0x25, 0x4d, 0x35, 0x68, 0x78, 0x68, 0x32, 0x53, 0x0c, 0x97, + 0x37, 0xa0, 0x07, 0x90, 0xa4, 0xcc, 0x64, 0x2d, 0xca, 0xc5, 0xd2, 0x4b, 0xd3, 0xb1, 0xad, 0xdb, + 0x1c, 0x16, 0xfc, 0x65, 0xfc, 0x26, 0x7d, 0x11, 0xb2, 0x62, 0x0c, 0x03, 0x4e, 0x28, 0x0f, 0xa4, + 0x73, 0x8a, 0x41, 0xf8, 0x3f, 0x7c, 0x8a, 0xeb, 0x80, 0xd6, 0x89, 0xe3, 0xd8, 0xcc, 0xc1, 0x2e, + 0xa3, 0xf1, 0xf6, 0x57, 0x61, 0xbc, 0x0f, 0x27, 0x6c, 0xe7, 0x21, 0x5d, 0xeb, 0x96, 0x33, 0x4a, + 0x7e, 0xb8, 0x90, 0x2a, 0xf7, 0x96, 0x74, 0x04, 0x63, 0x1b, 0x2d, 0xd3, 0xab, 0xdb, 0xa6, 0x1b, + 0xbe, 0x90, 0x12, 0xfc, 0xd7, 0x53, 0x13, 0x54, 0x39, 0x48, 0x59, 0x41, 0x51, 0x10, 0x75, 0x0b, + 0x1d, 0x9a, 0xe0, 0xfa, 0xf6, 0xd2, 0xf4, 0xd4, 0xba, 0x34, 0xc1, 0x5d, 0x0a, 0x69, 0xc2, 0x82, + 0xfe, 0x2f, 0xfc, 0xb3, 0xd9, 0xaa, 0x5b, 0x38, 0xe4, 0x28, 0xc0, 0x68, 0x50, 0x10, 0x04, 0x93, + 0x90, 0x7c, 0xc5, 0x2b, 0xa2, 0x5b, 0x7c, 0x2d, 0xfd, 0x4a, 0xc1, 0x5f, 0xfc, 0x5d, 0xa3, 0x26, + 0x24, 0xfd, 0xb7, 0x8a, 0xf4, 0xe8, 0xb0, 0xe5, 0x38, 0x50, 0x67, 0xcf, 0xc5, 0xf8, 0xa2, 0xba, + 0xf6, 0xf6, 0xeb, 0xcf, 0x0f, 0x43, 0x19, 0x34, 0x69, 0x44, 0x02, 0xc7, 0x8f, 0x01, 0xf4, 0x45, + 0x81, 0xff, 0x07, 0xbe, 0x65, 0xb4, 0x10, 0xa5, 0x3f, 0x2f, 0x2e, 0xd4, 0xc5, 0x4b, 0xa2, 0x85, + 0xad, 0x7b, 0xdc, 0xd6, 0x6d, 0xb4, 0x1c, 0xb5, 0x65, 0x89, 0xb6, 0x0a, 0xc5, 0xcd, 0x4a, 0xb5, + 0x5d, 0x09, 0x26, 0x6c, 0x1c, 0x06, 0xab, 0x23, 0xf4, 0x5e, 0x81, 0xb1, 0x68, 0x62, 0xa0, 0x1b, + 0x51, 0x03, 0x31, 0x71, 0xa3, 0x16, 0x2e, 0x06, 0x0a, 0x93, 0xf3, 0xdc, 0xe4, 0x35, 0x34, 0x1b, + 0x35, 0xe9, 0xe2, 0x03, 0xdf, 0x20, 0x23, 0x95, 0x9a, 0xd0, 0xff, 0xac, 0x00, 0x92, 0xc3, 0x04, + 0xcd, 0x45, 0xd5, 0x62, 0xc3, 0x4b, 0xbd, 0x79, 0x19, 0xa8, 0xb0, 0x76, 0x9f, 0x5b, 0xbb, 0x83, + 0x56, 0xa2, 0xd6, 0x68, 0xd0, 0x53, 0x69, 0x04, 0x4d, 0x3d, 0xa3, 0x33, 0x0e, 0x29, 0x6e, 0x1e, + 0xa1, 0x4f, 0x4a, 0xe7, 0x71, 0x46, 0x23, 0x43, 0xf6, 0x1a, 0x1b, 0x43, 0xb2, 0xd7, 0xf8, 0x04, + 0xd2, 0x4b, 0xdc, 0xeb, 0x3c, 0x9a, 0x8b, 0x7a, 0xad, 0x05, 0x3d, 0xbd, 0x5e, 0xb9, 0xc1, 0x37, + 0x0a, 0xa4, 0x7b, 0x52, 0x41, 0x7e, 0x0e, 0x72, 0xb4, 0xc8, 0xcf, 0x61, 0x40, 0xac, 0xe8, 0x73, + 0xdc, 0xcb, 0x2c, 0x9a, 0x91, 0xbd, 0x84, 0x60, 0xe1, 0x81, 0x42, 0x2a, 0xcc, 0x12, 0x94, 0x97, + 0xae, 0x77, 0x24, 0x7a, 0xd4, 0x99, 0x73, 0x10, 0x42, 0x7c, 0x86, 0x8b, 0x5f, 0x45, 0x59, 0xe9, + 0xd2, 0x87, 0x3a, 0x14, 0x52, 0x61, 0xf2, 0xc8, 0xa2, 0xd1, 0xa0, 0x92, 0x45, 0xa5, 0xd8, 0x8a, + 0x17, 0x0d, 0xb3, 0x0b, 0x59, 0x90, 0xf4, 0xa3, 0x0a, 0x49, 0xff, 0x1e, 0xfa, 0x32, 0x4d, 0xd5, + 0xe2, 0xb6, 0x2f, 0x0a, 0x1b, 0x3f, 0xe9, 0xd6, 0x36, 0x8f, 0x4f, 0x35, 0xe5, 0xe4, 0x54, 0x53, + 0x7e, 0x9c, 0x6a, 0xca, 0xbb, 0x33, 0x2d, 0x71, 0x72, 0xa6, 0x25, 0xbe, 0x9d, 0x69, 0x89, 0x97, + 0xb7, 0x2c, 0x9b, 0xed, 0xb6, 0xaa, 0xc5, 0x1a, 0x71, 0x8c, 0x47, 0xb6, 0x4b, 0x6b, 0xbb, 0xb6, + 0x69, 0xec, 0x88, 0xc5, 0x22, 0xad, 0xbf, 0x36, 0x0e, 0x42, 0x3e, 0xd6, 0x6e, 0x60, 0x5a, 0x4d, + 0xf2, 0x5f, 0x4a, 0xcb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x55, 0x64, 0x53, 0xe7, 0xa9, 0x09, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -658,6 +913,12 @@ type QueryClient interface { ConfirmedProvision(ctx context.Context, in *ConfirmedProvisionRequest, opts ...grpc.CallOption) (*ConfirmedProvisionResponse, error) // Get commitments of a specific sequence number Commitments(ctx context.Context, in *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, error) + // Get a list of Guardians registered on the bridge + Guardians(ctx context.Context, in *GuardiansRequest, opts ...grpc.CallOption) (*GuardiansResponse, error) + // Get a list of Operators registered on the bridge + Operators(ctx context.Context, in *OperatorsRequest, opts ...grpc.CallOption) (*OperatorsResponse, error) + // Get a list of Judges registered on the bridge + Judges(ctx context.Context, in *JudgesRequest, opts ...grpc.CallOption) (*JudgesResponse, error) } type queryClient struct { @@ -722,6 +983,33 @@ func (c *queryClient) Commitments(ctx context.Context, in *CommitmentsRequest, o return out, nil } +func (c *queryClient) Guardians(ctx context.Context, in *GuardiansRequest, opts ...grpc.CallOption) (*GuardiansResponse, error) { + out := new(GuardiansResponse) + 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 *OperatorsRequest, opts ...grpc.CallOption) (*OperatorsResponse, error) { + out := new(OperatorsResponse) + 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 *JudgesRequest, opts ...grpc.CallOption) (*JudgesResponse, error) { + out := new(JudgesResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Judges", 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. @@ -736,6 +1024,12 @@ type QueryServer interface { ConfirmedProvision(context.Context, *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) // Get commitments of a specific sequence number Commitments(context.Context, *CommitmentsRequest) (*CommitmentsResponse, error) + // Get a list of Guardians registered on the bridge + Guardians(context.Context, *GuardiansRequest) (*GuardiansResponse, error) + // Get a list of Operators registered on the bridge + Operators(context.Context, *OperatorsRequest) (*OperatorsResponse, error) + // Get a list of Judges registered on the bridge + Judges(context.Context, *JudgesRequest) (*JudgesResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -760,6 +1054,15 @@ func (*UnimplementedQueryServer) ConfirmedProvision(ctx context.Context, req *Co func (*UnimplementedQueryServer) Commitments(ctx context.Context, req *CommitmentsRequest) (*CommitmentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Commitments not implemented") } +func (*UnimplementedQueryServer) Guardians(ctx context.Context, req *GuardiansRequest) (*GuardiansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Guardians not implemented") +} +func (*UnimplementedQueryServer) Operators(ctx context.Context, req *OperatorsRequest) (*OperatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Operators not implemented") +} +func (*UnimplementedQueryServer) Judges(ctx context.Context, req *JudgesRequest) (*JudgesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Judges not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -873,6 +1176,60 @@ func _Query_Commitments_Handler(srv interface{}, ctx context.Context, dec func(i 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(GuardiansRequest) + 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.(*GuardiansRequest)) + } + 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(OperatorsRequest) + 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.(*OperatorsRequest)) + } + 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(JudgesRequest) + 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.(*JudgesRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "lbm.fbridge.v1.Query", HandlerType: (*QueryServer)(nil), @@ -901,6 +1258,18 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Commitments", Handler: _Query_Commitments_Handler, }, + { + MethodName: "Guardians", + Handler: _Query_Guardians_Handler, + }, + { + MethodName: "Operators", + Handler: _Query_Operators_Handler, + }, + { + MethodName: "Judges", + Handler: _Query_Judges_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "lbm/fbridge/v1/query.proto", @@ -1280,53 +1649,218 @@ func (m *CommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 +func (m *GuardiansRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *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 *GuardiansRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GreatestSeqByOperatorRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *GuardiansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Operator) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *GreatestSeqByOperatorResponse) Size() (n int) { - if m == nil { - return 0 +func (m *GuardiansResponse) 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 *GuardiansResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GuardiansResponse) 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 *OperatorsRequest) 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 *OperatorsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *OperatorsResponse) 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 *OperatorsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperatorsResponse) 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 *JudgesRequest) 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 *JudgesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JudgesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *JudgesResponse) 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 *JudgesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JudgesResponse) 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 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 *GreatestSeqByOperatorRequest) 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 *GreatestSeqByOperatorResponse) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -1438,6 +1972,78 @@ func (m *CommitmentsResponse) Size() (n int) { return n } +func (m *GuardiansRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GuardiansResponse) 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 *OperatorsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *OperatorsResponse) 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 *JudgesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *JudgesResponse) 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 sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2400,6 +3006,402 @@ func (m *CommitmentsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GuardiansRequest) 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: GuardiansRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GuardiansRequest: 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 *GuardiansResponse) 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: GuardiansResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GuardiansResponse: 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 *OperatorsRequest) 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: OperatorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperatorsRequest: 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 *OperatorsResponse) 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: OperatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperatorsResponse: 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 *JudgesRequest) 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: JudgesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JudgesRequest: 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 *JudgesResponse) 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: JudgesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JudgesResponse: 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/fbridge/types/query.pb.gw.go b/x/fbridge/types/query.pb.gw.go index 8dc109a27b..394633f441 100644 --- a/x/fbridge/types/query.pb.gw.go +++ b/x/fbridge/types/query.pb.gw.go @@ -305,6 +305,60 @@ func local_request_Query_Commitments_0(ctx context.Context, marshaler runtime.Ma } +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 GuardiansRequest + 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 GuardiansRequest + 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 OperatorsRequest + 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 OperatorsRequest + 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 JudgesRequest + 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 JudgesRequest + var metadata runtime.ServerMetadata + + msg, err := server.Judges(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. @@ -431,6 +485,66 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + 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()...) + + }) + return nil } @@ -592,6 +706,66 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + 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()...) + + }) + return nil } @@ -607,6 +781,12 @@ var ( 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", "confirmed_provision", "seq"}, "", 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))) ) var ( @@ -621,4 +801,10 @@ var ( forward_Query_ConfirmedProvision_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 ) diff --git a/x/fbridge/types/tx.pb.go b/x/fbridge/types/tx.pb.go index 9ef35bdffc..074ff0f75e 100644 --- a/x/fbridge/types/tx.pb.go +++ b/x/fbridge/types/tx.pb.go @@ -634,954 +634,2801 @@ func (m *ClaimResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ClaimResponse proto.InternalMessageInfo -func init() { - proto.RegisterType((*TransferRequest)(nil), "lbm.fbridge.v1.TransferRequest") - proto.RegisterType((*TransferResponse)(nil), "lbm.fbridge.v1.TransferResponse") - proto.RegisterType((*ProvisionRequest)(nil), "lbm.fbridge.v1.ProvisionRequest") - proto.RegisterType((*ProvisionResponse)(nil), "lbm.fbridge.v1.ProvisionResponse") - proto.RegisterType((*HoldTransferRequest)(nil), "lbm.fbridge.v1.HoldTransferRequest") - proto.RegisterType((*HoldTransferResponse)(nil), "lbm.fbridge.v1.HoldTransferResponse") - proto.RegisterType((*ReleaseTransferRequest)(nil), "lbm.fbridge.v1.ReleaseTransferRequest") - proto.RegisterType((*ReleaseTransferResponse)(nil), "lbm.fbridge.v1.ReleaseTransferResponse") - proto.RegisterType((*RemoveProvisionRequest)(nil), "lbm.fbridge.v1.RemoveProvisionRequest") - proto.RegisterType((*RemoveProvisionResponse)(nil), "lbm.fbridge.v1.RemoveProvisionResponse") - proto.RegisterType((*ClaimBatchRequest)(nil), "lbm.fbridge.v1.ClaimBatchRequest") - proto.RegisterType((*ClaimBatchResponse)(nil), "lbm.fbridge.v1.ClaimBatchResponse") - proto.RegisterType((*ClaimRequest)(nil), "lbm.fbridge.v1.ClaimRequest") - proto.RegisterType((*ClaimResponse)(nil), "lbm.fbridge.v1.ClaimResponse") +// AddGuardianRequest is input values required for adding a guardian +type AddGuardianRequest struct { + // the guardian address to be added + Guardian string `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` } -func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } - -var fileDescriptor_54a336bc5ea063bb = []byte{ - // 523 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xe3, 0x26, 0x44, 0xcd, 0xa8, 0x90, 0x74, 0x1b, 0xa5, 0xc1, 0xa2, 0x4e, 0x30, 0x88, - 0xa2, 0x4a, 0xd8, 0x34, 0xbc, 0x41, 0x40, 0x08, 0x2a, 0x55, 0xaa, 0x0c, 0x17, 0xb8, 0x20, 0xdb, - 0x99, 0x38, 0x16, 0xb6, 0x37, 0xf5, 0x3a, 0x56, 0x78, 0x0b, 0x78, 0x07, 0x1e, 0xa6, 0xc7, 0x1e, - 0x11, 0x87, 0x0a, 0x25, 0x3c, 0x08, 0x8a, 0xbd, 0x49, 0x1c, 0xff, 0x49, 0x0e, 0xdc, 0x76, 0x77, - 0xbe, 0xf9, 0xed, 0xb7, 0xb3, 0xa3, 0x81, 0x63, 0xc7, 0x70, 0xd5, 0xa1, 0xe1, 0xdb, 0x03, 0x0b, - 0xd5, 0xf0, 0x5c, 0x0d, 0xa6, 0xca, 0xd8, 0xa7, 0x01, 0x25, 0x0f, 0x1c, 0xc3, 0x55, 0x78, 0x40, - 0x09, 0xcf, 0xc5, 0xa6, 0x45, 0x2d, 0x1a, 0x85, 0xd4, 0xc5, 0x2a, 0x56, 0xc9, 0x3f, 0x04, 0xa8, - 0x7f, 0xf4, 0x75, 0x8f, 0x0d, 0xd1, 0xd7, 0xf0, 0x7a, 0x82, 0x2c, 0x20, 0x2d, 0xa8, 0x32, 0xf4, - 0x06, 0xe8, 0xb7, 0x85, 0xae, 0xf0, 0xbc, 0xa6, 0xf1, 0x1d, 0x11, 0x61, 0xdf, 0x47, 0x13, 0xed, - 0x10, 0xfd, 0xf6, 0x5e, 0x14, 0x59, 0xed, 0xc9, 0x05, 0x54, 0x75, 0x97, 0x4e, 0xbc, 0xa0, 0x5d, - 0x5e, 0x44, 0xfa, 0xbd, 0x9b, 0xbb, 0x4e, 0xe9, 0xf7, 0x5d, 0xe7, 0xcc, 0xb2, 0x83, 0xd1, 0xc4, - 0x50, 0x4c, 0xea, 0xaa, 0x6f, 0x6d, 0x8f, 0x99, 0x23, 0x5b, 0x57, 0x87, 0x7c, 0xf1, 0x82, 0x0d, - 0xbe, 0xaa, 0xc1, 0xb7, 0x31, 0x32, 0xe5, 0xbd, 0x17, 0x68, 0x9c, 0x20, 0x13, 0x68, 0xac, 0x2d, - 0xb1, 0x31, 0xf5, 0x18, 0xca, 0x3f, 0x05, 0x68, 0x5c, 0xf9, 0x34, 0xb4, 0x99, 0x4d, 0xbd, 0xa5, - 0xd1, 0x06, 0x94, 0x19, 0x5e, 0x47, 0x2e, 0x2b, 0xda, 0x62, 0x99, 0xb0, 0xbe, 0x57, 0x68, 0xbd, - 0x5c, 0x68, 0xbd, 0xf2, 0xdf, 0xd6, 0x8f, 0xe0, 0x30, 0xe1, 0x92, 0x7b, 0x3f, 0x85, 0xa3, 0x77, - 0xd4, 0x19, 0xa4, 0xcb, 0x9c, 0x71, 0x2f, 0xb7, 0xa0, 0xb9, 0x29, 0xe4, 0x80, 0x33, 0x68, 0x69, - 0xe8, 0xa0, 0xce, 0x70, 0x37, 0xe3, 0x21, 0x1c, 0x67, 0xb4, 0x49, 0x8c, 0x4b, 0x43, 0xdc, 0x5d, - 0xc8, 0x18, 0x93, 0xd2, 0x72, 0x4c, 0x0f, 0x0e, 0x5f, 0x3b, 0xba, 0xed, 0xf6, 0xf5, 0xc0, 0x1c, - 0x2d, 0x09, 0x27, 0x00, 0xae, 0x3e, 0xfd, 0x62, 0x2e, 0x02, 0x8c, 0x83, 0x6a, 0xae, 0x3e, 0x8d, - 0x94, 0x4c, 0x6e, 0x02, 0x49, 0xe6, 0x70, 0x52, 0x17, 0x0e, 0xa2, 0xd3, 0x62, 0x1b, 0x75, 0xb8, - 0xcf, 0x15, 0x71, 0x4a, 0xef, 0x6f, 0x05, 0xca, 0x97, 0xcc, 0x22, 0x97, 0xb0, 0xbf, 0x7c, 0x1f, - 0xe9, 0x28, 0x9b, 0xad, 0xae, 0xa4, 0xaa, 0x24, 0x76, 0x8b, 0x05, 0x31, 0x96, 0x5c, 0x41, 0x6d, - 0xf5, 0x50, 0x92, 0x91, 0xa7, 0xeb, 0x25, 0x3e, 0xde, 0xa2, 0xe0, 0xc4, 0x4f, 0x70, 0x90, 0xfc, - 0x4b, 0xf2, 0x24, 0x9d, 0x92, 0xd3, 0x12, 0xe2, 0xd3, 0xed, 0x22, 0x8e, 0x36, 0xa0, 0x9e, 0xfa, - 0x62, 0xf2, 0x2c, 0x9d, 0x98, 0xdf, 0x2f, 0xe2, 0xe9, 0x4e, 0x5d, 0xf2, 0x8e, 0x8d, 0xff, 0xcf, - 0xbb, 0x23, 0xaf, 0x99, 0xf2, 0xee, 0xc8, 0x6d, 0x24, 0xf2, 0x01, 0x60, 0xdd, 0x14, 0x24, 0x53, - 0xd3, 0x4c, 0x93, 0x89, 0xf2, 0x36, 0x09, 0x87, 0xbe, 0x81, 0x7b, 0xd1, 0x29, 0x79, 0x94, 0x2b, - 0x5e, 0xa2, 0x4e, 0x0a, 0xa2, 0x31, 0xa5, 0x7f, 0x71, 0x33, 0x93, 0x84, 0xdb, 0x99, 0x24, 0xfc, - 0x99, 0x49, 0xc2, 0xf7, 0xb9, 0x54, 0xba, 0x9d, 0x4b, 0xa5, 0x5f, 0x73, 0xa9, 0xf4, 0xf9, 0xe5, - 0xce, 0xa9, 0x30, 0x5d, 0x8d, 0xe3, 0x68, 0x3e, 0x18, 0xd5, 0x68, 0xd2, 0xbe, 0xfa, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x3e, 0x4d, 0xae, 0x45, 0xaa, 0x05, 0x00, 0x00, +func (m *AddGuardianRequest) Reset() { *m = AddGuardianRequest{} } +func (m *AddGuardianRequest) String() string { return proto.CompactTextString(m) } +func (*AddGuardianRequest) ProtoMessage() {} +func (*AddGuardianRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{14} +} +func (m *AddGuardianRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddGuardianRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddGuardianRequest.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 *AddGuardianRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddGuardianRequest.Merge(m, src) +} +func (m *AddGuardianRequest) XXX_Size() int { + return m.Size() +} +func (m *AddGuardianRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AddGuardianRequest.DiscardUnknown(m) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var xxx_messageInfo_AddGuardianRequest proto.InternalMessageInfo -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +func (m *AddGuardianRequest) GetGuardian() string { + if m != nil { + return m.Guardian + } + return "" +} -// 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 *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) - // Submit a provision to the bridge module. - Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) - // Set the time lock value from default value to uint64.max for specific confirmed provision. - HoldTransfer(ctx context.Context, in *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) - // Set the time lock value to 0 for specific confirmed provision. - ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) - // Remove a specific confirmed provision (reset for specific sequence number). - RemoveProvision(ctx context.Context, in *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) - // ClaimBatch processes the claiming of multiple claimable provisions in a single operation - ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) - // Claim processes the claiming of a provision with a specific sequence number - Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) +type AddGuardianResponse struct { } -type msgClient struct { - cc grpc1.ClientConn +func (m *AddGuardianResponse) Reset() { *m = AddGuardianResponse{} } +func (m *AddGuardianResponse) String() string { return proto.CompactTextString(m) } +func (*AddGuardianResponse) ProtoMessage() {} +func (*AddGuardianResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{15} +} +func (m *AddGuardianResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddGuardianResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddGuardianResponse.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 *AddGuardianResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddGuardianResponse.Merge(m, src) +} +func (m *AddGuardianResponse) XXX_Size() int { + return m.Size() +} +func (m *AddGuardianResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AddGuardianResponse.DiscardUnknown(m) } -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} +var xxx_messageInfo_AddGuardianResponse proto.InternalMessageInfo + +// RemoveGuardianRequest is input values required for removing a guardian +type RemoveGuardianRequest struct { + // the guardian address to be removed + Guardian string `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` } -func (c *msgClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) { - out := new(TransferResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Transfer", in, out, opts...) - if err != nil { - return nil, err +func (m *RemoveGuardianRequest) Reset() { *m = RemoveGuardianRequest{} } +func (m *RemoveGuardianRequest) String() string { return proto.CompactTextString(m) } +func (*RemoveGuardianRequest) ProtoMessage() {} +func (*RemoveGuardianRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{16} +} +func (m *RemoveGuardianRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveGuardianRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveGuardianRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *RemoveGuardianRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveGuardianRequest.Merge(m, src) +} +func (m *RemoveGuardianRequest) XXX_Size() int { + return m.Size() +} +func (m *RemoveGuardianRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveGuardianRequest.DiscardUnknown(m) } -func (c *msgClient) Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) { - out := new(ProvisionResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Provision", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_RemoveGuardianRequest proto.InternalMessageInfo + +func (m *RemoveGuardianRequest) GetGuardian() string { + if m != nil { + return m.Guardian } - return out, nil + return "" } -func (c *msgClient) HoldTransfer(ctx context.Context, in *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) { - out := new(HoldTransferResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/HoldTransfer", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type RemoveGuardianResponse struct { } -func (c *msgClient) ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) { - out := new(ReleaseTransferResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/ReleaseTransfer", in, out, opts...) - if err != nil { - return nil, err +func (m *RemoveGuardianResponse) Reset() { *m = RemoveGuardianResponse{} } +func (m *RemoveGuardianResponse) String() string { return proto.CompactTextString(m) } +func (*RemoveGuardianResponse) ProtoMessage() {} +func (*RemoveGuardianResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{17} +} +func (m *RemoveGuardianResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveGuardianResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveGuardianResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *RemoveGuardianResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveGuardianResponse.Merge(m, src) +} +func (m *RemoveGuardianResponse) XXX_Size() int { + return m.Size() +} +func (m *RemoveGuardianResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveGuardianResponse.DiscardUnknown(m) } -func (c *msgClient) RemoveProvision(ctx context.Context, in *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) { - out := new(RemoveProvisionResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveProvision", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_RemoveGuardianResponse proto.InternalMessageInfo + +// AddOperatorRequest is input values required for adding an operator +type AddOperatorRequest struct { + // the operator address to be added + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` } -func (c *msgClient) ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) { - out := new(ClaimBatchResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/ClaimBatch", in, out, opts...) - if err != nil { - return nil, err +func (m *AddOperatorRequest) Reset() { *m = AddOperatorRequest{} } +func (m *AddOperatorRequest) String() string { return proto.CompactTextString(m) } +func (*AddOperatorRequest) ProtoMessage() {} +func (*AddOperatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{18} +} +func (m *AddOperatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddOperatorRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *AddOperatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddOperatorRequest.Merge(m, src) +} +func (m *AddOperatorRequest) XXX_Size() int { + return m.Size() +} +func (m *AddOperatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AddOperatorRequest.DiscardUnknown(m) } -func (c *msgClient) Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) { - out := new(ClaimResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Claim", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_AddOperatorRequest proto.InternalMessageInfo + +func (m *AddOperatorRequest) GetOperator() string { + if m != nil { + return m.Operator } - return out, nil + return "" } -// MsgServer is the server API for Msg service. -type MsgServer interface { - // Submit a transfer request to the bridge module. - Transfer(context.Context, *TransferRequest) (*TransferResponse, error) - // Submit a provision to the bridge module. - Provision(context.Context, *ProvisionRequest) (*ProvisionResponse, error) - // Set the time lock value from default value to uint64.max for specific confirmed provision. - HoldTransfer(context.Context, *HoldTransferRequest) (*HoldTransferResponse, error) - // Set the time lock value to 0 for specific confirmed provision. - ReleaseTransfer(context.Context, *ReleaseTransferRequest) (*ReleaseTransferResponse, error) - // Remove a specific confirmed provision (reset for specific sequence number). - RemoveProvision(context.Context, *RemoveProvisionRequest) (*RemoveProvisionResponse, error) - // ClaimBatch processes the claiming of multiple claimable provisions in a single operation - ClaimBatch(context.Context, *ClaimBatchRequest) (*ClaimBatchResponse, error) - // Claim processes the claiming of a provision with a specific sequence number - Claim(context.Context, *ClaimRequest) (*ClaimResponse, error) +type AddOperatorResponse struct { } -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { +func (m *AddOperatorResponse) Reset() { *m = AddOperatorResponse{} } +func (m *AddOperatorResponse) String() string { return proto.CompactTextString(m) } +func (*AddOperatorResponse) ProtoMessage() {} +func (*AddOperatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{19} +} +func (m *AddOperatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddOperatorResponse.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 *AddOperatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddOperatorResponse.Merge(m, src) +} +func (m *AddOperatorResponse) XXX_Size() int { + return m.Size() +} +func (m *AddOperatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AddOperatorResponse.DiscardUnknown(m) } -func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *TransferRequest) (*TransferResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") +var xxx_messageInfo_AddOperatorResponse proto.InternalMessageInfo + +// RemoveOperatorRequest is input values required for removing an operator +type RemoveOperatorRequest struct { + // the operator address to be removed + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` } -func (*UnimplementedMsgServer) Provision(ctx context.Context, req *ProvisionRequest) (*ProvisionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Provision not implemented") + +func (m *RemoveOperatorRequest) Reset() { *m = RemoveOperatorRequest{} } +func (m *RemoveOperatorRequest) String() string { return proto.CompactTextString(m) } +func (*RemoveOperatorRequest) ProtoMessage() {} +func (*RemoveOperatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{20} } -func (*UnimplementedMsgServer) HoldTransfer(ctx context.Context, req *HoldTransferRequest) (*HoldTransferResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HoldTransfer not implemented") +func (m *RemoveOperatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedMsgServer) ReleaseTransfer(ctx context.Context, req *ReleaseTransferRequest) (*ReleaseTransferResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReleaseTransfer not implemented") +func (m *RemoveOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveOperatorRequest.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 (*UnimplementedMsgServer) RemoveProvision(ctx context.Context, req *RemoveProvisionRequest) (*RemoveProvisionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveProvision not implemented") +func (m *RemoveOperatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveOperatorRequest.Merge(m, src) } -func (*UnimplementedMsgServer) ClaimBatch(ctx context.Context, req *ClaimBatchRequest) (*ClaimBatchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimBatch not implemented") +func (m *RemoveOperatorRequest) XXX_Size() int { + return m.Size() } -func (*UnimplementedMsgServer) Claim(ctx context.Context, req *ClaimRequest) (*ClaimResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") +func (m *RemoveOperatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveOperatorRequest.DiscardUnknown(m) } -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} +var xxx_messageInfo_RemoveOperatorRequest proto.InternalMessageInfo -func _Msg_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransferRequest) - 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", +func (m *RemoveOperatorRequest) GetOperator() string { + if m != nil { + return m.Operator } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Transfer(ctx, req.(*TransferRequest)) - } - return interceptor(ctx, in, info, handler) + return "" } -func _Msg_Provision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProvisionRequest) - 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.(*ProvisionRequest)) - } - return interceptor(ctx, in, info, handler) +type RemoveOperatorResponse struct { } -func _Msg_HoldTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HoldTransferRequest) - 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.(*HoldTransferRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *RemoveOperatorResponse) Reset() { *m = RemoveOperatorResponse{} } +func (m *RemoveOperatorResponse) String() string { return proto.CompactTextString(m) } +func (*RemoveOperatorResponse) ProtoMessage() {} +func (*RemoveOperatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{21} } - -func _Msg_ReleaseTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReleaseTransferRequest) - 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.(*ReleaseTransferRequest)) +func (m *RemoveOperatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveOperatorResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *RemoveOperatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveOperatorResponse.Merge(m, src) +} +func (m *RemoveOperatorResponse) XXX_Size() int { + return m.Size() +} +func (m *RemoveOperatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveOperatorResponse.DiscardUnknown(m) } -func _Msg_RemoveProvision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveProvisionRequest) - 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.(*RemoveProvisionRequest)) - } - return interceptor(ctx, in, info, handler) +var xxx_messageInfo_RemoveOperatorResponse proto.InternalMessageInfo + +// AddJudgeRequest is input values required for adding a judge +type AddJudgeRequest struct { + // the judge address to be added + Judge string `protobuf:"bytes,1,opt,name=judge,proto3" json:"judge,omitempty"` } -func _Msg_ClaimBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimBatchRequest) - 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.(*ClaimBatchRequest)) +func (m *AddJudgeRequest) Reset() { *m = AddJudgeRequest{} } +func (m *AddJudgeRequest) String() string { return proto.CompactTextString(m) } +func (*AddJudgeRequest) ProtoMessage() {} +func (*AddJudgeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{22} +} +func (m *AddJudgeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddJudgeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddJudgeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *AddJudgeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddJudgeRequest.Merge(m, src) +} +func (m *AddJudgeRequest) XXX_Size() int { + return m.Size() +} +func (m *AddJudgeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AddJudgeRequest.DiscardUnknown(m) } -func _Msg_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimRequest) - 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.(*ClaimRequest)) +var xxx_messageInfo_AddJudgeRequest proto.InternalMessageInfo + +func (m *AddJudgeRequest) GetJudge() string { + if m != nil { + return m.Judge } - return interceptor(ctx, in, info, handler) + return "" } -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, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lbm/fbridge/v1/tx.proto", +type AddJudgeResponse struct { } -func (m *TransferRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *AddJudgeResponse) Reset() { *m = AddJudgeResponse{} } +func (m *AddJudgeResponse) String() string { return proto.CompactTextString(m) } +func (*AddJudgeResponse) ProtoMessage() {} +func (*AddJudgeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{23} +} +func (m *AddJudgeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddJudgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddJudgeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *AddJudgeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddJudgeResponse.Merge(m, src) +} +func (m *AddJudgeResponse) XXX_Size() int { + return m.Size() +} +func (m *AddJudgeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AddJudgeResponse.DiscardUnknown(m) } -func (m *TransferRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_AddJudgeResponse proto.InternalMessageInfo + +// RemoveJudgeRequest is input values required for removing a judge +type RemoveJudgeRequest struct { + // the judge address to be removed + Judge string `protobuf:"bytes,1,opt,name=judge,proto3" json:"judge,omitempty"` } -func (m *TransferRequest) 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 +func (m *RemoveJudgeRequest) Reset() { *m = RemoveJudgeRequest{} } +func (m *RemoveJudgeRequest) String() string { return proto.CompactTextString(m) } +func (*RemoveJudgeRequest) ProtoMessage() {} +func (*RemoveJudgeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{24} +} +func (m *RemoveJudgeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveJudgeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveJudgeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, 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 b[:n], nil } - return len(dAtA) - i, nil +} +func (m *RemoveJudgeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveJudgeRequest.Merge(m, src) +} +func (m *RemoveJudgeRequest) XXX_Size() int { + return m.Size() +} +func (m *RemoveJudgeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveJudgeRequest.DiscardUnknown(m) } -func (m *TransferResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_RemoveJudgeRequest proto.InternalMessageInfo + +func (m *RemoveJudgeRequest) GetJudge() string { + if m != nil { + return m.Judge } - return dAtA[:n], nil + return "" } -func (m *TransferResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type RemoveJudgeResponse struct { } -func (m *TransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (m *RemoveJudgeResponse) Reset() { *m = RemoveJudgeResponse{} } +func (m *RemoveJudgeResponse) String() string { return proto.CompactTextString(m) } +func (*RemoveJudgeResponse) ProtoMessage() {} +func (*RemoveJudgeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{25} } - -func (m *ProvisionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *RemoveJudgeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveJudgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveJudgeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *RemoveJudgeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveJudgeResponse.Merge(m, src) +} +func (m *RemoveJudgeResponse) XXX_Size() int { + return m.Size() +} +func (m *RemoveJudgeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveJudgeResponse.DiscardUnknown(m) } -func (m *ProvisionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_RemoveJudgeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*TransferRequest)(nil), "lbm.fbridge.v1.TransferRequest") + proto.RegisterType((*TransferResponse)(nil), "lbm.fbridge.v1.TransferResponse") + proto.RegisterType((*ProvisionRequest)(nil), "lbm.fbridge.v1.ProvisionRequest") + proto.RegisterType((*ProvisionResponse)(nil), "lbm.fbridge.v1.ProvisionResponse") + proto.RegisterType((*HoldTransferRequest)(nil), "lbm.fbridge.v1.HoldTransferRequest") + proto.RegisterType((*HoldTransferResponse)(nil), "lbm.fbridge.v1.HoldTransferResponse") + proto.RegisterType((*ReleaseTransferRequest)(nil), "lbm.fbridge.v1.ReleaseTransferRequest") + proto.RegisterType((*ReleaseTransferResponse)(nil), "lbm.fbridge.v1.ReleaseTransferResponse") + proto.RegisterType((*RemoveProvisionRequest)(nil), "lbm.fbridge.v1.RemoveProvisionRequest") + proto.RegisterType((*RemoveProvisionResponse)(nil), "lbm.fbridge.v1.RemoveProvisionResponse") + proto.RegisterType((*ClaimBatchRequest)(nil), "lbm.fbridge.v1.ClaimBatchRequest") + proto.RegisterType((*ClaimBatchResponse)(nil), "lbm.fbridge.v1.ClaimBatchResponse") + proto.RegisterType((*ClaimRequest)(nil), "lbm.fbridge.v1.ClaimRequest") + proto.RegisterType((*ClaimResponse)(nil), "lbm.fbridge.v1.ClaimResponse") + proto.RegisterType((*AddGuardianRequest)(nil), "lbm.fbridge.v1.AddGuardianRequest") + proto.RegisterType((*AddGuardianResponse)(nil), "lbm.fbridge.v1.AddGuardianResponse") + proto.RegisterType((*RemoveGuardianRequest)(nil), "lbm.fbridge.v1.RemoveGuardianRequest") + proto.RegisterType((*RemoveGuardianResponse)(nil), "lbm.fbridge.v1.RemoveGuardianResponse") + proto.RegisterType((*AddOperatorRequest)(nil), "lbm.fbridge.v1.AddOperatorRequest") + proto.RegisterType((*AddOperatorResponse)(nil), "lbm.fbridge.v1.AddOperatorResponse") + proto.RegisterType((*RemoveOperatorRequest)(nil), "lbm.fbridge.v1.RemoveOperatorRequest") + proto.RegisterType((*RemoveOperatorResponse)(nil), "lbm.fbridge.v1.RemoveOperatorResponse") + proto.RegisterType((*AddJudgeRequest)(nil), "lbm.fbridge.v1.AddJudgeRequest") + proto.RegisterType((*AddJudgeResponse)(nil), "lbm.fbridge.v1.AddJudgeResponse") + proto.RegisterType((*RemoveJudgeRequest)(nil), "lbm.fbridge.v1.RemoveJudgeRequest") + proto.RegisterType((*RemoveJudgeResponse)(nil), "lbm.fbridge.v1.RemoveJudgeResponse") } -func (m *ProvisionRequest) 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] = 0x22 - 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] = 0x1a - } - 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] = 0x12 - } - if m.Seq != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } + +var fileDescriptor_54a336bc5ea063bb = []byte{ + // 716 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xef, 0x4e, 0xd3, 0x50, + 0x18, 0xc6, 0x57, 0x06, 0x64, 0xbc, 0x22, 0x83, 0xb3, 0x01, 0xb3, 0x91, 0x81, 0x45, 0xc1, 0x90, + 0xd8, 0xf2, 0xe7, 0x0a, 0x40, 0xe3, 0x1f, 0x12, 0x22, 0x99, 0xc6, 0x44, 0xbf, 0x90, 0x6e, 0x3d, + 0x94, 0xea, 0xda, 0x33, 0x7a, 0xba, 0x65, 0xde, 0x85, 0xde, 0x83, 0x17, 0xc3, 0x47, 0x3e, 0x1a, + 0x3f, 0x10, 0xc3, 0xae, 0xc3, 0xc4, 0xb4, 0x3d, 0xed, 0xda, 0x73, 0xda, 0x55, 0xe2, 0xb7, 0x9e, + 0x9e, 0xe7, 0xfd, 0x9d, 0x67, 0x6f, 0xce, 0xf3, 0xae, 0xb0, 0xda, 0x6d, 0xdb, 0xda, 0x79, 0xdb, + 0xb5, 0x0c, 0x13, 0x6b, 0x83, 0x3d, 0xcd, 0x1b, 0xaa, 0x3d, 0x97, 0x78, 0x04, 0x2d, 0x74, 0xdb, + 0xb6, 0xca, 0x36, 0xd4, 0xc1, 0x9e, 0x5c, 0x37, 0x89, 0x49, 0x82, 0x2d, 0xcd, 0x7f, 0x0a, 0x55, + 0xca, 0x77, 0x09, 0xaa, 0xef, 0x5d, 0xdd, 0xa1, 0xe7, 0xd8, 0x6d, 0xe1, 0xcb, 0x3e, 0xa6, 0x1e, + 0x5a, 0x81, 0x59, 0x8a, 0x1d, 0x03, 0xbb, 0x0d, 0x69, 0x43, 0x7a, 0x3a, 0xd7, 0x62, 0x2b, 0x24, + 0x43, 0xc5, 0xc5, 0x1d, 0x6c, 0x0d, 0xb0, 0xdb, 0x98, 0x0a, 0x76, 0xe2, 0x35, 0x3a, 0x86, 0x59, + 0xdd, 0x26, 0x7d, 0xc7, 0x6b, 0x94, 0xfd, 0x9d, 0xa3, 0xfd, 0xab, 0x9b, 0xf5, 0xd2, 0xaf, 0x9b, + 0xf5, 0x1d, 0xd3, 0xf2, 0x2e, 0xfa, 0x6d, 0xb5, 0x43, 0x6c, 0xed, 0xa5, 0xe5, 0xd0, 0xce, 0x85, + 0xa5, 0x6b, 0xe7, 0xec, 0xe1, 0x19, 0x35, 0xbe, 0x68, 0xde, 0xd7, 0x1e, 0xa6, 0xea, 0x1b, 0xc7, + 0x6b, 0x31, 0x82, 0x82, 0x60, 0x71, 0x6c, 0x89, 0xf6, 0x88, 0x43, 0xb1, 0xf2, 0x43, 0x82, 0xc5, + 0x53, 0x97, 0x0c, 0x2c, 0x6a, 0x11, 0x27, 0x32, 0xba, 0x08, 0x65, 0x8a, 0x2f, 0x03, 0x97, 0xd3, + 0x2d, 0xff, 0x31, 0x61, 0x7d, 0x2a, 0xd7, 0x7a, 0x39, 0xd7, 0xfa, 0xf4, 0x7f, 0x5b, 0xaf, 0xc1, + 0x52, 0xc2, 0x25, 0xf3, 0xbe, 0x0d, 0xb5, 0xd7, 0xa4, 0x6b, 0xf0, 0x6d, 0x16, 0xdc, 0x2b, 0x2b, + 0x50, 0x4f, 0x0b, 0x19, 0x60, 0x07, 0x56, 0x5a, 0xb8, 0x8b, 0x75, 0x8a, 0x8b, 0x19, 0x0f, 0x60, + 0x55, 0xd0, 0x26, 0x31, 0x36, 0x19, 0xe0, 0xe2, 0x46, 0x86, 0x18, 0x4e, 0xcb, 0x30, 0xfb, 0xb0, + 0xf4, 0xbc, 0xab, 0x5b, 0xf6, 0x91, 0xee, 0x75, 0x2e, 0x22, 0xc2, 0x1a, 0x80, 0xad, 0x0f, 0xcf, + 0x3a, 0xfe, 0x06, 0x65, 0xa0, 0x39, 0x5b, 0x1f, 0x06, 0x4a, 0xaa, 0xd4, 0x01, 0x25, 0x6b, 0x18, + 0x69, 0x03, 0xe6, 0x83, 0xb7, 0xf9, 0x36, 0xaa, 0x70, 0x9f, 0x29, 0x58, 0xc9, 0x2e, 0xa0, 0x43, + 0xc3, 0x78, 0xd5, 0xd7, 0x5d, 0xc3, 0xd2, 0x63, 0xff, 0x32, 0x54, 0x4c, 0xf6, 0x8a, 0xdd, 0xd9, + 0x78, 0xad, 0x2c, 0x43, 0x2d, 0x55, 0xc1, 0x40, 0x07, 0xb0, 0x1c, 0xfe, 0xc0, 0xbb, 0xb0, 0x1a, + 0x51, 0x07, 0x05, 0x5c, 0xe8, 0xeb, 0x6d, 0x0f, 0xbb, 0xba, 0x47, 0xdc, 0x04, 0x8b, 0xb0, 0x57, + 0x11, 0x2b, 0x5a, 0x33, 0x5f, 0xe3, 0x0a, 0xde, 0xd7, 0x5d, 0x58, 0xb1, 0x2f, 0x01, 0xb7, 0x0d, + 0xd5, 0x43, 0xc3, 0x38, 0xee, 0x1b, 0x26, 0x8e, 0x40, 0x75, 0x98, 0xf9, 0xec, 0xaf, 0x19, 0x25, + 0x5c, 0xf8, 0xa1, 0x1b, 0x0b, 0xe3, 0x0b, 0x83, 0x42, 0xec, 0x3f, 0xd4, 0x2f, 0x43, 0x2d, 0xa5, + 0x0d, 0x11, 0xfb, 0x7f, 0x2a, 0x50, 0x3e, 0xa1, 0x26, 0x3a, 0x81, 0x4a, 0x74, 0x1f, 0xd1, 0xba, + 0x9a, 0x1e, 0x4d, 0x2a, 0x77, 0xab, 0xe5, 0x8d, 0x7c, 0x41, 0x88, 0x45, 0xa7, 0x30, 0x17, 0x5f, + 0x4c, 0x24, 0xc8, 0xf9, 0xfb, 0x2d, 0x3f, 0x9a, 0xa0, 0x60, 0xc4, 0x8f, 0x30, 0x9f, 0xcc, 0x1e, + 0xda, 0xe4, 0x4b, 0x32, 0x22, 0x2c, 0x3f, 0x9e, 0x2c, 0x62, 0xe8, 0x36, 0x54, 0xb9, 0x48, 0xa2, + 0x2d, 0xbe, 0x30, 0x3b, 0xdf, 0xf2, 0x76, 0xa1, 0x2e, 0x79, 0x46, 0x2a, 0xaf, 0x59, 0x67, 0x64, + 0x85, 0x3f, 0xeb, 0x8c, 0xcc, 0xe0, 0xa3, 0x77, 0x00, 0xe3, 0x10, 0x23, 0xa1, 0xa7, 0xc2, 0x50, + 0x90, 0x95, 0x49, 0x12, 0x06, 0x7d, 0x01, 0x33, 0xc1, 0x5b, 0xf4, 0x30, 0x53, 0x1c, 0xa1, 0xd6, + 0x72, 0x76, 0x19, 0xe5, 0x03, 0xdc, 0x4b, 0x84, 0x1c, 0x09, 0x07, 0x8b, 0x33, 0x43, 0xde, 0x9c, + 0xa8, 0x61, 0xdc, 0x33, 0x58, 0x48, 0x07, 0x1e, 0x3d, 0xc9, 0xee, 0x16, 0x4f, 0xdf, 0x2a, 0x92, + 0xa5, 0x8c, 0x47, 0xb1, 0xcd, 0x34, 0xce, 0x0d, 0x82, 0x4c, 0xe3, 0x7c, 0xee, 0xc7, 0xc6, 0x63, + 0x74, 0x8e, 0x71, 0x9e, 0xbe, 0x55, 0x24, 0x63, 0x07, 0x9c, 0x40, 0x25, 0x9a, 0x17, 0x62, 0xa0, + 0xb9, 0x91, 0x23, 0x06, 0x9a, 0x1f, 0x35, 0x7e, 0x1f, 0x12, 0xe3, 0x43, 0xec, 0x83, 0x38, 0x87, + 0xc4, 0x3e, 0x64, 0xcc, 0x9f, 0xa3, 0xe3, 0xab, 0xdb, 0xa6, 0x74, 0x7d, 0xdb, 0x94, 0x7e, 0xdf, + 0x36, 0xa5, 0x6f, 0xa3, 0x66, 0xe9, 0x7a, 0xd4, 0x2c, 0xfd, 0x1c, 0x35, 0x4b, 0x9f, 0x76, 0x0b, + 0xff, 0xde, 0x87, 0xf1, 0x77, 0x55, 0xf0, 0x47, 0xdf, 0x9e, 0x0d, 0x3e, 0x99, 0x0e, 0xfe, 0x06, + 0x00, 0x00, 0xff, 0xff, 0xe3, 0xc7, 0x5c, 0xd8, 0x73, 0x09, 0x00, 0x00, } -func (m *ProvisionResponse) 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 +// 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 *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) + // Submit a provision to the bridge module. + Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) + // Set the time lock value from default value to uint64.max for specific confirmed provision. + HoldTransfer(ctx context.Context, in *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) + // Set the time lock value to 0 for specific confirmed provision. + ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) + // Remove a specific confirmed provision (reset for specific sequence number). + RemoveProvision(ctx context.Context, in *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) + // Claim processes the claiming of a provision with a specific sequence number + Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) + // AddGuardian adds a guardian to the bridge module. + AddGuardian(ctx context.Context, in *AddGuardianRequest, opts ...grpc.CallOption) (*AddGuardianResponse, error) + // RemoveGuardian removes a guardian from the bridge module. + RemoveGuardian(ctx context.Context, in *RemoveGuardianRequest, opts ...grpc.CallOption) (*RemoveGuardianResponse, error) + // AddOperator adds an operator to the bridge module. + AddOperator(ctx context.Context, in *AddOperatorRequest, opts ...grpc.CallOption) (*AddOperatorResponse, error) + // RemoveOperator removes an operator from the bridge module. + RemoveOperator(ctx context.Context, in *RemoveOperatorRequest, opts ...grpc.CallOption) (*RemoveOperatorResponse, error) + // AddJudge adds a judge to the bridge module. + AddJudge(ctx context.Context, in *AddJudgeRequest, opts ...grpc.CallOption) (*AddJudgeResponse, error) + // RemoveJudge removes a judge from the bridge module. + RemoveJudge(ctx context.Context, in *RemoveJudgeRequest, opts ...grpc.CallOption) (*RemoveJudgeResponse, error) } -func (m *ProvisionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type msgClient struct { + cc grpc1.ClientConn } -func (m *ProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} } -func (m *HoldTransferRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) { + out := new(TransferResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Transfer", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *HoldTransferRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *HoldTransferRequest) 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] = 0x8 +func (c *msgClient) Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) { + out := new(ProvisionResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Provision", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *HoldTransferResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) HoldTransfer(ctx context.Context, in *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) { + out := new(HoldTransferResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/HoldTransfer", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *HoldTransferResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) { + out := new(ReleaseTransferResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/ReleaseTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *HoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *msgClient) RemoveProvision(ctx context.Context, in *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) { + out := new(RemoveProvisionResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveProvision", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *ReleaseTransferRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) { + out := new(ClaimBatchResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/ClaimBatch", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *ReleaseTransferRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) { + out := new(ClaimResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Claim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *ReleaseTransferRequest) 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] = 0x8 +func (c *msgClient) AddGuardian(ctx context.Context, in *AddGuardianRequest, opts ...grpc.CallOption) (*AddGuardianResponse, error) { + out := new(AddGuardianResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddGuardian", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *ReleaseTransferResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) RemoveGuardian(ctx context.Context, in *RemoveGuardianRequest, opts ...grpc.CallOption) (*RemoveGuardianResponse, error) { + out := new(RemoveGuardianResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveGuardian", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *ReleaseTransferResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) AddOperator(ctx context.Context, in *AddOperatorRequest, opts ...grpc.CallOption) (*AddOperatorResponse, error) { + out := new(AddOperatorResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddOperator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *ReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *msgClient) RemoveOperator(ctx context.Context, in *RemoveOperatorRequest, opts ...grpc.CallOption) (*RemoveOperatorResponse, error) { + out := new(RemoveOperatorResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveOperator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *RemoveProvisionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) AddJudge(ctx context.Context, in *AddJudgeRequest, opts ...grpc.CallOption) (*AddJudgeResponse, error) { + out := new(AddJudgeResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddJudge", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *RemoveProvisionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) RemoveJudge(ctx context.Context, in *RemoveJudgeRequest, opts ...grpc.CallOption) (*RemoveJudgeResponse, error) { + out := new(RemoveJudgeResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveJudge", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *RemoveProvisionRequest) 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] = 0x8 - } - return len(dAtA) - i, nil +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Submit a transfer request to the bridge module. + Transfer(context.Context, *TransferRequest) (*TransferResponse, error) + // Submit a provision to the bridge module. + Provision(context.Context, *ProvisionRequest) (*ProvisionResponse, error) + // Set the time lock value from default value to uint64.max for specific confirmed provision. + HoldTransfer(context.Context, *HoldTransferRequest) (*HoldTransferResponse, error) + // Set the time lock value to 0 for specific confirmed provision. + ReleaseTransfer(context.Context, *ReleaseTransferRequest) (*ReleaseTransferResponse, error) + // Remove a specific confirmed provision (reset for specific sequence number). + RemoveProvision(context.Context, *RemoveProvisionRequest) (*RemoveProvisionResponse, error) + // ClaimBatch processes the claiming of multiple claimable provisions in a single operation + ClaimBatch(context.Context, *ClaimBatchRequest) (*ClaimBatchResponse, error) + // Claim processes the claiming of a provision with a specific sequence number + Claim(context.Context, *ClaimRequest) (*ClaimResponse, error) + // AddGuardian adds a guardian to the bridge module. + AddGuardian(context.Context, *AddGuardianRequest) (*AddGuardianResponse, error) + // RemoveGuardian removes a guardian from the bridge module. + RemoveGuardian(context.Context, *RemoveGuardianRequest) (*RemoveGuardianResponse, error) + // AddOperator adds an operator to the bridge module. + AddOperator(context.Context, *AddOperatorRequest) (*AddOperatorResponse, error) + // RemoveOperator removes an operator from the bridge module. + RemoveOperator(context.Context, *RemoveOperatorRequest) (*RemoveOperatorResponse, error) + // AddJudge adds a judge to the bridge module. + AddJudge(context.Context, *AddJudgeRequest) (*AddJudgeResponse, error) + // RemoveJudge removes a judge from the bridge module. + RemoveJudge(context.Context, *RemoveJudgeRequest) (*RemoveJudgeResponse, error) } -func (m *RemoveProvisionResponse) 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 +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { } -func (m *RemoveProvisionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *TransferRequest) (*TransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") } - -func (m *RemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (*UnimplementedMsgServer) Provision(ctx context.Context, req *ProvisionRequest) (*ProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Provision not implemented") } - -func (m *ClaimBatchRequest) 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 (*UnimplementedMsgServer) HoldTransfer(ctx context.Context, req *HoldTransferRequest) (*HoldTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HoldTransfer not implemented") } - -func (m *ClaimBatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedMsgServer) ReleaseTransfer(ctx context.Context, req *ReleaseTransferRequest) (*ReleaseTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReleaseTransfer not implemented") } - -func (m *ClaimBatchRequest) 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] = 0x8 - } - return len(dAtA) - i, nil +func (*UnimplementedMsgServer) RemoveProvision(ctx context.Context, req *RemoveProvisionRequest) (*RemoveProvisionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveProvision not implemented") } - -func (m *ClaimBatchResponse) 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 (*UnimplementedMsgServer) ClaimBatch(ctx context.Context, req *ClaimBatchRequest) (*ClaimBatchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimBatch not implemented") } - -func (m *ClaimBatchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedMsgServer) Claim(ctx context.Context, req *ClaimRequest) (*ClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") } - -func (m *ClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (*UnimplementedMsgServer) AddGuardian(ctx context.Context, req *AddGuardianRequest) (*AddGuardianResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddGuardian not implemented") } - -func (m *ClaimRequest) 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 (*UnimplementedMsgServer) RemoveGuardian(ctx context.Context, req *RemoveGuardianRequest) (*RemoveGuardianResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveGuardian not implemented") } - -func (m *ClaimRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedMsgServer) AddOperator(ctx context.Context, req *AddOperatorRequest) (*AddOperatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddOperator not implemented") } - -func (m *ClaimRequest) 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] = 0x8 - } - return len(dAtA) - i, nil +func (*UnimplementedMsgServer) RemoveOperator(ctx context.Context, req *RemoveOperatorRequest) (*RemoveOperatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveOperator not implemented") } - -func (m *ClaimResponse) 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 (*UnimplementedMsgServer) AddJudge(ctx context.Context, req *AddJudgeRequest) (*AddJudgeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddJudge not implemented") } - -func (m *ClaimResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedMsgServer) RemoveJudge(ctx context.Context, req *RemoveJudgeRequest) (*RemoveJudgeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveJudge not implemented") } -func (m *ClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) } -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++ +func _Msg_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransferRequest) + if err := dec(in); err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base -} -func (m *TransferRequest) Size() (n int) { - if m == nil { - return 0 + if interceptor == nil { + return srv.(MsgServer).Transfer(ctx, in) } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/Transfer", } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Transfer(ctx, req.(*TransferRequest)) } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return interceptor(ctx, in, info, handler) } -func (m *TransferResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_Provision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProvisionRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + 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.(*ProvisionRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ProvisionRequest) Size() (n int) { - if m == nil { - return 0 +func _Msg_HoldTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HoldTransferRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) + if interceptor == nil { + return srv.(MsgServer).HoldTransfer(ctx, in) } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/HoldTransfer", } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).HoldTransfer(ctx, req.(*HoldTransferRequest)) } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return interceptor(ctx, in, info, handler) } -func (m *ProvisionResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_ReleaseTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReleaseTransferRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + 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.(*ReleaseTransferRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *HoldTransferRequest) Size() (n int) { - if m == nil { - return 0 +func _Msg_RemoveProvision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveProvisionRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) + if interceptor == nil { + return srv.(MsgServer).RemoveProvision(ctx, in) } - return n + 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.(*RemoveProvisionRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *HoldTransferResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_ClaimBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimBatchRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + 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.(*ClaimBatchRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ReleaseTransferRequest) Size() (n int) { - if m == nil { - return 0 +func _Msg_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) + if interceptor == nil { + return srv.(MsgServer).Claim(ctx, in) } - return n + 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.(*ClaimRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ReleaseTransferResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_AddGuardian_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddGuardianRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + if interceptor == nil { + return srv.(MsgServer).AddGuardian(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/AddGuardian", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddGuardian(ctx, req.(*AddGuardianRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *RemoveProvisionRequest) Size() (n int) { - if m == nil { - return 0 +func _Msg_RemoveGuardian_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveGuardianRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) + if interceptor == nil { + return srv.(MsgServer).RemoveGuardian(ctx, in) } - return n + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/RemoveGuardian", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveGuardian(ctx, req.(*RemoveGuardianRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *RemoveProvisionResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_AddOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddOperatorRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + if interceptor == nil { + return srv.(MsgServer).AddOperator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/AddOperator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddOperator(ctx, req.(*AddOperatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ClaimBatchRequest) Size() (n int) { - if m == nil { - return 0 +func _Msg_RemoveOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveOperatorRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - if m.MaxClaims != 0 { - n += 1 + sovTx(uint64(m.MaxClaims)) + if interceptor == nil { + return srv.(MsgServer).RemoveOperator(ctx, in) } - return n + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/RemoveOperator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveOperator(ctx, req.(*RemoveOperatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ClaimBatchResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_AddJudge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddJudgeRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + if interceptor == nil { + return srv.(MsgServer).AddJudge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/AddJudge", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddJudge(ctx, req.(*AddJudgeRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ClaimRequest) Size() (n int) { - if m == nil { - return 0 +func _Msg_RemoveJudge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveJudgeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveJudge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fbridge.v1.Msg/RemoveJudge", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveJudge(ctx, req.(*RemoveJudgeRequest)) + } + 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: "AddGuardian", + Handler: _Msg_AddGuardian_Handler, + }, + { + MethodName: "RemoveGuardian", + Handler: _Msg_RemoveGuardian_Handler, + }, + { + MethodName: "AddOperator", + Handler: _Msg_AddOperator_Handler, + }, + { + MethodName: "RemoveOperator", + Handler: _Msg_RemoveOperator_Handler, + }, + { + MethodName: "AddJudge", + Handler: _Msg_AddJudge_Handler, + }, + { + MethodName: "RemoveJudge", + Handler: _Msg_RemoveJudge_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lbm/fbridge/v1/tx.proto", +} + +func (m *TransferRequest) 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 *TransferRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) + { + 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 *TransferResponse) 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 *TransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ProvisionRequest) 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 *ProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProvisionRequest) 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] = 0x22 + 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] = 0x1a + } + 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] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ProvisionResponse) 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 *ProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *HoldTransferRequest) 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 *HoldTransferRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HoldTransferRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *HoldTransferResponse) 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 *HoldTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ReleaseTransferRequest) 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 *ReleaseTransferRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReleaseTransferRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ReleaseTransferResponse) 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 *ReleaseTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RemoveProvisionRequest) 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 *RemoveProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveProvisionRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RemoveProvisionResponse) 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 *RemoveProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ClaimBatchRequest) 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 *ClaimBatchRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimBatchRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ClaimBatchResponse) 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 *ClaimBatchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ClaimRequest) 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 *ClaimRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimRequest) 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] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ClaimResponse) 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 *ClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *AddGuardianRequest) 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 *AddGuardianRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddGuardianRequest) 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 *AddGuardianResponse) 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 *AddGuardianResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddGuardianResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RemoveGuardianRequest) 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 *RemoveGuardianRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveGuardianRequest) 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 *RemoveGuardianResponse) 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 *RemoveGuardianResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveGuardianResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *AddOperatorRequest) 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 *AddOperatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddOperatorRequest) 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 = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AddOperatorResponse) 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 *AddOperatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RemoveOperatorRequest) 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 *RemoveOperatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveOperatorRequest) 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 = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RemoveOperatorResponse) 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 *RemoveOperatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *AddJudgeRequest) 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 *AddJudgeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddJudgeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Judge) > 0 { + i -= len(m.Judge) + copy(dAtA[i:], m.Judge) + i = encodeVarintTx(dAtA, i, uint64(len(m.Judge))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AddJudgeResponse) 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 *AddJudgeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddJudgeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RemoveJudgeRequest) 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 *RemoveJudgeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveJudgeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Judge) > 0 { + i -= len(m.Judge) + copy(dAtA[i:], m.Judge) + i = encodeVarintTx(dAtA, i, uint64(len(m.Judge))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RemoveJudgeResponse) 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 *RemoveJudgeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveJudgeResponse) 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 *TransferRequest) 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 *TransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ProvisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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 *ProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *HoldTransferRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *HoldTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ReleaseTransferRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *ReleaseTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RemoveProvisionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *RemoveProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ClaimBatchRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxClaims != 0 { + n += 1 + sovTx(uint64(m.MaxClaims)) + } + return n +} + +func (m *ClaimBatchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ClaimRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n +} + +func (m *ClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *AddGuardianRequest) 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 *AddGuardianResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RemoveGuardianRequest) 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 *RemoveGuardianResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *AddOperatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *AddOperatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RemoveOperatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *RemoveOperatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *AddJudgeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Judge) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *AddJudgeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RemoveJudgeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Judge) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *RemoveJudgeResponse) 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 *TransferRequest) 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: TransferRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferRequest: 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 *TransferResponse) 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: TransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferResponse: 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 *ProvisionRequest) 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: ProvisionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProvisionRequest: 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 ErrIntOverflowTx + } + 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 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 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 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 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 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 *ProvisionResponse) 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: ProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProvisionResponse: 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 *HoldTransferRequest) 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: HoldTransferRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HoldTransferRequest: 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 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 *HoldTransferResponse) 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: HoldTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HoldTransferResponse: 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 *ReleaseTransferRequest) 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: ReleaseTransferRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReleaseTransferRequest: 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 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 *ReleaseTransferResponse) 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: ReleaseTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReleaseTransferResponse: 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 + } } - return n -} -func (m *ClaimResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - 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)))) + return nil } -func (m *TransferRequest) Unmarshal(dAtA []byte) error { +func (m *RemoveProvisionRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1604,17 +3451,17 @@ func (m *TransferRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TransferRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveProvisionRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TransferRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveProvisionRequest: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - var stringLen uint64 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1624,29 +3471,116 @@ func (m *TransferRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Seq |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveProvisionResponse) 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: RemoveProvisionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveProvisionResponse: 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 postIndex > l { + if (iNdEx + skippy) > 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) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClaimBatchRequest) 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 } - var stringLen uint64 + 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: ClaimBatchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimBatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 @@ -1656,29 +3590,116 @@ func (m *TransferRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.MaxClaims |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClaimBatchResponse) 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: ClaimBatchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimBatchResponse: 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 postIndex > l { + if (iNdEx + skippy) > 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) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClaimRequest) 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: ClaimRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimRequest: 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) } - var stringLen uint64 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1688,26 +3709,11 @@ func (m *TransferRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Seq |= 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:]) @@ -1729,7 +3735,7 @@ func (m *TransferRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TransferResponse) Unmarshal(dAtA []byte) error { +func (m *ClaimResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1752,10 +3758,10 @@ func (m *TransferResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TransferResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ClaimResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1779,7 +3785,7 @@ func (m *TransferResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProvisionRequest) Unmarshal(dAtA []byte) error { +func (m *AddGuardianRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1802,98 +3808,15 @@ func (m *ProvisionRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProvisionRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AddGuardianRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddGuardianRequest: 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 ErrIntOverflowTx - } - 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 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 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 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 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Guardian", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1921,9 +3844,7 @@ func (m *ProvisionRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Guardian = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1946,7 +3867,7 @@ func (m *ProvisionRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProvisionResponse) Unmarshal(dAtA []byte) error { +func (m *AddGuardianResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1969,10 +3890,10 @@ func (m *ProvisionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProvisionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AddGuardianResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddGuardianResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1996,7 +3917,7 @@ func (m *ProvisionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *HoldTransferRequest) Unmarshal(dAtA []byte) error { +func (m *RemoveGuardianRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2019,17 +3940,17 @@ func (m *HoldTransferRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HoldTransferRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveGuardianRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HoldTransferRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveGuardianRequest: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Guardian", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2039,11 +3960,24 @@ func (m *HoldTransferRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + 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:]) @@ -2065,7 +3999,7 @@ func (m *HoldTransferRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *HoldTransferResponse) Unmarshal(dAtA []byte) error { +func (m *RemoveGuardianResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2088,10 +4022,10 @@ func (m *HoldTransferResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HoldTransferResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveGuardianResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HoldTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveGuardianResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2115,7 +4049,7 @@ func (m *HoldTransferResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { +func (m *AddOperatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2138,17 +4072,17 @@ func (m *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReleaseTransferRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AddOperatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReleaseTransferRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddOperatorRequest: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2158,11 +4092,24 @@ func (m *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2184,7 +4131,7 @@ func (m *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReleaseTransferResponse) Unmarshal(dAtA []byte) error { +func (m *AddOperatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2207,10 +4154,10 @@ func (m *ReleaseTransferResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReleaseTransferResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AddOperatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReleaseTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2234,7 +4181,7 @@ func (m *ReleaseTransferResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveProvisionRequest) Unmarshal(dAtA []byte) error { +func (m *RemoveOperatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2257,17 +4204,17 @@ func (m *RemoveProvisionRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveProvisionRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveOperatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveOperatorRequest: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2277,11 +4224,24 @@ func (m *RemoveProvisionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2303,7 +4263,7 @@ func (m *RemoveProvisionRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveProvisionResponse) Unmarshal(dAtA []byte) error { +func (m *RemoveOperatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2326,10 +4286,10 @@ func (m *RemoveProvisionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveProvisionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveOperatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2353,7 +4313,7 @@ func (m *RemoveProvisionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimBatchRequest) Unmarshal(dAtA []byte) error { +func (m *AddJudgeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2376,17 +4336,17 @@ func (m *ClaimBatchRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimBatchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AddJudgeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimBatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddJudgeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxClaims", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Judge", wireType) } - m.MaxClaims = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2396,11 +4356,24 @@ func (m *ClaimBatchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxClaims |= uint64(b&0x7F) << shift + 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.Judge = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2422,7 +4395,7 @@ func (m *ClaimBatchRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimBatchResponse) Unmarshal(dAtA []byte) error { +func (m *AddJudgeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2445,10 +4418,10 @@ func (m *ClaimBatchResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimBatchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AddJudgeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddJudgeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2472,7 +4445,7 @@ func (m *ClaimBatchResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimRequest) Unmarshal(dAtA []byte) error { +func (m *RemoveJudgeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2495,17 +4468,17 @@ func (m *ClaimRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveJudgeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveJudgeRequest: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Judge", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2515,11 +4488,24 @@ func (m *ClaimRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + 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.Judge = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2541,7 +4527,7 @@ func (m *ClaimRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimResponse) Unmarshal(dAtA []byte) error { +func (m *RemoveJudgeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2564,10 +4550,10 @@ func (m *ClaimResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveJudgeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveJudgeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From f958df5e45a0d4a2ba416337a68fa3a053f3d0df Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Wed, 24 Apr 2024 15:37:43 +0900 Subject: [PATCH 04/12] chore --- docs/core/proto-docs.md | 297 +-- proto/lbm/fbridge/v1/fbridge.proto | 8 + proto/lbm/fbridge/v1/tx.proto | 135 +- x/fbridge/types/codec.go | 1 + x/fbridge/types/fbridge.pb.go | 98 +- x/fbridge/types/keys.go | 1 + x/fbridge/types/tx.pb.go | 3215 +++++++--------------------- 7 files changed, 1010 insertions(+), 2745 deletions(-) create mode 100644 x/fbridge/types/codec.go create mode 100644 x/fbridge/types/keys.go diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 1eae22170a..9b9e3b6978 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -766,6 +766,8 @@ - [ProvisionData](#lbm.fbridge.v1.ProvisionData) - [ProvisionStatus](#lbm.fbridge.v1.ProvisionStatus) + - [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) @@ -799,32 +801,22 @@ - [Query](#lbm.fbridge.v1.Query) - [lbm/fbridge/v1/tx.proto](#lbm/fbridge/v1/tx.proto) - - [AddGuardianRequest](#lbm.fbridge.v1.AddGuardianRequest) - - [AddGuardianResponse](#lbm.fbridge.v1.AddGuardianResponse) - - [AddJudgeRequest](#lbm.fbridge.v1.AddJudgeRequest) - - [AddJudgeResponse](#lbm.fbridge.v1.AddJudgeResponse) - - [AddOperatorRequest](#lbm.fbridge.v1.AddOperatorRequest) - - [AddOperatorResponse](#lbm.fbridge.v1.AddOperatorResponse) - - [ClaimBatchRequest](#lbm.fbridge.v1.ClaimBatchRequest) - - [ClaimBatchResponse](#lbm.fbridge.v1.ClaimBatchResponse) - - [ClaimRequest](#lbm.fbridge.v1.ClaimRequest) - - [ClaimResponse](#lbm.fbridge.v1.ClaimResponse) - - [HoldTransferRequest](#lbm.fbridge.v1.HoldTransferRequest) - - [HoldTransferResponse](#lbm.fbridge.v1.HoldTransferResponse) - - [ProvisionRequest](#lbm.fbridge.v1.ProvisionRequest) - - [ProvisionResponse](#lbm.fbridge.v1.ProvisionResponse) - - [ReleaseTransferRequest](#lbm.fbridge.v1.ReleaseTransferRequest) - - [ReleaseTransferResponse](#lbm.fbridge.v1.ReleaseTransferResponse) - - [RemoveGuardianRequest](#lbm.fbridge.v1.RemoveGuardianRequest) - - [RemoveGuardianResponse](#lbm.fbridge.v1.RemoveGuardianResponse) - - [RemoveJudgeRequest](#lbm.fbridge.v1.RemoveJudgeRequest) - - [RemoveJudgeResponse](#lbm.fbridge.v1.RemoveJudgeResponse) - - [RemoveOperatorRequest](#lbm.fbridge.v1.RemoveOperatorRequest) - - [RemoveOperatorResponse](#lbm.fbridge.v1.RemoveOperatorResponse) - - [RemoveProvisionRequest](#lbm.fbridge.v1.RemoveProvisionRequest) - - [RemoveProvisionResponse](#lbm.fbridge.v1.RemoveProvisionResponse) - - [TransferRequest](#lbm.fbridge.v1.TransferRequest) - - [TransferResponse](#lbm.fbridge.v1.TransferResponse) + - [MsgClaim](#lbm.fbridge.v1.MsgClaim) + - [MsgClaimBatch](#lbm.fbridge.v1.MsgClaimBatch) + - [MsgClaimBatchResponse](#lbm.fbridge.v1.MsgClaimBatchResponse) + - [MsgClaimResponse](#lbm.fbridge.v1.MsgClaimResponse) + - [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) + - [MsgTransfer](#lbm.fbridge.v1.MsgTransfer) + - [MsgTransferResponse](#lbm.fbridge.v1.MsgTransferResponse) + - [MsgUpdateRole](#lbm.fbridge.v1.MsgUpdateRole) + - [MsgUpdateRoleResponse](#lbm.fbridge.v1.MsgUpdateRoleResponse) - [Msg](#lbm.fbridge.v1.Msg) @@ -11539,6 +11531,20 @@ To optimize computational cost, we have collected frequently changing values fro + + + +### Role +Role defines the role of the operator, guardian, and judge. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNSPECIFIED | 0 | | +| GUARDIAN | 1 | | +| OPERATOR | 2 | | +| JUDGE | 3 | | + + @@ -11987,85 +11993,25 @@ GenesisState defines the fbridge module's genesis state. - + -### AddGuardianRequest -AddGuardianRequest is input values required for adding a guardian +### MsgClaim +MsgClaim is input values required for claiming a provision | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `guardian` | [string](#string) | | the guardian address to be added | - - - - - - - - -### AddGuardianResponse - - - - - - - - - -### AddJudgeRequest -AddJudgeRequest is input values required for adding a judge - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `judge` | [string](#string) | | the judge address to be added | - - - - - - - - -### AddJudgeResponse - - - - - - - - - -### AddOperatorRequest -AddOperatorRequest is input values required for adding an operator - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `operator` | [string](#string) | | the operator address to be added | - - - - - - - - -### AddOperatorResponse - +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | - + -### ClaimBatchRequest -ClaimBatchRequest is input values required for claiming multiple claimable provisions +### MsgClaimBatch +MsgClaimBatch is input values required for claiming multiple claimable provisions | Field | Type | Label | Description | @@ -12077,9 +12023,9 @@ ClaimBatchRequest is input values required for claiming multiple claimable provi - + -### ClaimBatchResponse +### MsgClaimBatchResponse @@ -12087,35 +12033,20 @@ ClaimBatchRequest is input values required for claiming multiple claimable provi - + -### ClaimRequest -ClaimRequest is input values required for claiming a provision +### MsgClaimResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | - - - - - - - -### ClaimResponse + - - - - -### HoldTransferRequest -HoldTransferRequest is input values required for holding transfer +### MsgHoldTransfer +MsgHoldTransfer is input values required for holding transfer | Field | Type | Label | Description | @@ -12127,9 +12058,9 @@ HoldTransferRequest is input values required for holding transfer - + -### HoldTransferResponse +### MsgHoldTransferResponse @@ -12137,10 +12068,10 @@ HoldTransferRequest is input values required for holding transfer - + -### ProvisionRequest -ProvisionRequest is input values required for provisioning +### MsgProvision +MsgProvision is input values required for provisioning | Field | Type | Label | Description | @@ -12155,9 +12086,9 @@ ProvisionRequest is input values required for provisioning - + -### ProvisionResponse +### MsgProvisionResponse @@ -12165,10 +12096,10 @@ ProvisionRequest is input values required for provisioning - + -### ReleaseTransferRequest -ReleaseTransferRequest is input values required for releasing a held transfer by time lock +### MsgReleaseTransfer +MsgReleaseTransfer is input values required for releasing a held transfer by time lock | Field | Type | Label | Description | @@ -12180,84 +12111,34 @@ ReleaseTransferRequest is input values required for releasing a held transfer by - - -### ReleaseTransferResponse - - - - - - - - - -### RemoveGuardianRequest -RemoveGuardianRequest is input values required for removing a guardian - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `guardian` | [string](#string) | | the guardian address to be removed | - - - - - - - - -### RemoveGuardianResponse - - - - - - - - - -### RemoveJudgeRequest -RemoveJudgeRequest is input values required for removing a judge - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `judge` | [string](#string) | | the judge address to be removed | - - - - + +### MsgReleaseTransferResponse - -### RemoveJudgeResponse + - - - -### RemoveOperatorRequest -RemoveOperatorRequest is input values required for removing an operator +### MsgRemoveProvision +MsgRemoveProvision is input values required for removing a specific confirmed provision | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `operator` | [string](#string) | | the operator address to be removed | +| `seq` | [uint64](#uint64) | | the sequence number of the bridge request | - + -### RemoveOperatorResponse +### MsgRemoveProvisionResponse @@ -12265,24 +12146,26 @@ RemoveOperatorRequest is input values required for removing an operator - + -### RemoveProvisionRequest -RemoveProvisionRequest is input values required for removing a specific confirmed provision +### MsgTransfer +MsgTransfer is input values required for bridge transfer | 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 | - + -### RemoveProvisionResponse +### MsgTransferResponse @@ -12290,26 +12173,25 @@ RemoveProvisionRequest is input values required for removing a specific confirme - + -### TransferRequest -TransferRequest is input values required for bridge transfer +### MsgUpdateRole +MsgUpdateRole is input values required for updating the role of an address | 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 | +| `address` | [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 | - + -### TransferResponse +### MsgUpdateRoleResponse @@ -12330,19 +12212,14 @@ TransferRequest is input values required for bridge transfer | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Transfer` | [TransferRequest](#lbm.fbridge.v1.TransferRequest) | [TransferResponse](#lbm.fbridge.v1.TransferResponse) | Submit a transfer request to the bridge module. | | -| `Provision` | [ProvisionRequest](#lbm.fbridge.v1.ProvisionRequest) | [ProvisionResponse](#lbm.fbridge.v1.ProvisionResponse) | Submit a provision to the bridge module. | | -| `HoldTransfer` | [HoldTransferRequest](#lbm.fbridge.v1.HoldTransferRequest) | [HoldTransferResponse](#lbm.fbridge.v1.HoldTransferResponse) | Set the time lock value from default value to uint64.max for specific confirmed provision. | | -| `ReleaseTransfer` | [ReleaseTransferRequest](#lbm.fbridge.v1.ReleaseTransferRequest) | [ReleaseTransferResponse](#lbm.fbridge.v1.ReleaseTransferResponse) | Set the time lock value to 0 for specific confirmed provision. | | -| `RemoveProvision` | [RemoveProvisionRequest](#lbm.fbridge.v1.RemoveProvisionRequest) | [RemoveProvisionResponse](#lbm.fbridge.v1.RemoveProvisionResponse) | Remove a specific confirmed provision (reset for specific sequence number). | | -| `ClaimBatch` | [ClaimBatchRequest](#lbm.fbridge.v1.ClaimBatchRequest) | [ClaimBatchResponse](#lbm.fbridge.v1.ClaimBatchResponse) | ClaimBatch processes the claiming of multiple claimable provisions in a single operation | | -| `Claim` | [ClaimRequest](#lbm.fbridge.v1.ClaimRequest) | [ClaimResponse](#lbm.fbridge.v1.ClaimResponse) | Claim processes the claiming of a provision with a specific sequence number | | -| `AddGuardian` | [AddGuardianRequest](#lbm.fbridge.v1.AddGuardianRequest) | [AddGuardianResponse](#lbm.fbridge.v1.AddGuardianResponse) | AddGuardian adds a guardian to the bridge module. | | -| `RemoveGuardian` | [RemoveGuardianRequest](#lbm.fbridge.v1.RemoveGuardianRequest) | [RemoveGuardianResponse](#lbm.fbridge.v1.RemoveGuardianResponse) | RemoveGuardian removes a guardian from the bridge module. | | -| `AddOperator` | [AddOperatorRequest](#lbm.fbridge.v1.AddOperatorRequest) | [AddOperatorResponse](#lbm.fbridge.v1.AddOperatorResponse) | AddOperator adds an operator to the bridge module. | | -| `RemoveOperator` | [RemoveOperatorRequest](#lbm.fbridge.v1.RemoveOperatorRequest) | [RemoveOperatorResponse](#lbm.fbridge.v1.RemoveOperatorResponse) | RemoveOperator removes an operator from the bridge module. | | -| `AddJudge` | [AddJudgeRequest](#lbm.fbridge.v1.AddJudgeRequest) | [AddJudgeResponse](#lbm.fbridge.v1.AddJudgeResponse) | AddJudge adds a judge to the bridge module. | | -| `RemoveJudge` | [RemoveJudgeRequest](#lbm.fbridge.v1.RemoveJudgeRequest) | [RemoveJudgeResponse](#lbm.fbridge.v1.RemoveJudgeResponse) | RemoveJudge removes a judge from the bridge module. | | +| `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 | | +| `UpdateRole` | [MsgUpdateRole](#lbm.fbridge.v1.MsgUpdateRole) | [MsgUpdateRoleResponse](#lbm.fbridge.v1.MsgUpdateRoleResponse) | UpdateRole updates the role of an address in the bridge module. The role can be one of the following: guardian, operator, judge. | | diff --git a/proto/lbm/fbridge/v1/fbridge.proto b/proto/lbm/fbridge/v1/fbridge.proto index 6116662cb9..40040fd39e 100644 --- a/proto/lbm/fbridge/v1/fbridge.proto +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -46,3 +46,11 @@ 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; +} \ No newline at end of file diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto index f295e6c028..85a56f18b2 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -4,50 +4,37 @@ 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(TransferRequest) returns (TransferResponse); + rpc Transfer(MsgTransfer) returns (MsgTransferResponse); // Submit a provision to the bridge module. - rpc Provision(ProvisionRequest) returns (ProvisionResponse); + rpc Provision(MsgProvision) returns (MsgProvisionResponse); // Set the time lock value from default value to uint64.max for specific confirmed provision. - rpc HoldTransfer(HoldTransferRequest) returns (HoldTransferResponse); + rpc HoldTransfer(MsgHoldTransfer) returns (MsgHoldTransferResponse); // Set the time lock value to 0 for specific confirmed provision. - rpc ReleaseTransfer(ReleaseTransferRequest) returns (ReleaseTransferResponse); + rpc ReleaseTransfer(MsgReleaseTransfer) returns (MsgReleaseTransferResponse); // Remove a specific confirmed provision (reset for specific sequence number). - rpc RemoveProvision(RemoveProvisionRequest) returns (RemoveProvisionResponse); + rpc RemoveProvision(MsgRemoveProvision) returns (MsgRemoveProvisionResponse); // ClaimBatch processes the claiming of multiple claimable provisions in a single operation - rpc ClaimBatch(ClaimBatchRequest) returns (ClaimBatchResponse); + rpc ClaimBatch(MsgClaimBatch) returns (MsgClaimBatchResponse); // Claim processes the claiming of a provision with a specific sequence number - rpc Claim(ClaimRequest) returns (ClaimResponse); + rpc Claim(MsgClaim) returns (MsgClaimResponse); - // AddGuardian adds a guardian to the bridge module. - rpc AddGuardian(AddGuardianRequest) returns (AddGuardianResponse); - - // RemoveGuardian removes a guardian from the bridge module. - rpc RemoveGuardian(RemoveGuardianRequest) returns (RemoveGuardianResponse); - - // AddOperator adds an operator to the bridge module. - rpc AddOperator(AddOperatorRequest) returns (AddOperatorResponse); - - // RemoveOperator removes an operator from the bridge module. - rpc RemoveOperator(RemoveOperatorRequest) returns (RemoveOperatorResponse); - - // AddJudge adds a judge to the bridge module. - rpc AddJudge(AddJudgeRequest) returns (AddJudgeResponse); - - // RemoveJudge removes a judge from the bridge module. - rpc RemoveJudge(RemoveJudgeRequest) returns (RemoveJudgeResponse); + // UpdateRole updates the role of an address in the bridge module. + // The role can be one of the following: guardian, operator, judge. + rpc UpdateRole(MsgUpdateRole) returns (MsgUpdateRoleResponse); } -// TransferRequest is input values required for bridge transfer -message TransferRequest { +// 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 @@ -57,10 +44,10 @@ message TransferRequest { [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; } -message TransferResponse {} +message MsgTransferResponse {} -// ProvisionRequest is input values required for provisioning -message ProvisionRequest { +// MsgProvision is input values required for provisioning +message MsgProvision { // the sequence number of the bridge request uint64 seq = 1; // the sender address on the source chain @@ -72,92 +59,58 @@ message ProvisionRequest { [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; } -message ProvisionResponse {} +message MsgProvisionResponse {} -// HoldTransferRequest is input values required for holding transfer -message HoldTransferRequest { +// MsgHoldTransfer is input values required for holding transfer +message MsgHoldTransfer { // the sequence number of the bridge request uint64 seq = 1; } -message HoldTransferResponse {} +message MsgHoldTransferResponse {} -// ReleaseTransferRequest is input values required for releasing a held transfer by time lock -message ReleaseTransferRequest { +// MsgReleaseTransfer is input values required for releasing a held transfer by time lock +message MsgReleaseTransfer { // the sequence number of the bridge request uint64 seq = 1; } -message ReleaseTransferResponse {} +message MsgReleaseTransferResponse {} -// RemoveProvisionRequest is input values required for removing a specific confirmed provision -message RemoveProvisionRequest { +// MsgRemoveProvision is input values required for removing a specific confirmed provision +message MsgRemoveProvision { // the sequence number of the bridge request uint64 seq = 1; } -message RemoveProvisionResponse {} +message MsgRemoveProvisionResponse {} -// ClaimBatchRequest is input values required for claiming multiple claimable provisions -message ClaimBatchRequest { +// MsgClaimBatch is input values required for claiming multiple claimable provisions +message MsgClaimBatch { // the maximum number of claims to be made at once uint64 max_claims = 1; } -message ClaimBatchResponse {} +message MsgClaimBatchResponse {} -// ClaimRequest is input values required for claiming a provision -message ClaimRequest { +// MsgClaim is input values required for claiming a provision +message MsgClaim { // the sequence number of the bridge request uint64 seq = 1; } -message ClaimResponse {} - -// AddGuardianRequest is input values required for adding a guardian -message AddGuardianRequest { - // the guardian address to be added - string guardian = 1; -} - -message AddGuardianResponse {} - -// RemoveGuardianRequest is input values required for removing a guardian -message RemoveGuardianRequest { - // the guardian address to be removed - string guardian = 1; -} - -message RemoveGuardianResponse {} - -// AddOperatorRequest is input values required for adding an operator -message AddOperatorRequest { - // the operator address to be added - string operator = 1; -} - -message AddOperatorResponse {} - -// RemoveOperatorRequest is input values required for removing an operator -message RemoveOperatorRequest { - // the operator address to be removed - string operator = 1; -} - -message RemoveOperatorResponse {} - -// AddJudgeRequest is input values required for adding a judge -message AddJudgeRequest { - // the judge address to be added - string judge = 1; -} - -message AddJudgeResponse {} - -// RemoveJudgeRequest is input values required for removing a judge -message RemoveJudgeRequest { - // the judge address to be removed - string judge = 1; +message MsgClaimResponse {} + +// MsgUpdateRole is input values required for updating the role of an address +message MsgUpdateRole { + // the address to update the role + string address = 1; + // the role to be updated + // - unspecified : 0, used to remove the address from a group + // - guardian : 1 + // - operator : 2 + // - judge : 3 + Role role = 2; } -message RemoveJudgeResponse {} +message MsgUpdateRoleResponse {} \ No newline at end of file diff --git a/x/fbridge/types/codec.go b/x/fbridge/types/codec.go new file mode 100644 index 0000000000..ab1254f4c2 --- /dev/null +++ b/x/fbridge/types/codec.go @@ -0,0 +1 @@ +package types diff --git a/x/fbridge/types/fbridge.pb.go b/x/fbridge/types/fbridge.pb.go index 77a6a7ee45..4f06967485 100644 --- a/x/fbridge/types/fbridge.pb.go +++ b/x/fbridge/types/fbridge.pb.go @@ -24,6 +24,38 @@ var _ = math.Inf // 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"` @@ -282,6 +314,7 @@ func (m *Fraction) GetDenominator() uint64 { } 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") @@ -291,37 +324,40 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/fbridge.proto", fileDescriptor_62374d75fc6aa1ba) } var fileDescriptor_62374d75fc6aa1ba = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x86, 0x9b, 0xae, 0x54, 0xcd, 0x29, 0x6b, 0xc1, 0x9a, 0x50, 0x35, 0x8d, 0xac, 0x54, 0x42, - 0x4c, 0x48, 0x24, 0x6c, 0xbc, 0xc1, 0x36, 0x26, 0x51, 0x71, 0x51, 0x05, 0xae, 0xb8, 0x89, 0x9c, - 0xd8, 0xcd, 0xcc, 0x62, 0xbb, 0xd8, 0x4e, 0x04, 0xbc, 0x04, 0xbc, 0x02, 0x6f, 0xb3, 0xcb, 0x5d, - 0x22, 0x2e, 0x26, 0xd4, 0xbe, 0x08, 0x8a, 0x9b, 0x84, 0xf6, 0xaa, 0x77, 0xc7, 0xbf, 0xf3, 0x7f, - 0xfe, 0xcf, 0xc9, 0x81, 0xa3, 0x2c, 0xe6, 0xc1, 0x3c, 0x56, 0x8c, 0xa4, 0x34, 0x28, 0x4e, 0xeb, - 0xd2, 0x5f, 0x28, 0x69, 0x24, 0x1a, 0x64, 0x31, 0xf7, 0x6b, 0xa9, 0x38, 0x3d, 0x3c, 0x48, 0x65, - 0x2a, 0xed, 0x55, 0x50, 0x56, 0xeb, 0xaf, 0x26, 0x3f, 0xda, 0xd0, 0x9d, 0x61, 0x85, 0xb9, 0x46, - 0x53, 0x38, 0x90, 0x0b, 0xaa, 0xb0, 0x91, 0x2a, 0x32, 0x2a, 0xd7, 0x26, 0xca, 0x68, 0x41, 0xb3, - 0x91, 0x33, 0x76, 0x4e, 0xfa, 0x67, 0x23, 0x7f, 0x9b, 0xe7, 0x5f, 0x29, 0x9c, 0x18, 0x26, 0x45, - 0x88, 0x6a, 0xd7, 0xc7, 0xd2, 0xf4, 0xbe, 0xf4, 0x94, 0xac, 0x34, 0xc7, 0x8a, 0x30, 0x2c, 0xb6, - 0x58, 0xed, 0x5d, 0xac, 0xda, 0xb5, 0xc1, 0xba, 0x84, 0xc7, 0x9f, 0x73, 0x92, 0xd2, 0x2d, 0xd0, - 0xde, 0x0e, 0xd0, 0xd0, 0x5a, 0x36, 0x28, 0x2f, 0x60, 0x68, 0x18, 0xa7, 0x99, 0x4c, 0x6e, 0xa2, - 0x05, 0x55, 0x4c, 0x92, 0x51, 0x67, 0xec, 0x9c, 0x74, 0xc2, 0x41, 0x2d, 0xcf, 0xac, 0x3a, 0xf9, - 0xe5, 0xc0, 0xfe, 0x4c, 0xc9, 0x82, 0x69, 0x26, 0xc5, 0x25, 0x36, 0x18, 0x3d, 0x82, 0x3d, 0x4d, - 0xbf, 0xd8, 0x39, 0x74, 0xc2, 0xb2, 0x44, 0x53, 0xe8, 0x62, 0x2e, 0x73, 0x61, 0x6c, 0x43, 0xee, - 0xf9, 0xd9, 0xed, 0xfd, 0x71, 0xeb, 0xcf, 0xfd, 0xf1, 0xcb, 0x94, 0x99, 0xeb, 0x3c, 0xf6, 0x13, - 0xc9, 0x83, 0x2b, 0x26, 0x74, 0x72, 0xcd, 0x70, 0x30, 0xaf, 0x8a, 0x57, 0x9a, 0xdc, 0x04, 0xe6, - 0xdb, 0x82, 0x6a, 0xff, 0x9d, 0x30, 0x61, 0x45, 0x40, 0x4f, 0xa0, 0xab, 0xa9, 0x20, 0x54, 0xd9, - 0x9e, 0xdc, 0xb0, 0x3a, 0xa1, 0x43, 0xe8, 0x29, 0x9a, 0x50, 0x56, 0x50, 0x65, 0x93, 0xba, 0x61, - 0x73, 0x9e, 0x7c, 0x87, 0x61, 0x13, 0xf1, 0x83, 0xc1, 0x26, 0xd7, 0xe8, 0x19, 0x3c, 0x6c, 0xfa, - 0xa3, 0x82, 0x54, 0x69, 0xfb, 0xb5, 0xf6, 0x56, 0x10, 0xf4, 0x1c, 0x06, 0x89, 0x14, 0x73, 0xa6, - 0x78, 0x94, 0x94, 0x4f, 0x6b, 0x9b, 0xfe, 0x41, 0xb8, 0x5f, 0xa9, 0x17, 0x56, 0x44, 0x4f, 0x01, - 0x98, 0x8e, 0x92, 0x0c, 0x33, 0x4e, 0x89, 0x0d, 0xd5, 0x0b, 0x5d, 0xa6, 0x2f, 0xd6, 0xc2, 0x64, - 0x0a, 0xbd, 0x7a, 0xca, 0xe8, 0x08, 0x5c, 0x91, 0xf3, 0xf5, 0xdf, 0xaf, 0x5e, 0xfc, 0x2f, 0xa0, - 0x31, 0xf4, 0x09, 0x15, 0x92, 0x33, 0x61, 0xef, 0xdb, 0xeb, 0x44, 0x1b, 0xd2, 0xf9, 0xf4, 0x76, - 0xe9, 0x39, 0x77, 0x4b, 0xcf, 0xf9, 0xbb, 0xf4, 0x9c, 0x9f, 0x2b, 0xaf, 0x75, 0xb7, 0xf2, 0x5a, - 0xbf, 0x57, 0x5e, 0xeb, 0xd3, 0xeb, 0x9d, 0x93, 0xfc, 0xda, 0xac, 0xbe, 0x9d, 0x69, 0xdc, 0xb5, - 0x0b, 0xfd, 0xe6, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x90, 0x4f, 0xd7, 0x16, 0x03, 0x00, - 0x00, + // 523 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x6e, 0xda, 0x3c, + 0x18, 0xc6, 0x09, 0x50, 0x44, 0x4c, 0x0b, 0x7c, 0x56, 0xf5, 0x09, 0x55, 0x5d, 0xca, 0x90, 0xa6, + 0x55, 0x95, 0x96, 0xac, 0xdd, 0xf9, 0x24, 0xca, 0x9f, 0x0a, 0x34, 0xb5, 0xc8, 0x2d, 0x27, 0x3b, + 0x41, 0x26, 0x31, 0xa9, 0xd7, 0xc4, 0x66, 0xb6, 0x13, 0x6d, 0xbb, 0x89, 0xed, 0x16, 0x76, 0x37, + 0x3d, 0xec, 0xe1, 0xb4, 0x83, 0x6a, 0x82, 0x1b, 0x99, 0x62, 0x12, 0x06, 0x47, 0x9c, 0xbd, 0xef, + 0x93, 0x3c, 0x3f, 0x3f, 0xaf, 0x5f, 0x19, 0x1c, 0x07, 0xd3, 0xd0, 0x99, 0x4d, 0x05, 0xf5, 0x7c, + 0xe2, 0xc4, 0xe7, 0x59, 0x69, 0xcf, 0x05, 0x57, 0x1c, 0x56, 0x83, 0x69, 0x68, 0x67, 0x52, 0x7c, + 0x7e, 0x74, 0xe8, 0x73, 0x9f, 0xeb, 0x4f, 0x4e, 0x52, 0xad, 0xfe, 0x6a, 0x7d, 0xcf, 0x83, 0xd2, + 0x08, 0x0b, 0x1c, 0x4a, 0x38, 0x04, 0x87, 0x7c, 0x4e, 0x04, 0x56, 0x5c, 0x4c, 0x94, 0x88, 0xa4, + 0x9a, 0x04, 0x24, 0x26, 0x41, 0xc3, 0x68, 0x1a, 0xa7, 0x95, 0x8b, 0x86, 0xbd, 0xcd, 0xb3, 0xfb, + 0x02, 0xbb, 0x8a, 0x72, 0x86, 0x60, 0xe6, 0xba, 0x4b, 0x4c, 0x1f, 0x12, 0x4f, 0xc2, 0xf2, 0x23, + 0x2c, 0x3c, 0x8a, 0xd9, 0x16, 0x2b, 0xbf, 0x8b, 0x95, 0xb9, 0x36, 0x58, 0x5d, 0xf0, 0xdf, 0xa7, + 0xc8, 0xf3, 0xc9, 0x16, 0xa8, 0xb0, 0x03, 0x54, 0xd3, 0x96, 0x0d, 0xca, 0x6b, 0x50, 0x53, 0x34, + 0x24, 0x01, 0x77, 0x1f, 0x26, 0x73, 0x22, 0x28, 0xf7, 0x1a, 0xc5, 0xa6, 0x71, 0x5a, 0x44, 0xd5, + 0x4c, 0x1e, 0x69, 0xb5, 0xf5, 0xd3, 0x00, 0x07, 0x23, 0xc1, 0x63, 0x2a, 0x29, 0x67, 0x5d, 0xac, + 0x30, 0xac, 0x83, 0x82, 0x24, 0x9f, 0xf5, 0x3d, 0x14, 0x51, 0x52, 0xc2, 0x21, 0x28, 0xe1, 0x90, + 0x47, 0x4c, 0xe9, 0x81, 0xcc, 0xcb, 0x8b, 0xc7, 0xe7, 0x93, 0xdc, 0xef, 0xe7, 0x93, 0x33, 0x9f, + 0xaa, 0xfb, 0x68, 0x6a, 0xbb, 0x3c, 0x74, 0xfa, 0x94, 0x49, 0xf7, 0x9e, 0x62, 0x67, 0x96, 0x16, + 0x6f, 0xa4, 0xf7, 0xe0, 0xa8, 0xaf, 0x73, 0x22, 0xed, 0x01, 0x53, 0x28, 0x25, 0xc0, 0xff, 0x41, + 0x49, 0x12, 0xe6, 0x11, 0xa1, 0x67, 0x32, 0x51, 0xda, 0xc1, 0x23, 0x50, 0x16, 0xc4, 0x25, 0x34, + 0x26, 0x42, 0x27, 0x35, 0xd1, 0xba, 0x6f, 0x7d, 0x03, 0xb5, 0x75, 0xc4, 0x5b, 0x85, 0x55, 0x24, + 0xe1, 0x4b, 0xb0, 0xbf, 0x9e, 0x8f, 0x30, 0x2f, 0x4d, 0x5b, 0xc9, 0xb4, 0x1e, 0xf3, 0xe0, 0x2b, + 0x50, 0x75, 0x39, 0x9b, 0x51, 0x11, 0x4e, 0xdc, 0xe4, 0x68, 0xa9, 0xd3, 0xef, 0xa1, 0x83, 0x54, + 0xed, 0x68, 0x11, 0xbe, 0x00, 0x80, 0xca, 0x89, 0x1b, 0x60, 0x1a, 0x12, 0x4f, 0x87, 0x2a, 0x23, + 0x93, 0xca, 0xce, 0x4a, 0x68, 0x0d, 0x41, 0x39, 0xbb, 0x65, 0x78, 0x0c, 0x4c, 0x16, 0x85, 0xab, + 0xed, 0xa7, 0x27, 0xfe, 0x13, 0x60, 0x13, 0x54, 0x3c, 0xc2, 0x78, 0x48, 0x99, 0xfe, 0x9e, 0x5f, + 0x25, 0xda, 0x90, 0xce, 0xde, 0x83, 0x22, 0xe2, 0x01, 0x81, 0x35, 0x50, 0x19, 0x5f, 0xdf, 0x8e, + 0x7a, 0x9d, 0x41, 0x7f, 0xd0, 0xeb, 0xd6, 0x73, 0x70, 0x1f, 0x94, 0xaf, 0xc6, 0x6d, 0xd4, 0x1d, + 0xb4, 0xaf, 0xeb, 0x46, 0xd2, 0xdd, 0x8c, 0x7a, 0xa8, 0x7d, 0x77, 0x83, 0xea, 0x79, 0x68, 0x82, + 0xbd, 0xe1, 0xb8, 0x7b, 0xd5, 0xab, 0x17, 0x2e, 0x87, 0x8f, 0x0b, 0xcb, 0x78, 0x5a, 0x58, 0xc6, + 0x9f, 0x85, 0x65, 0xfc, 0x58, 0x5a, 0xb9, 0xa7, 0xa5, 0x95, 0xfb, 0xb5, 0xb4, 0x72, 0x1f, 0xdf, + 0xee, 0xdc, 0xc4, 0x97, 0xf5, 0xd3, 0xd1, 0x3b, 0x99, 0x96, 0xf4, 0x83, 0x78, 0xf7, 0x37, 0x00, + 0x00, 0xff, 0xff, 0x47, 0x3c, 0x5e, 0x9b, 0x56, 0x03, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/fbridge/types/keys.go b/x/fbridge/types/keys.go new file mode 100644 index 0000000000..ab1254f4c2 --- /dev/null +++ b/x/fbridge/types/keys.go @@ -0,0 +1 @@ +package types diff --git a/x/fbridge/types/tx.pb.go b/x/fbridge/types/tx.pb.go index 074ff0f75e..3cc907e3c1 100644 --- a/x/fbridge/types/tx.pb.go +++ b/x/fbridge/types/tx.pb.go @@ -29,8 +29,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// TransferRequest is input values required for bridge transfer -type TransferRequest struct { +// 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 @@ -39,18 +39,18 @@ type TransferRequest struct { 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 *TransferRequest) Reset() { *m = TransferRequest{} } -func (m *TransferRequest) String() string { return proto.CompactTextString(m) } -func (*TransferRequest) ProtoMessage() {} -func (*TransferRequest) Descriptor() ([]byte, []int) { +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 *TransferRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TransferRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgTransfer.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -60,47 +60,47 @@ func (m *TransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *TransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferRequest.Merge(m, src) +func (m *MsgTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransfer.Merge(m, src) } -func (m *TransferRequest) XXX_Size() int { +func (m *MsgTransfer) XXX_Size() int { return m.Size() } -func (m *TransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransferRequest.DiscardUnknown(m) +func (m *MsgTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransfer.DiscardUnknown(m) } -var xxx_messageInfo_TransferRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgTransfer proto.InternalMessageInfo -func (m *TransferRequest) GetSender() string { +func (m *MsgTransfer) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *TransferRequest) GetReceiver() string { +func (m *MsgTransfer) GetReceiver() string { if m != nil { return m.Receiver } return "" } -type TransferResponse struct { +type MsgTransferResponse struct { } -func (m *TransferResponse) Reset() { *m = TransferResponse{} } -func (m *TransferResponse) String() string { return proto.CompactTextString(m) } -func (*TransferResponse) ProtoMessage() {} -func (*TransferResponse) Descriptor() ([]byte, []int) { +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 *TransferResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TransferResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgTransferResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -110,20 +110,20 @@ func (m *TransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *TransferResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferResponse.Merge(m, src) +func (m *MsgTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferResponse.Merge(m, src) } -func (m *TransferResponse) XXX_Size() int { +func (m *MsgTransferResponse) XXX_Size() int { return m.Size() } -func (m *TransferResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransferResponse.DiscardUnknown(m) +func (m *MsgTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferResponse.DiscardUnknown(m) } -var xxx_messageInfo_TransferResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgTransferResponse proto.InternalMessageInfo -// ProvisionRequest is input values required for provisioning -type ProvisionRequest struct { +// MsgProvision is input values required for provisioning +type MsgProvision 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 @@ -134,18 +134,18 @@ type ProvisionRequest struct { Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` } -func (m *ProvisionRequest) Reset() { *m = ProvisionRequest{} } -func (m *ProvisionRequest) String() string { return proto.CompactTextString(m) } -func (*ProvisionRequest) ProtoMessage() {} -func (*ProvisionRequest) Descriptor() ([]byte, []int) { +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 *ProvisionRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgProvision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ProvisionRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgProvision.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -155,54 +155,54 @@ func (m *ProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *ProvisionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProvisionRequest.Merge(m, src) +func (m *MsgProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProvision.Merge(m, src) } -func (m *ProvisionRequest) XXX_Size() int { +func (m *MsgProvision) XXX_Size() int { return m.Size() } -func (m *ProvisionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProvisionRequest.DiscardUnknown(m) +func (m *MsgProvision) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProvision.DiscardUnknown(m) } -var xxx_messageInfo_ProvisionRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgProvision proto.InternalMessageInfo -func (m *ProvisionRequest) GetSeq() uint64 { +func (m *MsgProvision) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -func (m *ProvisionRequest) GetSender() string { +func (m *MsgProvision) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *ProvisionRequest) GetReceiver() string { +func (m *MsgProvision) GetReceiver() string { if m != nil { return m.Receiver } return "" } -type ProvisionResponse struct { +type MsgProvisionResponse struct { } -func (m *ProvisionResponse) Reset() { *m = ProvisionResponse{} } -func (m *ProvisionResponse) String() string { return proto.CompactTextString(m) } -func (*ProvisionResponse) ProtoMessage() {} -func (*ProvisionResponse) Descriptor() ([]byte, []int) { +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 *ProvisionResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ProvisionResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgProvisionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -212,36 +212,36 @@ func (m *ProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *ProvisionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProvisionResponse.Merge(m, src) +func (m *MsgProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProvisionResponse.Merge(m, src) } -func (m *ProvisionResponse) XXX_Size() int { +func (m *MsgProvisionResponse) XXX_Size() int { return m.Size() } -func (m *ProvisionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProvisionResponse.DiscardUnknown(m) +func (m *MsgProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProvisionResponse.DiscardUnknown(m) } -var xxx_messageInfo_ProvisionResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgProvisionResponse proto.InternalMessageInfo -// HoldTransferRequest is input values required for holding transfer -type HoldTransferRequest struct { +// MsgHoldTransfer is input values required for holding transfer +type MsgHoldTransfer struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *HoldTransferRequest) Reset() { *m = HoldTransferRequest{} } -func (m *HoldTransferRequest) String() string { return proto.CompactTextString(m) } -func (*HoldTransferRequest) ProtoMessage() {} -func (*HoldTransferRequest) Descriptor() ([]byte, []int) { +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 *HoldTransferRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgHoldTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *HoldTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgHoldTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_HoldTransferRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgHoldTransfer.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -251,40 +251,40 @@ func (m *HoldTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *HoldTransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HoldTransferRequest.Merge(m, src) +func (m *MsgHoldTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgHoldTransfer.Merge(m, src) } -func (m *HoldTransferRequest) XXX_Size() int { +func (m *MsgHoldTransfer) XXX_Size() int { return m.Size() } -func (m *HoldTransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HoldTransferRequest.DiscardUnknown(m) +func (m *MsgHoldTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgHoldTransfer.DiscardUnknown(m) } -var xxx_messageInfo_HoldTransferRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgHoldTransfer proto.InternalMessageInfo -func (m *HoldTransferRequest) GetSeq() uint64 { +func (m *MsgHoldTransfer) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type HoldTransferResponse struct { +type MsgHoldTransferResponse struct { } -func (m *HoldTransferResponse) Reset() { *m = HoldTransferResponse{} } -func (m *HoldTransferResponse) String() string { return proto.CompactTextString(m) } -func (*HoldTransferResponse) ProtoMessage() {} -func (*HoldTransferResponse) Descriptor() ([]byte, []int) { +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 *HoldTransferResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgHoldTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *HoldTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgHoldTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_HoldTransferResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgHoldTransferResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -294,36 +294,36 @@ func (m *HoldTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *HoldTransferResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HoldTransferResponse.Merge(m, src) +func (m *MsgHoldTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgHoldTransferResponse.Merge(m, src) } -func (m *HoldTransferResponse) XXX_Size() int { +func (m *MsgHoldTransferResponse) XXX_Size() int { return m.Size() } -func (m *HoldTransferResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HoldTransferResponse.DiscardUnknown(m) +func (m *MsgHoldTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgHoldTransferResponse.DiscardUnknown(m) } -var xxx_messageInfo_HoldTransferResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgHoldTransferResponse proto.InternalMessageInfo -// ReleaseTransferRequest is input values required for releasing a held transfer by time lock -type ReleaseTransferRequest struct { +// MsgReleaseTransfer is input values required for releasing a held transfer by time lock +type MsgReleaseTransfer struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *ReleaseTransferRequest) Reset() { *m = ReleaseTransferRequest{} } -func (m *ReleaseTransferRequest) String() string { return proto.CompactTextString(m) } -func (*ReleaseTransferRequest) ProtoMessage() {} -func (*ReleaseTransferRequest) Descriptor() ([]byte, []int) { +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 *ReleaseTransferRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgReleaseTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ReleaseTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgReleaseTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ReleaseTransferRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgReleaseTransfer.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -333,40 +333,40 @@ func (m *ReleaseTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *ReleaseTransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReleaseTransferRequest.Merge(m, src) +func (m *MsgReleaseTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReleaseTransfer.Merge(m, src) } -func (m *ReleaseTransferRequest) XXX_Size() int { +func (m *MsgReleaseTransfer) XXX_Size() int { return m.Size() } -func (m *ReleaseTransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ReleaseTransferRequest.DiscardUnknown(m) +func (m *MsgReleaseTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReleaseTransfer.DiscardUnknown(m) } -var xxx_messageInfo_ReleaseTransferRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgReleaseTransfer proto.InternalMessageInfo -func (m *ReleaseTransferRequest) GetSeq() uint64 { +func (m *MsgReleaseTransfer) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type ReleaseTransferResponse struct { +type MsgReleaseTransferResponse struct { } -func (m *ReleaseTransferResponse) Reset() { *m = ReleaseTransferResponse{} } -func (m *ReleaseTransferResponse) String() string { return proto.CompactTextString(m) } -func (*ReleaseTransferResponse) ProtoMessage() {} -func (*ReleaseTransferResponse) Descriptor() ([]byte, []int) { +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 *ReleaseTransferResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgReleaseTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ReleaseTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgReleaseTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ReleaseTransferResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgReleaseTransferResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -376,36 +376,36 @@ func (m *ReleaseTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *ReleaseTransferResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReleaseTransferResponse.Merge(m, src) +func (m *MsgReleaseTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReleaseTransferResponse.Merge(m, src) } -func (m *ReleaseTransferResponse) XXX_Size() int { +func (m *MsgReleaseTransferResponse) XXX_Size() int { return m.Size() } -func (m *ReleaseTransferResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ReleaseTransferResponse.DiscardUnknown(m) +func (m *MsgReleaseTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReleaseTransferResponse.DiscardUnknown(m) } -var xxx_messageInfo_ReleaseTransferResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgReleaseTransferResponse proto.InternalMessageInfo -// RemoveProvisionRequest is input values required for removing a specific confirmed provision -type RemoveProvisionRequest struct { +// MsgRemoveProvision is input values required for removing a specific confirmed provision +type MsgRemoveProvision struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *RemoveProvisionRequest) Reset() { *m = RemoveProvisionRequest{} } -func (m *RemoveProvisionRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveProvisionRequest) ProtoMessage() {} -func (*RemoveProvisionRequest) Descriptor() ([]byte, []int) { +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 *RemoveProvisionRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgRemoveProvision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RemoveProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRemoveProvision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RemoveProvisionRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRemoveProvision.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -415,40 +415,40 @@ func (m *RemoveProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *RemoveProvisionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveProvisionRequest.Merge(m, src) +func (m *MsgRemoveProvision) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveProvision.Merge(m, src) } -func (m *RemoveProvisionRequest) XXX_Size() int { +func (m *MsgRemoveProvision) XXX_Size() int { return m.Size() } -func (m *RemoveProvisionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveProvisionRequest.DiscardUnknown(m) +func (m *MsgRemoveProvision) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveProvision.DiscardUnknown(m) } -var xxx_messageInfo_RemoveProvisionRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgRemoveProvision proto.InternalMessageInfo -func (m *RemoveProvisionRequest) GetSeq() uint64 { +func (m *MsgRemoveProvision) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type RemoveProvisionResponse struct { +type MsgRemoveProvisionResponse struct { } -func (m *RemoveProvisionResponse) Reset() { *m = RemoveProvisionResponse{} } -func (m *RemoveProvisionResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveProvisionResponse) ProtoMessage() {} -func (*RemoveProvisionResponse) Descriptor() ([]byte, []int) { +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 *RemoveProvisionResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgRemoveProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RemoveProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRemoveProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RemoveProvisionResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRemoveProvisionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -458,36 +458,36 @@ func (m *RemoveProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *RemoveProvisionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveProvisionResponse.Merge(m, src) +func (m *MsgRemoveProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveProvisionResponse.Merge(m, src) } -func (m *RemoveProvisionResponse) XXX_Size() int { +func (m *MsgRemoveProvisionResponse) XXX_Size() int { return m.Size() } -func (m *RemoveProvisionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveProvisionResponse.DiscardUnknown(m) +func (m *MsgRemoveProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveProvisionResponse.DiscardUnknown(m) } -var xxx_messageInfo_RemoveProvisionResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgRemoveProvisionResponse proto.InternalMessageInfo -// ClaimBatchRequest is input values required for claiming multiple claimable provisions -type ClaimBatchRequest struct { +// MsgClaimBatch is input values required for claiming multiple claimable provisions +type MsgClaimBatch struct { // the maximum number of claims to be made at once MaxClaims uint64 `protobuf:"varint,1,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"` } -func (m *ClaimBatchRequest) Reset() { *m = ClaimBatchRequest{} } -func (m *ClaimBatchRequest) String() string { return proto.CompactTextString(m) } -func (*ClaimBatchRequest) ProtoMessage() {} -func (*ClaimBatchRequest) Descriptor() ([]byte, []int) { +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 *ClaimBatchRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgClaimBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ClaimBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgClaimBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ClaimBatchRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgClaimBatch.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -497,40 +497,40 @@ func (m *ClaimBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *ClaimBatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimBatchRequest.Merge(m, src) +func (m *MsgClaimBatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBatch.Merge(m, src) } -func (m *ClaimBatchRequest) XXX_Size() int { +func (m *MsgClaimBatch) XXX_Size() int { return m.Size() } -func (m *ClaimBatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimBatchRequest.DiscardUnknown(m) +func (m *MsgClaimBatch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBatch.DiscardUnknown(m) } -var xxx_messageInfo_ClaimBatchRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgClaimBatch proto.InternalMessageInfo -func (m *ClaimBatchRequest) GetMaxClaims() uint64 { +func (m *MsgClaimBatch) GetMaxClaims() uint64 { if m != nil { return m.MaxClaims } return 0 } -type ClaimBatchResponse struct { +type MsgClaimBatchResponse struct { } -func (m *ClaimBatchResponse) Reset() { *m = ClaimBatchResponse{} } -func (m *ClaimBatchResponse) String() string { return proto.CompactTextString(m) } -func (*ClaimBatchResponse) ProtoMessage() {} -func (*ClaimBatchResponse) Descriptor() ([]byte, []int) { +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 *ClaimBatchResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgClaimBatchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ClaimBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgClaimBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ClaimBatchResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgClaimBatchResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -540,36 +540,36 @@ func (m *ClaimBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *ClaimBatchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimBatchResponse.Merge(m, src) +func (m *MsgClaimBatchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimBatchResponse.Merge(m, src) } -func (m *ClaimBatchResponse) XXX_Size() int { +func (m *MsgClaimBatchResponse) XXX_Size() int { return m.Size() } -func (m *ClaimBatchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimBatchResponse.DiscardUnknown(m) +func (m *MsgClaimBatchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimBatchResponse.DiscardUnknown(m) } -var xxx_messageInfo_ClaimBatchResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgClaimBatchResponse proto.InternalMessageInfo -// ClaimRequest is input values required for claiming a provision -type ClaimRequest struct { +// MsgClaim is input values required for claiming a provision +type MsgClaim struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *ClaimRequest) Reset() { *m = ClaimRequest{} } -func (m *ClaimRequest) String() string { return proto.CompactTextString(m) } -func (*ClaimRequest) ProtoMessage() {} -func (*ClaimRequest) Descriptor() ([]byte, []int) { +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 *ClaimRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ClaimRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgClaim.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -579,40 +579,40 @@ func (m *ClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *ClaimRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimRequest.Merge(m, src) +func (m *MsgClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaim.Merge(m, src) } -func (m *ClaimRequest) XXX_Size() int { +func (m *MsgClaim) XXX_Size() int { return m.Size() } -func (m *ClaimRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimRequest.DiscardUnknown(m) +func (m *MsgClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaim.DiscardUnknown(m) } -var xxx_messageInfo_ClaimRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgClaim proto.InternalMessageInfo -func (m *ClaimRequest) GetSeq() uint64 { +func (m *MsgClaim) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type ClaimResponse struct { +type MsgClaimResponse struct { } -func (m *ClaimResponse) Reset() { *m = ClaimResponse{} } -func (m *ClaimResponse) String() string { return proto.CompactTextString(m) } -func (*ClaimResponse) ProtoMessage() {} -func (*ClaimResponse) Descriptor() ([]byte, []int) { +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 *ClaimResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgClaimResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ClaimResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgClaimResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -622,36 +622,42 @@ func (m *ClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *ClaimResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimResponse.Merge(m, src) +func (m *MsgClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimResponse.Merge(m, src) } -func (m *ClaimResponse) XXX_Size() int { +func (m *MsgClaimResponse) XXX_Size() int { return m.Size() } -func (m *ClaimResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimResponse.DiscardUnknown(m) +func (m *MsgClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimResponse.DiscardUnknown(m) } -var xxx_messageInfo_ClaimResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgClaimResponse proto.InternalMessageInfo -// AddGuardianRequest is input values required for adding a guardian -type AddGuardianRequest struct { - // the guardian address to be added - Guardian string `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` +// MsgUpdateRole is input values required for updating the role of an address +type MsgUpdateRole struct { + // the address to update the role + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,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,2,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` } -func (m *AddGuardianRequest) Reset() { *m = AddGuardianRequest{} } -func (m *AddGuardianRequest) String() string { return proto.CompactTextString(m) } -func (*AddGuardianRequest) ProtoMessage() {} -func (*AddGuardianRequest) Descriptor() ([]byte, []int) { +func (m *MsgUpdateRole) Reset() { *m = MsgUpdateRole{} } +func (m *MsgUpdateRole) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRole) ProtoMessage() {} +func (*MsgUpdateRole) Descriptor() ([]byte, []int) { return fileDescriptor_54a336bc5ea063bb, []int{14} } -func (m *AddGuardianRequest) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AddGuardianRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AddGuardianRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateRole.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -661,450 +667,47 @@ func (m *AddGuardianRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *AddGuardianRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddGuardianRequest.Merge(m, src) +func (m *MsgUpdateRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRole.Merge(m, src) } -func (m *AddGuardianRequest) XXX_Size() int { +func (m *MsgUpdateRole) XXX_Size() int { return m.Size() } -func (m *AddGuardianRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddGuardianRequest.DiscardUnknown(m) +func (m *MsgUpdateRole) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRole.DiscardUnknown(m) } -var xxx_messageInfo_AddGuardianRequest proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateRole proto.InternalMessageInfo -func (m *AddGuardianRequest) GetGuardian() string { +func (m *MsgUpdateRole) GetAddress() string { if m != nil { - return m.Guardian + return m.Address } return "" } -type AddGuardianResponse struct { -} - -func (m *AddGuardianResponse) Reset() { *m = AddGuardianResponse{} } -func (m *AddGuardianResponse) String() string { return proto.CompactTextString(m) } -func (*AddGuardianResponse) ProtoMessage() {} -func (*AddGuardianResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{15} -} -func (m *AddGuardianResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddGuardianResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddGuardianResponse.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 *AddGuardianResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddGuardianResponse.Merge(m, src) -} -func (m *AddGuardianResponse) XXX_Size() int { - return m.Size() -} -func (m *AddGuardianResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddGuardianResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddGuardianResponse proto.InternalMessageInfo - -// RemoveGuardianRequest is input values required for removing a guardian -type RemoveGuardianRequest struct { - // the guardian address to be removed - Guardian string `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` -} - -func (m *RemoveGuardianRequest) Reset() { *m = RemoveGuardianRequest{} } -func (m *RemoveGuardianRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveGuardianRequest) ProtoMessage() {} -func (*RemoveGuardianRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{16} -} -func (m *RemoveGuardianRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveGuardianRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveGuardianRequest.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 *RemoveGuardianRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveGuardianRequest.Merge(m, src) -} -func (m *RemoveGuardianRequest) XXX_Size() int { - return m.Size() -} -func (m *RemoveGuardianRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveGuardianRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveGuardianRequest proto.InternalMessageInfo - -func (m *RemoveGuardianRequest) GetGuardian() string { - if m != nil { - return m.Guardian - } - return "" -} - -type RemoveGuardianResponse struct { -} - -func (m *RemoveGuardianResponse) Reset() { *m = RemoveGuardianResponse{} } -func (m *RemoveGuardianResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveGuardianResponse) ProtoMessage() {} -func (*RemoveGuardianResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{17} -} -func (m *RemoveGuardianResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveGuardianResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveGuardianResponse.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 *RemoveGuardianResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveGuardianResponse.Merge(m, src) -} -func (m *RemoveGuardianResponse) XXX_Size() int { - return m.Size() -} -func (m *RemoveGuardianResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveGuardianResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveGuardianResponse proto.InternalMessageInfo - -// AddOperatorRequest is input values required for adding an operator -type AddOperatorRequest struct { - // the operator address to be added - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` -} - -func (m *AddOperatorRequest) Reset() { *m = AddOperatorRequest{} } -func (m *AddOperatorRequest) String() string { return proto.CompactTextString(m) } -func (*AddOperatorRequest) ProtoMessage() {} -func (*AddOperatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{18} -} -func (m *AddOperatorRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddOperatorRequest.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 *AddOperatorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddOperatorRequest.Merge(m, src) -} -func (m *AddOperatorRequest) XXX_Size() int { - return m.Size() -} -func (m *AddOperatorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddOperatorRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddOperatorRequest proto.InternalMessageInfo - -func (m *AddOperatorRequest) GetOperator() string { - if m != nil { - return m.Operator - } - return "" -} - -type AddOperatorResponse struct { -} - -func (m *AddOperatorResponse) Reset() { *m = AddOperatorResponse{} } -func (m *AddOperatorResponse) String() string { return proto.CompactTextString(m) } -func (*AddOperatorResponse) ProtoMessage() {} -func (*AddOperatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{19} -} -func (m *AddOperatorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddOperatorResponse.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 *AddOperatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddOperatorResponse.Merge(m, src) -} -func (m *AddOperatorResponse) XXX_Size() int { - return m.Size() -} -func (m *AddOperatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddOperatorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddOperatorResponse proto.InternalMessageInfo - -// RemoveOperatorRequest is input values required for removing an operator -type RemoveOperatorRequest struct { - // the operator address to be removed - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` -} - -func (m *RemoveOperatorRequest) Reset() { *m = RemoveOperatorRequest{} } -func (m *RemoveOperatorRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveOperatorRequest) ProtoMessage() {} -func (*RemoveOperatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{20} -} -func (m *RemoveOperatorRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveOperatorRequest.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 *RemoveOperatorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveOperatorRequest.Merge(m, src) -} -func (m *RemoveOperatorRequest) XXX_Size() int { - return m.Size() -} -func (m *RemoveOperatorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveOperatorRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveOperatorRequest proto.InternalMessageInfo - -func (m *RemoveOperatorRequest) GetOperator() string { - if m != nil { - return m.Operator - } - return "" -} - -type RemoveOperatorResponse struct { -} - -func (m *RemoveOperatorResponse) Reset() { *m = RemoveOperatorResponse{} } -func (m *RemoveOperatorResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveOperatorResponse) ProtoMessage() {} -func (*RemoveOperatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{21} -} -func (m *RemoveOperatorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveOperatorResponse.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 *RemoveOperatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveOperatorResponse.Merge(m, src) -} -func (m *RemoveOperatorResponse) XXX_Size() int { - return m.Size() -} -func (m *RemoveOperatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveOperatorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveOperatorResponse proto.InternalMessageInfo - -// AddJudgeRequest is input values required for adding a judge -type AddJudgeRequest struct { - // the judge address to be added - Judge string `protobuf:"bytes,1,opt,name=judge,proto3" json:"judge,omitempty"` -} - -func (m *AddJudgeRequest) Reset() { *m = AddJudgeRequest{} } -func (m *AddJudgeRequest) String() string { return proto.CompactTextString(m) } -func (*AddJudgeRequest) ProtoMessage() {} -func (*AddJudgeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{22} -} -func (m *AddJudgeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddJudgeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddJudgeRequest.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 *AddJudgeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddJudgeRequest.Merge(m, src) -} -func (m *AddJudgeRequest) XXX_Size() int { - return m.Size() -} -func (m *AddJudgeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddJudgeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddJudgeRequest proto.InternalMessageInfo - -func (m *AddJudgeRequest) GetJudge() string { - if m != nil { - return m.Judge - } - return "" -} - -type AddJudgeResponse struct { -} - -func (m *AddJudgeResponse) Reset() { *m = AddJudgeResponse{} } -func (m *AddJudgeResponse) String() string { return proto.CompactTextString(m) } -func (*AddJudgeResponse) ProtoMessage() {} -func (*AddJudgeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{23} -} -func (m *AddJudgeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddJudgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddJudgeResponse.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 *AddJudgeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddJudgeResponse.Merge(m, src) -} -func (m *AddJudgeResponse) XXX_Size() int { - return m.Size() -} -func (m *AddJudgeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddJudgeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddJudgeResponse proto.InternalMessageInfo - -// RemoveJudgeRequest is input values required for removing a judge -type RemoveJudgeRequest struct { - // the judge address to be removed - Judge string `protobuf:"bytes,1,opt,name=judge,proto3" json:"judge,omitempty"` -} - -func (m *RemoveJudgeRequest) Reset() { *m = RemoveJudgeRequest{} } -func (m *RemoveJudgeRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveJudgeRequest) ProtoMessage() {} -func (*RemoveJudgeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{24} -} -func (m *RemoveJudgeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveJudgeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveJudgeRequest.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 *RemoveJudgeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveJudgeRequest.Merge(m, src) -} -func (m *RemoveJudgeRequest) XXX_Size() int { - return m.Size() -} -func (m *RemoveJudgeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveJudgeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveJudgeRequest proto.InternalMessageInfo - -func (m *RemoveJudgeRequest) GetJudge() string { +func (m *MsgUpdateRole) GetRole() Role { if m != nil { - return m.Judge + return m.Role } - return "" + return Role_UNSPECIFIED } -type RemoveJudgeResponse struct { +type MsgUpdateRoleResponse struct { } -func (m *RemoveJudgeResponse) Reset() { *m = RemoveJudgeResponse{} } -func (m *RemoveJudgeResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveJudgeResponse) ProtoMessage() {} -func (*RemoveJudgeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{25} +func (m *MsgUpdateRoleResponse) Reset() { *m = MsgUpdateRoleResponse{} } +func (m *MsgUpdateRoleResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRoleResponse) ProtoMessage() {} +func (*MsgUpdateRoleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_54a336bc5ea063bb, []int{15} } -func (m *RemoveJudgeResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateRoleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RemoveJudgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RemoveJudgeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateRoleResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1114,96 +717,78 @@ func (m *RemoveJudgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *RemoveJudgeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveJudgeResponse.Merge(m, src) +func (m *MsgUpdateRoleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRoleResponse.Merge(m, src) } -func (m *RemoveJudgeResponse) XXX_Size() int { +func (m *MsgUpdateRoleResponse) XXX_Size() int { return m.Size() } -func (m *RemoveJudgeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveJudgeResponse.DiscardUnknown(m) +func (m *MsgUpdateRoleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRoleResponse.DiscardUnknown(m) } -var xxx_messageInfo_RemoveJudgeResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateRoleResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*TransferRequest)(nil), "lbm.fbridge.v1.TransferRequest") - proto.RegisterType((*TransferResponse)(nil), "lbm.fbridge.v1.TransferResponse") - proto.RegisterType((*ProvisionRequest)(nil), "lbm.fbridge.v1.ProvisionRequest") - proto.RegisterType((*ProvisionResponse)(nil), "lbm.fbridge.v1.ProvisionResponse") - proto.RegisterType((*HoldTransferRequest)(nil), "lbm.fbridge.v1.HoldTransferRequest") - proto.RegisterType((*HoldTransferResponse)(nil), "lbm.fbridge.v1.HoldTransferResponse") - proto.RegisterType((*ReleaseTransferRequest)(nil), "lbm.fbridge.v1.ReleaseTransferRequest") - proto.RegisterType((*ReleaseTransferResponse)(nil), "lbm.fbridge.v1.ReleaseTransferResponse") - proto.RegisterType((*RemoveProvisionRequest)(nil), "lbm.fbridge.v1.RemoveProvisionRequest") - proto.RegisterType((*RemoveProvisionResponse)(nil), "lbm.fbridge.v1.RemoveProvisionResponse") - proto.RegisterType((*ClaimBatchRequest)(nil), "lbm.fbridge.v1.ClaimBatchRequest") - proto.RegisterType((*ClaimBatchResponse)(nil), "lbm.fbridge.v1.ClaimBatchResponse") - proto.RegisterType((*ClaimRequest)(nil), "lbm.fbridge.v1.ClaimRequest") - proto.RegisterType((*ClaimResponse)(nil), "lbm.fbridge.v1.ClaimResponse") - proto.RegisterType((*AddGuardianRequest)(nil), "lbm.fbridge.v1.AddGuardianRequest") - proto.RegisterType((*AddGuardianResponse)(nil), "lbm.fbridge.v1.AddGuardianResponse") - proto.RegisterType((*RemoveGuardianRequest)(nil), "lbm.fbridge.v1.RemoveGuardianRequest") - proto.RegisterType((*RemoveGuardianResponse)(nil), "lbm.fbridge.v1.RemoveGuardianResponse") - proto.RegisterType((*AddOperatorRequest)(nil), "lbm.fbridge.v1.AddOperatorRequest") - proto.RegisterType((*AddOperatorResponse)(nil), "lbm.fbridge.v1.AddOperatorResponse") - proto.RegisterType((*RemoveOperatorRequest)(nil), "lbm.fbridge.v1.RemoveOperatorRequest") - proto.RegisterType((*RemoveOperatorResponse)(nil), "lbm.fbridge.v1.RemoveOperatorResponse") - proto.RegisterType((*AddJudgeRequest)(nil), "lbm.fbridge.v1.AddJudgeRequest") - proto.RegisterType((*AddJudgeResponse)(nil), "lbm.fbridge.v1.AddJudgeResponse") - proto.RegisterType((*RemoveJudgeRequest)(nil), "lbm.fbridge.v1.RemoveJudgeRequest") - proto.RegisterType((*RemoveJudgeResponse)(nil), "lbm.fbridge.v1.RemoveJudgeResponse") + 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((*MsgUpdateRole)(nil), "lbm.fbridge.v1.MsgUpdateRole") + proto.RegisterType((*MsgUpdateRoleResponse)(nil), "lbm.fbridge.v1.MsgUpdateRoleResponse") } func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } var fileDescriptor_54a336bc5ea063bb = []byte{ - // 716 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xef, 0x4e, 0xd3, 0x50, - 0x18, 0xc6, 0x57, 0x06, 0x64, 0xbc, 0x22, 0x83, 0xb3, 0x01, 0xb3, 0x91, 0x81, 0x45, 0xc1, 0x90, - 0xd8, 0xf2, 0xe7, 0x0a, 0x40, 0xe3, 0x1f, 0x12, 0x22, 0x99, 0xc6, 0x44, 0xbf, 0x90, 0x6e, 0x3d, - 0x94, 0xea, 0xda, 0x33, 0x7a, 0xba, 0x65, 0xde, 0x85, 0xde, 0x83, 0x17, 0xc3, 0x47, 0x3e, 0x1a, - 0x3f, 0x10, 0xc3, 0xae, 0xc3, 0xc4, 0xb4, 0x3d, 0xed, 0xda, 0x73, 0xda, 0x55, 0xe2, 0xb7, 0x9e, - 0x9e, 0xe7, 0xfd, 0x9d, 0x67, 0x6f, 0xce, 0xf3, 0xae, 0xb0, 0xda, 0x6d, 0xdb, 0xda, 0x79, 0xdb, - 0xb5, 0x0c, 0x13, 0x6b, 0x83, 0x3d, 0xcd, 0x1b, 0xaa, 0x3d, 0x97, 0x78, 0x04, 0x2d, 0x74, 0xdb, - 0xb6, 0xca, 0x36, 0xd4, 0xc1, 0x9e, 0x5c, 0x37, 0x89, 0x49, 0x82, 0x2d, 0xcd, 0x7f, 0x0a, 0x55, - 0xca, 0x77, 0x09, 0xaa, 0xef, 0x5d, 0xdd, 0xa1, 0xe7, 0xd8, 0x6d, 0xe1, 0xcb, 0x3e, 0xa6, 0x1e, - 0x5a, 0x81, 0x59, 0x8a, 0x1d, 0x03, 0xbb, 0x0d, 0x69, 0x43, 0x7a, 0x3a, 0xd7, 0x62, 0x2b, 0x24, - 0x43, 0xc5, 0xc5, 0x1d, 0x6c, 0x0d, 0xb0, 0xdb, 0x98, 0x0a, 0x76, 0xe2, 0x35, 0x3a, 0x86, 0x59, - 0xdd, 0x26, 0x7d, 0xc7, 0x6b, 0x94, 0xfd, 0x9d, 0xa3, 0xfd, 0xab, 0x9b, 0xf5, 0xd2, 0xaf, 0x9b, - 0xf5, 0x1d, 0xd3, 0xf2, 0x2e, 0xfa, 0x6d, 0xb5, 0x43, 0x6c, 0xed, 0xa5, 0xe5, 0xd0, 0xce, 0x85, - 0xa5, 0x6b, 0xe7, 0xec, 0xe1, 0x19, 0x35, 0xbe, 0x68, 0xde, 0xd7, 0x1e, 0xa6, 0xea, 0x1b, 0xc7, - 0x6b, 0x31, 0x82, 0x82, 0x60, 0x71, 0x6c, 0x89, 0xf6, 0x88, 0x43, 0xb1, 0xf2, 0x43, 0x82, 0xc5, - 0x53, 0x97, 0x0c, 0x2c, 0x6a, 0x11, 0x27, 0x32, 0xba, 0x08, 0x65, 0x8a, 0x2f, 0x03, 0x97, 0xd3, - 0x2d, 0xff, 0x31, 0x61, 0x7d, 0x2a, 0xd7, 0x7a, 0x39, 0xd7, 0xfa, 0xf4, 0x7f, 0x5b, 0xaf, 0xc1, - 0x52, 0xc2, 0x25, 0xf3, 0xbe, 0x0d, 0xb5, 0xd7, 0xa4, 0x6b, 0xf0, 0x6d, 0x16, 0xdc, 0x2b, 0x2b, - 0x50, 0x4f, 0x0b, 0x19, 0x60, 0x07, 0x56, 0x5a, 0xb8, 0x8b, 0x75, 0x8a, 0x8b, 0x19, 0x0f, 0x60, - 0x55, 0xd0, 0x26, 0x31, 0x36, 0x19, 0xe0, 0xe2, 0x46, 0x86, 0x18, 0x4e, 0xcb, 0x30, 0xfb, 0xb0, - 0xf4, 0xbc, 0xab, 0x5b, 0xf6, 0x91, 0xee, 0x75, 0x2e, 0x22, 0xc2, 0x1a, 0x80, 0xad, 0x0f, 0xcf, - 0x3a, 0xfe, 0x06, 0x65, 0xa0, 0x39, 0x5b, 0x1f, 0x06, 0x4a, 0xaa, 0xd4, 0x01, 0x25, 0x6b, 0x18, - 0x69, 0x03, 0xe6, 0x83, 0xb7, 0xf9, 0x36, 0xaa, 0x70, 0x9f, 0x29, 0x58, 0xc9, 0x2e, 0xa0, 0x43, - 0xc3, 0x78, 0xd5, 0xd7, 0x5d, 0xc3, 0xd2, 0x63, 0xff, 0x32, 0x54, 0x4c, 0xf6, 0x8a, 0xdd, 0xd9, - 0x78, 0xad, 0x2c, 0x43, 0x2d, 0x55, 0xc1, 0x40, 0x07, 0xb0, 0x1c, 0xfe, 0xc0, 0xbb, 0xb0, 0x1a, - 0x51, 0x07, 0x05, 0x5c, 0xe8, 0xeb, 0x6d, 0x0f, 0xbb, 0xba, 0x47, 0xdc, 0x04, 0x8b, 0xb0, 0x57, - 0x11, 0x2b, 0x5a, 0x33, 0x5f, 0xe3, 0x0a, 0xde, 0xd7, 0x5d, 0x58, 0xb1, 0x2f, 0x01, 0xb7, 0x0d, - 0xd5, 0x43, 0xc3, 0x38, 0xee, 0x1b, 0x26, 0x8e, 0x40, 0x75, 0x98, 0xf9, 0xec, 0xaf, 0x19, 0x25, - 0x5c, 0xf8, 0xa1, 0x1b, 0x0b, 0xe3, 0x0b, 0x83, 0x42, 0xec, 0x3f, 0xd4, 0x2f, 0x43, 0x2d, 0xa5, - 0x0d, 0x11, 0xfb, 0x7f, 0x2a, 0x50, 0x3e, 0xa1, 0x26, 0x3a, 0x81, 0x4a, 0x74, 0x1f, 0xd1, 0xba, - 0x9a, 0x1e, 0x4d, 0x2a, 0x77, 0xab, 0xe5, 0x8d, 0x7c, 0x41, 0x88, 0x45, 0xa7, 0x30, 0x17, 0x5f, - 0x4c, 0x24, 0xc8, 0xf9, 0xfb, 0x2d, 0x3f, 0x9a, 0xa0, 0x60, 0xc4, 0x8f, 0x30, 0x9f, 0xcc, 0x1e, - 0xda, 0xe4, 0x4b, 0x32, 0x22, 0x2c, 0x3f, 0x9e, 0x2c, 0x62, 0xe8, 0x36, 0x54, 0xb9, 0x48, 0xa2, - 0x2d, 0xbe, 0x30, 0x3b, 0xdf, 0xf2, 0x76, 0xa1, 0x2e, 0x79, 0x46, 0x2a, 0xaf, 0x59, 0x67, 0x64, - 0x85, 0x3f, 0xeb, 0x8c, 0xcc, 0xe0, 0xa3, 0x77, 0x00, 0xe3, 0x10, 0x23, 0xa1, 0xa7, 0xc2, 0x50, - 0x90, 0x95, 0x49, 0x12, 0x06, 0x7d, 0x01, 0x33, 0xc1, 0x5b, 0xf4, 0x30, 0x53, 0x1c, 0xa1, 0xd6, - 0x72, 0x76, 0x19, 0xe5, 0x03, 0xdc, 0x4b, 0x84, 0x1c, 0x09, 0x07, 0x8b, 0x33, 0x43, 0xde, 0x9c, - 0xa8, 0x61, 0xdc, 0x33, 0x58, 0x48, 0x07, 0x1e, 0x3d, 0xc9, 0xee, 0x16, 0x4f, 0xdf, 0x2a, 0x92, - 0xa5, 0x8c, 0x47, 0xb1, 0xcd, 0x34, 0xce, 0x0d, 0x82, 0x4c, 0xe3, 0x7c, 0xee, 0xc7, 0xc6, 0x63, - 0x74, 0x8e, 0x71, 0x9e, 0xbe, 0x55, 0x24, 0x63, 0x07, 0x9c, 0x40, 0x25, 0x9a, 0x17, 0x62, 0xa0, - 0xb9, 0x91, 0x23, 0x06, 0x9a, 0x1f, 0x35, 0x7e, 0x1f, 0x12, 0xe3, 0x43, 0xec, 0x83, 0x38, 0x87, - 0xc4, 0x3e, 0x64, 0xcc, 0x9f, 0xa3, 0xe3, 0xab, 0xdb, 0xa6, 0x74, 0x7d, 0xdb, 0x94, 0x7e, 0xdf, - 0x36, 0xa5, 0x6f, 0xa3, 0x66, 0xe9, 0x7a, 0xd4, 0x2c, 0xfd, 0x1c, 0x35, 0x4b, 0x9f, 0x76, 0x0b, - 0xff, 0xde, 0x87, 0xf1, 0x77, 0x55, 0xf0, 0x47, 0xdf, 0x9e, 0x0d, 0x3e, 0x99, 0x0e, 0xfe, 0x06, - 0x00, 0x00, 0xff, 0xff, 0xe3, 0xc7, 0x5c, 0xd8, 0x73, 0x09, 0x00, 0x00, + // 585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdf, 0x6e, 0xd2, 0x50, + 0x18, 0xa7, 0x63, 0x43, 0xf8, 0x9c, 0xdb, 0x72, 0x64, 0x03, 0x2b, 0x96, 0xa5, 0xf3, 0xcf, 0xb2, + 0xc4, 0xd6, 0xe1, 0x1b, 0xb0, 0xc4, 0xe8, 0x62, 0xa3, 0xa9, 0x9a, 0x18, 0x6f, 0xcc, 0x81, 0x1e, + 0x4a, 0x63, 0xdb, 0x83, 0xfd, 0x3a, 0x82, 0x0f, 0x61, 0xe2, 0x23, 0xf8, 0x0a, 0xbe, 0xc5, 0x2e, + 0x77, 0x69, 0xbc, 0x58, 0x0c, 0xbc, 0x88, 0xa1, 0x6b, 0x0f, 0x2d, 0x14, 0xb8, 0xf0, 0xee, 0x1c, + 0x7e, 0x7f, 0xbe, 0x5f, 0xbe, 0xfc, 0xe8, 0x81, 0x9a, 0xdb, 0xf1, 0xf4, 0x5e, 0x27, 0x70, 0x2c, + 0x9b, 0xe9, 0xc3, 0x53, 0x3d, 0x1c, 0x69, 0x83, 0x80, 0x87, 0x9c, 0xec, 0xb8, 0x1d, 0x4f, 0x8b, + 0x01, 0x6d, 0x78, 0x2a, 0x57, 0x6d, 0x6e, 0xf3, 0x08, 0xd2, 0xa7, 0xa7, 0x1b, 0x96, 0xdc, 0x98, + 0x93, 0x27, 0x82, 0x08, 0x55, 0xbf, 0x4b, 0x70, 0xdb, 0x40, 0xfb, 0x7d, 0x40, 0x7d, 0xec, 0xb1, + 0x80, 0x1c, 0x40, 0x09, 0x99, 0x6f, 0xb1, 0xa0, 0x2e, 0x1d, 0x4a, 0xc7, 0x15, 0x33, 0xbe, 0x11, + 0x19, 0xca, 0x01, 0xeb, 0x32, 0x67, 0xc8, 0x82, 0xfa, 0x46, 0x84, 0x88, 0x3b, 0x39, 0x87, 0x12, + 0xf5, 0xf8, 0x85, 0x1f, 0xd6, 0x8b, 0x53, 0xa4, 0xdd, 0xba, 0xbc, 0x6e, 0x16, 0xfe, 0x5c, 0x37, + 0x4f, 0x6c, 0x27, 0xec, 0x5f, 0x74, 0xb4, 0x2e, 0xf7, 0xf4, 0x17, 0x8e, 0x8f, 0xdd, 0xbe, 0x43, + 0xf5, 0x5e, 0x7c, 0x78, 0x8a, 0xd6, 0x17, 0x3d, 0xfc, 0x36, 0x60, 0xa8, 0xbd, 0xf2, 0x43, 0x33, + 0x76, 0x50, 0xf7, 0xe1, 0x6e, 0x2a, 0x8e, 0xc9, 0x70, 0xc0, 0x7d, 0x64, 0xea, 0x4f, 0x09, 0xb6, + 0x0d, 0xb4, 0xdf, 0x06, 0x7c, 0xe8, 0xa0, 0xc3, 0x7d, 0xb2, 0x07, 0x45, 0x64, 0x5f, 0xa3, 0x90, + 0x9b, 0xe6, 0xf4, 0x98, 0x4a, 0xbe, 0xb1, 0x34, 0x79, 0x71, 0x69, 0xf2, 0xcd, 0xff, 0x4e, 0x7e, + 0x00, 0xd5, 0x74, 0x42, 0x11, 0xfd, 0x08, 0x76, 0x0d, 0xb4, 0x5f, 0x72, 0xd7, 0x12, 0x4b, 0x5e, + 0x08, 0xaf, 0xde, 0x83, 0xda, 0x1c, 0x49, 0xe8, 0x1f, 0x03, 0x31, 0xd0, 0x36, 0x99, 0xcb, 0x28, + 0xb2, 0x15, 0x16, 0x0d, 0x90, 0x17, 0x79, 0x0b, 0x2e, 0x1e, 0x1f, 0xb2, 0x15, 0x5b, 0x14, 0x2e, + 0x19, 0x9e, 0x70, 0xd1, 0xe0, 0x8e, 0x81, 0xf6, 0x99, 0x4b, 0x1d, 0xaf, 0x4d, 0xc3, 0x6e, 0x9f, + 0x3c, 0x00, 0xf0, 0xe8, 0xe8, 0x73, 0x77, 0xfa, 0x0b, 0xc6, 0x3e, 0x15, 0x8f, 0x8e, 0x22, 0x0a, + 0xaa, 0x35, 0xd8, 0xcf, 0xf0, 0x85, 0x51, 0x03, 0xca, 0x09, 0x90, 0x13, 0x82, 0xc0, 0x5e, 0x82, + 0x0a, 0xc5, 0xbb, 0x68, 0xf4, 0x87, 0x81, 0x45, 0x43, 0x66, 0x72, 0x97, 0x91, 0x3a, 0xdc, 0xa2, + 0x96, 0x15, 0x30, 0xc4, 0xb8, 0xaa, 0xc9, 0x95, 0x1c, 0xc3, 0x66, 0xc0, 0x5d, 0x16, 0xf5, 0x60, + 0xa7, 0x55, 0xd5, 0xb2, 0x7f, 0x13, 0x6d, 0xaa, 0x36, 0x23, 0x46, 0x9c, 0x6f, 0x66, 0x9a, 0x4c, + 0x6b, 0xfd, 0xda, 0x82, 0xa2, 0x81, 0x36, 0x79, 0x0d, 0x65, 0xb1, 0xf2, 0xfb, 0xf3, 0x46, 0xa9, + 0xa2, 0xca, 0x47, 0x2b, 0xc0, 0xc4, 0x95, 0xbc, 0x81, 0xca, 0x6c, 0xf7, 0x8d, 0x1c, 0x85, 0x40, + 0xe5, 0x87, 0xab, 0x50, 0x61, 0xf8, 0x11, 0xb6, 0x33, 0xc5, 0x6a, 0xe6, 0xa8, 0xd2, 0x04, 0xf9, + 0xc9, 0x1a, 0x82, 0x70, 0xa6, 0xb0, 0x3b, 0x5f, 0x39, 0x35, 0x47, 0x3b, 0xc7, 0x91, 0x4f, 0xd6, + 0x73, 0xb2, 0x23, 0xb2, 0x7d, 0xcc, 0x1f, 0x91, 0xe1, 0x2c, 0x19, 0x91, 0xdb, 0x57, 0x62, 0x02, + 0xa4, 0xcb, 0x9a, 0xa3, 0x9c, 0xc1, 0xf2, 0xa3, 0x95, 0xb0, 0xf0, 0x3c, 0x83, 0xad, 0x9b, 0xde, + 0xd6, 0x97, 0xf1, 0xe5, 0xc3, 0x65, 0x48, 0x3a, 0x58, 0xaa, 0xca, 0x79, 0xc1, 0x66, 0x70, 0x6e, + 0xb0, 0xc5, 0xce, 0xb6, 0xcf, 0x2f, 0xc7, 0x8a, 0x74, 0x35, 0x56, 0xa4, 0xbf, 0x63, 0x45, 0xfa, + 0x31, 0x51, 0x0a, 0x57, 0x13, 0xa5, 0xf0, 0x7b, 0xa2, 0x14, 0x3e, 0x3d, 0x5b, 0xfb, 0x39, 0x1b, + 0x89, 0x17, 0x22, 0xfa, 0xb0, 0x75, 0x4a, 0xd1, 0xeb, 0xf0, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xa9, 0x06, 0xe7, 0xaa, 0x7c, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1219,31 +804,22 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { // Submit a transfer request to the bridge module. - Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) + Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, error) // Submit a provision to the bridge module. - Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) + 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 *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) + 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 *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) + 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 *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) + 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 *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) + 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 *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) - // AddGuardian adds a guardian to the bridge module. - AddGuardian(ctx context.Context, in *AddGuardianRequest, opts ...grpc.CallOption) (*AddGuardianResponse, error) - // RemoveGuardian removes a guardian from the bridge module. - RemoveGuardian(ctx context.Context, in *RemoveGuardianRequest, opts ...grpc.CallOption) (*RemoveGuardianResponse, error) - // AddOperator adds an operator to the bridge module. - AddOperator(ctx context.Context, in *AddOperatorRequest, opts ...grpc.CallOption) (*AddOperatorResponse, error) - // RemoveOperator removes an operator from the bridge module. - RemoveOperator(ctx context.Context, in *RemoveOperatorRequest, opts ...grpc.CallOption) (*RemoveOperatorResponse, error) - // AddJudge adds a judge to the bridge module. - AddJudge(ctx context.Context, in *AddJudgeRequest, opts ...grpc.CallOption) (*AddJudgeResponse, error) - // RemoveJudge removes a judge from the bridge module. - RemoveJudge(ctx context.Context, in *RemoveJudgeRequest, opts ...grpc.CallOption) (*RemoveJudgeResponse, error) + Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOption) (*MsgClaimResponse, error) + // UpdateRole updates the role of an address in the bridge module. + // The role can be one of the following: guardian, operator, judge. + UpdateRole(ctx context.Context, in *MsgUpdateRole, opts ...grpc.CallOption) (*MsgUpdateRoleResponse, error) } type msgClient struct { @@ -1254,8 +830,8 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) { - out := new(TransferResponse) +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 @@ -1263,8 +839,8 @@ func (c *msgClient) Transfer(ctx context.Context, in *TransferRequest, opts ...g return out, nil } -func (c *msgClient) Provision(ctx context.Context, in *ProvisionRequest, opts ...grpc.CallOption) (*ProvisionResponse, error) { - out := new(ProvisionResponse) +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 @@ -1272,8 +848,8 @@ func (c *msgClient) Provision(ctx context.Context, in *ProvisionRequest, opts .. return out, nil } -func (c *msgClient) HoldTransfer(ctx context.Context, in *HoldTransferRequest, opts ...grpc.CallOption) (*HoldTransferResponse, error) { - out := new(HoldTransferResponse) +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 @@ -1281,8 +857,8 @@ func (c *msgClient) HoldTransfer(ctx context.Context, in *HoldTransferRequest, o return out, nil } -func (c *msgClient) ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequest, opts ...grpc.CallOption) (*ReleaseTransferResponse, error) { - out := new(ReleaseTransferResponse) +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 @@ -1290,8 +866,8 @@ func (c *msgClient) ReleaseTransfer(ctx context.Context, in *ReleaseTransferRequ return out, nil } -func (c *msgClient) RemoveProvision(ctx context.Context, in *RemoveProvisionRequest, opts ...grpc.CallOption) (*RemoveProvisionResponse, error) { - out := new(RemoveProvisionResponse) +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 @@ -1299,8 +875,8 @@ func (c *msgClient) RemoveProvision(ctx context.Context, in *RemoveProvisionRequ return out, nil } -func (c *msgClient) ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts ...grpc.CallOption) (*ClaimBatchResponse, error) { - out := new(ClaimBatchResponse) +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 @@ -1308,8 +884,8 @@ func (c *msgClient) ClaimBatch(ctx context.Context, in *ClaimBatchRequest, opts return out, nil } -func (c *msgClient) Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) { - out := new(ClaimResponse) +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 @@ -1317,132 +893,63 @@ func (c *msgClient) Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.Ca return out, nil } -func (c *msgClient) AddGuardian(ctx context.Context, in *AddGuardianRequest, opts ...grpc.CallOption) (*AddGuardianResponse, error) { - out := new(AddGuardianResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddGuardian", in, out, opts...) +func (c *msgClient) UpdateRole(ctx context.Context, in *MsgUpdateRole, opts ...grpc.CallOption) (*MsgUpdateRoleResponse, error) { + out := new(MsgUpdateRoleResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/UpdateRole", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) RemoveGuardian(ctx context.Context, in *RemoveGuardianRequest, opts ...grpc.CallOption) (*RemoveGuardianResponse, error) { - out := new(RemoveGuardianResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveGuardian", 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) + // UpdateRole updates the role of an address in the bridge module. + // The role can be one of the following: guardian, operator, judge. + UpdateRole(context.Context, *MsgUpdateRole) (*MsgUpdateRoleResponse, error) } -func (c *msgClient) AddOperator(ctx context.Context, in *AddOperatorRequest, opts ...grpc.CallOption) (*AddOperatorResponse, error) { - out := new(AddOperatorResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddOperator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { } -func (c *msgClient) RemoveOperator(ctx context.Context, in *RemoveOperatorRequest, opts ...grpc.CallOption) (*RemoveOperatorResponse, error) { - out := new(RemoveOperatorResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveOperator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) AddJudge(ctx context.Context, in *AddJudgeRequest, opts ...grpc.CallOption) (*AddJudgeResponse, error) { - out := new(AddJudgeResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/AddJudge", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RemoveJudge(ctx context.Context, in *RemoveJudgeRequest, opts ...grpc.CallOption) (*RemoveJudgeResponse, error) { - out := new(RemoveJudgeResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/RemoveJudge", 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, *TransferRequest) (*TransferResponse, error) - // Submit a provision to the bridge module. - Provision(context.Context, *ProvisionRequest) (*ProvisionResponse, error) - // Set the time lock value from default value to uint64.max for specific confirmed provision. - HoldTransfer(context.Context, *HoldTransferRequest) (*HoldTransferResponse, error) - // Set the time lock value to 0 for specific confirmed provision. - ReleaseTransfer(context.Context, *ReleaseTransferRequest) (*ReleaseTransferResponse, error) - // Remove a specific confirmed provision (reset for specific sequence number). - RemoveProvision(context.Context, *RemoveProvisionRequest) (*RemoveProvisionResponse, error) - // ClaimBatch processes the claiming of multiple claimable provisions in a single operation - ClaimBatch(context.Context, *ClaimBatchRequest) (*ClaimBatchResponse, error) - // Claim processes the claiming of a provision with a specific sequence number - Claim(context.Context, *ClaimRequest) (*ClaimResponse, error) - // AddGuardian adds a guardian to the bridge module. - AddGuardian(context.Context, *AddGuardianRequest) (*AddGuardianResponse, error) - // RemoveGuardian removes a guardian from the bridge module. - RemoveGuardian(context.Context, *RemoveGuardianRequest) (*RemoveGuardianResponse, error) - // AddOperator adds an operator to the bridge module. - AddOperator(context.Context, *AddOperatorRequest) (*AddOperatorResponse, error) - // RemoveOperator removes an operator from the bridge module. - RemoveOperator(context.Context, *RemoveOperatorRequest) (*RemoveOperatorResponse, error) - // AddJudge adds a judge to the bridge module. - AddJudge(context.Context, *AddJudgeRequest) (*AddJudgeResponse, error) - // RemoveJudge removes a judge from the bridge module. - RemoveJudge(context.Context, *RemoveJudgeRequest) (*RemoveJudgeResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *TransferRequest) (*TransferResponse, error) { +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 *ProvisionRequest) (*ProvisionResponse, error) { +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 *HoldTransferRequest) (*HoldTransferResponse, error) { +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 *ReleaseTransferRequest) (*ReleaseTransferResponse, error) { +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 *RemoveProvisionRequest) (*RemoveProvisionResponse, error) { +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 *ClaimBatchRequest) (*ClaimBatchResponse, error) { +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 *ClaimRequest) (*ClaimResponse, error) { +func (*UnimplementedMsgServer) Claim(ctx context.Context, req *MsgClaim) (*MsgClaimResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") } -func (*UnimplementedMsgServer) AddGuardian(ctx context.Context, req *AddGuardianRequest) (*AddGuardianResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddGuardian not implemented") -} -func (*UnimplementedMsgServer) RemoveGuardian(ctx context.Context, req *RemoveGuardianRequest) (*RemoveGuardianResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveGuardian not implemented") -} -func (*UnimplementedMsgServer) AddOperator(ctx context.Context, req *AddOperatorRequest) (*AddOperatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddOperator not implemented") -} -func (*UnimplementedMsgServer) RemoveOperator(ctx context.Context, req *RemoveOperatorRequest) (*RemoveOperatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveOperator not implemented") -} -func (*UnimplementedMsgServer) AddJudge(ctx context.Context, req *AddJudgeRequest) (*AddJudgeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddJudge not implemented") -} -func (*UnimplementedMsgServer) RemoveJudge(ctx context.Context, req *RemoveJudgeRequest) (*RemoveJudgeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveJudge not implemented") +func (*UnimplementedMsgServer) UpdateRole(ctx context.Context, req *MsgUpdateRole) (*MsgUpdateRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -1450,7 +957,7 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { } func _Msg_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransferRequest) + in := new(MsgTransfer) if err := dec(in); err != nil { return nil, err } @@ -1462,13 +969,13 @@ func _Msg_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/lbm.fbridge.v1.Msg/Transfer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Transfer(ctx, req.(*TransferRequest)) + 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(ProvisionRequest) + in := new(MsgProvision) if err := dec(in); err != nil { return nil, err } @@ -1480,13 +987,13 @@ func _Msg_Provision_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/lbm.fbridge.v1.Msg/Provision", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Provision(ctx, req.(*ProvisionRequest)) + 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(HoldTransferRequest) + in := new(MsgHoldTransfer) if err := dec(in); err != nil { return nil, err } @@ -1498,13 +1005,13 @@ func _Msg_HoldTransfer_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/lbm.fbridge.v1.Msg/HoldTransfer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).HoldTransfer(ctx, req.(*HoldTransferRequest)) + 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(ReleaseTransferRequest) + in := new(MsgReleaseTransfer) if err := dec(in); err != nil { return nil, err } @@ -1516,13 +1023,13 @@ func _Msg_ReleaseTransfer_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/lbm.fbridge.v1.Msg/ReleaseTransfer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ReleaseTransfer(ctx, req.(*ReleaseTransferRequest)) + 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(RemoveProvisionRequest) + in := new(MsgRemoveProvision) if err := dec(in); err != nil { return nil, err } @@ -1534,13 +1041,13 @@ func _Msg_RemoveProvision_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/lbm.fbridge.v1.Msg/RemoveProvision", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveProvision(ctx, req.(*RemoveProvisionRequest)) + 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(ClaimBatchRequest) + in := new(MsgClaimBatch) if err := dec(in); err != nil { return nil, err } @@ -1552,13 +1059,13 @@ func _Msg_ClaimBatch_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: "/lbm.fbridge.v1.Msg/ClaimBatch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClaimBatch(ctx, req.(*ClaimBatchRequest)) + 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(ClaimRequest) + in := new(MsgClaim) if err := dec(in); err != nil { return nil, err } @@ -1570,115 +1077,25 @@ func _Msg_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface FullMethod: "/lbm.fbridge.v1.Msg/Claim", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Claim(ctx, req.(*ClaimRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_AddGuardian_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddGuardianRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AddGuardian(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/AddGuardian", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddGuardian(ctx, req.(*AddGuardianRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemoveGuardian_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveGuardianRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemoveGuardian(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/RemoveGuardian", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveGuardian(ctx, req.(*RemoveGuardianRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_AddOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddOperatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AddOperator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/AddOperator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddOperator(ctx, req.(*AddOperatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemoveOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveOperatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemoveOperator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/RemoveOperator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveOperator(ctx, req.(*RemoveOperatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_AddJudge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddJudgeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AddJudge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/AddJudge", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddJudge(ctx, req.(*AddJudgeRequest)) + return srv.(MsgServer).Claim(ctx, req.(*MsgClaim)) } return interceptor(ctx, in, info, handler) } -func _Msg_RemoveJudge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveJudgeRequest) +func _Msg_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRole) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RemoveJudge(ctx, in) + return srv.(MsgServer).UpdateRole(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/RemoveJudge", + FullMethod: "/lbm.fbridge.v1.Msg/UpdateRole", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveJudge(ctx, req.(*RemoveJudgeRequest)) + return srv.(MsgServer).UpdateRole(ctx, req.(*MsgUpdateRole)) } return interceptor(ctx, in, info, handler) } @@ -1716,35 +1133,15 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_Claim_Handler, }, { - MethodName: "AddGuardian", - Handler: _Msg_AddGuardian_Handler, - }, - { - MethodName: "RemoveGuardian", - Handler: _Msg_RemoveGuardian_Handler, - }, - { - MethodName: "AddOperator", - Handler: _Msg_AddOperator_Handler, - }, - { - MethodName: "RemoveOperator", - Handler: _Msg_RemoveOperator_Handler, - }, - { - MethodName: "AddJudge", - Handler: _Msg_AddJudge_Handler, - }, - { - MethodName: "RemoveJudge", - Handler: _Msg_RemoveJudge_Handler, + MethodName: "UpdateRole", + Handler: _Msg_UpdateRole_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "lbm/fbridge/v1/tx.proto", } -func (m *TransferRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgTransfer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1754,12 +1151,12 @@ func (m *TransferRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TransferRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgTransfer) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1791,7 +1188,7 @@ func (m *TransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TransferResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgTransferResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1801,12 +1198,12 @@ func (m *TransferResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TransferResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgTransferResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1814,7 +1211,7 @@ func (m *TransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ProvisionRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgProvision) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1824,12 +1221,12 @@ func (m *ProvisionRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ProvisionRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgProvision) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1866,7 +1263,7 @@ func (m *ProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ProvisionResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgProvisionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1876,12 +1273,12 @@ func (m *ProvisionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ProvisionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgProvisionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1889,7 +1286,7 @@ func (m *ProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *HoldTransferRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgHoldTransfer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1899,12 +1296,12 @@ func (m *HoldTransferRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HoldTransferRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgHoldTransfer) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HoldTransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgHoldTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1917,7 +1314,7 @@ func (m *HoldTransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *HoldTransferResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgHoldTransferResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1927,12 +1324,12 @@ func (m *HoldTransferResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HoldTransferResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgHoldTransferResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgHoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1940,7 +1337,7 @@ func (m *HoldTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ReleaseTransferRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgReleaseTransfer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1950,12 +1347,12 @@ func (m *ReleaseTransferRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ReleaseTransferRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgReleaseTransfer) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ReleaseTransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgReleaseTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1968,7 +1365,7 @@ func (m *ReleaseTransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *ReleaseTransferResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgReleaseTransferResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1978,12 +1375,12 @@ func (m *ReleaseTransferResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ReleaseTransferResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgReleaseTransferResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1991,7 +1388,7 @@ func (m *ReleaseTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *RemoveProvisionRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgRemoveProvision) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2001,12 +1398,12 @@ func (m *RemoveProvisionRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RemoveProvisionRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRemoveProvision) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RemoveProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRemoveProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2019,7 +1416,7 @@ func (m *RemoveProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *RemoveProvisionResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRemoveProvisionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2029,12 +1426,12 @@ func (m *RemoveProvisionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RemoveProvisionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRemoveProvisionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2042,7 +1439,7 @@ func (m *RemoveProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *ClaimBatchRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgClaimBatch) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2052,12 +1449,12 @@ func (m *ClaimBatchRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ClaimBatchRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgClaimBatch) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ClaimBatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgClaimBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2070,7 +1467,7 @@ func (m *ClaimBatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ClaimBatchResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgClaimBatchResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2080,12 +1477,12 @@ func (m *ClaimBatchResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ClaimBatchResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgClaimBatchResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2093,7 +1490,7 @@ func (m *ClaimBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ClaimRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2103,12 +1500,12 @@ func (m *ClaimRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ClaimRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgClaim) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ClaimRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2121,7 +1518,7 @@ func (m *ClaimRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ClaimResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgClaimResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2131,12 +1528,12 @@ func (m *ClaimResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ClaimResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgClaimResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2144,7 +1541,7 @@ func (m *ClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AddGuardianRequest) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateRole) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2154,27 +1551,32 @@ func (m *AddGuardianRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AddGuardianRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateRole) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AddGuardianRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateRole) 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))) + if m.Role != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *AddGuardianResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateRoleResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2184,12 +1586,12 @@ func (m *AddGuardianResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AddGuardianResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateRoleResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AddGuardianResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2197,405 +1599,140 @@ func (m *AddGuardianResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RemoveGuardianRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +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++ } - return dAtA[:n], nil -} - -func (m *RemoveGuardianRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *RemoveGuardianRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MsgTransfer) Size() (n int) { + if m == nil { + return 0 + } 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 + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } - return len(dAtA) - i, nil + 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 *RemoveGuardianResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgTransferResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + return n } -func (m *RemoveGuardianResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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 *RemoveGuardianResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MsgProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - return len(dAtA) - i, nil + return n } -func (m *AddOperatorRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgHoldTransfer) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n } -func (m *AddOperatorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgHoldTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n } -func (m *AddOperatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MsgReleaseTransfer) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Operator) > 0 { - i -= len(m.Operator) - copy(dAtA[i:], m.Operator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) - i-- - dAtA[i] = 0xa + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) } - return len(dAtA) - i, nil + return n } -func (m *AddOperatorResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgReleaseTransferResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + return n } -func (m *AddOperatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgRemoveProvision) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovTx(uint64(m.Seq)) + } + return n } -func (m *AddOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MsgRemoveProvisionResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - return len(dAtA) - i, nil + return n } -func (m *RemoveOperatorRequest) 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 *RemoveOperatorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveOperatorRequest) 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 = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveOperatorResponse) 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 *RemoveOperatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AddJudgeRequest) 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 *AddJudgeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddJudgeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Judge) > 0 { - i -= len(m.Judge) - copy(dAtA[i:], m.Judge) - i = encodeVarintTx(dAtA, i, uint64(len(m.Judge))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddJudgeResponse) 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 *AddJudgeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddJudgeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RemoveJudgeRequest) 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 *RemoveJudgeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveJudgeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Judge) > 0 { - i -= len(m.Judge) - copy(dAtA[i:], m.Judge) - i = encodeVarintTx(dAtA, i, uint64(len(m.Judge))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveJudgeResponse) 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 *RemoveJudgeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveJudgeResponse) 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 *TransferRequest) 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 *TransferResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ProvisionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = 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 *ProvisionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *HoldTransferRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) - } - return n -} - -func (m *HoldTransferResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ReleaseTransferRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) - } - return n -} - -func (m *ReleaseTransferResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RemoveProvisionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovTx(uint64(m.Seq)) - } - return n -} - -func (m *RemoveProvisionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ClaimBatchRequest) Size() (n int) { +func (m *MsgClaimBatch) Size() (n int) { if m == nil { return 0 } @@ -2607,7 +1744,7 @@ func (m *ClaimBatchRequest) Size() (n int) { return n } -func (m *ClaimBatchResponse) Size() (n int) { +func (m *MsgClaimBatchResponse) Size() (n int) { if m == nil { return 0 } @@ -2616,7 +1753,7 @@ func (m *ClaimBatchResponse) Size() (n int) { return n } -func (m *ClaimRequest) Size() (n int) { +func (m *MsgClaim) Size() (n int) { if m == nil { return 0 } @@ -2628,7 +1765,7 @@ func (m *ClaimRequest) Size() (n int) { return n } -func (m *ClaimResponse) Size() (n int) { +func (m *MsgClaimResponse) Size() (n int) { if m == nil { return 0 } @@ -2637,679 +1774,38 @@ func (m *ClaimResponse) Size() (n int) { return n } -func (m *AddGuardianRequest) Size() (n int) { +func (m *MsgUpdateRole) 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 *AddGuardianResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RemoveGuardianRequest) 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 *RemoveGuardianResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AddOperatorRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Operator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *AddOperatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RemoveOperatorRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Operator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *RemoveOperatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AddJudgeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Judge) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *AddJudgeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RemoveJudgeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Judge) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *RemoveJudgeResponse) 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 *TransferRequest) 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: TransferRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransferRequest: 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 *TransferResponse) 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: TransferResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransferResponse: 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 *ProvisionRequest) 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: ProvisionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProvisionRequest: 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 ErrIntOverflowTx - } - 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 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 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 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 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 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 *ProvisionResponse) 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: ProvisionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProvisionResponse: 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 *HoldTransferRequest) 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: HoldTransferRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HoldTransferRequest: 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 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 + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } - return nil -} -func (m *HoldTransferResponse) 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: HoldTransferResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HoldTransferResponse: 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 m.Role != 0 { + n += 1 + sovTx(uint64(m.Role)) } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *MsgUpdateRoleResponse) Size() (n int) { + if m == nil { + return 0 } - return nil + 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 *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { +func (m *MsgTransfer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3332,17 +1828,17 @@ func (m *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReleaseTransferRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTransfer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReleaseTransferRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTransfer: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3352,116 +1848,29 @@ func (m *ReleaseTransferRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + stringLen |= 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 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReleaseTransferResponse) 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: ReleaseTransferResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReleaseTransferResponse: 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 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthTx } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveProvisionRequest) 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 { + if postIndex > 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: RemoveProvisionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveProvisionRequest: 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3471,116 +1880,29 @@ func (m *RemoveProvisionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + stringLen |= 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 *RemoveProvisionResponse) 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: RemoveProvisionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveProvisionResponse: 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 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClaimBatchRequest) 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 + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if postIndex > l { + return io.ErrUnexpectedEOF } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClaimBatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimBatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxClaims", wireType) + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - m.MaxClaims = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3590,11 +1912,26 @@ func (m *ClaimBatchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxClaims |= uint64(b&0x7F) << shift + 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:]) @@ -3616,7 +1953,7 @@ func (m *ClaimBatchRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimBatchResponse) Unmarshal(dAtA []byte) error { +func (m *MsgTransferResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3639,10 +1976,10 @@ func (m *ClaimBatchResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimBatchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTransferResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3666,7 +2003,7 @@ func (m *ClaimBatchResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimRequest) Unmarshal(dAtA []byte) error { +func (m *MsgProvision) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3689,10 +2026,10 @@ func (m *ClaimRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgProvision: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgProvision: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3714,6 +2051,104 @@ func (m *ClaimRequest) Unmarshal(dAtA []byte) error { 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 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 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 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 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 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:]) @@ -3735,7 +2170,7 @@ func (m *ClaimRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClaimResponse) Unmarshal(dAtA []byte) error { +func (m *MsgProvisionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3758,10 +2193,10 @@ func (m *ClaimResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClaimResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgProvisionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3785,7 +2220,7 @@ func (m *ClaimResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AddGuardianRequest) Unmarshal(dAtA []byte) error { +func (m *MsgHoldTransfer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3808,17 +2243,17 @@ func (m *AddGuardianRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AddGuardianRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgHoldTransfer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AddGuardianRequest: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Guardian", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - var stringLen uint64 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3828,24 +2263,11 @@ func (m *AddGuardianRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Seq |= 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:]) @@ -3867,7 +2289,7 @@ func (m *AddGuardianRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AddGuardianResponse) Unmarshal(dAtA []byte) error { +func (m *MsgHoldTransferResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3890,10 +2312,10 @@ func (m *AddGuardianResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AddGuardianResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgHoldTransferResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AddGuardianResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgHoldTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3917,7 +2339,7 @@ func (m *AddGuardianResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveGuardianRequest) Unmarshal(dAtA []byte) error { +func (m *MsgReleaseTransfer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3940,17 +2362,17 @@ func (m *RemoveGuardianRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveGuardianRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgReleaseTransfer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveGuardianRequest: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Guardian", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - var stringLen uint64 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3960,24 +2382,11 @@ func (m *RemoveGuardianRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Seq |= 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:]) @@ -3999,7 +2408,7 @@ func (m *RemoveGuardianRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveGuardianResponse) Unmarshal(dAtA []byte) error { +func (m *MsgReleaseTransferResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4022,10 +2431,10 @@ func (m *RemoveGuardianResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveGuardianResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgReleaseTransferResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveGuardianResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgReleaseTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4049,7 +2458,7 @@ func (m *RemoveGuardianResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AddOperatorRequest) Unmarshal(dAtA []byte) error { +func (m *MsgRemoveProvision) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4072,17 +2481,17 @@ func (m *AddOperatorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AddOperatorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemoveProvision: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AddOperatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Operator", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - var stringLen uint64 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4092,24 +2501,11 @@ func (m *AddOperatorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Seq |= 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.Operator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4131,7 +2527,7 @@ func (m *AddOperatorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AddOperatorResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRemoveProvisionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4154,10 +2550,10 @@ func (m *AddOperatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AddOperatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemoveProvisionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AddOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRemoveProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4181,7 +2577,7 @@ func (m *AddOperatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveOperatorRequest) Unmarshal(dAtA []byte) error { +func (m *MsgClaimBatch) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4204,17 +2600,17 @@ func (m *RemoveOperatorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveOperatorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgClaimBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveOperatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Operator", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxClaims", wireType) } - var stringLen uint64 + m.MaxClaims = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4224,24 +2620,11 @@ func (m *RemoveOperatorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.MaxClaims |= 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.Operator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4263,7 +2646,7 @@ func (m *RemoveOperatorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveOperatorResponse) Unmarshal(dAtA []byte) error { +func (m *MsgClaimBatchResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4286,10 +2669,10 @@ func (m *RemoveOperatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveOperatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgClaimBatchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgClaimBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4313,7 +2696,7 @@ func (m *RemoveOperatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AddJudgeRequest) Unmarshal(dAtA []byte) error { +func (m *MsgClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4336,17 +2719,17 @@ func (m *AddJudgeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AddJudgeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AddJudgeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Judge", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - var stringLen uint64 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4356,24 +2739,11 @@ func (m *AddJudgeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Seq |= 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.Judge = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4395,7 +2765,7 @@ func (m *AddJudgeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AddJudgeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgClaimResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4418,10 +2788,10 @@ func (m *AddJudgeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AddJudgeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgClaimResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AddJudgeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4445,7 +2815,7 @@ func (m *AddJudgeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveJudgeRequest) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateRole) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4468,15 +2838,15 @@ func (m *RemoveJudgeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveJudgeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateRole: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveJudgeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateRole: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Judge", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4504,8 +2874,27 @@ func (m *RemoveJudgeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Judge = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + 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:]) @@ -4527,7 +2916,7 @@ func (m *RemoveJudgeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveJudgeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateRoleResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4550,10 +2939,10 @@ func (m *RemoveJudgeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveJudgeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateRoleResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveJudgeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 038daf7acd8be6f406795c56c41d5d97b9a0d980 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:23:36 +0900 Subject: [PATCH 05/12] initialize module structure --- x/fbridge/client/cli/query.go | 17 ++++ x/fbridge/client/cli/tx.go | 22 +++++ x/fbridge/keeper/genesis.go | 13 +++ x/fbridge/keeper/grpc_query.go | 53 +++++++++++ x/fbridge/keeper/keeper.go | 2 + x/fbridge/keeper/msg_server.go | 56 +++++++++++ x/fbridge/module/module.go | 164 +++++++++++++++++++++++++++++++++ x/fbridge/types/codec.go | 22 +++++ x/fbridge/types/genesis.go | 8 ++ x/fbridge/types/keys.go | 8 ++ 10 files changed, 365 insertions(+) diff --git a/x/fbridge/client/cli/query.go b/x/fbridge/client/cli/query.go index 7f1e458cd3..6ef6d0424a 100644 --- a/x/fbridge/client/cli/query.go +++ b/x/fbridge/client/cli/query.go @@ -1 +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 index 7f1e458cd3..ef9ef1f04c 100644 --- a/x/fbridge/client/cli/tx.go +++ b/x/fbridge/client/cli/tx.go @@ -1 +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 index b55569d4a4..42ffc544d4 100644 --- a/x/fbridge/keeper/genesis.go +++ b/x/fbridge/keeper/genesis.go @@ -1 +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 index b55569d4a4..877ca1bcda 100644 --- a/x/fbridge/keeper/grpc_query.go +++ b/x/fbridge/keeper/grpc_query.go @@ -1 +1,54 @@ 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) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) GreatestSeqByOperator(ctx context.Context, request *types.GreatestSeqByOperatorRequest) (*types.GreatestSeqByOperatorResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) NextSeqToConfirm(ctx context.Context, request *types.NextSeqToConfirmRequest) (*types.NextSeqToConfirmResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) SubmittedProvision(ctx context.Context, request *types.SubmittedProvisionRequest) (*types.SubmittedProvisionResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) ConfirmedProvision(ctx context.Context, request *types.ConfirmedProvisionRequest) (*types.ConfirmedProvisionResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) Commitments(ctx context.Context, request *types.CommitmentsRequest) (*types.CommitmentsResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) Guardians(ctx context.Context, request *types.GuardiansRequest) (*types.GuardiansResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) Operators(ctx context.Context, request *types.OperatorsRequest) (*types.OperatorsResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) Judges(ctx context.Context, request *types.JudgesRequest) (*types.JudgesResponse, error) { + //TODO implement me + panic("implement me") +} diff --git a/x/fbridge/keeper/keeper.go b/x/fbridge/keeper/keeper.go index b55569d4a4..d22a739529 100644 --- a/x/fbridge/keeper/keeper.go +++ b/x/fbridge/keeper/keeper.go @@ -1 +1,3 @@ package keeper + +type Keeper struct{} diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go index b55569d4a4..5dfc1fdf19 100644 --- a/x/fbridge/keeper/msg_server.go +++ b/x/fbridge/keeper/msg_server.go @@ -1 +1,57 @@ 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) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) Provision(ctx context.Context, provision *types.MsgProvision) (*types.MsgProvisionResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) HoldTransfer(ctx context.Context, transfer *types.MsgHoldTransfer) (*types.MsgHoldTransferResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) ReleaseTransfer(ctx context.Context, transfer *types.MsgReleaseTransfer) (*types.MsgReleaseTransferResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) RemoveProvision(ctx context.Context, provision *types.MsgRemoveProvision) (*types.MsgRemoveProvisionResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) ClaimBatch(ctx context.Context, batch *types.MsgClaimBatch) (*types.MsgClaimBatchResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) Claim(ctx context.Context, claim *types.MsgClaim) (*types.MsgClaimResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) UpdateRole(ctx context.Context, role *types.MsgUpdateRole) (*types.MsgUpdateRoleResponse, error) { + //TODO implement me + panic("implement me") +} diff --git a/x/fbridge/module/module.go b/x/fbridge/module/module.go index b0b78bfd7a..77f5e72e4f 100644 --- a/x/fbridge/module/module.go +++ b/x/fbridge/module/module.go @@ -1 +1,165 @@ 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 index ab1254f4c2..6a0c213529 100644 --- a/x/fbridge/types/codec.go +++ b/x/fbridge/types/codec.go @@ -1 +1,23 @@ package types + +import ( + "github.com/Finschia/finschia-sdk/codec/types" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/types/msgservice" +) + +func RegisterInterfaces(registrar types.InterfaceRegistry) { + registrar.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgTransfer{}, + &MsgProvision{}, + &MsgHoldTransfer{}, + &MsgReleaseTransfer{}, + &MsgRemoveProvision{}, + &MsgClaimBatch{}, + &MsgClaim{}, + &MsgUpdateRole{}, + ) + + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) +} diff --git a/x/fbridge/types/genesis.go b/x/fbridge/types/genesis.go index ab1254f4c2..58322550d4 100644 --- a/x/fbridge/types/genesis.go +++ b/x/fbridge/types/genesis.go @@ -1 +1,9 @@ package types + +func DefaultGenesisState() *GenesisState { + return &GenesisState{} +} + +func ValidateGenesis(data GenesisState) error { + return nil +} diff --git a/x/fbridge/types/keys.go b/x/fbridge/types/keys.go index ab1254f4c2..db369517f7 100644 --- a/x/fbridge/types/keys.go +++ b/x/fbridge/types/keys.go @@ -1 +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 +) From 115e37a608a1e5039a91f5642014d6528f77a9a7 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:29:55 +0900 Subject: [PATCH 06/12] lint --- x/fbridge/keeper/grpc_query.go | 9 --------- x/fbridge/keeper/msg_server.go | 8 -------- x/fbridge/module/module.go | 3 +-- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/x/fbridge/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go index 877ca1bcda..a0dea8662a 100644 --- a/x/fbridge/keeper/grpc_query.go +++ b/x/fbridge/keeper/grpc_query.go @@ -9,46 +9,37 @@ import ( var _ types.QueryServer = Keeper{} func (k Keeper) Params(ctx context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) GreatestSeqByOperator(ctx context.Context, request *types.GreatestSeqByOperatorRequest) (*types.GreatestSeqByOperatorResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) NextSeqToConfirm(ctx context.Context, request *types.NextSeqToConfirmRequest) (*types.NextSeqToConfirmResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) SubmittedProvision(ctx context.Context, request *types.SubmittedProvisionRequest) (*types.SubmittedProvisionResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) ConfirmedProvision(ctx context.Context, request *types.ConfirmedProvisionRequest) (*types.ConfirmedProvisionResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Commitments(ctx context.Context, request *types.CommitmentsRequest) (*types.CommitmentsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Guardians(ctx context.Context, request *types.GuardiansRequest) (*types.GuardiansResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Operators(ctx context.Context, request *types.OperatorsRequest) (*types.OperatorsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Judges(ctx context.Context, request *types.JudgesRequest) (*types.JudgesResponse, error) { - //TODO implement me panic("implement me") } diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go index 5dfc1fdf19..ff709622a9 100644 --- a/x/fbridge/keeper/msg_server.go +++ b/x/fbridge/keeper/msg_server.go @@ -17,41 +17,33 @@ func NewMsgServer(k Keeper) types.MsgServer { } func (m msgServer) Transfer(ctx context.Context, transfer *types.MsgTransfer) (*types.MsgTransferResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) Provision(ctx context.Context, provision *types.MsgProvision) (*types.MsgProvisionResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) HoldTransfer(ctx context.Context, transfer *types.MsgHoldTransfer) (*types.MsgHoldTransferResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) ReleaseTransfer(ctx context.Context, transfer *types.MsgReleaseTransfer) (*types.MsgReleaseTransferResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) RemoveProvision(ctx context.Context, provision *types.MsgRemoveProvision) (*types.MsgRemoveProvisionResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) ClaimBatch(ctx context.Context, batch *types.MsgClaimBatch) (*types.MsgClaimBatchResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) Claim(ctx context.Context, claim *types.MsgClaim) (*types.MsgClaimResponse, error) { - //TODO implement me panic("implement me") } func (m msgServer) UpdateRole(ctx context.Context, role *types.MsgUpdateRole) (*types.MsgUpdateRoleResponse, error) { - //TODO implement me panic("implement me") } diff --git a/x/fbridge/module/module.go b/x/fbridge/module/module.go index 77f5e72e4f..e7f7cfc28c 100644 --- a/x/fbridge/module/module.go +++ b/x/fbridge/module/module.go @@ -7,7 +7,6 @@ import ( "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" @@ -157,7 +156,7 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { retur // } //// WeightedOperations returns the all the gov module operations with their respective weights. -//func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +// func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { // return simulation.WeightedOperations( // simState.AppParams, simState.Cdc, simState.TxConfig, // am.accountKeeper, am.bankKeeper, am.keeper, From 045d683d4d2d051a2f9f215b37675a3768271945 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Wed, 24 Apr 2024 22:34:01 +0900 Subject: [PATCH 07/12] chore --- proto/lbm/fbridge/v1/fbridge.proto | 2 +- proto/lbm/fbridge/v1/query.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/lbm/fbridge/v1/fbridge.proto b/proto/lbm/fbridge/v1/fbridge.proto index 40040fd39e..e5e8c4f211 100644 --- a/proto/lbm/fbridge/v1/fbridge.proto +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -53,4 +53,4 @@ enum Role { GUARDIAN = 1; OPERATOR = 2; JUDGE = 3; -} \ No newline at end of file +} diff --git a/proto/lbm/fbridge/v1/query.proto b/proto/lbm/fbridge/v1/query.proto index a44319fc1d..cb7dc49953 100644 --- a/proto/lbm/fbridge/v1/query.proto +++ b/proto/lbm/fbridge/v1/query.proto @@ -122,4 +122,4 @@ message JudgesRequest {} message JudgesResponse { repeated string judges = 1; -} \ No newline at end of file +} From a48d83f72c762591d336400a424f03b44c721b95 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:06:02 +0900 Subject: [PATCH 08/12] modify proto based on discussion --- client/docs/swagger-ui/swagger.yaml | 294 ++++--- docs/core/proto-docs.md | 91 ++- proto/lbm/fbridge/v1/genesis.proto | 23 +- proto/lbm/fbridge/v1/query.proto | 51 +- proto/lbm/fbridge/v1/tx.proto | 2 +- x/fbridge/keeper/grpc_query.go | 23 +- x/fbridge/types/genesis.pb.go | 313 +++++--- x/fbridge/types/msgs.go | 1 + x/fbridge/types/query.pb.go | 1101 +++++++++++++++++++++++---- x/fbridge/types/query.pb.gw.go | 212 +++++- 10 files changed, 1726 insertions(+), 385 deletions(-) create mode 100644 x/fbridge/types/msgs.go diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index c329811dfb..9b9f13627e 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -29844,58 +29844,19 @@ paths: format: uint64 tags: - Query - '/lbm/fbridge/v1/confirmed_provision/{seq}': + /lbm/fbridge/v1/greatest_confirmed_seq: get: - summary: Get a specific confirmed provision - operationId: ConfirmedProvision + summary: Get a greatest consecutive sequence number confirmed by n-of-m operators + operationId: GreatestConsecutiveConfirmedSeq 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. + seq: + type: string + format: uint64 default: description: An unexpected error response schema: @@ -29918,19 +29879,88 @@ paths: 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_seq_by_operator/{operator}': + /lbm/fbridge/v1/guardians: get: - summary: Get a greatest sequence number to be confirmed by a particular operator - operationId: GreatestSeqByOperator + summary: Get 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: Get 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 to be used when the next bridge request is made + operationId: NextSeqSend responses: '200': description: A successful response. @@ -29962,25 +29992,19 @@ paths: 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/guardians: + /lbm/fbridge/v1/operators: get: - summary: Get a list of Guardians registered on the bridge - operationId: FBridgeGuardians + summary: Get a list of Operators registered on the bridge + operationId: FBridgeOperators responses: '200': description: A successful response. schema: type: object properties: - guardians: + operators: type: array items: type: string @@ -30008,20 +30032,31 @@ paths: format: byte tags: - Query - /lbm/fbridge/v1/judges: + '/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs': get: - summary: Get a list of Judges registered on the bridge - operationId: FBridgeJudges + summary: >- + Get 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: - judges: + seqs: type: array items: type: string + format: uint64 default: description: An unexpected error response schema: @@ -30044,21 +30079,72 @@ paths: 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/next_seq_to_confirm: + '/lbm/fbridge/v1/operators/{operator}/provision/{seq}': get: - summary: Get a next sequence number to be confirmed by n-of-m operators - operationId: NextSeqToConfirm + summary: Get a provision submitted by a particular operator + operationId: SubmittedProvision responses: '200': description: A successful response. schema: type: object properties: - seq: - type: string - format: uint64 + 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: @@ -30081,22 +30167,33 @@ paths: 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: + '/lbm/fbridge/v1/operators/{operator}/seq': get: - summary: Get a list of Operators registered on the bridge - operationId: FBridgeOperators + summary: Get a greatest sequence number confirmed by a particular operator + operationId: GreatestSeqByOperator responses: '200': description: A successful response. schema: type: object properties: - operators: - type: array - items: - type: string + seq: + type: string + format: uint64 default: description: An unexpected error response schema: @@ -30119,6 +30216,12 @@ paths: 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: @@ -30200,10 +30303,10 @@ paths: format: byte tags: - Query - '/lbm/fbridge/v1/submitted_provision/{operator}/{seq}': + '/lbm/fbridge/v1/provision/{seq}': get: - summary: Get a provision submitted by a particular operator - operationId: SubmittedProvision + summary: Get a particular sequence of confirmed provisions + operationId: ConfirmedProvision responses: '200': description: A successful response. @@ -30275,11 +30378,6 @@ paths: 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 @@ -49896,6 +49994,12 @@ definitions: description: |- Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. + lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse: + type: object + properties: + seq: + type: string + format: uint64 lbm.fbridge.v1.GreatestSeqByOperatorResponse: type: object properties: @@ -49916,7 +50020,15 @@ definitions: type: array items: type: string - lbm.fbridge.v1.NextSeqToConfirmResponse: + lbm.fbridge.v1.NeededSubmissionSeqsResponse: + type: object + properties: + seqs: + type: array + items: + type: string + format: uint64 + lbm.fbridge.v1.NextSeqSendResponse: type: object properties: seq: diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 9b9e3b6978..dcad3c47d1 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -783,14 +783,18 @@ - [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) - [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) - [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) + - [GreatestConsecutiveConfirmedSeqRequest](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqRequest) + - [GreatestConsecutiveConfirmedSeqResponse](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse) - [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) - [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) - [GuardiansRequest](#lbm.fbridge.v1.GuardiansRequest) - [GuardiansResponse](#lbm.fbridge.v1.GuardiansResponse) - [JudgesRequest](#lbm.fbridge.v1.JudgesRequest) - [JudgesResponse](#lbm.fbridge.v1.JudgesResponse) - - [NextSeqToConfirmRequest](#lbm.fbridge.v1.NextSeqToConfirmRequest) - - [NextSeqToConfirmResponse](#lbm.fbridge.v1.NextSeqToConfirmResponse) + - [NeededSubmissionSeqsRequest](#lbm.fbridge.v1.NeededSubmissionSeqsRequest) + - [NeededSubmissionSeqsResponse](#lbm.fbridge.v1.NeededSubmissionSeqsResponse) + - [NextSeqSendRequest](#lbm.fbridge.v1.NextSeqSendRequest) + - [NextSeqSendResponse](#lbm.fbridge.v1.NextSeqSendResponse) - [OperatorsRequest](#lbm.fbridge.v1.OperatorsRequest) - [OperatorsResponse](#lbm.fbridge.v1.OperatorsResponse) - [QueryParamsRequest](#lbm.fbridge.v1.QueryParamsRequest) @@ -11635,7 +11639,7 @@ GenesisState defines the fbridge module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `operator` | [string](#string) | | the operator address | -| `greatest_seq` | [uint64](#uint64) | | the greatest sequence number confirmed by the operator | +| `seq` | [uint64](#uint64) | | the sequence number | @@ -11667,9 +11671,10 @@ GenesisState defines the fbridge module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `greatest_seq_per_operator` | [OperatorSeqInfo](#lbm.fbridge.v1.OperatorSeqInfo) | repeated | the greatest sequence number confirmed by each operator | -| `next_seq_to_confirm` | [uint64](#uint64) | | the next sequence numbers to confirm. (next_seq_to_confirm - 1) is confirmed by n-of-m operators | -| `next_seq_to_claim` | [uint64](#uint64) | | the next sequence numbers confirmed by n-of-m operators that have not been claimed yet | +| `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 | @@ -11772,6 +11777,31 @@ GenesisState defines the fbridge module's genesis state. + + +### GreatestConsecutiveConfirmedSeqRequest + + + + + + + + + +### GreatestConsecutiveConfirmedSeqResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seq` | [uint64](#uint64) | | | + + + + + + ### GreatestSeqByOperatorRequest @@ -11852,9 +11882,40 @@ GenesisState defines the fbridge module's genesis state. - + + +### NeededSubmissionSeqsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `operator` | [string](#string) | | the address of the operator | +| `range` | [uint64](#uint64) | | range specifies the size of the range to search | + + + + + + + + +### NeededSubmissionSeqsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `seqs` | [uint64](#uint64) | repeated | | + + + + + + + -### NextSeqToConfirmRequest +### NextSeqSendRequest @@ -11862,9 +11923,9 @@ GenesisState defines the fbridge module's genesis state. - + -### NextSeqToConfirmResponse +### NextSeqSendResponse @@ -11973,10 +12034,12 @@ GenesisState defines the fbridge module's genesis state. | 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| -| `GreatestSeqByOperator` | [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) | [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) | Get a greatest sequence number to be confirmed by a particular operator | GET|/lbm/fbridge/v1/greatest_seq_by_operator/{operator}| -| `NextSeqToConfirm` | [NextSeqToConfirmRequest](#lbm.fbridge.v1.NextSeqToConfirmRequest) | [NextSeqToConfirmResponse](#lbm.fbridge.v1.NextSeqToConfirmResponse) | Get a next sequence number to be confirmed by n-of-m operators | GET|/lbm/fbridge/v1/next_seq_to_confirm| -| `SubmittedProvision` | [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) | [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) | Get a provision submitted by a particular operator | GET|/lbm/fbridge/v1/submitted_provision/{operator}/{seq}| -| `ConfirmedProvision` | [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) | [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) | Get a specific confirmed provision | GET|/lbm/fbridge/v1/confirmed_provision/{seq}| +| `NextSeqSend` | [NextSeqSendRequest](#lbm.fbridge.v1.NextSeqSendRequest) | [NextSeqSendResponse](#lbm.fbridge.v1.NextSeqSendResponse) | NextSeqSend to be used when the next bridge request is made | GET|/lbm/fbridge/v1/nextseq_send| +| `GreatestSeqByOperator` | [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) | [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) | Get a greatest sequence number confirmed by a particular operator | GET|/lbm/fbridge/v1/operators/{operator}/seq| +| `GreatestConsecutiveConfirmedSeq` | [GreatestConsecutiveConfirmedSeqRequest](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqRequest) | [GreatestConsecutiveConfirmedSeqResponse](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse) | Get a greatest consecutive sequence number confirmed by n-of-m operators | GET|/lbm/fbridge/v1/greatest_confirmed_seq| +| `SubmittedProvision` | [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) | [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) | Get a provision submitted by a particular operator | GET|/lbm/fbridge/v1/operators/{operator}/provision/{seq}| +| `ConfirmedProvision` | [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) | [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) | Get a particular sequence of confirmed provisions | GET|/lbm/fbridge/v1/provision/{seq}| +| `NeededSubmissionSeqs` | [NeededSubmissionSeqsRequest](#lbm.fbridge.v1.NeededSubmissionSeqsRequest) | [NeededSubmissionSeqsResponse](#lbm.fbridge.v1.NeededSubmissionSeqsResponse) | Get 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` | [CommitmentsRequest](#lbm.fbridge.v1.CommitmentsRequest) | [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) | Get commitments of a specific sequence number | GET|/lbm/fbridge/v1/commitments/{seq}| | `Guardians` | [GuardiansRequest](#lbm.fbridge.v1.GuardiansRequest) | [GuardiansResponse](#lbm.fbridge.v1.GuardiansResponse) | Get a list of Guardians registered on the bridge | GET|/lbm/fbridge/v1/guardians| | `Operators` | [OperatorsRequest](#lbm.fbridge.v1.OperatorsRequest) | [OperatorsResponse](#lbm.fbridge.v1.OperatorsResponse) | Get a list of Operators registered on the bridge | GET|/lbm/fbridge/v1/operators| diff --git a/proto/lbm/fbridge/v1/genesis.proto b/proto/lbm/fbridge/v1/genesis.proto index 3e637d4ce9..087d1acca9 100644 --- a/proto/lbm/fbridge/v1/genesis.proto +++ b/proto/lbm/fbridge/v1/genesis.proto @@ -33,25 +33,28 @@ message BlockSeqInfo { 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_per_operator = 1; - // the next sequence numbers to confirm. (next_seq_to_confirm - 1) is confirmed by n-of-m operators - uint64 next_seq_to_confirm = 2; - // the next sequence numbers confirmed by n-of-m operators that have not been claimed yet - uint64 next_seq_to_claim = 3; + 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 = 4; + repeated Commitment commitments = 6; // provision associated with a specific commitment. - repeated Provision provisions = 5; + repeated Provision provisions = 7; // map the sequence number confirmed by n-of-m operators with commitment - repeated ConfirmedProvision confirmed_seq_to_commitment = 7; + repeated ConfirmedProvision confirmed_seq_to_commitment = 8; } message OperatorSeqInfo { // the operator address string operator = 1; - // the greatest sequence number confirmed by the operator - uint64 greatest_seq = 2; + // the sequence number + uint64 seq = 2; } message Commitment { diff --git a/proto/lbm/fbridge/v1/query.proto b/proto/lbm/fbridge/v1/query.proto index cb7dc49953..dbcd3f51cc 100644 --- a/proto/lbm/fbridge/v1/query.proto +++ b/proto/lbm/fbridge/v1/query.proto @@ -13,24 +13,38 @@ service Query { option (google.api.http).get = "/lbm/fbridge/v1/params"; } - // Get a greatest sequence number to be confirmed by a particular operator + // NextSeqSend to be used when the next bridge request is made + rpc NextSeqSend(NextSeqSendRequest) returns (NextSeqSendResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/nextseq_send"; + } + + // Get a greatest sequence number confirmed by a particular operator rpc GreatestSeqByOperator(GreatestSeqByOperatorRequest) returns (GreatestSeqByOperatorResponse) { - option (google.api.http).get = "/lbm/fbridge/v1/greatest_seq_by_operator/{operator}"; + option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/seq"; } - // Get a next sequence number to be confirmed by n-of-m operators - rpc NextSeqToConfirm(NextSeqToConfirmRequest) returns (NextSeqToConfirmResponse) { - option (google.api.http).get = "/lbm/fbridge/v1/next_seq_to_confirm"; + // Get a greatest consecutive sequence number confirmed by n-of-m operators + rpc GreatestConsecutiveConfirmedSeq(GreatestConsecutiveConfirmedSeqRequest) + returns (GreatestConsecutiveConfirmedSeqResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/greatest_confirmed_seq"; } // Get a provision submitted by a particular operator rpc SubmittedProvision(SubmittedProvisionRequest) returns (SubmittedProvisionResponse) { - option (google.api.http).get = "/lbm/fbridge/v1/submitted_provision/{operator}/{seq}"; + option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/provision/{seq}"; } - // Get a specific confirmed provision + // Get a particular sequence of confirmed provisions rpc ConfirmedProvision(ConfirmedProvisionRequest) returns (ConfirmedProvisionResponse) { - option (google.api.http).get = "/lbm/fbridge/v1/confirmed_provision/{seq}"; + option (google.api.http).get = "/lbm/fbridge/v1/provision/{seq}"; + } + + // Get 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(NeededSubmissionSeqsRequest) returns (NeededSubmissionSeqsResponse) { + option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs"; } // Get commitments of a specific sequence number @@ -60,6 +74,12 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } +message NextSeqSendRequest {} + +message NextSeqSendResponse { + uint64 seq = 1; +} + message GreatestSeqByOperatorRequest { // the address of the operator string operator = 1; @@ -69,9 +89,9 @@ message GreatestSeqByOperatorResponse { uint64 seq = 1; } -message NextSeqToConfirmRequest {} +message GreatestConsecutiveConfirmedSeqRequest {} -message NextSeqToConfirmResponse { +message GreatestConsecutiveConfirmedSeqResponse { uint64 seq = 1; } @@ -87,6 +107,17 @@ message SubmittedProvisionResponse { ProvisionStatus status = 2 [(gogoproto.nullable) = false]; } +message NeededSubmissionSeqsRequest { + // the address of the operator + string operator = 1; + // range specifies the size of the range to search + uint64 range = 2; +} + +message NeededSubmissionSeqsResponse { + repeated uint64 seqs = 1; +} + message ConfirmedProvisionRequest { // the sequence number of the bridge request uint64 seq = 1; diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto index 85a56f18b2..ada0618bf1 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -113,4 +113,4 @@ message MsgUpdateRole { Role role = 2; } -message MsgUpdateRoleResponse {} \ No newline at end of file +message MsgUpdateRoleResponse {} diff --git a/x/fbridge/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go index a0dea8662a..673c876282 100644 --- a/x/fbridge/keeper/grpc_query.go +++ b/x/fbridge/keeper/grpc_query.go @@ -2,44 +2,63 @@ 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) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) NextSeqSend(ctx context.Context, request *types.NextSeqSendRequest) (*types.NextSeqSendResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) GreatestSeqByOperator(ctx context.Context, request *types.GreatestSeqByOperatorRequest) (*types.GreatestSeqByOperatorResponse, error) { + //TODO implement me panic("implement me") } -func (k Keeper) NextSeqToConfirm(ctx context.Context, request *types.NextSeqToConfirmRequest) (*types.NextSeqToConfirmResponse, error) { +func (k Keeper) GreatestConsecutiveConfirmedSeq(ctx context.Context, request *types.GreatestConsecutiveConfirmedSeqRequest) (*types.GreatestConsecutiveConfirmedSeqResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) SubmittedProvision(ctx context.Context, request *types.SubmittedProvisionRequest) (*types.SubmittedProvisionResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) ConfirmedProvision(ctx context.Context, request *types.ConfirmedProvisionRequest) (*types.ConfirmedProvisionResponse, error) { + //TODO implement me + panic("implement me") +} + +func (k Keeper) NeededSubmissionSeqs(ctx context.Context, request *types.NeededSubmissionSeqsRequest) (*types.NeededSubmissionSeqsResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) Commitments(ctx context.Context, request *types.CommitmentsRequest) (*types.CommitmentsResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) Guardians(ctx context.Context, request *types.GuardiansRequest) (*types.GuardiansResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) Operators(ctx context.Context, request *types.OperatorsRequest) (*types.OperatorsResponse, error) { + //TODO implement me panic("implement me") } func (k Keeper) Judges(ctx context.Context, request *types.JudgesRequest) (*types.JudgesResponse, error) { + //TODO implement me panic("implement me") } diff --git a/x/fbridge/types/genesis.pb.go b/x/fbridge/types/genesis.pb.go index 5e48364820..60dc09d4c7 100644 --- a/x/fbridge/types/genesis.pb.go +++ b/x/fbridge/types/genesis.pb.go @@ -180,18 +180,21 @@ func (m *BlockSeqInfo) GetBlocknum() uint64 { } 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 - GreatestSeqPerOperator []*OperatorSeqInfo `protobuf:"bytes,1,rep,name=greatest_seq_per_operator,json=greatestSeqPerOperator,proto3" json:"greatest_seq_per_operator,omitempty"` - // the next sequence numbers to confirm. (next_seq_to_confirm - 1) is confirmed by n-of-m operators - NextSeqToConfirm uint64 `protobuf:"varint,2,opt,name=next_seq_to_confirm,json=nextSeqToConfirm,proto3" json:"next_seq_to_confirm,omitempty"` - // the next sequence numbers confirmed by n-of-m operators that have not been claimed yet - NextSeqToClaim uint64 `protobuf:"varint,3,opt,name=next_seq_to_claim,json=nextSeqToClaim,proto3" json:"next_seq_to_claim,omitempty"` + 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,4,rep,name=commitments,proto3" json:"commitments,omitempty"` + Commitments []*Commitment `protobuf:"bytes,6,rep,name=commitments,proto3" json:"commitments,omitempty"` // provision associated with a specific commitment. - Provisions []*Provision `protobuf:"bytes,5,rep,name=provisions,proto3" json:"provisions,omitempty"` + 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,7,rep,name=confirmed_seq_to_commitment,json=confirmedSeqToCommitment,proto3" json:"confirmed_seq_to_commitment,omitempty"` + 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{} } @@ -230,8 +233,8 @@ 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 greatest sequence number confirmed by the operator - GreatestSeq uint64 `protobuf:"varint,2,opt,name=greatest_seq,json=greatestSeq,proto3" json:"greatest_seq,omitempty"` + // the sequence number + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` } func (m *OperatorSeqInfo) Reset() { *m = OperatorSeqInfo{} } @@ -274,9 +277,9 @@ func (m *OperatorSeqInfo) GetOperator() string { return "" } -func (m *OperatorSeqInfo) GetGreatestSeq() uint64 { +func (m *OperatorSeqInfo) GetSeq() uint64 { if m != nil { - return m.GreatestSeq + return m.Seq } return 0 } @@ -472,47 +475,49 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/genesis.proto", fileDescriptor_0fc3cc4535a29f6d) } var fileDescriptor_0fc3cc4535a29f6d = []byte{ - // 639 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xcf, 0x4e, 0xdb, 0x4e, - 0x10, 0x8e, 0x93, 0xfc, 0xf8, 0x33, 0x84, 0xc0, 0x6f, 0x5b, 0x21, 0x93, 0x52, 0x87, 0xfa, 0x44, - 0x0f, 0xc4, 0xa5, 0xad, 0x54, 0xb5, 0xe2, 0x14, 0x10, 0xa8, 0x95, 0xaa, 0x22, 0x87, 0x13, 0x97, - 0x68, 0x93, 0x6c, 0xcc, 0x8a, 0xd8, 0x1b, 0xef, 0x6e, 0x22, 0xfa, 0x06, 0x3d, 0xf6, 0xd6, 0x6b, - 0x8f, 0x7d, 0x14, 0x8e, 0x1c, 0x7b, 0xa8, 0xaa, 0x0a, 0x5e, 0xa4, 0xf2, 0x66, 0x6d, 0x6f, 0x0c, - 0xf4, 0xb6, 0x3b, 0xf3, 0xcd, 0x37, 0xdf, 0xcc, 0xec, 0x2c, 0x6c, 0x8d, 0x7a, 0xa1, 0x37, 0xec, - 0x71, 0x3a, 0x08, 0x88, 0x37, 0xdd, 0xf3, 0x02, 0x12, 0x11, 0x41, 0x45, 0x6b, 0xcc, 0x99, 0x64, - 0xa8, 0x3e, 0xea, 0x85, 0x2d, 0xed, 0x6d, 0x4d, 0xf7, 0x1a, 0x8f, 0x03, 0x16, 0x30, 0xe5, 0xf2, - 0x92, 0xd3, 0x0c, 0xd5, 0x28, 0x72, 0xa4, 0x01, 0xca, 0xeb, 0xfe, 0xb2, 0xa0, 0x76, 0x3c, 0x63, - 0xed, 0x48, 0x2c, 0x09, 0x7a, 0x0d, 0x0b, 0x63, 0xcc, 0x71, 0x28, 0x6c, 0x6b, 0xdb, 0xda, 0x59, - 0x79, 0xb9, 0xd1, 0x9a, 0xcf, 0xd2, 0x3a, 0x51, 0xde, 0x76, 0xf5, 0xea, 0x77, 0xb3, 0xe4, 0x6b, - 0x2c, 0x3a, 0x86, 0x55, 0x41, 0xa2, 0x01, 0x8d, 0x82, 0xae, 0x48, 0x68, 0xec, 0xb2, 0x0a, 0xde, - 0x2a, 0x06, 0x77, 0x66, 0x20, 0x95, 0x4a, 0x53, 0xd4, 0x84, 0x61, 0x43, 0x1f, 0x61, 0x8d, 0x93, - 0x3e, 0xa1, 0xd3, 0x9c, 0xaa, 0xa2, 0xa8, 0x9c, 0x22, 0x95, 0x9f, 0xc2, 0x4c, 0xb2, 0x3a, 0x9f, - 0xb3, 0xba, 0x13, 0xa8, 0x99, 0x29, 0xd1, 0x26, 0x2c, 0x45, 0xe4, 0x52, 0x76, 0x05, 0x89, 0x55, - 0x7d, 0x55, 0x7f, 0x31, 0xb9, 0x77, 0x48, 0x8c, 0x0e, 0x61, 0x4d, 0x90, 0xb8, 0x2b, 0x59, 0xb7, - 0x37, 0x62, 0xfd, 0x8b, 0x68, 0x12, 0xda, 0xe5, 0xed, 0xca, 0x7d, 0x45, 0xb4, 0x13, 0x7f, 0x87, - 0xc4, 0xef, 0xa3, 0x21, 0xf3, 0x57, 0x05, 0x89, 0x4f, 0x59, 0x5b, 0x87, 0xbc, 0xab, 0x7e, 0xf9, - 0xde, 0x2c, 0xb9, 0xfb, 0x50, 0x33, 0x41, 0x68, 0x1d, 0x2a, 0x79, 0xc6, 0xe4, 0x88, 0x1a, 0xb0, - 0x64, 0xa4, 0x49, 0xcc, 0xd9, 0xdd, 0xfd, 0x51, 0x81, 0xfa, 0x7c, 0x75, 0xe8, 0x0c, 0x36, 0x03, - 0x4e, 0xb0, 0x24, 0x42, 0x69, 0xef, 0x8e, 0x09, 0xef, 0xb2, 0x31, 0xe1, 0x58, 0x32, 0x6e, 0x5b, - 0x4a, 0x66, 0xb3, 0x28, 0xf3, 0x93, 0xf6, 0xa7, 0x4a, 0x37, 0x52, 0x86, 0x0e, 0x89, 0x4f, 0x08, - 0x4f, 0xdd, 0x68, 0x17, 0x1e, 0xa5, 0x3d, 0x49, 0xaa, 0xef, 0xb3, 0x68, 0x48, 0x79, 0xaa, 0x6a, - 0x5d, 0xb7, 0xe7, 0x94, 0x1d, 0xcc, 0xec, 0xe8, 0x39, 0xfc, 0x3f, 0x07, 0x1f, 0x61, 0x1a, 0xaa, - 0x19, 0x55, 0xfd, 0x7a, 0x0e, 0x4e, 0xac, 0x68, 0x1f, 0x56, 0xfa, 0x2c, 0x0c, 0xa9, 0x0c, 0x49, - 0x24, 0x85, 0x5d, 0x55, 0x3a, 0x1b, 0x45, 0x9d, 0x07, 0x19, 0xc4, 0x37, 0xe1, 0xe8, 0x2d, 0xc0, - 0x98, 0xb3, 0x29, 0x15, 0x94, 0x45, 0xc2, 0xfe, 0x4f, 0x05, 0x6f, 0xde, 0x79, 0x8d, 0x29, 0xc2, - 0x37, 0xc0, 0x08, 0xc3, 0x13, 0x5d, 0x06, 0x19, 0xe4, 0x75, 0xa5, 0xd4, 0xf6, 0xa2, 0xe2, 0x72, - 0xef, 0x0a, 0xd1, 0x21, 0x39, 0xa9, 0x9d, 0xd1, 0xe8, 0x1e, 0xa4, 0x1c, 0x7a, 0xd0, 0x27, 0xb0, - 0x56, 0x68, 0x73, 0x32, 0x59, 0x63, 0x32, 0xd6, 0xce, 0xb2, 0x9f, 0xdd, 0xd1, 0x33, 0xa8, 0x99, - 0x63, 0xd4, 0x3d, 0x5e, 0x31, 0x06, 0xe3, 0x9e, 0x01, 0xe4, 0x59, 0xfe, 0x49, 0xa6, 0x1f, 0x55, - 0x39, 0x7f, 0x54, 0x0e, 0x80, 0x51, 0x65, 0x45, 0xe1, 0x0d, 0x8b, 0xfb, 0xcd, 0x82, 0xe5, 0xac, - 0xb6, 0x02, 0xda, 0x2a, 0xa2, 0xd1, 0x1e, 0x54, 0x07, 0x58, 0x62, 0xbd, 0xca, 0x4f, 0x1f, 0xec, - 0xfc, 0x21, 0x96, 0xd8, 0x57, 0x50, 0xf4, 0x06, 0x16, 0x92, 0x9d, 0x9d, 0x08, 0xbd, 0xb4, 0xcd, - 0x07, 0x83, 0x3a, 0x0a, 0xe6, 0x6b, 0xb8, 0x7b, 0x04, 0xe8, 0x6e, 0xf7, 0xef, 0x59, 0x9b, 0x79, - 0xcd, 0xe5, 0xa2, 0xe6, 0xf6, 0x87, 0xab, 0x1b, 0xc7, 0xba, 0xbe, 0x71, 0xac, 0x3f, 0x37, 0x8e, - 0xf5, 0xf5, 0xd6, 0x29, 0x5d, 0xdf, 0x3a, 0xa5, 0x9f, 0xb7, 0x4e, 0xe9, 0xec, 0x45, 0x40, 0xe5, - 0xf9, 0xa4, 0xd7, 0xea, 0xb3, 0xd0, 0x3b, 0xa2, 0x91, 0xe8, 0x9f, 0x53, 0xec, 0x0d, 0xf5, 0x61, - 0x57, 0x0c, 0x2e, 0xbc, 0xcb, 0xec, 0x97, 0x94, 0x9f, 0xc7, 0x44, 0xf4, 0x16, 0xd4, 0x0f, 0xf9, - 0xea, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x98, 0x82, 0x29, 0x85, 0x05, 0x00, 0x00, + // 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) { @@ -674,7 +679,7 @@ func (m *ReceivingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } } if len(m.Provisions) > 0 { @@ -688,7 +693,7 @@ func (m *ReceivingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } } if len(m.Commitments) > 0 { @@ -702,23 +707,50 @@ func (m *ReceivingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } - if m.NextSeqToClaim != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.NextSeqToClaim)) + 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] = 0x18 + dAtA[i] = 0x22 } - if m.NextSeqToConfirm != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.NextSeqToConfirm)) + if m.GreatestConsecutiveSeq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.GreatestConsecutiveSeq)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } - if len(m.GreatestSeqPerOperator) > 0 { - for iNdEx := len(m.GreatestSeqPerOperator) - 1; iNdEx >= 0; iNdEx-- { + if len(m.GreatestSeqByOperator) > 0 { + for iNdEx := len(m.GreatestSeqByOperator) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.GreatestSeqPerOperator[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + 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 } @@ -752,8 +784,8 @@ func (m *OperatorSeqInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.GreatestSeq != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.GreatestSeq)) + if m.Seq != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Seq)) i-- dAtA[i] = 0x10 } @@ -963,17 +995,27 @@ func (m *ReceivingState) Size() (n int) { } var l int _ = l - if len(m.GreatestSeqPerOperator) > 0 { - for _, e := range m.GreatestSeqPerOperator { + if len(m.GreatestConsecutiveSeqByOperator) > 0 { + for _, e := range m.GreatestConsecutiveSeqByOperator { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } - if m.NextSeqToConfirm != 0 { - n += 1 + sovGenesis(uint64(m.NextSeqToConfirm)) + if len(m.GreatestSeqByOperator) > 0 { + for _, e := range m.GreatestSeqByOperator { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } } - if m.NextSeqToClaim != 0 { - n += 1 + sovGenesis(uint64(m.NextSeqToClaim)) + 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 { @@ -1006,8 +1048,8 @@ func (m *OperatorSeqInfo) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - if m.GreatestSeq != 0 { - n += 1 + sovGenesis(uint64(m.GreatestSeq)) + if m.Seq != 0 { + n += 1 + sovGenesis(uint64(m.Seq)) } return n } @@ -1446,7 +1488,7 @@ func (m *ReceivingState) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GreatestSeqPerOperator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GreatestConsecutiveSeqByOperator", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1473,16 +1515,16 @@ func (m *ReceivingState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GreatestSeqPerOperator = append(m.GreatestSeqPerOperator, &OperatorSeqInfo{}) - if err := m.GreatestSeqPerOperator[len(m.GreatestSeqPerOperator)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextSeqToConfirm", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GreatestSeqByOperator", wireType) } - m.NextSeqToConfirm = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1492,16 +1534,31 @@ func (m *ReceivingState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NextSeqToConfirm |= uint64(b&0x7F) << shift + 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 NextSeqToClaim", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GreatestConsecutiveSeq", wireType) } - m.NextSeqToClaim = 0 + m.GreatestConsecutiveSeq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1511,12 +1568,88 @@ func (m *ReceivingState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NextSeqToClaim |= uint64(b&0x7F) << shift + 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) } @@ -1550,7 +1683,7 @@ func (m *ReceivingState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Provisions", wireType) } @@ -1584,7 +1717,7 @@ func (m *ReceivingState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConfirmedSeqToCommitment", wireType) } @@ -1702,9 +1835,9 @@ func (m *OperatorSeqInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GreatestSeq", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - m.GreatestSeq = 0 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1714,7 +1847,7 @@ func (m *OperatorSeqInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GreatestSeq |= uint64(b&0x7F) << shift + m.Seq |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fbridge/types/msgs.go b/x/fbridge/types/msgs.go new file mode 100644 index 0000000000..ab1254f4c2 --- /dev/null +++ b/x/fbridge/types/msgs.go @@ -0,0 +1 @@ +package types diff --git a/x/fbridge/types/query.pb.go b/x/fbridge/types/query.pb.go index bb1f91bc2d..5c73bf5bb4 100644 --- a/x/fbridge/types/query.pb.go +++ b/x/fbridge/types/query.pb.go @@ -109,6 +109,86 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } +type NextSeqSendRequest struct { +} + +func (m *NextSeqSendRequest) Reset() { *m = NextSeqSendRequest{} } +func (m *NextSeqSendRequest) String() string { return proto.CompactTextString(m) } +func (*NextSeqSendRequest) ProtoMessage() {} +func (*NextSeqSendRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{2} +} +func (m *NextSeqSendRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NextSeqSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NextSeqSendRequest.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 *NextSeqSendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextSeqSendRequest.Merge(m, src) +} +func (m *NextSeqSendRequest) XXX_Size() int { + return m.Size() +} +func (m *NextSeqSendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NextSeqSendRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NextSeqSendRequest proto.InternalMessageInfo + +type NextSeqSendResponse struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` +} + +func (m *NextSeqSendResponse) Reset() { *m = NextSeqSendResponse{} } +func (m *NextSeqSendResponse) String() string { return proto.CompactTextString(m) } +func (*NextSeqSendResponse) ProtoMessage() {} +func (*NextSeqSendResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{3} +} +func (m *NextSeqSendResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NextSeqSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NextSeqSendResponse.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 *NextSeqSendResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextSeqSendResponse.Merge(m, src) +} +func (m *NextSeqSendResponse) XXX_Size() int { + return m.Size() +} +func (m *NextSeqSendResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NextSeqSendResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NextSeqSendResponse proto.InternalMessageInfo + +func (m *NextSeqSendResponse) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + type GreatestSeqByOperatorRequest struct { // the address of the operator Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` @@ -118,7 +198,7 @@ func (m *GreatestSeqByOperatorRequest) Reset() { *m = GreatestSeqByOpera func (m *GreatestSeqByOperatorRequest) String() string { return proto.CompactTextString(m) } func (*GreatestSeqByOperatorRequest) ProtoMessage() {} func (*GreatestSeqByOperatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{2} + return fileDescriptor_5e7780f9db9d346e, []int{4} } func (m *GreatestSeqByOperatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +242,7 @@ func (m *GreatestSeqByOperatorResponse) Reset() { *m = GreatestSeqByOper func (m *GreatestSeqByOperatorResponse) String() string { return proto.CompactTextString(m) } func (*GreatestSeqByOperatorResponse) ProtoMessage() {} func (*GreatestSeqByOperatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{3} + return fileDescriptor_5e7780f9db9d346e, []int{5} } func (m *GreatestSeqByOperatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,21 +278,23 @@ func (m *GreatestSeqByOperatorResponse) GetSeq() uint64 { return 0 } -type NextSeqToConfirmRequest struct { +type GreatestConsecutiveConfirmedSeqRequest struct { } -func (m *NextSeqToConfirmRequest) Reset() { *m = NextSeqToConfirmRequest{} } -func (m *NextSeqToConfirmRequest) String() string { return proto.CompactTextString(m) } -func (*NextSeqToConfirmRequest) ProtoMessage() {} -func (*NextSeqToConfirmRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{4} +func (m *GreatestConsecutiveConfirmedSeqRequest) Reset() { + *m = GreatestConsecutiveConfirmedSeqRequest{} } -func (m *NextSeqToConfirmRequest) XXX_Unmarshal(b []byte) error { +func (m *GreatestConsecutiveConfirmedSeqRequest) String() string { return proto.CompactTextString(m) } +func (*GreatestConsecutiveConfirmedSeqRequest) ProtoMessage() {} +func (*GreatestConsecutiveConfirmedSeqRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{6} +} +func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NextSeqToConfirmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NextSeqToConfirmRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -222,34 +304,36 @@ func (m *NextSeqToConfirmRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *NextSeqToConfirmRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextSeqToConfirmRequest.Merge(m, src) +func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest.Merge(m, src) } -func (m *NextSeqToConfirmRequest) XXX_Size() int { +func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Size() int { return m.Size() } -func (m *NextSeqToConfirmRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NextSeqToConfirmRequest.DiscardUnknown(m) +func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest.DiscardUnknown(m) } -var xxx_messageInfo_NextSeqToConfirmRequest proto.InternalMessageInfo +var xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest proto.InternalMessageInfo -type NextSeqToConfirmResponse struct { +type GreatestConsecutiveConfirmedSeqResponse struct { Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *NextSeqToConfirmResponse) Reset() { *m = NextSeqToConfirmResponse{} } -func (m *NextSeqToConfirmResponse) String() string { return proto.CompactTextString(m) } -func (*NextSeqToConfirmResponse) ProtoMessage() {} -func (*NextSeqToConfirmResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{5} +func (m *GreatestConsecutiveConfirmedSeqResponse) Reset() { + *m = GreatestConsecutiveConfirmedSeqResponse{} +} +func (m *GreatestConsecutiveConfirmedSeqResponse) String() string { return proto.CompactTextString(m) } +func (*GreatestConsecutiveConfirmedSeqResponse) ProtoMessage() {} +func (*GreatestConsecutiveConfirmedSeqResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{7} } -func (m *NextSeqToConfirmResponse) XXX_Unmarshal(b []byte) error { +func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NextSeqToConfirmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NextSeqToConfirmResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -259,19 +343,19 @@ func (m *NextSeqToConfirmResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *NextSeqToConfirmResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextSeqToConfirmResponse.Merge(m, src) +func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse.Merge(m, src) } -func (m *NextSeqToConfirmResponse) XXX_Size() int { +func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Size() int { return m.Size() } -func (m *NextSeqToConfirmResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NextSeqToConfirmResponse.DiscardUnknown(m) +func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse.DiscardUnknown(m) } -var xxx_messageInfo_NextSeqToConfirmResponse proto.InternalMessageInfo +var xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse proto.InternalMessageInfo -func (m *NextSeqToConfirmResponse) GetSeq() uint64 { +func (m *GreatestConsecutiveConfirmedSeqResponse) GetSeq() uint64 { if m != nil { return m.Seq } @@ -289,7 +373,7 @@ func (m *SubmittedProvisionRequest) Reset() { *m = SubmittedProvisionReq func (m *SubmittedProvisionRequest) String() string { return proto.CompactTextString(m) } func (*SubmittedProvisionRequest) ProtoMessage() {} func (*SubmittedProvisionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{6} + return fileDescriptor_5e7780f9db9d346e, []int{8} } func (m *SubmittedProvisionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -341,7 +425,7 @@ func (m *SubmittedProvisionResponse) Reset() { *m = SubmittedProvisionRe func (m *SubmittedProvisionResponse) String() string { return proto.CompactTextString(m) } func (*SubmittedProvisionResponse) ProtoMessage() {} func (*SubmittedProvisionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{7} + return fileDescriptor_5e7780f9db9d346e, []int{9} } func (m *SubmittedProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,6 +468,104 @@ func (m *SubmittedProvisionResponse) GetStatus() ProvisionStatus { return ProvisionStatus{} } +type NeededSubmissionSeqsRequest 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 *NeededSubmissionSeqsRequest) Reset() { *m = NeededSubmissionSeqsRequest{} } +func (m *NeededSubmissionSeqsRequest) String() string { return proto.CompactTextString(m) } +func (*NeededSubmissionSeqsRequest) ProtoMessage() {} +func (*NeededSubmissionSeqsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{10} +} +func (m *NeededSubmissionSeqsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NeededSubmissionSeqsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NeededSubmissionSeqsRequest.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 *NeededSubmissionSeqsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NeededSubmissionSeqsRequest.Merge(m, src) +} +func (m *NeededSubmissionSeqsRequest) XXX_Size() int { + return m.Size() +} +func (m *NeededSubmissionSeqsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NeededSubmissionSeqsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NeededSubmissionSeqsRequest proto.InternalMessageInfo + +func (m *NeededSubmissionSeqsRequest) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *NeededSubmissionSeqsRequest) GetRange() uint64 { + if m != nil { + return m.Range + } + return 0 +} + +type NeededSubmissionSeqsResponse struct { + Seqs []uint64 `protobuf:"varint,1,rep,packed,name=seqs,proto3" json:"seqs,omitempty"` +} + +func (m *NeededSubmissionSeqsResponse) Reset() { *m = NeededSubmissionSeqsResponse{} } +func (m *NeededSubmissionSeqsResponse) String() string { return proto.CompactTextString(m) } +func (*NeededSubmissionSeqsResponse) ProtoMessage() {} +func (*NeededSubmissionSeqsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e7780f9db9d346e, []int{11} +} +func (m *NeededSubmissionSeqsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NeededSubmissionSeqsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NeededSubmissionSeqsResponse.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 *NeededSubmissionSeqsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NeededSubmissionSeqsResponse.Merge(m, src) +} +func (m *NeededSubmissionSeqsResponse) XXX_Size() int { + return m.Size() +} +func (m *NeededSubmissionSeqsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NeededSubmissionSeqsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NeededSubmissionSeqsResponse proto.InternalMessageInfo + +func (m *NeededSubmissionSeqsResponse) GetSeqs() []uint64 { + if m != nil { + return m.Seqs + } + return nil +} + type ConfirmedProvisionRequest struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` @@ -393,7 +575,7 @@ func (m *ConfirmedProvisionRequest) Reset() { *m = ConfirmedProvisionReq func (m *ConfirmedProvisionRequest) String() string { return proto.CompactTextString(m) } func (*ConfirmedProvisionRequest) ProtoMessage() {} func (*ConfirmedProvisionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{8} + return fileDescriptor_5e7780f9db9d346e, []int{12} } func (m *ConfirmedProvisionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +620,7 @@ func (m *ConfirmedProvisionResponse) Reset() { *m = ConfirmedProvisionRe func (m *ConfirmedProvisionResponse) String() string { return proto.CompactTextString(m) } func (*ConfirmedProvisionResponse) ProtoMessage() {} func (*ConfirmedProvisionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{9} + return fileDescriptor_5e7780f9db9d346e, []int{13} } func (m *ConfirmedProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,7 +672,7 @@ func (m *CommitmentsRequest) Reset() { *m = CommitmentsRequest{} } func (m *CommitmentsRequest) String() string { return proto.CompactTextString(m) } func (*CommitmentsRequest) ProtoMessage() {} func (*CommitmentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{10} + return fileDescriptor_5e7780f9db9d346e, []int{14} } func (m *CommitmentsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -534,7 +716,7 @@ func (m *CommitmentsResponse) Reset() { *m = CommitmentsResponse{} } func (m *CommitmentsResponse) String() string { return proto.CompactTextString(m) } func (*CommitmentsResponse) ProtoMessage() {} func (*CommitmentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{11} + return fileDescriptor_5e7780f9db9d346e, []int{15} } func (m *CommitmentsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -577,7 +759,7 @@ func (m *GuardiansRequest) Reset() { *m = GuardiansRequest{} } func (m *GuardiansRequest) String() string { return proto.CompactTextString(m) } func (*GuardiansRequest) ProtoMessage() {} func (*GuardiansRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{12} + return fileDescriptor_5e7780f9db9d346e, []int{16} } func (m *GuardiansRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -614,7 +796,7 @@ func (m *GuardiansResponse) Reset() { *m = GuardiansResponse{} } func (m *GuardiansResponse) String() string { return proto.CompactTextString(m) } func (*GuardiansResponse) ProtoMessage() {} func (*GuardiansResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{13} + return fileDescriptor_5e7780f9db9d346e, []int{17} } func (m *GuardiansResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -657,7 +839,7 @@ func (m *OperatorsRequest) Reset() { *m = OperatorsRequest{} } func (m *OperatorsRequest) String() string { return proto.CompactTextString(m) } func (*OperatorsRequest) ProtoMessage() {} func (*OperatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{14} + return fileDescriptor_5e7780f9db9d346e, []int{18} } func (m *OperatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +876,7 @@ func (m *OperatorsResponse) Reset() { *m = OperatorsResponse{} } func (m *OperatorsResponse) String() string { return proto.CompactTextString(m) } func (*OperatorsResponse) ProtoMessage() {} func (*OperatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{15} + return fileDescriptor_5e7780f9db9d346e, []int{19} } func (m *OperatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -737,7 +919,7 @@ func (m *JudgesRequest) Reset() { *m = JudgesRequest{} } func (m *JudgesRequest) String() string { return proto.CompactTextString(m) } func (*JudgesRequest) ProtoMessage() {} func (*JudgesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{16} + return fileDescriptor_5e7780f9db9d346e, []int{20} } func (m *JudgesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +956,7 @@ func (m *JudgesResponse) Reset() { *m = JudgesResponse{} } func (m *JudgesResponse) String() string { return proto.CompactTextString(m) } func (*JudgesResponse) ProtoMessage() {} func (*JudgesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e7780f9db9d346e, []int{17} + return fileDescriptor_5e7780f9db9d346e, []int{21} } func (m *JudgesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -813,12 +995,16 @@ func (m *JudgesResponse) GetJudges() []string { func init() { proto.RegisterType((*QueryParamsRequest)(nil), "lbm.fbridge.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "lbm.fbridge.v1.QueryParamsResponse") + proto.RegisterType((*NextSeqSendRequest)(nil), "lbm.fbridge.v1.NextSeqSendRequest") + proto.RegisterType((*NextSeqSendResponse)(nil), "lbm.fbridge.v1.NextSeqSendResponse") proto.RegisterType((*GreatestSeqByOperatorRequest)(nil), "lbm.fbridge.v1.GreatestSeqByOperatorRequest") proto.RegisterType((*GreatestSeqByOperatorResponse)(nil), "lbm.fbridge.v1.GreatestSeqByOperatorResponse") - proto.RegisterType((*NextSeqToConfirmRequest)(nil), "lbm.fbridge.v1.NextSeqToConfirmRequest") - proto.RegisterType((*NextSeqToConfirmResponse)(nil), "lbm.fbridge.v1.NextSeqToConfirmResponse") + proto.RegisterType((*GreatestConsecutiveConfirmedSeqRequest)(nil), "lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqRequest") + proto.RegisterType((*GreatestConsecutiveConfirmedSeqResponse)(nil), "lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse") proto.RegisterType((*SubmittedProvisionRequest)(nil), "lbm.fbridge.v1.SubmittedProvisionRequest") proto.RegisterType((*SubmittedProvisionResponse)(nil), "lbm.fbridge.v1.SubmittedProvisionResponse") + proto.RegisterType((*NeededSubmissionSeqsRequest)(nil), "lbm.fbridge.v1.NeededSubmissionSeqsRequest") + proto.RegisterType((*NeededSubmissionSeqsResponse)(nil), "lbm.fbridge.v1.NeededSubmissionSeqsResponse") proto.RegisterType((*ConfirmedProvisionRequest)(nil), "lbm.fbridge.v1.ConfirmedProvisionRequest") proto.RegisterType((*ConfirmedProvisionResponse)(nil), "lbm.fbridge.v1.ConfirmedProvisionResponse") proto.RegisterType((*CommitmentsRequest)(nil), "lbm.fbridge.v1.CommitmentsRequest") @@ -834,59 +1020,66 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/query.proto", fileDescriptor_5e7780f9db9d346e) } var fileDescriptor_5e7780f9db9d346e = []byte{ - // 818 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x4f, 0x13, 0x4d, - 0x18, 0xee, 0x02, 0x5f, 0xf3, 0xf5, 0x6d, 0x3e, 0x3e, 0xbe, 0x81, 0x0f, 0xdb, 0xb5, 0x2c, 0x65, - 0x89, 0x5a, 0x04, 0xba, 0x16, 0x50, 0x12, 0x7f, 0x5c, 0xc0, 0x48, 0xc4, 0x44, 0xb1, 0x78, 0xf2, - 0xd2, 0x6c, 0xdb, 0x61, 0x59, 0x65, 0x77, 0xda, 0x9d, 0x29, 0xa1, 0x21, 0x1c, 0xf4, 0x2f, 0x30, - 0xea, 0xd9, 0xbb, 0x47, 0xff, 0x0b, 0x8e, 0x24, 0x5e, 0x3c, 0x19, 0x03, 0x26, 0xfe, 0x1b, 0xa6, - 0xb3, 0xb3, 0xdb, 0x76, 0xa7, 0x0b, 0xdc, 0xbc, 0xcd, 0xbe, 0xf3, 0xbc, 0xcf, 0xf3, 0xcc, 0xcb, - 0xcc, 0x43, 0x41, 0xdd, 0xab, 0x3a, 0xc6, 0x4e, 0xd5, 0xb3, 0xeb, 0x16, 0x36, 0xf6, 0x4b, 0x46, - 0xb3, 0x85, 0xbd, 0x76, 0xb1, 0xe1, 0x11, 0x46, 0xd0, 0xe8, 0x5e, 0xd5, 0x29, 0x8a, 0xbd, 0xe2, - 0x7e, 0x49, 0xcd, 0x59, 0x84, 0x58, 0x7b, 0xd8, 0x30, 0x1b, 0xb6, 0x61, 0xba, 0x2e, 0x61, 0x26, - 0xb3, 0x89, 0x4b, 0x7d, 0xb4, 0x3a, 0x61, 0x11, 0x8b, 0xf0, 0xa5, 0xd1, 0x59, 0x89, 0x6a, 0x2e, - 0xc2, 0x1f, 0xd0, 0xf1, 0x5d, 0x7d, 0x02, 0xd0, 0xf3, 0x8e, 0xe0, 0x96, 0xe9, 0x99, 0x0e, 0x2d, - 0xe3, 0x66, 0x0b, 0x53, 0xa6, 0x3f, 0x81, 0xf1, 0xbe, 0x2a, 0x6d, 0x10, 0x97, 0x62, 0xb4, 0x02, - 0xc9, 0x06, 0xaf, 0x64, 0x94, 0xbc, 0x52, 0x48, 0x2f, 0x4d, 0x16, 0xfb, 0xfd, 0x15, 0x7d, 0xfc, - 0xda, 0xc8, 0xf1, 0xf7, 0xe9, 0x44, 0x59, 0x60, 0xf5, 0xbb, 0x90, 0xdb, 0xf0, 0xb0, 0xc9, 0x30, - 0x65, 0xdb, 0xb8, 0xb9, 0xd6, 0x7e, 0xd6, 0xc0, 0x9e, 0xc9, 0x88, 0x27, 0xc4, 0x90, 0x0a, 0x7f, - 0x13, 0x51, 0xe2, 0xbc, 0xa9, 0x72, 0xf8, 0xad, 0x97, 0x60, 0x2a, 0xa6, 0x57, 0x58, 0x1a, 0x83, - 0x61, 0x8a, 0x9b, 0xbc, 0x6f, 0xa4, 0xdc, 0x59, 0xea, 0x59, 0xb8, 0xf2, 0x14, 0x1f, 0x74, 0xe0, - 0x2f, 0xc8, 0x3a, 0x71, 0x77, 0x6c, 0xcf, 0x09, 0x8e, 0xb5, 0x00, 0x19, 0x79, 0x2b, 0x96, 0xe8, - 0x31, 0x64, 0xb7, 0x5b, 0x55, 0xc7, 0x66, 0x0c, 0xd7, 0xb7, 0x3c, 0xb2, 0x6f, 0x53, 0x9b, 0xb8, - 0x97, 0x30, 0x1d, 0x50, 0x0d, 0x75, 0xa9, 0x3e, 0x2a, 0xa0, 0x0e, 0xe2, 0x12, 0xda, 0xab, 0x30, - 0x52, 0x37, 0x99, 0x29, 0xa6, 0x3a, 0x25, 0x4d, 0x35, 0x68, 0x78, 0x68, 0x32, 0x53, 0x0c, 0x97, - 0x37, 0xa0, 0x07, 0x90, 0xa4, 0xcc, 0x64, 0x2d, 0xca, 0xc5, 0xd2, 0x4b, 0xd3, 0xb1, 0xad, 0xdb, - 0x1c, 0x16, 0xfc, 0x65, 0xfc, 0x26, 0x7d, 0x11, 0xb2, 0x62, 0x0c, 0x03, 0x4e, 0x28, 0x0f, 0xa4, - 0x73, 0x8a, 0x41, 0xf8, 0x3f, 0x7c, 0x8a, 0xeb, 0x80, 0xd6, 0x89, 0xe3, 0xd8, 0xcc, 0xc1, 0x2e, - 0xa3, 0xf1, 0xf6, 0x57, 0x61, 0xbc, 0x0f, 0x27, 0x6c, 0xe7, 0x21, 0x5d, 0xeb, 0x96, 0x33, 0x4a, - 0x7e, 0xb8, 0x90, 0x2a, 0xf7, 0x96, 0x74, 0x04, 0x63, 0x1b, 0x2d, 0xd3, 0xab, 0xdb, 0xa6, 0x1b, - 0xbe, 0x90, 0x12, 0xfc, 0xd7, 0x53, 0x13, 0x54, 0x39, 0x48, 0x59, 0x41, 0x51, 0x10, 0x75, 0x0b, - 0x1d, 0x9a, 0xe0, 0xfa, 0xf6, 0xd2, 0xf4, 0xd4, 0xba, 0x34, 0xc1, 0x5d, 0x0a, 0x69, 0xc2, 0x82, - 0xfe, 0x2f, 0xfc, 0xb3, 0xd9, 0xaa, 0x5b, 0x38, 0xe4, 0x28, 0xc0, 0x68, 0x50, 0x10, 0x04, 0x93, - 0x90, 0x7c, 0xc5, 0x2b, 0xa2, 0x5b, 0x7c, 0x2d, 0xfd, 0x4a, 0xc1, 0x5f, 0xfc, 0x5d, 0xa3, 0x26, - 0x24, 0xfd, 0xb7, 0x8a, 0xf4, 0xe8, 0xb0, 0xe5, 0x38, 0x50, 0x67, 0xcf, 0xc5, 0xf8, 0xa2, 0xba, - 0xf6, 0xf6, 0xeb, 0xcf, 0x0f, 0x43, 0x19, 0x34, 0x69, 0x44, 0x02, 0xc7, 0x8f, 0x01, 0xf4, 0x45, - 0x81, 0xff, 0x07, 0xbe, 0x65, 0xb4, 0x10, 0xa5, 0x3f, 0x2f, 0x2e, 0xd4, 0xc5, 0x4b, 0xa2, 0x85, - 0xad, 0x7b, 0xdc, 0xd6, 0x6d, 0xb4, 0x1c, 0xb5, 0x65, 0x89, 0xb6, 0x0a, 0xc5, 0xcd, 0x4a, 0xb5, - 0x5d, 0x09, 0x26, 0x6c, 0x1c, 0x06, 0xab, 0x23, 0xf4, 0x5e, 0x81, 0xb1, 0x68, 0x62, 0xa0, 0x1b, - 0x51, 0x03, 0x31, 0x71, 0xa3, 0x16, 0x2e, 0x06, 0x0a, 0x93, 0xf3, 0xdc, 0xe4, 0x35, 0x34, 0x1b, - 0x35, 0xe9, 0xe2, 0x03, 0xdf, 0x20, 0x23, 0x95, 0x9a, 0xd0, 0xff, 0xac, 0x00, 0x92, 0xc3, 0x04, - 0xcd, 0x45, 0xd5, 0x62, 0xc3, 0x4b, 0xbd, 0x79, 0x19, 0xa8, 0xb0, 0x76, 0x9f, 0x5b, 0xbb, 0x83, - 0x56, 0xa2, 0xd6, 0x68, 0xd0, 0x53, 0x69, 0x04, 0x4d, 0x3d, 0xa3, 0x33, 0x0e, 0x29, 0x6e, 0x1e, - 0xa1, 0x4f, 0x4a, 0xe7, 0x71, 0x46, 0x23, 0x43, 0xf6, 0x1a, 0x1b, 0x43, 0xb2, 0xd7, 0xf8, 0x04, - 0xd2, 0x4b, 0xdc, 0xeb, 0x3c, 0x9a, 0x8b, 0x7a, 0xad, 0x05, 0x3d, 0xbd, 0x5e, 0xb9, 0xc1, 0x37, - 0x0a, 0xa4, 0x7b, 0x52, 0x41, 0x7e, 0x0e, 0x72, 0xb4, 0xc8, 0xcf, 0x61, 0x40, 0xac, 0xe8, 0x73, - 0xdc, 0xcb, 0x2c, 0x9a, 0x91, 0xbd, 0x84, 0x60, 0xe1, 0x81, 0x42, 0x2a, 0xcc, 0x12, 0x94, 0x97, - 0xae, 0x77, 0x24, 0x7a, 0xd4, 0x99, 0x73, 0x10, 0x42, 0x7c, 0x86, 0x8b, 0x5f, 0x45, 0x59, 0xe9, - 0xd2, 0x87, 0x3a, 0x14, 0x52, 0x61, 0xf2, 0xc8, 0xa2, 0xd1, 0xa0, 0x92, 0x45, 0xa5, 0xd8, 0x8a, - 0x17, 0x0d, 0xb3, 0x0b, 0x59, 0x90, 0xf4, 0xa3, 0x0a, 0x49, 0xff, 0x1e, 0xfa, 0x32, 0x4d, 0xd5, - 0xe2, 0xb6, 0x2f, 0x0a, 0x1b, 0x3f, 0xe9, 0xd6, 0x36, 0x8f, 0x4f, 0x35, 0xe5, 0xe4, 0x54, 0x53, - 0x7e, 0x9c, 0x6a, 0xca, 0xbb, 0x33, 0x2d, 0x71, 0x72, 0xa6, 0x25, 0xbe, 0x9d, 0x69, 0x89, 0x97, - 0xb7, 0x2c, 0x9b, 0xed, 0xb6, 0xaa, 0xc5, 0x1a, 0x71, 0x8c, 0x47, 0xb6, 0x4b, 0x6b, 0xbb, 0xb6, - 0x69, 0xec, 0x88, 0xc5, 0x22, 0xad, 0xbf, 0x36, 0x0e, 0x42, 0x3e, 0xd6, 0x6e, 0x60, 0x5a, 0x4d, - 0xf2, 0x5f, 0x4a, 0xcb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x55, 0x64, 0x53, 0xe7, 0xa9, 0x09, - 0x00, 0x00, + // 943 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x8f, 0xdb, 0x44, + 0x14, 0x5e, 0xb7, 0x69, 0x44, 0x5e, 0xa0, 0x94, 0xd9, 0x65, 0xd5, 0x75, 0x53, 0x67, 0xe3, 0xa2, + 0xdd, 0xb4, 0x74, 0xe3, 0x26, 0x54, 0x5d, 0x89, 0xd2, 0xcb, 0x06, 0x51, 0x51, 0xa4, 0xb6, 0x24, + 0x37, 0x2e, 0xd1, 0x24, 0x9e, 0x75, 0x0d, 0x6b, 0x4f, 0xec, 0x19, 0x47, 0xbb, 0x2a, 0x3d, 0xc0, + 0x2f, 0x40, 0xa2, 0xbf, 0x01, 0x89, 0x3f, 0x80, 0xc4, 0x95, 0x53, 0x8f, 0x2b, 0x71, 0xe1, 0x84, + 0xd0, 0x2e, 0x3f, 0x04, 0x79, 0x3c, 0x76, 0x12, 0x4f, 0x9c, 0x0d, 0xa7, 0xde, 0xc6, 0xcf, 0xef, + 0x7d, 0xdf, 0xf7, 0xde, 0xcb, 0x7c, 0x0e, 0xe8, 0x47, 0x43, 0xcf, 0x3a, 0x1c, 0x86, 0xae, 0xed, + 0x10, 0x6b, 0xd2, 0xb6, 0x82, 0x88, 0x84, 0x27, 0xad, 0x71, 0x48, 0x39, 0x45, 0x57, 0x8f, 0x86, + 0x5e, 0x4b, 0xbe, 0x6b, 0x4d, 0xda, 0x7a, 0xcd, 0xa1, 0xd4, 0x39, 0x22, 0x16, 0x1e, 0xbb, 0x16, + 0xf6, 0x7d, 0xca, 0x31, 0x77, 0xa9, 0xcf, 0x92, 0x6c, 0x7d, 0xc3, 0xa1, 0x0e, 0x15, 0x47, 0x2b, + 0x3e, 0xc9, 0x68, 0x2d, 0x87, 0x9f, 0xc2, 0x89, 0xb7, 0xe6, 0x06, 0xa0, 0xaf, 0x63, 0xc2, 0xe7, + 0x38, 0xc4, 0x1e, 0xeb, 0x91, 0x20, 0x22, 0x8c, 0x9b, 0x5f, 0xc1, 0xfa, 0x5c, 0x94, 0x8d, 0xa9, + 0xcf, 0x08, 0xba, 0x0f, 0xe5, 0xb1, 0x88, 0x5c, 0xd7, 0xb6, 0xb5, 0x66, 0xb5, 0xb3, 0xd9, 0x9a, + 0xd7, 0xd7, 0x4a, 0xf2, 0x0f, 0x4a, 0x6f, 0xfe, 0xae, 0xaf, 0xf5, 0x64, 0x6e, 0x4c, 0xf1, 0x94, + 0x1c, 0xf3, 0x3e, 0x09, 0xfa, 0xc4, 0xb7, 0x53, 0x8a, 0x5d, 0x58, 0x9f, 0x8b, 0x4a, 0x8a, 0x6b, + 0x70, 0x99, 0x91, 0x40, 0xe0, 0x97, 0x7a, 0xf1, 0xd1, 0xfc, 0x14, 0x6a, 0x8f, 0x43, 0x82, 0x39, + 0x61, 0x71, 0xf2, 0xc1, 0xc9, 0xb3, 0x31, 0x09, 0x31, 0xa7, 0xa1, 0x04, 0x42, 0x3a, 0xbc, 0x43, + 0x65, 0x48, 0x94, 0x55, 0x7a, 0xd9, 0xb3, 0xd9, 0x86, 0x9b, 0x05, 0xb5, 0x85, 0x74, 0x4d, 0xd8, + 0x49, 0x4b, 0xba, 0x71, 0xca, 0x28, 0xe2, 0xee, 0x84, 0x74, 0xa9, 0x7f, 0xe8, 0x86, 0x1e, 0xb1, + 0xfb, 0x24, 0x48, 0x3b, 0x78, 0x08, 0xbb, 0x17, 0x66, 0x16, 0xd2, 0x7c, 0x09, 0x5b, 0xfd, 0x68, + 0xe8, 0xb9, 0x9c, 0x13, 0xfb, 0x79, 0x48, 0x27, 0x2e, 0x73, 0xa9, 0xbf, 0x42, 0x4b, 0x29, 0xd4, + 0xa5, 0x29, 0xd4, 0x6b, 0x0d, 0xf4, 0x45, 0x58, 0x92, 0x7b, 0x1f, 0x4a, 0x36, 0xe6, 0x58, 0xae, + 0xec, 0xa6, 0xb2, 0xb2, 0xb4, 0xe0, 0x73, 0xcc, 0xb1, 0xdc, 0x9c, 0x28, 0x40, 0x8f, 0xa0, 0xcc, + 0x38, 0xe6, 0x11, 0x13, 0x64, 0xd5, 0x4e, 0xbd, 0xb0, 0xb4, 0x2f, 0xd2, 0xd2, 0xb5, 0x27, 0x45, + 0xe6, 0x33, 0xb8, 0xf1, 0x94, 0x10, 0x9b, 0xd8, 0x42, 0x1b, 0x13, 0x79, 0x24, 0x60, 0xab, 0xf4, + 0xb8, 0x01, 0x57, 0x42, 0xec, 0x3b, 0x44, 0x76, 0x99, 0x3c, 0x98, 0x1d, 0xa8, 0x2d, 0x06, 0x94, + 0x8d, 0x22, 0x28, 0x31, 0x12, 0xc4, 0xbf, 0xcd, 0xcb, 0xcd, 0x52, 0x4f, 0x9c, 0xcd, 0x3d, 0xd8, + 0xca, 0x16, 0xa2, 0x8c, 0x59, 0xdd, 0x4a, 0x3c, 0xca, 0x45, 0xf9, 0x6f, 0x79, 0x94, 0x3b, 0x80, + 0xba, 0xd4, 0xf3, 0x5c, 0xee, 0x11, 0x9f, 0xb3, 0x62, 0xf9, 0xfb, 0xb0, 0x3e, 0x97, 0x27, 0x65, + 0x6f, 0x43, 0x75, 0x34, 0x0d, 0x8b, 0xf9, 0x54, 0x7a, 0xb3, 0x21, 0x13, 0xc1, 0xb5, 0xc7, 0x11, + 0x0e, 0x6d, 0x17, 0xfb, 0x99, 0x07, 0xb4, 0xe1, 0x83, 0x99, 0x98, 0x84, 0xaa, 0x41, 0xc5, 0x49, + 0x83, 0x12, 0x68, 0x1a, 0x88, 0x61, 0xd2, 0x1b, 0x36, 0x0b, 0x33, 0x13, 0x9b, 0xc2, 0xa4, 0xcb, + 0xce, 0x60, 0xb2, 0x80, 0xf9, 0x3e, 0xbc, 0xf7, 0x24, 0xb2, 0x1d, 0x92, 0x61, 0x34, 0xe1, 0x6a, + 0x1a, 0x90, 0x00, 0x9b, 0x50, 0xfe, 0x56, 0x44, 0x64, 0xb5, 0x7c, 0xea, 0xfc, 0xfe, 0x2e, 0x5c, + 0x11, 0xce, 0x85, 0x02, 0x28, 0x27, 0x6e, 0x84, 0xcc, 0xfc, 0xb0, 0x55, 0xc3, 0xd3, 0x6f, 0x2d, + 0xcd, 0x49, 0x48, 0x4d, 0xe3, 0xc7, 0x3f, 0xff, 0xfd, 0xf9, 0xd2, 0x75, 0xb4, 0x69, 0xe5, 0x2c, + 0x35, 0x31, 0x3a, 0xf4, 0x3d, 0x54, 0x67, 0x2c, 0x4d, 0xe5, 0x55, 0x5d, 0x50, 0xe5, 0x5d, 0xe0, + 0x89, 0xe6, 0x47, 0x82, 0xd7, 0x40, 0xb5, 0x3c, 0xaf, 0x4f, 0x8e, 0x39, 0x23, 0xc1, 0x80, 0xc5, + 0x74, 0xbf, 0x68, 0xf0, 0xe1, 0x42, 0xb3, 0x43, 0x77, 0xf3, 0x24, 0xcb, 0xfc, 0x54, 0xdf, 0x5b, + 0x31, 0x5b, 0x8a, 0xbb, 0x27, 0xc4, 0xdd, 0x41, 0xcd, 0xbc, 0xb8, 0x6c, 0x9f, 0xd6, 0xcb, 0xf4, + 0xf8, 0xca, 0x62, 0x24, 0x40, 0x7f, 0x68, 0x50, 0xbf, 0xc0, 0x38, 0xd1, 0x83, 0x22, 0x11, 0xcb, + 0x3d, 0x59, 0xdf, 0xff, 0xdf, 0x75, 0xb2, 0x8d, 0x96, 0x68, 0xa3, 0x89, 0x76, 0xf2, 0x6d, 0x38, + 0x12, 0x60, 0x30, 0x4a, 0xcb, 0x06, 0x71, 0x13, 0xbf, 0x6a, 0x80, 0x54, 0xd3, 0x45, 0xb7, 0xf3, + 0xfc, 0x85, 0x26, 0xaf, 0xdf, 0x59, 0x25, 0x55, 0xaa, 0xfb, 0x4c, 0xa8, 0x7b, 0x80, 0xee, 0xaf, + 0x34, 0xe4, 0x71, 0x5a, 0x6f, 0xbd, 0x64, 0x24, 0x78, 0x85, 0x5e, 0x6b, 0xb1, 0x7f, 0xe4, 0x5d, + 0x4d, 0xd5, 0x5a, 0xe8, 0x94, 0xaa, 0xd6, 0x62, 0x93, 0x34, 0x77, 0x85, 0xd6, 0x06, 0xaa, 0x2b, + 0xb7, 0x24, 0x27, 0xeb, 0x37, 0x0d, 0x36, 0x16, 0x19, 0x3a, 0xfa, 0x58, 0xbd, 0x14, 0x85, 0xdf, + 0x11, 0xfd, 0xee, 0x6a, 0xc9, 0x52, 0x5c, 0x57, 0x88, 0x7b, 0x84, 0x1e, 0xae, 0x34, 0x48, 0x5f, + 0x40, 0x0d, 0x58, 0x86, 0x15, 0xaf, 0x9e, 0xa1, 0x1f, 0x34, 0xa8, 0xce, 0xf8, 0xac, 0x7a, 0xd1, + 0x55, 0xb3, 0x56, 0x2f, 0xfa, 0x02, 0xa3, 0x36, 0x6f, 0x0b, 0x75, 0xb7, 0x50, 0x23, 0xaf, 0x6e, + 0xc6, 0xab, 0xe5, 0xf0, 0x18, 0x54, 0x32, 0x77, 0x46, 0xdb, 0xca, 0xaf, 0x3e, 0x67, 0xe6, 0x7a, + 0x63, 0x49, 0x86, 0x24, 0x6f, 0x08, 0xf2, 0x1b, 0x68, 0x4b, 0xb9, 0x01, 0x19, 0x0f, 0x83, 0x4a, + 0xe6, 0xe5, 0x2a, 0x69, 0xde, 0xfa, 0x55, 0x52, 0xe5, 0x43, 0x50, 0x4c, 0x9a, 0xed, 0x03, 0x39, + 0x50, 0x4e, 0xcc, 0x1f, 0x29, 0x1f, 0xdc, 0xb9, 0xaf, 0x84, 0x6e, 0x14, 0xbd, 0xbe, 0xc8, 0xbe, + 0x93, 0x6f, 0xc7, 0xc1, 0x93, 0x37, 0x67, 0x86, 0x76, 0x7a, 0x66, 0x68, 0xff, 0x9c, 0x19, 0xda, + 0x4f, 0xe7, 0xc6, 0xda, 0xe9, 0xb9, 0xb1, 0xf6, 0xd7, 0xb9, 0xb1, 0xf6, 0xcd, 0x3d, 0xc7, 0xe5, + 0x2f, 0xa2, 0x61, 0x6b, 0x44, 0x3d, 0xeb, 0x0b, 0xd7, 0x67, 0xa3, 0x17, 0x2e, 0xb6, 0x0e, 0xe5, + 0x61, 0x8f, 0xd9, 0xdf, 0x59, 0xc7, 0x19, 0x1e, 0x3f, 0x19, 0x13, 0x36, 0x2c, 0x8b, 0x7f, 0xd7, + 0x9f, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x20, 0x1a, 0xcc, 0x0b, 0xdd, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -903,14 +1096,21 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries the parameters of x/fbridge module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Get a greatest sequence number to be confirmed by a particular operator + // NextSeqSend to be used when the next bridge request is made + NextSeqSend(ctx context.Context, in *NextSeqSendRequest, opts ...grpc.CallOption) (*NextSeqSendResponse, error) + // Get a greatest sequence number confirmed by a particular operator GreatestSeqByOperator(ctx context.Context, in *GreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*GreatestSeqByOperatorResponse, error) - // Get a next sequence number to be confirmed by n-of-m operators - NextSeqToConfirm(ctx context.Context, in *NextSeqToConfirmRequest, opts ...grpc.CallOption) (*NextSeqToConfirmResponse, error) + // Get a greatest consecutive sequence number confirmed by n-of-m operators + GreatestConsecutiveConfirmedSeq(ctx context.Context, in *GreatestConsecutiveConfirmedSeqRequest, opts ...grpc.CallOption) (*GreatestConsecutiveConfirmedSeqResponse, error) // Get a provision submitted by a particular operator SubmittedProvision(ctx context.Context, in *SubmittedProvisionRequest, opts ...grpc.CallOption) (*SubmittedProvisionResponse, error) - // Get a specific confirmed provision + // Get a particular sequence of confirmed provisions ConfirmedProvision(ctx context.Context, in *ConfirmedProvisionRequest, opts ...grpc.CallOption) (*ConfirmedProvisionResponse, error) + // Get 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 *NeededSubmissionSeqsRequest, opts ...grpc.CallOption) (*NeededSubmissionSeqsResponse, error) // Get commitments of a specific sequence number Commitments(ctx context.Context, in *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, error) // Get a list of Guardians registered on the bridge @@ -938,6 +1138,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) NextSeqSend(ctx context.Context, in *NextSeqSendRequest, opts ...grpc.CallOption) (*NextSeqSendResponse, error) { + out := new(NextSeqSendResponse) + 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 *GreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*GreatestSeqByOperatorResponse, error) { out := new(GreatestSeqByOperatorResponse) err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/GreatestSeqByOperator", in, out, opts...) @@ -947,9 +1156,9 @@ func (c *queryClient) GreatestSeqByOperator(ctx context.Context, in *GreatestSeq return out, nil } -func (c *queryClient) NextSeqToConfirm(ctx context.Context, in *NextSeqToConfirmRequest, opts ...grpc.CallOption) (*NextSeqToConfirmResponse, error) { - out := new(NextSeqToConfirmResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/NextSeqToConfirm", in, out, opts...) +func (c *queryClient) GreatestConsecutiveConfirmedSeq(ctx context.Context, in *GreatestConsecutiveConfirmedSeqRequest, opts ...grpc.CallOption) (*GreatestConsecutiveConfirmedSeqResponse, error) { + out := new(GreatestConsecutiveConfirmedSeqResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/GreatestConsecutiveConfirmedSeq", in, out, opts...) if err != nil { return nil, err } @@ -974,6 +1183,15 @@ func (c *queryClient) ConfirmedProvision(ctx context.Context, in *ConfirmedProvi return out, nil } +func (c *queryClient) NeededSubmissionSeqs(ctx context.Context, in *NeededSubmissionSeqsRequest, opts ...grpc.CallOption) (*NeededSubmissionSeqsResponse, error) { + out := new(NeededSubmissionSeqsResponse) + 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 *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, error) { out := new(CommitmentsResponse) err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Query/Commitments", in, out, opts...) @@ -1014,14 +1232,21 @@ func (c *queryClient) Judges(ctx context.Context, in *JudgesRequest, opts ...grp type QueryServer interface { // Params queries the parameters of x/fbridge module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Get a greatest sequence number to be confirmed by a particular operator + // NextSeqSend to be used when the next bridge request is made + NextSeqSend(context.Context, *NextSeqSendRequest) (*NextSeqSendResponse, error) + // Get a greatest sequence number confirmed by a particular operator GreatestSeqByOperator(context.Context, *GreatestSeqByOperatorRequest) (*GreatestSeqByOperatorResponse, error) - // Get a next sequence number to be confirmed by n-of-m operators - NextSeqToConfirm(context.Context, *NextSeqToConfirmRequest) (*NextSeqToConfirmResponse, error) + // Get a greatest consecutive sequence number confirmed by n-of-m operators + GreatestConsecutiveConfirmedSeq(context.Context, *GreatestConsecutiveConfirmedSeqRequest) (*GreatestConsecutiveConfirmedSeqResponse, error) // Get a provision submitted by a particular operator SubmittedProvision(context.Context, *SubmittedProvisionRequest) (*SubmittedProvisionResponse, error) - // Get a specific confirmed provision + // Get a particular sequence of confirmed provisions ConfirmedProvision(context.Context, *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) + // Get 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, *NeededSubmissionSeqsRequest) (*NeededSubmissionSeqsResponse, error) // Get commitments of a specific sequence number Commitments(context.Context, *CommitmentsRequest) (*CommitmentsResponse, error) // Get a list of Guardians registered on the bridge @@ -1039,11 +1264,14 @@ 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 *NextSeqSendRequest) (*NextSeqSendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NextSeqSend not implemented") +} func (*UnimplementedQueryServer) GreatestSeqByOperator(ctx context.Context, req *GreatestSeqByOperatorRequest) (*GreatestSeqByOperatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GreatestSeqByOperator not implemented") } -func (*UnimplementedQueryServer) NextSeqToConfirm(ctx context.Context, req *NextSeqToConfirmRequest) (*NextSeqToConfirmResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NextSeqToConfirm not implemented") +func (*UnimplementedQueryServer) GreatestConsecutiveConfirmedSeq(ctx context.Context, req *GreatestConsecutiveConfirmedSeqRequest) (*GreatestConsecutiveConfirmedSeqResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GreatestConsecutiveConfirmedSeq not implemented") } func (*UnimplementedQueryServer) SubmittedProvision(ctx context.Context, req *SubmittedProvisionRequest) (*SubmittedProvisionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmittedProvision not implemented") @@ -1051,6 +1279,9 @@ func (*UnimplementedQueryServer) SubmittedProvision(ctx context.Context, req *Su func (*UnimplementedQueryServer) ConfirmedProvision(ctx context.Context, req *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmedProvision not implemented") } +func (*UnimplementedQueryServer) NeededSubmissionSeqs(ctx context.Context, req *NeededSubmissionSeqsRequest) (*NeededSubmissionSeqsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NeededSubmissionSeqs not implemented") +} func (*UnimplementedQueryServer) Commitments(ctx context.Context, req *CommitmentsRequest) (*CommitmentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Commitments not implemented") } @@ -1086,6 +1317,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf 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(NextSeqSendRequest) + 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.(*NextSeqSendRequest)) + } + 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(GreatestSeqByOperatorRequest) if err := dec(in); err != nil { @@ -1104,20 +1353,20 @@ func _Query_GreatestSeqByOperator_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Query_NextSeqToConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NextSeqToConfirmRequest) +func _Query_GreatestConsecutiveConfirmedSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GreatestConsecutiveConfirmedSeqRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).NextSeqToConfirm(ctx, in) + return srv.(QueryServer).GreatestConsecutiveConfirmedSeq(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/lbm.fbridge.v1.Query/NextSeqToConfirm", + FullMethod: "/lbm.fbridge.v1.Query/GreatestConsecutiveConfirmedSeq", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NextSeqToConfirm(ctx, req.(*NextSeqToConfirmRequest)) + return srv.(QueryServer).GreatestConsecutiveConfirmedSeq(ctx, req.(*GreatestConsecutiveConfirmedSeqRequest)) } return interceptor(ctx, in, info, handler) } @@ -1158,6 +1407,24 @@ func _Query_ConfirmedProvision_Handler(srv interface{}, ctx context.Context, dec 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(NeededSubmissionSeqsRequest) + 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.(*NeededSubmissionSeqsRequest)) + } + 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(CommitmentsRequest) if err := dec(in); err != nil { @@ -1238,13 +1505,17 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "NextSeqSend", + Handler: _Query_NextSeqSend_Handler, + }, { MethodName: "GreatestSeqByOperator", Handler: _Query_GreatestSeqByOperator_Handler, }, { - MethodName: "NextSeqToConfirm", - Handler: _Query_NextSeqToConfirm_Handler, + MethodName: "GreatestConsecutiveConfirmedSeq", + Handler: _Query_GreatestConsecutiveConfirmedSeq_Handler, }, { MethodName: "SubmittedProvision", @@ -1254,6 +1525,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ConfirmedProvision", Handler: _Query_ConfirmedProvision_Handler, }, + { + MethodName: "NeededSubmissionSeqs", + Handler: _Query_NeededSubmissionSeqs_Handler, + }, { MethodName: "Commitments", Handler: _Query_Commitments_Handler, @@ -1331,6 +1606,57 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *NextSeqSendRequest) 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 *NextSeqSendRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NextSeqSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *NextSeqSendResponse) 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 *NextSeqSendResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NextSeqSendResponse) 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 *GreatestSeqByOperatorRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1389,7 +1715,7 @@ func (m *GreatestSeqByOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *NextSeqToConfirmRequest) Marshal() (dAtA []byte, err error) { +func (m *GreatestConsecutiveConfirmedSeqRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1399,12 +1725,12 @@ func (m *NextSeqToConfirmRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NextSeqToConfirmRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GreatestConsecutiveConfirmedSeqRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NextSeqToConfirmRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GreatestConsecutiveConfirmedSeqRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1412,7 +1738,7 @@ func (m *NextSeqToConfirmRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *NextSeqToConfirmResponse) Marshal() (dAtA []byte, err error) { +func (m *GreatestConsecutiveConfirmedSeqResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1422,12 +1748,12 @@ func (m *NextSeqToConfirmResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NextSeqToConfirmResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GreatestConsecutiveConfirmedSeqResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NextSeqToConfirmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GreatestConsecutiveConfirmedSeqResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1518,7 +1844,7 @@ func (m *SubmittedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *ConfirmedProvisionRequest) Marshal() (dAtA []byte, err error) { +func (m *NeededSubmissionSeqsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1528,25 +1854,32 @@ func (m *ConfirmedProvisionRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConfirmedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *NeededSubmissionSeqsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfirmedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NeededSubmissionSeqsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Seq != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + if m.Range != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Range)) i-- - dAtA[i] = 0x8 + 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 *ConfirmedProvisionResponse) Marshal() (dAtA []byte, err error) { +func (m *NeededSubmissionSeqsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1556,24 +1889,93 @@ func (m *ConfirmedProvisionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConfirmedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *NeededSubmissionSeqsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfirmedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NeededSubmissionSeqsResponse) 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 + 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 -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintQuery(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConfirmedProvisionRequest) 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 *ConfirmedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfirmedProvisionRequest) 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 *ConfirmedProvisionResponse) 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 *ConfirmedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfirmedProvisionResponse) 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 { @@ -1845,6 +2247,27 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *NextSeqSendRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *NextSeqSendResponse) 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 *GreatestSeqByOperatorRequest) Size() (n int) { if m == nil { return 0 @@ -1870,7 +2293,7 @@ func (m *GreatestSeqByOperatorResponse) Size() (n int) { return n } -func (m *NextSeqToConfirmRequest) Size() (n int) { +func (m *GreatestConsecutiveConfirmedSeqRequest) Size() (n int) { if m == nil { return 0 } @@ -1879,7 +2302,7 @@ func (m *NextSeqToConfirmRequest) Size() (n int) { return n } -func (m *NextSeqToConfirmResponse) Size() (n int) { +func (m *GreatestConsecutiveConfirmedSeqResponse) Size() (n int) { if m == nil { return 0 } @@ -1920,6 +2343,38 @@ func (m *SubmittedProvisionResponse) Size() (n int) { return n } +func (m *NeededSubmissionSeqsRequest) 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 *NeededSubmissionSeqsResponse) 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 *ConfirmedProvisionRequest) Size() (n int) { if m == nil { return 0 @@ -2183,6 +2638,125 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *NextSeqSendRequest) 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: NextSeqSendRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NextSeqSendRequest: 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 *NextSeqSendResponse) 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: NextSeqSendResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NextSeqSendResponse: 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 *GreatestSeqByOperatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2334,7 +2908,7 @@ func (m *GreatestSeqByOperatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *NextSeqToConfirmRequest) Unmarshal(dAtA []byte) error { +func (m *GreatestConsecutiveConfirmedSeqRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2357,10 +2931,10 @@ func (m *NextSeqToConfirmRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NextSeqToConfirmRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NextSeqToConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2384,7 +2958,7 @@ func (m *NextSeqToConfirmRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *NextSeqToConfirmResponse) Unmarshal(dAtA []byte) error { +func (m *GreatestConsecutiveConfirmedSeqResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2407,10 +2981,10 @@ func (m *NextSeqToConfirmResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NextSeqToConfirmResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NextSeqToConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2670,6 +3244,233 @@ func (m *SubmittedProvisionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *NeededSubmissionSeqsRequest) 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: NeededSubmissionSeqsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NeededSubmissionSeqsRequest: 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 *NeededSubmissionSeqsResponse) 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: NeededSubmissionSeqsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NeededSubmissionSeqsResponse: 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 *ConfirmedProvisionRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/fbridge/types/query.pb.gw.go b/x/fbridge/types/query.pb.gw.go index 394633f441..380319a8a8 100644 --- a/x/fbridge/types/query.pb.gw.go +++ b/x/fbridge/types/query.pb.gw.go @@ -49,6 +49,24 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +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 NextSeqSendRequest + 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 NextSeqSendRequest + 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 GreatestSeqByOperatorRequest var metadata runtime.ServerMetadata @@ -103,20 +121,20 @@ func local_request_Query_GreatestSeqByOperator_0(ctx context.Context, marshaler } -func request_Query_NextSeqToConfirm_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq NextSeqToConfirmRequest +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 GreatestConsecutiveConfirmedSeqRequest var metadata runtime.ServerMetadata - msg, err := client.NextSeqToConfirm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GreatestConsecutiveConfirmedSeq(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_NextSeqToConfirm_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq NextSeqToConfirmRequest +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 GreatestConsecutiveConfirmedSeqRequest var metadata runtime.ServerMetadata - msg, err := server.NextSeqToConfirm(ctx, &protoReq) + msg, err := server.GreatestConsecutiveConfirmedSeq(ctx, &protoReq) return msg, metadata, err } @@ -251,6 +269,78 @@ func local_request_Query_ConfirmedProvision_0(ctx context.Context, marshaler run } +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 NeededSubmissionSeqsRequest + 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 NeededSubmissionSeqsRequest + 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 CommitmentsRequest var metadata runtime.ServerMetadata @@ -385,6 +475,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + 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() @@ -405,7 +515,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_NextSeqToConfirm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + 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) @@ -414,14 +524,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_NextSeqToConfirm_0(rctx, inboundMarshaler, server, req, pathParams) + 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_NextSeqToConfirm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GreatestConsecutiveConfirmedSeq_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -465,6 +575,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + 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() @@ -606,6 +736,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + 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() @@ -626,7 +776,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_NextSeqToConfirm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + 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) @@ -635,14 +785,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_NextSeqToConfirm_0(rctx, inboundMarshaler, client, req, pathParams) + 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_NextSeqToConfirm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GreatestConsecutiveConfirmedSeq_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -686,6 +836,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + 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() @@ -772,13 +942,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie 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_GreatestSeqByOperator_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", "greatest_seq_by_operator", "operator"}, "", 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_NextSeqToConfirm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fbridge", "v1", "next_seq_to_confirm"}, "", 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_SubmittedProvision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "fbridge", "v1", "submitted_provision", "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_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", "confirmed_provision", "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))) @@ -792,14 +966,18 @@ var ( var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_NextSeqSend_0 = runtime.ForwardResponseMessage + forward_Query_GreatestSeqByOperator_0 = runtime.ForwardResponseMessage - forward_Query_NextSeqToConfirm_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 From 6e58a32446b7a22a48b5e92867f92f753f8dd25e Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:54:57 +0900 Subject: [PATCH 09/12] add codec --- docs/core/proto-docs.md | 65 +- proto/lbm/fbridge/v1/tx.proto | 58 +- x/fbridge/keeper/grpc_query.go | 2 +- x/fbridge/types/codec.go | 38 + x/fbridge/types/msgs.go | 115 +++ x/fbridge/types/tx.pb.go | 1238 +++++++++++++++++++++++++++++--- 6 files changed, 1398 insertions(+), 118 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index dcad3c47d1..6299fbfd2c 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -809,6 +809,8 @@ - [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) @@ -817,6 +819,8 @@ - [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) - [MsgTransfer](#lbm.fbridge.v1.MsgTransfer) - [MsgTransferResponse](#lbm.fbridge.v1.MsgTransferResponse) - [MsgUpdateRole](#lbm.fbridge.v1.MsgUpdateRole) @@ -12064,6 +12068,7 @@ 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 | @@ -12079,6 +12084,7 @@ MsgClaimBatch is input values required for claiming multiple claimable provision | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the claimer address | | `max_claims` | [uint64](#uint64) | | the maximum number of claims to be made at once | @@ -12106,6 +12112,31 @@ MsgClaimBatch is input values required for claiming multiple claimable provision + + +### MsgHalt +MsgHalt is input values required for halting the bridge module + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `guardian` | [string](#string) | | the guardian address | + + + + + + + + +### MsgHaltResponse + + + + + + + ### MsgHoldTransfer @@ -12114,6 +12145,7 @@ 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 | @@ -12139,6 +12171,7 @@ 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 | @@ -12167,6 +12200,7 @@ MsgReleaseTransfer is input values required for releasing a held transfer by tim | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the guardian address | | `seq` | [uint64](#uint64) | | the sequence number of the bridge request | @@ -12192,6 +12226,7 @@ MsgRemoveProvision is input values required for removing a specific confirmed pr | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the judge address | | `seq` | [uint64](#uint64) | | the sequence number of the bridge request | @@ -12209,6 +12244,31 @@ MsgRemoveProvision is input values required for removing a specific confirmed pr + + +### MsgResume +MsgResume is input values required for resuming the bridge module + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `from` | [string](#string) | | the guardian address | + + + + + + + + +### MsgResumeResponse + + + + + + + ### MsgTransfer @@ -12244,7 +12304,8 @@ MsgUpdateRole is input values required for updating the role of an address | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | the address to update the role | +| `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 | @@ -12283,6 +12344,8 @@ MsgUpdateRole is input values required for updating the role of an address | `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 | | | `UpdateRole` | [MsgUpdateRole](#lbm.fbridge.v1.MsgUpdateRole) | [MsgUpdateRoleResponse](#lbm.fbridge.v1.MsgUpdateRoleResponse) | UpdateRole updates the role of an address in the bridge module. The role can be one of the following: guardian, operator, judge. | | +| `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/tx.proto b/proto/lbm/fbridge/v1/tx.proto index ada0618bf1..27f6b5fc9c 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -31,6 +31,12 @@ service Msg { // UpdateRole updates the role of an address in the bridge module. // The role can be one of the following: guardian, operator, judge. rpc UpdateRole(MsgUpdateRole) returns (MsgUpdateRoleResponse); + + // 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 @@ -48,14 +54,16 @@ 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 = 1; + uint64 seq = 2; // the sender address on the source chain - string sender = 2; + string sender = 3; // the recipient address on the destination chain - string receiver = 3; + string receiver = 4; // the amount of token to be claimed - string amount = 4 + string amount = 5 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; } @@ -63,54 +71,82 @@ 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 = 1; + 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 = 1; + 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 = 1; + 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 = 1; + 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 = 1; + uint64 seq = 2; } message MsgClaimResponse {} // MsgUpdateRole is input values required for updating the role of an address message MsgUpdateRole { + // the guardian address + string from = 1; // the address to update the role - string address = 1; + 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 = 2; + Role role = 3; } message MsgUpdateRoleResponse {} + +// 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/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go index 673c876282..ed33bcd11e 100644 --- a/x/fbridge/keeper/grpc_query.go +++ b/x/fbridge/keeper/grpc_query.go @@ -2,7 +2,7 @@ package keeper import ( "context" - + "github.com/Finschia/finschia-sdk/x/fbridge/types" ) diff --git a/x/fbridge/types/codec.go b/x/fbridge/types/codec.go index 6a0c213529..6e166c6c0f 100644 --- a/x/fbridge/types/codec.go +++ b/x/fbridge/types/codec.go @@ -1,11 +1,30 @@ 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, &MsgUpdateRole{}, "lbm-sdk/MsgUpdateRole") + legacy.RegisterAminoMsg(cdc, &MsgHalt{}, "lbm-sdk/MsgHalt") + legacy.RegisterAminoMsg(cdc, &MsgResume{}, "lbm-sdk/MsgResume") +} + func RegisterInterfaces(registrar types.InterfaceRegistry) { registrar.RegisterImplementations( (*sdk.Msg)(nil), @@ -17,7 +36,26 @@ func RegisterInterfaces(registrar types.InterfaceRegistry) { &MsgClaimBatch{}, &MsgClaim{}, &MsgUpdateRole{}, + &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/msgs.go b/x/fbridge/types/msgs.go index ab1254f4c2..c121625868 100644 --- a/x/fbridge/types/msgs.go +++ b/x/fbridge/types/msgs.go @@ -1 +1,116 @@ 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 = &MsgUpdateRole{} + _ 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 MsgUpdateRole) ValidateBasic() error { return nil } + +func (m MsgUpdateRole) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} +} + +func (m MsgUpdateRole) 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/tx.pb.go b/x/fbridge/types/tx.pb.go index 3cc907e3c1..6c0f55d96e 100644 --- a/x/fbridge/types/tx.pb.go +++ b/x/fbridge/types/tx.pb.go @@ -124,14 +124,16 @@ 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,1,opt,name=seq,proto3" json:"seq,omitempty"` + Seq uint64 `protobuf:"varint,2,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"` + Sender string `protobuf:"bytes,3,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"` + 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,4,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` + 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{} } @@ -167,6 +169,13 @@ func (m *MsgProvision) XXX_DiscardUnknown() { 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 @@ -226,8 +235,10 @@ 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,1,opt,name=seq,proto3" json:"seq,omitempty"` + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` } func (m *MsgHoldTransfer) Reset() { *m = MsgHoldTransfer{} } @@ -263,6 +274,13 @@ func (m *MsgHoldTransfer) XXX_DiscardUnknown() { 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 @@ -308,8 +326,10 @@ 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,1,opt,name=seq,proto3" json:"seq,omitempty"` + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` } func (m *MsgReleaseTransfer) Reset() { *m = MsgReleaseTransfer{} } @@ -345,6 +365,13 @@ func (m *MsgReleaseTransfer) XXX_DiscardUnknown() { 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 @@ -390,8 +417,10 @@ 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,1,opt,name=seq,proto3" json:"seq,omitempty"` + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` } func (m *MsgRemoveProvision) Reset() { *m = MsgRemoveProvision{} } @@ -427,6 +456,13 @@ func (m *MsgRemoveProvision) XXX_DiscardUnknown() { 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 @@ -472,8 +508,10 @@ 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,1,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"` + MaxClaims uint64 `protobuf:"varint,2,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"` } func (m *MsgClaimBatch) Reset() { *m = MsgClaimBatch{} } @@ -509,6 +547,13 @@ func (m *MsgClaimBatch) XXX_DiscardUnknown() { 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 @@ -554,8 +599,10 @@ 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,1,opt,name=seq,proto3" json:"seq,omitempty"` + Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` } func (m *MsgClaim) Reset() { *m = MsgClaim{} } @@ -591,6 +638,13 @@ func (m *MsgClaim) XXX_DiscardUnknown() { 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 @@ -636,14 +690,16 @@ var xxx_messageInfo_MsgClaimResponse proto.InternalMessageInfo // MsgUpdateRole is input values required for updating the role of an address type MsgUpdateRole struct { + // the guardian address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // the address to update the role - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + 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,2,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` + Role Role `protobuf:"varint,3,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` } func (m *MsgUpdateRole) Reset() { *m = MsgUpdateRole{} } @@ -679,9 +735,16 @@ func (m *MsgUpdateRole) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateRole proto.InternalMessageInfo -func (m *MsgUpdateRole) GetAddress() string { +func (m *MsgUpdateRole) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *MsgUpdateRole) GetTarget() string { if m != nil { - return m.Address + return m.Target } return "" } @@ -729,6 +792,170 @@ func (m *MsgUpdateRoleResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateRoleResponse 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{16} +} +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{17} +} +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{18} +} +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{19} +} +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") @@ -746,49 +973,59 @@ func init() { proto.RegisterType((*MsgClaimResponse)(nil), "lbm.fbridge.v1.MsgClaimResponse") proto.RegisterType((*MsgUpdateRole)(nil), "lbm.fbridge.v1.MsgUpdateRole") proto.RegisterType((*MsgUpdateRoleResponse)(nil), "lbm.fbridge.v1.MsgUpdateRoleResponse") + 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{ - // 585 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdf, 0x6e, 0xd2, 0x50, - 0x18, 0xa7, 0x63, 0x43, 0xf8, 0x9c, 0xdb, 0x72, 0x64, 0x03, 0x2b, 0x96, 0xa5, 0xf3, 0xcf, 0xb2, - 0xc4, 0xd6, 0xe1, 0x1b, 0xb0, 0xc4, 0xe8, 0x62, 0xa3, 0xa9, 0x9a, 0x18, 0x6f, 0xcc, 0x81, 0x1e, - 0x4a, 0x63, 0xdb, 0x83, 0xfd, 0x3a, 0x82, 0x0f, 0x61, 0xe2, 0x23, 0xf8, 0x0a, 0xbe, 0xc5, 0x2e, - 0x77, 0x69, 0xbc, 0x58, 0x0c, 0xbc, 0x88, 0xa1, 0x6b, 0x0f, 0x2d, 0x14, 0xb8, 0xf0, 0xee, 0x1c, - 0x7e, 0x7f, 0xbe, 0x5f, 0xbe, 0xfc, 0xe8, 0x81, 0x9a, 0xdb, 0xf1, 0xf4, 0x5e, 0x27, 0x70, 0x2c, - 0x9b, 0xe9, 0xc3, 0x53, 0x3d, 0x1c, 0x69, 0x83, 0x80, 0x87, 0x9c, 0xec, 0xb8, 0x1d, 0x4f, 0x8b, - 0x01, 0x6d, 0x78, 0x2a, 0x57, 0x6d, 0x6e, 0xf3, 0x08, 0xd2, 0xa7, 0xa7, 0x1b, 0x96, 0xdc, 0x98, - 0x93, 0x27, 0x82, 0x08, 0x55, 0xbf, 0x4b, 0x70, 0xdb, 0x40, 0xfb, 0x7d, 0x40, 0x7d, 0xec, 0xb1, - 0x80, 0x1c, 0x40, 0x09, 0x99, 0x6f, 0xb1, 0xa0, 0x2e, 0x1d, 0x4a, 0xc7, 0x15, 0x33, 0xbe, 0x11, - 0x19, 0xca, 0x01, 0xeb, 0x32, 0x67, 0xc8, 0x82, 0xfa, 0x46, 0x84, 0x88, 0x3b, 0x39, 0x87, 0x12, - 0xf5, 0xf8, 0x85, 0x1f, 0xd6, 0x8b, 0x53, 0xa4, 0xdd, 0xba, 0xbc, 0x6e, 0x16, 0xfe, 0x5c, 0x37, - 0x4f, 0x6c, 0x27, 0xec, 0x5f, 0x74, 0xb4, 0x2e, 0xf7, 0xf4, 0x17, 0x8e, 0x8f, 0xdd, 0xbe, 0x43, - 0xf5, 0x5e, 0x7c, 0x78, 0x8a, 0xd6, 0x17, 0x3d, 0xfc, 0x36, 0x60, 0xa8, 0xbd, 0xf2, 0x43, 0x33, - 0x76, 0x50, 0xf7, 0xe1, 0x6e, 0x2a, 0x8e, 0xc9, 0x70, 0xc0, 0x7d, 0x64, 0xea, 0x4f, 0x09, 0xb6, - 0x0d, 0xb4, 0xdf, 0x06, 0x7c, 0xe8, 0xa0, 0xc3, 0x7d, 0xb2, 0x07, 0x45, 0x64, 0x5f, 0xa3, 0x90, - 0x9b, 0xe6, 0xf4, 0x98, 0x4a, 0xbe, 0xb1, 0x34, 0x79, 0x71, 0x69, 0xf2, 0xcd, 0xff, 0x4e, 0x7e, - 0x00, 0xd5, 0x74, 0x42, 0x11, 0xfd, 0x08, 0x76, 0x0d, 0xb4, 0x5f, 0x72, 0xd7, 0x12, 0x4b, 0x5e, - 0x08, 0xaf, 0xde, 0x83, 0xda, 0x1c, 0x49, 0xe8, 0x1f, 0x03, 0x31, 0xd0, 0x36, 0x99, 0xcb, 0x28, - 0xb2, 0x15, 0x16, 0x0d, 0x90, 0x17, 0x79, 0x0b, 0x2e, 0x1e, 0x1f, 0xb2, 0x15, 0x5b, 0x14, 0x2e, - 0x19, 0x9e, 0x70, 0xd1, 0xe0, 0x8e, 0x81, 0xf6, 0x99, 0x4b, 0x1d, 0xaf, 0x4d, 0xc3, 0x6e, 0x9f, - 0x3c, 0x00, 0xf0, 0xe8, 0xe8, 0x73, 0x77, 0xfa, 0x0b, 0xc6, 0x3e, 0x15, 0x8f, 0x8e, 0x22, 0x0a, - 0xaa, 0x35, 0xd8, 0xcf, 0xf0, 0x85, 0x51, 0x03, 0xca, 0x09, 0x90, 0x13, 0x82, 0xc0, 0x5e, 0x82, - 0x0a, 0xc5, 0xbb, 0x68, 0xf4, 0x87, 0x81, 0x45, 0x43, 0x66, 0x72, 0x97, 0x91, 0x3a, 0xdc, 0xa2, - 0x96, 0x15, 0x30, 0xc4, 0xb8, 0xaa, 0xc9, 0x95, 0x1c, 0xc3, 0x66, 0xc0, 0x5d, 0x16, 0xf5, 0x60, - 0xa7, 0x55, 0xd5, 0xb2, 0x7f, 0x13, 0x6d, 0xaa, 0x36, 0x23, 0x46, 0x9c, 0x6f, 0x66, 0x9a, 0x4c, - 0x6b, 0xfd, 0xda, 0x82, 0xa2, 0x81, 0x36, 0x79, 0x0d, 0x65, 0xb1, 0xf2, 0xfb, 0xf3, 0x46, 0xa9, - 0xa2, 0xca, 0x47, 0x2b, 0xc0, 0xc4, 0x95, 0xbc, 0x81, 0xca, 0x6c, 0xf7, 0x8d, 0x1c, 0x85, 0x40, - 0xe5, 0x87, 0xab, 0x50, 0x61, 0xf8, 0x11, 0xb6, 0x33, 0xc5, 0x6a, 0xe6, 0xa8, 0xd2, 0x04, 0xf9, - 0xc9, 0x1a, 0x82, 0x70, 0xa6, 0xb0, 0x3b, 0x5f, 0x39, 0x35, 0x47, 0x3b, 0xc7, 0x91, 0x4f, 0xd6, - 0x73, 0xb2, 0x23, 0xb2, 0x7d, 0xcc, 0x1f, 0x91, 0xe1, 0x2c, 0x19, 0x91, 0xdb, 0x57, 0x62, 0x02, - 0xa4, 0xcb, 0x9a, 0xa3, 0x9c, 0xc1, 0xf2, 0xa3, 0x95, 0xb0, 0xf0, 0x3c, 0x83, 0xad, 0x9b, 0xde, - 0xd6, 0x97, 0xf1, 0xe5, 0xc3, 0x65, 0x48, 0x3a, 0x58, 0xaa, 0xca, 0x79, 0xc1, 0x66, 0x70, 0x6e, - 0xb0, 0xc5, 0xce, 0xb6, 0xcf, 0x2f, 0xc7, 0x8a, 0x74, 0x35, 0x56, 0xa4, 0xbf, 0x63, 0x45, 0xfa, - 0x31, 0x51, 0x0a, 0x57, 0x13, 0xa5, 0xf0, 0x7b, 0xa2, 0x14, 0x3e, 0x3d, 0x5b, 0xfb, 0x39, 0x1b, - 0x89, 0x17, 0x22, 0xfa, 0xb0, 0x75, 0x4a, 0xd1, 0xeb, 0xf0, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xa9, 0x06, 0xe7, 0xaa, 0x7c, 0x06, 0x00, 0x00, + // 678 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdd, 0x6e, 0xd3, 0x30, + 0x18, 0x6d, 0x68, 0x57, 0xd6, 0x8f, 0xb1, 0x1f, 0xef, 0xa7, 0x5d, 0xd8, 0xda, 0x11, 0x98, 0x98, + 0x26, 0x91, 0x6c, 0xe3, 0x02, 0x89, 0x2b, 0xd4, 0x49, 0x13, 0x4c, 0x54, 0xa0, 0x08, 0x24, 0xc4, + 0x0d, 0x72, 0x5b, 0x37, 0x8b, 0x48, 0xe2, 0x12, 0xbb, 0x55, 0x79, 0x08, 0x24, 0x1e, 0x86, 0x3b, + 0x5e, 0x60, 0x97, 0xbb, 0x44, 0x5c, 0x4c, 0x68, 0x7b, 0x11, 0x14, 0x2f, 0x71, 0x93, 0xce, 0xd9, + 0x8f, 0xb8, 0xb3, 0x75, 0xbe, 0x73, 0xbe, 0xf3, 0xd9, 0x3e, 0x32, 0x54, 0xbd, 0xb6, 0x6f, 0xf5, + 0xda, 0xa1, 0xdb, 0x75, 0x88, 0x35, 0xdc, 0xb5, 0xf8, 0xc8, 0xec, 0x87, 0x94, 0x53, 0x34, 0xeb, + 0xb5, 0x7d, 0x33, 0x06, 0xcc, 0xe1, 0xae, 0xbe, 0xe4, 0x50, 0x87, 0x0a, 0xc8, 0x8a, 0x56, 0x17, + 0x55, 0xfa, 0xda, 0x04, 0x3d, 0x21, 0x08, 0xd4, 0xf8, 0xae, 0xc1, 0xbd, 0x16, 0x73, 0xde, 0x87, + 0x38, 0x60, 0x3d, 0x12, 0xa2, 0x15, 0x28, 0x33, 0x12, 0x74, 0x49, 0x58, 0xd3, 0x36, 0xb4, 0xad, + 0x8a, 0x1d, 0xef, 0x90, 0x0e, 0xd3, 0x21, 0xe9, 0x10, 0x77, 0x48, 0xc2, 0xda, 0x1d, 0x81, 0xc8, + 0x3d, 0x3a, 0x84, 0x32, 0xf6, 0xe9, 0x20, 0xe0, 0xb5, 0x62, 0x84, 0x34, 0xf7, 0x8e, 0x4f, 0x1b, + 0x85, 0x3f, 0xa7, 0x8d, 0x6d, 0xc7, 0xe5, 0x47, 0x83, 0xb6, 0xd9, 0xa1, 0xbe, 0x75, 0xe0, 0x06, + 0xac, 0x73, 0xe4, 0x62, 0xab, 0x17, 0x2f, 0x9e, 0xb2, 0xee, 0x17, 0x8b, 0x7f, 0xeb, 0x13, 0x66, + 0xbe, 0x0e, 0xb8, 0x1d, 0x2b, 0x18, 0xcb, 0xb0, 0x98, 0xb2, 0x63, 0x13, 0xd6, 0xa7, 0x01, 0x23, + 0xc6, 0x4f, 0x0d, 0x66, 0x5a, 0xcc, 0x79, 0x17, 0xd2, 0xa1, 0xcb, 0x5c, 0x1a, 0x20, 0x04, 0xa5, + 0x5e, 0x48, 0xfd, 0xd8, 0xa5, 0x58, 0xa3, 0x79, 0x28, 0x32, 0xf2, 0x55, 0xd8, 0x2b, 0xd9, 0xd1, + 0x32, 0x35, 0x4d, 0x31, 0x77, 0x9a, 0x52, 0xee, 0x34, 0x53, 0xff, 0x3d, 0xcd, 0x0a, 0x2c, 0xa5, + 0x5d, 0xcb, 0x71, 0x9e, 0xc3, 0x5c, 0x8b, 0x39, 0xaf, 0xa8, 0xd7, 0x95, 0x07, 0x7f, 0xa3, 0x81, + 0x8c, 0x55, 0xa8, 0x4e, 0x10, 0xa5, 0xe6, 0x0b, 0x40, 0x2d, 0xe6, 0xd8, 0xc4, 0x23, 0x98, 0x91, + 0x5b, 0xca, 0xae, 0x81, 0x7e, 0x99, 0x7b, 0x49, 0xd9, 0xa7, 0x43, 0x72, 0xcb, 0x1b, 0x90, 0xca, + 0x19, 0xae, 0x54, 0x6e, 0xc2, 0xfd, 0x16, 0x73, 0xf6, 0x3d, 0xec, 0xfa, 0x4d, 0xcc, 0x3b, 0x47, + 0x4a, 0xd1, 0x75, 0x00, 0x1f, 0x8f, 0x3e, 0x77, 0xa2, 0x2a, 0x16, 0x6b, 0x57, 0x7c, 0x3c, 0x12, + 0x34, 0x66, 0x54, 0x61, 0x39, 0xa3, 0x21, 0xc5, 0x77, 0x60, 0x3a, 0x01, 0x6e, 0x68, 0x16, 0xc1, + 0x7c, 0xc2, 0x90, 0x2a, 0x44, 0x58, 0xfc, 0xd0, 0xef, 0x62, 0x4e, 0x6c, 0xea, 0x11, 0xa5, 0xd4, + 0x0a, 0x94, 0x39, 0x0e, 0x1d, 0xc2, 0xe3, 0x6c, 0xc4, 0x3b, 0xb4, 0x05, 0xa5, 0x90, 0x7a, 0x44, + 0xbc, 0xbe, 0xd9, 0xbd, 0x25, 0x33, 0x1b, 0x58, 0x33, 0xd2, 0xb3, 0x45, 0x45, 0x3c, 0xc5, 0xb8, + 0x8d, 0xec, 0xbf, 0x09, 0x77, 0xa3, 0x1b, 0xc7, 0x1e, 0x8f, 0x5e, 0xad, 0x33, 0xc0, 0x61, 0xd7, + 0xc5, 0x41, 0xdc, 0x5d, 0xee, 0x8d, 0x85, 0x8b, 0x17, 0x85, 0x3d, 0x2e, 0x99, 0x0d, 0xa8, 0x88, + 0xa3, 0x67, 0x03, 0x5f, 0xe9, 0xda, 0x58, 0x84, 0x05, 0x59, 0x90, 0xb0, 0xf6, 0x7e, 0x95, 0xa1, + 0xd8, 0x62, 0x0e, 0x7a, 0x03, 0xd3, 0xf2, 0x11, 0x3d, 0x98, 0x34, 0x9e, 0x8a, 0xa8, 0xfe, 0xe8, + 0x0a, 0x30, 0x51, 0x45, 0x6f, 0xa1, 0x32, 0x7e, 0x39, 0x6b, 0x0a, 0x86, 0x44, 0xf5, 0xc7, 0x57, + 0xa1, 0x52, 0xf0, 0x23, 0xcc, 0x64, 0xe2, 0xd3, 0x50, 0xb0, 0xd2, 0x05, 0xfa, 0x93, 0x6b, 0x0a, + 0xa4, 0x32, 0x86, 0xb9, 0xc9, 0x10, 0x19, 0x0a, 0xee, 0x44, 0x8d, 0xbe, 0x7d, 0x7d, 0x4d, 0xb6, + 0x45, 0x36, 0x4d, 0xea, 0x16, 0x99, 0x9a, 0x9c, 0x16, 0xca, 0x64, 0x21, 0x1b, 0x20, 0x15, 0xab, + 0x75, 0x05, 0x73, 0x0c, 0xeb, 0x9b, 0x57, 0xc2, 0x52, 0x73, 0x1f, 0xa6, 0x2e, 0xd2, 0x54, 0xcb, + 0xab, 0xd7, 0x37, 0xf2, 0x90, 0xb4, 0xb1, 0x54, 0x98, 0x54, 0xc6, 0xc6, 0xb0, 0xd2, 0xd8, 0xe5, + 0x8c, 0xa0, 0x97, 0x50, 0x12, 0x01, 0xa9, 0xaa, 0xee, 0x18, 0x7b, 0x5c, 0x6f, 0xe4, 0x00, 0x52, + 0xe1, 0x00, 0xca, 0x71, 0x50, 0x56, 0x95, 0x87, 0x1c, 0x41, 0xfa, 0xc3, 0x5c, 0x28, 0xd1, 0x69, + 0x1e, 0x1e, 0x9f, 0xd5, 0xb5, 0x93, 0xb3, 0xba, 0xf6, 0xf7, 0xac, 0xae, 0xfd, 0x38, 0xaf, 0x17, + 0x4e, 0xce, 0xeb, 0x85, 0xdf, 0xe7, 0xf5, 0xc2, 0xa7, 0x9d, 0x6b, 0xbf, 0x8f, 0x91, 0xfc, 0xa5, + 0xc5, 0x47, 0xd2, 0x2e, 0x8b, 0x1f, 0xfa, 0xd9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x11, 0x7f, + 0xc2, 0x98, 0x00, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -820,6 +1057,10 @@ type MsgClient interface { // UpdateRole updates the role of an address in the bridge module. // The role can be one of the following: guardian, operator, judge. UpdateRole(ctx context.Context, in *MsgUpdateRole, opts ...grpc.CallOption) (*MsgUpdateRoleResponse, 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 { @@ -902,6 +1143,24 @@ func (c *msgClient) UpdateRole(ctx context.Context, in *MsgUpdateRole, opts ...g 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. @@ -921,6 +1180,10 @@ type MsgServer interface { // UpdateRole updates the role of an address in the bridge module. // The role can be one of the following: guardian, operator, judge. UpdateRole(context.Context, *MsgUpdateRole) (*MsgUpdateRoleResponse, 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. @@ -951,6 +1214,12 @@ func (*UnimplementedMsgServer) Claim(ctx context.Context, req *MsgClaim) (*MsgCl func (*UnimplementedMsgServer) UpdateRole(ctx context.Context, req *MsgUpdateRole) (*MsgUpdateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole 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) @@ -1100,6 +1369,42 @@ func _Msg_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(inte 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), @@ -1136,6 +1441,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateRole", Handler: _Msg_UpdateRole_Handler, }, + { + MethodName: "Halt", + Handler: _Msg_Halt_Handler, + }, + { + MethodName: "Resume", + Handler: _Msg_Resume_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "lbm/fbridge/v1/tx.proto", @@ -1240,25 +1553,32 @@ func (m *MsgProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + 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] = 0x1a + 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] = 0x12 + dAtA[i] = 0x1a } if m.Seq != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Seq)) i-- - dAtA[i] = 0x8 + 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 } @@ -1309,7 +1629,14 @@ func (m *MsgHoldTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Seq != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Seq)) i-- - dAtA[i] = 0x8 + 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 } @@ -1360,7 +1687,14 @@ func (m *MsgReleaseTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Seq != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Seq)) i-- - dAtA[i] = 0x8 + 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 } @@ -1411,7 +1745,14 @@ func (m *MsgRemoveProvision) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Seq != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Seq)) i-- - dAtA[i] = 0x8 + 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 } @@ -1462,7 +1803,14 @@ func (m *MsgClaimBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.MaxClaims != 0 { i = encodeVarintTx(dAtA, i, uint64(m.MaxClaims)) i-- - dAtA[i] = 0x8 + 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 } @@ -1513,7 +1861,14 @@ func (m *MsgClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Seq != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Seq)) i-- - dAtA[i] = 0x8 + 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 } @@ -1564,12 +1919,19 @@ func (m *MsgUpdateRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Role != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Role)) i-- - dAtA[i] = 0x10 + 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.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + 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 } @@ -1599,51 +1961,161 @@ func (m *MsgUpdateRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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++ +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 } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgTransfer) Size() (n int) { - if m == nil { - return 0 - } + +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 - 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)) + 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 } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return len(dAtA) - i, nil } -func (m *MsgTransferResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgProvision) Size() (n int) { +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)) } @@ -1675,6 +2147,10 @@ func (m *MsgHoldTransfer) Size() (n int) { } 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)) } @@ -1696,6 +2172,10 @@ func (m *MsgReleaseTransfer) Size() (n int) { } 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)) } @@ -1717,6 +2197,10 @@ func (m *MsgRemoveProvision) Size() (n int) { } 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)) } @@ -1738,6 +2222,10 @@ func (m *MsgClaimBatch) Size() (n int) { } 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)) } @@ -1759,6 +2247,10 @@ func (m *MsgClaim) Size() (n int) { } 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)) } @@ -1780,7 +2272,11 @@ func (m *MsgUpdateRole) Size() (n int) { } var l int _ = l - l = len(m.Address) + 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)) } @@ -1799,6 +2295,50 @@ func (m *MsgUpdateRoleResponse) Size() (n int) { 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 } @@ -2033,6 +2573,38 @@ func (m *MsgProvision) Unmarshal(dAtA []byte) error { } 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) } @@ -2051,7 +2623,7 @@ func (m *MsgProvision) Unmarshal(dAtA []byte) error { break } } - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -2083,7 +2655,7 @@ func (m *MsgProvision) Unmarshal(dAtA []byte) error { } m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } @@ -2115,7 +2687,7 @@ func (m *MsgProvision) Unmarshal(dAtA []byte) error { } m.Receiver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } @@ -2250,6 +2822,38 @@ func (m *MsgHoldTransfer) Unmarshal(dAtA []byte) error { } 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) } @@ -2369,6 +2973,38 @@ func (m *MsgReleaseTransfer) Unmarshal(dAtA []byte) error { } 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) } @@ -2488,10 +3124,10 @@ func (m *MsgRemoveProvision) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.Seq = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2501,7 +3137,39 @@ func (m *MsgRemoveProvision) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Seq |= uint64(b&0x7F) << shift + 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 } @@ -2607,6 +3275,38 @@ func (m *MsgClaimBatch) Unmarshal(dAtA []byte) error { } 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) } @@ -2726,6 +3426,38 @@ func (m *MsgClaim) Unmarshal(dAtA []byte) error { } 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) } @@ -2846,7 +3578,7 @@ func (m *MsgUpdateRole) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2874,9 +3606,41 @@ func (m *MsgUpdateRole) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + 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) } @@ -2966,6 +3730,270 @@ func (m *MsgUpdateRoleResponse) Unmarshal(dAtA []byte) error { } 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 From 897806a109a5c50e9b70a56127d6c77239a03f9c Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:59:54 +0900 Subject: [PATCH 10/12] lint --- x/fbridge/keeper/grpc_query.go | 11 ----------- x/fbridge/keeper/msg_server.go | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/x/fbridge/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go index ed33bcd11e..1cf16fbdda 100644 --- a/x/fbridge/keeper/grpc_query.go +++ b/x/fbridge/keeper/grpc_query.go @@ -9,56 +9,45 @@ import ( var _ types.QueryServer = Keeper{} func (k Keeper) Params(ctx context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) NextSeqSend(ctx context.Context, request *types.NextSeqSendRequest) (*types.NextSeqSendResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) GreatestSeqByOperator(ctx context.Context, request *types.GreatestSeqByOperatorRequest) (*types.GreatestSeqByOperatorResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) GreatestConsecutiveConfirmedSeq(ctx context.Context, request *types.GreatestConsecutiveConfirmedSeqRequest) (*types.GreatestConsecutiveConfirmedSeqResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) SubmittedProvision(ctx context.Context, request *types.SubmittedProvisionRequest) (*types.SubmittedProvisionResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) ConfirmedProvision(ctx context.Context, request *types.ConfirmedProvisionRequest) (*types.ConfirmedProvisionResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) NeededSubmissionSeqs(ctx context.Context, request *types.NeededSubmissionSeqsRequest) (*types.NeededSubmissionSeqsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Commitments(ctx context.Context, request *types.CommitmentsRequest) (*types.CommitmentsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Guardians(ctx context.Context, request *types.GuardiansRequest) (*types.GuardiansResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Operators(ctx context.Context, request *types.OperatorsRequest) (*types.OperatorsResponse, error) { - //TODO implement me panic("implement me") } func (k Keeper) Judges(ctx context.Context, request *types.JudgesRequest) (*types.JudgesResponse, error) { - //TODO implement me panic("implement me") } diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go index ff709622a9..d70b67d41d 100644 --- a/x/fbridge/keeper/msg_server.go +++ b/x/fbridge/keeper/msg_server.go @@ -47,3 +47,11 @@ func (m msgServer) Claim(ctx context.Context, claim *types.MsgClaim) (*types.Msg func (m msgServer) UpdateRole(ctx context.Context, role *types.MsgUpdateRole) (*types.MsgUpdateRoleResponse, 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") +} From 9b34eede01d36033922612ef0128002b50f7df92 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Fri, 26 Apr 2024 18:01:56 +0900 Subject: [PATCH 11/12] add CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a88a6c5ca3..991af46ac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features * (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/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 From 71c5c649d9c0b67a3a1bc0f80828f634a20af5b7 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:38:33 +0900 Subject: [PATCH 12/12] modify UpdateRole feature --- client/docs/config.json | 4 +- client/docs/swagger-ui/swagger.yaml | 556 ++++++-- docs/core/proto-docs.md | 295 ++-- proto/lbm/fbridge/v1/fbridge.proto | 19 + proto/lbm/fbridge/v1/query.proto | 111 +- proto/lbm/fbridge/v1/tx.proto | 25 +- x/fbridge/keeper/grpc_query.go | 28 +- x/fbridge/keeper/msg_server.go | 6 +- x/fbridge/types/codec.go | 6 +- x/fbridge/types/fbridge.pb.go | 444 +++++- x/fbridge/types/msgs.go | 19 +- x/fbridge/types/query.pb.go | 2033 +++++++++++++++++++-------- x/fbridge/types/query.pb.gw.go | 218 ++- x/fbridge/types/tx.pb.go | 637 +++++++-- 14 files changed, 3361 insertions(+), 1040 deletions(-) diff --git a/client/docs/config.json b/client/docs/config.json index 05239a6e53..4a1968c6ee 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -173,7 +173,9 @@ "Commitments": "FBridgeCommitments", "Guardians": "FBridgeGuardians", "Operators": "FBridgeOperators", - "Judges": "FBridgeJudges" + "Judges": "FBridgeJudges", + "Proposals": "FBridgeProposals", + "Proposal": "FBridgeProposal" } } } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 9b9f13627e..c56e21d150 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -29801,7 +29801,7 @@ paths: - Service '/lbm/fbridge/v1/commitments/{seq}': get: - summary: Get commitments of a specific sequence number + summary: Commitments queries commitments of a specific sequence number operationId: FBridgeCommitments responses: '200': @@ -29846,7 +29846,9 @@ paths: - Query /lbm/fbridge/v1/greatest_confirmed_seq: get: - summary: Get a greatest consecutive sequence number confirmed by n-of-m operators + summary: >- + GreatestConsecutiveConfirmedSeq queries a greatest consecutive sequence + number confirmed by n-of-m operators operationId: GreatestConsecutiveConfirmedSeq responses: '200': @@ -29883,7 +29885,7 @@ paths: - Query /lbm/fbridge/v1/guardians: get: - summary: Get a list of Guardians registered on the bridge + summary: Guardians queries a list of Guardians registered on the bridge operationId: FBridgeGuardians responses: '200': @@ -29921,7 +29923,7 @@ paths: - Query /lbm/fbridge/v1/judges: get: - summary: Get a list of Judges registered on the bridge + summary: Judges queries a list of Judges registered on the bridge operationId: FBridgeJudges responses: '200': @@ -29959,7 +29961,7 @@ paths: - Query /lbm/fbridge/v1/nextseq_send: get: - summary: NextSeqSend to be used when the next bridge request is made + summary: NextSeqSend queries the sequence of next bridge request operationId: NextSeqSend responses: '200': @@ -29996,7 +29998,7 @@ paths: - Query /lbm/fbridge/v1/operators: get: - summary: Get a list of Operators registered on the bridge + summary: Operators queries a list of Operators registered on the bridge operationId: FBridgeOperators responses: '200': @@ -30035,8 +30037,8 @@ paths: '/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs': get: summary: >- - Get a list of sequence numbers that need to be submitted by a particular - operator + 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, @@ -30095,7 +30097,9 @@ paths: - Query '/lbm/fbridge/v1/operators/{operator}/provision/{seq}': get: - summary: Get a provision submitted by a particular operator + summary: >- + SubmittedProvision queries a provision submitted by a particular + operator operationId: SubmittedProvision responses: '200': @@ -30183,7 +30187,9 @@ paths: - Query '/lbm/fbridge/v1/operators/{operator}/seq': get: - summary: Get a greatest sequence number confirmed by a particular operator + summary: >- + GreatestSeqByOperator queries a greatest sequence number confirmed by a + particular operator operationId: GreatestSeqByOperator responses: '200': @@ -30279,6 +30285,10 @@ paths: 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: @@ -30305,7 +30315,7 @@ paths: - Query '/lbm/fbridge/v1/provision/{seq}': get: - summary: Get a particular sequence of confirmed provisions + summary: ConfirmedProvision queries a particular sequence of confirmed provisions operationId: ConfirmedProvision responses: '200': @@ -30386,6 +30396,216 @@ paths: 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 @@ -49931,14 +50151,106 @@ definitions: minimum_gas_price: type: string description: ConfigResponse defines the response structure for the Config gRPC query. - lbm.fbridge.v1.CommitmentsResponse: + 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.ConfirmedProvisionResponse: + lbm.fbridge.v1.QueryConfirmedProvisionResponse: type: object properties: data: @@ -49982,45 +50294,33 @@ definitions: To optimize computational cost, we have collected frequently changing values from provision. - 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.GreatestConsecutiveConfirmedSeqResponse: + lbm.fbridge.v1.QueryGreatestConsecutiveConfirmedSeqResponse: type: object properties: seq: type: string format: uint64 - lbm.fbridge.v1.GreatestSeqByOperatorResponse: + lbm.fbridge.v1.QueryGreatestSeqByOperatorResponse: type: object properties: seq: type: string format: uint64 - lbm.fbridge.v1.GuardiansResponse: + lbm.fbridge.v1.QueryGuardiansResponse: type: object properties: guardians: type: array items: type: string - lbm.fbridge.v1.JudgesResponse: + lbm.fbridge.v1.QueryJudgesResponse: type: object properties: judges: type: array items: type: string - lbm.fbridge.v1.NeededSubmissionSeqsResponse: + lbm.fbridge.v1.QueryNeededSubmissionSeqsResponse: type: object properties: seqs: @@ -50028,95 +50328,19 @@ definitions: items: type: string format: uint64 - lbm.fbridge.v1.NextSeqSendResponse: + lbm.fbridge.v1.QueryNextSeqSendResponse: type: object properties: seq: type: string format: uint64 - lbm.fbridge.v1.OperatorsResponse: + lbm.fbridge.v1.QueryOperatorsResponse: type: object properties: operators: type: array items: type: string - 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) - 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.QueryParamsResponse: type: object properties: @@ -50157,7 +50381,81 @@ definitions: type: string format: uint64 title: default timelock period for each provision (unix timestamp) - lbm.fbridge.v1.SubmittedProvisionResponse: + 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: @@ -50201,3 +50499,43 @@ definitions: 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 f37c7698c7..8982d795db 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -765,6 +765,7 @@ - [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) @@ -779,32 +780,38 @@ - [SendingState](#lbm.fbridge.v1.SendingState) - [lbm/fbridge/v1/query.proto](#lbm/fbridge/v1/query.proto) - - [CommitmentsRequest](#lbm.fbridge.v1.CommitmentsRequest) - - [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) - - [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) - - [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) - - [GreatestConsecutiveConfirmedSeqRequest](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqRequest) - - [GreatestConsecutiveConfirmedSeqResponse](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse) - - [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) - - [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) - - [GuardiansRequest](#lbm.fbridge.v1.GuardiansRequest) - - [GuardiansResponse](#lbm.fbridge.v1.GuardiansResponse) - - [JudgesRequest](#lbm.fbridge.v1.JudgesRequest) - - [JudgesResponse](#lbm.fbridge.v1.JudgesResponse) - - [NeededSubmissionSeqsRequest](#lbm.fbridge.v1.NeededSubmissionSeqsRequest) - - [NeededSubmissionSeqsResponse](#lbm.fbridge.v1.NeededSubmissionSeqsResponse) - - [NextSeqSendRequest](#lbm.fbridge.v1.NextSeqSendRequest) - - [NextSeqSendResponse](#lbm.fbridge.v1.NextSeqSendResponse) - - [OperatorsRequest](#lbm.fbridge.v1.OperatorsRequest) - - [OperatorsResponse](#lbm.fbridge.v1.OperatorsResponse) + - [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) - - [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) - - [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) + - [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) @@ -821,10 +828,10 @@ - [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) - - [MsgUpdateRole](#lbm.fbridge.v1.MsgUpdateRole) - - [MsgUpdateRoleResponse](#lbm.fbridge.v1.MsgUpdateRoleResponse) - [Msg](#lbm.fbridge.v1.Msg) @@ -11496,6 +11503,7 @@ supports positive values. | `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 | @@ -11537,6 +11545,25 @@ To optimize computational cost, we have collected frequently changing values fro + + + +### 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) | + + + + + @@ -11720,9 +11747,9 @@ GenesisState defines the fbridge module's genesis state. - + -### CommitmentsRequest +### QueryCommitmentsRequest @@ -11735,9 +11762,9 @@ GenesisState defines the fbridge module's genesis state. - + -### CommitmentsResponse +### QueryCommitmentsResponse @@ -11750,9 +11777,9 @@ GenesisState defines the fbridge module's genesis state. - + -### ConfirmedProvisionRequest +### QueryConfirmedProvisionRequest @@ -11765,9 +11792,9 @@ GenesisState defines the fbridge module's genesis state. - + -### ConfirmedProvisionResponse +### QueryConfirmedProvisionResponse @@ -11781,9 +11808,9 @@ GenesisState defines the fbridge module's genesis state. - + -### GreatestConsecutiveConfirmedSeqRequest +### QueryGreatestConsecutiveConfirmedSeqRequest @@ -11791,9 +11818,9 @@ GenesisState defines the fbridge module's genesis state. - + -### GreatestConsecutiveConfirmedSeqResponse +### QueryGreatestConsecutiveConfirmedSeqResponse @@ -11806,9 +11833,9 @@ GenesisState defines the fbridge module's genesis state. - + -### GreatestSeqByOperatorRequest +### QueryGreatestSeqByOperatorRequest @@ -11821,9 +11848,9 @@ GenesisState defines the fbridge module's genesis state. - + -### GreatestSeqByOperatorResponse +### QueryGreatestSeqByOperatorResponse @@ -11836,9 +11863,9 @@ GenesisState defines the fbridge module's genesis state. - + -### GuardiansRequest +### QueryGuardiansRequest @@ -11846,9 +11873,9 @@ GenesisState defines the fbridge module's genesis state. - + -### GuardiansResponse +### QueryGuardiansResponse @@ -11861,9 +11888,9 @@ GenesisState defines the fbridge module's genesis state. - + -### JudgesRequest +### QueryJudgesRequest @@ -11871,9 +11898,9 @@ GenesisState defines the fbridge module's genesis state. - + -### JudgesResponse +### QueryJudgesResponse @@ -11886,9 +11913,9 @@ GenesisState defines the fbridge module's genesis state. - + -### NeededSubmissionSeqsRequest +### QueryNeededSubmissionSeqsRequest @@ -11902,9 +11929,9 @@ GenesisState defines the fbridge module's genesis state. - + -### NeededSubmissionSeqsResponse +### QueryNeededSubmissionSeqsResponse @@ -11917,9 +11944,9 @@ GenesisState defines the fbridge module's genesis state. - + -### NextSeqSendRequest +### QueryNextSeqSendRequest @@ -11927,9 +11954,9 @@ GenesisState defines the fbridge module's genesis state. - + -### NextSeqSendResponse +### QueryNextSeqSendResponse @@ -11942,9 +11969,9 @@ GenesisState defines the fbridge module's genesis state. - + -### OperatorsRequest +### QueryOperatorsRequest @@ -11952,9 +11979,9 @@ GenesisState defines the fbridge module's genesis state. - + -### OperatorsResponse +### QueryOperatorsResponse @@ -11992,9 +12019,69 @@ GenesisState defines the fbridge module's genesis state. - + + +### 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 | | + + -### SubmittedProvisionRequest + + + + + +### QuerySubmittedProvisionRequest @@ -12008,9 +12095,9 @@ GenesisState defines the fbridge module's genesis state. - + -### SubmittedProvisionResponse +### QuerySubmittedProvisionResponse @@ -12038,16 +12125,18 @@ GenesisState defines the fbridge module's genesis state. | 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` | [NextSeqSendRequest](#lbm.fbridge.v1.NextSeqSendRequest) | [NextSeqSendResponse](#lbm.fbridge.v1.NextSeqSendResponse) | NextSeqSend to be used when the next bridge request is made | GET|/lbm/fbridge/v1/nextseq_send| -| `GreatestSeqByOperator` | [GreatestSeqByOperatorRequest](#lbm.fbridge.v1.GreatestSeqByOperatorRequest) | [GreatestSeqByOperatorResponse](#lbm.fbridge.v1.GreatestSeqByOperatorResponse) | Get a greatest sequence number confirmed by a particular operator | GET|/lbm/fbridge/v1/operators/{operator}/seq| -| `GreatestConsecutiveConfirmedSeq` | [GreatestConsecutiveConfirmedSeqRequest](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqRequest) | [GreatestConsecutiveConfirmedSeqResponse](#lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse) | Get a greatest consecutive sequence number confirmed by n-of-m operators | GET|/lbm/fbridge/v1/greatest_confirmed_seq| -| `SubmittedProvision` | [SubmittedProvisionRequest](#lbm.fbridge.v1.SubmittedProvisionRequest) | [SubmittedProvisionResponse](#lbm.fbridge.v1.SubmittedProvisionResponse) | Get a provision submitted by a particular operator | GET|/lbm/fbridge/v1/operators/{operator}/provision/{seq}| -| `ConfirmedProvision` | [ConfirmedProvisionRequest](#lbm.fbridge.v1.ConfirmedProvisionRequest) | [ConfirmedProvisionResponse](#lbm.fbridge.v1.ConfirmedProvisionResponse) | Get a particular sequence of confirmed provisions | GET|/lbm/fbridge/v1/provision/{seq}| -| `NeededSubmissionSeqs` | [NeededSubmissionSeqsRequest](#lbm.fbridge.v1.NeededSubmissionSeqsRequest) | [NeededSubmissionSeqsResponse](#lbm.fbridge.v1.NeededSubmissionSeqsResponse) | Get 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` | [CommitmentsRequest](#lbm.fbridge.v1.CommitmentsRequest) | [CommitmentsResponse](#lbm.fbridge.v1.CommitmentsResponse) | Get commitments of a specific sequence number | GET|/lbm/fbridge/v1/commitments/{seq}| -| `Guardians` | [GuardiansRequest](#lbm.fbridge.v1.GuardiansRequest) | [GuardiansResponse](#lbm.fbridge.v1.GuardiansResponse) | Get a list of Guardians registered on the bridge | GET|/lbm/fbridge/v1/guardians| -| `Operators` | [OperatorsRequest](#lbm.fbridge.v1.OperatorsRequest) | [OperatorsResponse](#lbm.fbridge.v1.OperatorsResponse) | Get a list of Operators registered on the bridge | GET|/lbm/fbridge/v1/operators| -| `Judges` | [JudgesRequest](#lbm.fbridge.v1.JudgesRequest) | [JudgesResponse](#lbm.fbridge.v1.JudgesResponse) | Get a list of Judges registered on the bridge | GET|/lbm/fbridge/v1/judges| +| `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}| @@ -12060,6 +12149,33 @@ GenesisState defines the fbridge module's genesis state. + + +### 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 @@ -12269,26 +12385,26 @@ MsgResume is input values required for resuming the bridge module - + -### MsgTransfer -MsgTransfer is input values required for bridge transfer +### MsgSuggestRole +MsgUpdateRole is input values required for updating the role of an address | 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 | +| `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 | - + -### MsgTransferResponse +### MsgSuggestRoleResponse @@ -12296,26 +12412,26 @@ MsgTransfer is input values required for bridge transfer - + -### MsgUpdateRole -MsgUpdateRole is input values required for updating the role of an address +### MsgTransfer +MsgTransfer is input values required for bridge transfer | 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 | +| `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 | - + -### MsgUpdateRoleResponse +### MsgTransferResponse @@ -12343,7 +12459,8 @@ MsgUpdateRole is input values required for updating the role of an address | `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 | | -| `UpdateRole` | [MsgUpdateRole](#lbm.fbridge.v1.MsgUpdateRole) | [MsgUpdateRoleResponse](#lbm.fbridge.v1.MsgUpdateRoleResponse) | UpdateRole updates the role of an address in the bridge module. The role can be one of the following: guardian, operator, judge. | | +| `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/fbridge.proto b/proto/lbm/fbridge/v1/fbridge.proto index e5e8c4f211..58b1054ef3 100644 --- a/proto/lbm/fbridge/v1/fbridge.proto +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -14,6 +14,8 @@ message Params { 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. @@ -54,3 +56,20 @@ enum Role { 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/query.proto b/proto/lbm/fbridge/v1/query.proto index dbcd3f51cc..900aac4e8b 100644 --- a/proto/lbm/fbridge/v1/query.proto +++ b/proto/lbm/fbridge/v1/query.proto @@ -5,6 +5,7 @@ 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 { @@ -13,59 +14,69 @@ service Query { option (google.api.http).get = "/lbm/fbridge/v1/params"; } - // NextSeqSend to be used when the next bridge request is made - rpc NextSeqSend(NextSeqSendRequest) returns (NextSeqSendResponse) { + // NextSeqSend queries the sequence of next bridge request + rpc NextSeqSend(QueryNextSeqSendRequest) returns (QueryNextSeqSendResponse) { option (google.api.http).get = "/lbm/fbridge/v1/nextseq_send"; } - // Get a greatest sequence number confirmed by a particular operator - rpc GreatestSeqByOperator(GreatestSeqByOperatorRequest) returns (GreatestSeqByOperatorResponse) { + // 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"; } - // Get a greatest consecutive sequence number confirmed by n-of-m operators - rpc GreatestConsecutiveConfirmedSeq(GreatestConsecutiveConfirmedSeqRequest) - returns (GreatestConsecutiveConfirmedSeqResponse) { + // 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"; } - // Get a provision submitted by a particular operator - rpc SubmittedProvision(SubmittedProvisionRequest) returns (SubmittedProvisionResponse) { + // 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}"; } - // Get a particular sequence of confirmed provisions - rpc ConfirmedProvision(ConfirmedProvisionRequest) returns (ConfirmedProvisionResponse) { + // ConfirmedProvision queries a particular sequence of confirmed provisions + rpc ConfirmedProvision(QueryConfirmedProvisionRequest) returns (QueryConfirmedProvisionResponse) { option (google.api.http).get = "/lbm/fbridge/v1/provision/{seq}"; } - // Get a list of sequence numbers that need to be submitted by a particular operator + // 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(NeededSubmissionSeqsRequest) returns (NeededSubmissionSeqsResponse) { + rpc NeededSubmissionSeqs(QueryNeededSubmissionSeqsRequest) returns (QueryNeededSubmissionSeqsResponse) { option (google.api.http).get = "/lbm/fbridge/v1/operators/{operator}/needed_submission_seqs"; } - // Get commitments of a specific sequence number - rpc Commitments(CommitmentsRequest) returns (CommitmentsResponse) { + // Commitments queries commitments of a specific sequence number + rpc Commitments(QueryCommitmentsRequest) returns (QueryCommitmentsResponse) { option (google.api.http).get = "/lbm/fbridge/v1/commitments/{seq}"; } - // Get a list of Guardians registered on the bridge - rpc Guardians(GuardiansRequest) returns (GuardiansResponse) { + // Guardians queries a list of Guardians registered on the bridge + rpc Guardians(QueryGuardiansRequest) returns (QueryGuardiansResponse) { option (google.api.http).get = "/lbm/fbridge/v1/guardians"; } - // Get a list of Operators registered on the bridge - rpc Operators(OperatorsRequest) returns (OperatorsResponse) { + // Operators queries a list of Operators registered on the bridge + rpc Operators(QueryOperatorsRequest) returns (QueryOperatorsResponse) { option (google.api.http).get = "/lbm/fbridge/v1/operators"; } - // Get a list of Judges registered on the bridge - rpc Judges(JudgesRequest) returns (JudgesResponse) { + // 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 {} @@ -74,83 +85,101 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } -message NextSeqSendRequest {} +message QueryNextSeqSendRequest {} -message NextSeqSendResponse { +message QueryNextSeqSendResponse { uint64 seq = 1; } -message GreatestSeqByOperatorRequest { +message QueryGreatestSeqByOperatorRequest { // the address of the operator string operator = 1; } -message GreatestSeqByOperatorResponse { +message QueryGreatestSeqByOperatorResponse { uint64 seq = 1; } -message GreatestConsecutiveConfirmedSeqRequest {} +message QueryGreatestConsecutiveConfirmedSeqRequest {} -message GreatestConsecutiveConfirmedSeqResponse { +message QueryGreatestConsecutiveConfirmedSeqResponse { uint64 seq = 1; } -message SubmittedProvisionRequest { +message QuerySubmittedProvisionRequest { // the address of the operator string operator = 1; // the sequence number of the bridge request uint64 seq = 2; } -message SubmittedProvisionResponse { +message QuerySubmittedProvisionResponse { ProvisionData data = 1 [(gogoproto.nullable) = false]; ProvisionStatus status = 2 [(gogoproto.nullable) = false]; } -message NeededSubmissionSeqsRequest { +message QueryNeededSubmissionSeqsRequest { // the address of the operator string operator = 1; // range specifies the size of the range to search uint64 range = 2; } -message NeededSubmissionSeqsResponse { +message QueryNeededSubmissionSeqsResponse { repeated uint64 seqs = 1; } -message ConfirmedProvisionRequest { +message QueryConfirmedProvisionRequest { // the sequence number of the bridge request uint64 seq = 1; } -message ConfirmedProvisionResponse { +message QueryConfirmedProvisionResponse { ProvisionData data = 1 [(gogoproto.nullable) = false]; ProvisionStatus status = 2 [(gogoproto.nullable) = false]; } -message CommitmentsRequest { +message QueryCommitmentsRequest { // the sequence number of the bridge request uint64 seq = 1; } -message CommitmentsResponse { +message QueryCommitmentsResponse { repeated string commitments = 1; } -message GuardiansRequest {} +message QueryGuardiansRequest {} -message GuardiansResponse { +message QueryGuardiansResponse { repeated string guardians = 1; } -message OperatorsRequest {} +message QueryOperatorsRequest {} -message OperatorsResponse { +message QueryOperatorsResponse { repeated string operators = 1; } -message JudgesRequest {} +message QueryJudgesRequest {} -message JudgesResponse { +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 index 27f6b5fc9c..8b114a8645 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -28,9 +28,13 @@ service Msg { // Claim processes the claiming of a provision with a specific sequence number rpc Claim(MsgClaim) returns (MsgClaimResponse); - // UpdateRole updates the role of an address in the bridge module. + // SuggestRole suggests updating the role of an address in the bridge module. // The role can be one of the following: guardian, operator, judge. - rpc UpdateRole(MsgUpdateRole) returns (MsgUpdateRoleResponse); + // 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); @@ -120,7 +124,7 @@ message MsgClaim { message MsgClaimResponse {} // MsgUpdateRole is input values required for updating the role of an address -message MsgUpdateRole { +message MsgSuggestRole { // the guardian address string from = 1; // the address to update the role @@ -133,7 +137,20 @@ message MsgUpdateRole { Role role = 3; } -message MsgUpdateRoleResponse {} +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 { diff --git a/x/fbridge/keeper/grpc_query.go b/x/fbridge/keeper/grpc_query.go index 1cf16fbdda..c157e03e30 100644 --- a/x/fbridge/keeper/grpc_query.go +++ b/x/fbridge/keeper/grpc_query.go @@ -12,42 +12,50 @@ func (k Keeper) Params(ctx context.Context, request *types.QueryParamsRequest) ( panic("implement me") } -func (k Keeper) NextSeqSend(ctx context.Context, request *types.NextSeqSendRequest) (*types.NextSeqSendResponse, error) { +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.GreatestSeqByOperatorRequest) (*types.GreatestSeqByOperatorResponse, error) { +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.GreatestConsecutiveConfirmedSeqRequest) (*types.GreatestConsecutiveConfirmedSeqResponse, error) { +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.SubmittedProvisionRequest) (*types.SubmittedProvisionResponse, error) { +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.ConfirmedProvisionRequest) (*types.ConfirmedProvisionResponse, error) { +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.NeededSubmissionSeqsRequest) (*types.NeededSubmissionSeqsResponse, error) { +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.CommitmentsRequest) (*types.CommitmentsResponse, error) { +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.GuardiansRequest) (*types.GuardiansResponse, error) { +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.OperatorsRequest) (*types.OperatorsResponse, error) { +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.JudgesRequest) (*types.JudgesResponse, error) { +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/msg_server.go b/x/fbridge/keeper/msg_server.go index d70b67d41d..58d79ed1b1 100644 --- a/x/fbridge/keeper/msg_server.go +++ b/x/fbridge/keeper/msg_server.go @@ -44,7 +44,11 @@ func (m msgServer) Claim(ctx context.Context, claim *types.MsgClaim) (*types.Msg panic("implement me") } -func (m msgServer) UpdateRole(ctx context.Context, role *types.MsgUpdateRole) (*types.MsgUpdateRoleResponse, error) { +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") } diff --git a/x/fbridge/types/codec.go b/x/fbridge/types/codec.go index 6e166c6c0f..c2edd215be 100644 --- a/x/fbridge/types/codec.go +++ b/x/fbridge/types/codec.go @@ -20,7 +20,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgRemoveProvision{}, "lbm-sdk/MsgRemoveProvision") legacy.RegisterAminoMsg(cdc, &MsgClaimBatch{}, "lbm-sdk/MsgClaimBatch") legacy.RegisterAminoMsg(cdc, &MsgClaim{}, "lbm-sdk/MsgClaim") - legacy.RegisterAminoMsg(cdc, &MsgUpdateRole{}, "lbm-sdk/MsgUpdateRole") + 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") } @@ -35,7 +36,8 @@ func RegisterInterfaces(registrar types.InterfaceRegistry) { &MsgRemoveProvision{}, &MsgClaimBatch{}, &MsgClaim{}, - &MsgUpdateRole{}, + &MsgSuggestRole{}, + &MsgAddVoteForRole{}, &MsgHalt{}, &MsgResume{}, ) diff --git a/x/fbridge/types/fbridge.pb.go b/x/fbridge/types/fbridge.pb.go index 4f06967485..9ca2c7a57a 100644 --- a/x/fbridge/types/fbridge.pb.go +++ b/x/fbridge/types/fbridge.pb.go @@ -65,6 +65,8 @@ type Params struct { 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{} } @@ -128,6 +130,13 @@ func (m *Params) GetTimelockPeriod() uint64 { 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 @@ -313,51 +322,142 @@ func (m *Fraction) GetDenominator() uint64 { 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{ - // 523 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x6e, 0xda, 0x3c, - 0x18, 0xc6, 0x09, 0x50, 0x44, 0x4c, 0x0b, 0x7c, 0x56, 0xf5, 0x09, 0x55, 0x5d, 0xca, 0x90, 0xa6, - 0x55, 0x95, 0x96, 0xac, 0xdd, 0xf9, 0x24, 0xca, 0x9f, 0x0a, 0x34, 0xb5, 0xc8, 0x2d, 0x27, 0x3b, - 0x41, 0x26, 0x31, 0xa9, 0xd7, 0xc4, 0x66, 0xb6, 0x13, 0x6d, 0xbb, 0x89, 0xed, 0x16, 0x76, 0x37, - 0x3d, 0xec, 0xe1, 0xb4, 0x83, 0x6a, 0x82, 0x1b, 0x99, 0x62, 0x12, 0x06, 0x47, 0x9c, 0xbd, 0xef, - 0x93, 0x3c, 0x3f, 0x3f, 0xaf, 0x5f, 0x19, 0x1c, 0x07, 0xd3, 0xd0, 0x99, 0x4d, 0x05, 0xf5, 0x7c, - 0xe2, 0xc4, 0xe7, 0x59, 0x69, 0xcf, 0x05, 0x57, 0x1c, 0x56, 0x83, 0x69, 0x68, 0x67, 0x52, 0x7c, - 0x7e, 0x74, 0xe8, 0x73, 0x9f, 0xeb, 0x4f, 0x4e, 0x52, 0xad, 0xfe, 0x6a, 0x7d, 0xcf, 0x83, 0xd2, - 0x08, 0x0b, 0x1c, 0x4a, 0x38, 0x04, 0x87, 0x7c, 0x4e, 0x04, 0x56, 0x5c, 0x4c, 0x94, 0x88, 0xa4, - 0x9a, 0x04, 0x24, 0x26, 0x41, 0xc3, 0x68, 0x1a, 0xa7, 0x95, 0x8b, 0x86, 0xbd, 0xcd, 0xb3, 0xfb, - 0x02, 0xbb, 0x8a, 0x72, 0x86, 0x60, 0xe6, 0xba, 0x4b, 0x4c, 0x1f, 0x12, 0x4f, 0xc2, 0xf2, 0x23, - 0x2c, 0x3c, 0x8a, 0xd9, 0x16, 0x2b, 0xbf, 0x8b, 0x95, 0xb9, 0x36, 0x58, 0x5d, 0xf0, 0xdf, 0xa7, - 0xc8, 0xf3, 0xc9, 0x16, 0xa8, 0xb0, 0x03, 0x54, 0xd3, 0x96, 0x0d, 0xca, 0x6b, 0x50, 0x53, 0x34, - 0x24, 0x01, 0x77, 0x1f, 0x26, 0x73, 0x22, 0x28, 0xf7, 0x1a, 0xc5, 0xa6, 0x71, 0x5a, 0x44, 0xd5, - 0x4c, 0x1e, 0x69, 0xb5, 0xf5, 0xd3, 0x00, 0x07, 0x23, 0xc1, 0x63, 0x2a, 0x29, 0x67, 0x5d, 0xac, - 0x30, 0xac, 0x83, 0x82, 0x24, 0x9f, 0xf5, 0x3d, 0x14, 0x51, 0x52, 0xc2, 0x21, 0x28, 0xe1, 0x90, - 0x47, 0x4c, 0xe9, 0x81, 0xcc, 0xcb, 0x8b, 0xc7, 0xe7, 0x93, 0xdc, 0xef, 0xe7, 0x93, 0x33, 0x9f, - 0xaa, 0xfb, 0x68, 0x6a, 0xbb, 0x3c, 0x74, 0xfa, 0x94, 0x49, 0xf7, 0x9e, 0x62, 0x67, 0x96, 0x16, - 0x6f, 0xa4, 0xf7, 0xe0, 0xa8, 0xaf, 0x73, 0x22, 0xed, 0x01, 0x53, 0x28, 0x25, 0xc0, 0xff, 0x41, - 0x49, 0x12, 0xe6, 0x11, 0xa1, 0x67, 0x32, 0x51, 0xda, 0xc1, 0x23, 0x50, 0x16, 0xc4, 0x25, 0x34, - 0x26, 0x42, 0x27, 0x35, 0xd1, 0xba, 0x6f, 0x7d, 0x03, 0xb5, 0x75, 0xc4, 0x5b, 0x85, 0x55, 0x24, - 0xe1, 0x4b, 0xb0, 0xbf, 0x9e, 0x8f, 0x30, 0x2f, 0x4d, 0x5b, 0xc9, 0xb4, 0x1e, 0xf3, 0xe0, 0x2b, - 0x50, 0x75, 0x39, 0x9b, 0x51, 0x11, 0x4e, 0xdc, 0xe4, 0x68, 0xa9, 0xd3, 0xef, 0xa1, 0x83, 0x54, - 0xed, 0x68, 0x11, 0xbe, 0x00, 0x80, 0xca, 0x89, 0x1b, 0x60, 0x1a, 0x12, 0x4f, 0x87, 0x2a, 0x23, - 0x93, 0xca, 0xce, 0x4a, 0x68, 0x0d, 0x41, 0x39, 0xbb, 0x65, 0x78, 0x0c, 0x4c, 0x16, 0x85, 0xab, - 0xed, 0xa7, 0x27, 0xfe, 0x13, 0x60, 0x13, 0x54, 0x3c, 0xc2, 0x78, 0x48, 0x99, 0xfe, 0x9e, 0x5f, - 0x25, 0xda, 0x90, 0xce, 0xde, 0x83, 0x22, 0xe2, 0x01, 0x81, 0x35, 0x50, 0x19, 0x5f, 0xdf, 0x8e, - 0x7a, 0x9d, 0x41, 0x7f, 0xd0, 0xeb, 0xd6, 0x73, 0x70, 0x1f, 0x94, 0xaf, 0xc6, 0x6d, 0xd4, 0x1d, - 0xb4, 0xaf, 0xeb, 0x46, 0xd2, 0xdd, 0x8c, 0x7a, 0xa8, 0x7d, 0x77, 0x83, 0xea, 0x79, 0x68, 0x82, - 0xbd, 0xe1, 0xb8, 0x7b, 0xd5, 0xab, 0x17, 0x2e, 0x87, 0x8f, 0x0b, 0xcb, 0x78, 0x5a, 0x58, 0xc6, - 0x9f, 0x85, 0x65, 0xfc, 0x58, 0x5a, 0xb9, 0xa7, 0xa5, 0x95, 0xfb, 0xb5, 0xb4, 0x72, 0x1f, 0xdf, - 0xee, 0xdc, 0xc4, 0x97, 0xf5, 0xd3, 0xd1, 0x3b, 0x99, 0x96, 0xf4, 0x83, 0x78, 0xf7, 0x37, 0x00, - 0x00, 0xff, 0xff, 0x47, 0x3c, 0x5e, 0x9b, 0x56, 0x03, 0x00, 0x00, + // 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) { @@ -380,6 +480,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = 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-- @@ -552,6 +657,58 @@ func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 @@ -584,6 +741,9 @@ func (m *Params) Size() (n int) { if m.TimelockPeriod != 0 { n += 1 + sovFbridge(uint64(m.TimelockPeriod)) } + if m.ProposalPeriod != 0 { + n += 1 + sovFbridge(uint64(m.ProposalPeriod)) + } return n } @@ -642,6 +802,32 @@ func (m *Fraction) Size() (n int) { 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 } @@ -804,6 +990,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { 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:]) @@ -1188,6 +1393,177 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } 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 diff --git a/x/fbridge/types/msgs.go b/x/fbridge/types/msgs.go index c121625868..fce2320548 100644 --- a/x/fbridge/types/msgs.go +++ b/x/fbridge/types/msgs.go @@ -10,7 +10,8 @@ var ( _ sdk.Msg = &MsgRemoveProvision{} _ sdk.Msg = &MsgClaimBatch{} _ sdk.Msg = &MsgClaim{} - _ sdk.Msg = &MsgUpdateRole{} + _ sdk.Msg = &MsgSuggestRole{} + _ sdk.Msg = &MsgAddVoteForRole{} _ sdk.Msg = &MsgHalt{} _ sdk.Msg = &MsgResume{} ) @@ -85,13 +86,23 @@ func (m MsgClaim) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) } -func (m MsgUpdateRole) ValidateBasic() error { return nil } +func (m MsgSuggestRole) ValidateBasic() error { return nil } -func (m MsgUpdateRole) GetSigners() []sdk.AccAddress { +func (m MsgSuggestRole) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)} } -func (m MsgUpdateRole) GetSignBytes() []byte { +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)) } diff --git a/x/fbridge/types/query.pb.go b/x/fbridge/types/query.pb.go index 5c73bf5bb4..d43ba5168b 100644 --- a/x/fbridge/types/query.pb.go +++ b/x/fbridge/types/query.pb.go @@ -6,6 +6,7 @@ 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" @@ -109,21 +110,21 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -type NextSeqSendRequest struct { +type QueryNextSeqSendRequest struct { } -func (m *NextSeqSendRequest) Reset() { *m = NextSeqSendRequest{} } -func (m *NextSeqSendRequest) String() string { return proto.CompactTextString(m) } -func (*NextSeqSendRequest) ProtoMessage() {} -func (*NextSeqSendRequest) Descriptor() ([]byte, []int) { +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 *NextSeqSendRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryNextSeqSendRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NextSeqSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryNextSeqSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NextSeqSendRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryNextSeqSendRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -133,34 +134,34 @@ func (m *NextSeqSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *NextSeqSendRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextSeqSendRequest.Merge(m, src) +func (m *QueryNextSeqSendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNextSeqSendRequest.Merge(m, src) } -func (m *NextSeqSendRequest) XXX_Size() int { +func (m *QueryNextSeqSendRequest) XXX_Size() int { return m.Size() } -func (m *NextSeqSendRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NextSeqSendRequest.DiscardUnknown(m) +func (m *QueryNextSeqSendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNextSeqSendRequest.DiscardUnknown(m) } -var xxx_messageInfo_NextSeqSendRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryNextSeqSendRequest proto.InternalMessageInfo -type NextSeqSendResponse struct { +type QueryNextSeqSendResponse struct { Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *NextSeqSendResponse) Reset() { *m = NextSeqSendResponse{} } -func (m *NextSeqSendResponse) String() string { return proto.CompactTextString(m) } -func (*NextSeqSendResponse) ProtoMessage() {} -func (*NextSeqSendResponse) Descriptor() ([]byte, []int) { +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 *NextSeqSendResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryNextSeqSendResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NextSeqSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryNextSeqSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NextSeqSendResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryNextSeqSendResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -170,42 +171,42 @@ func (m *NextSeqSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *NextSeqSendResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextSeqSendResponse.Merge(m, src) +func (m *QueryNextSeqSendResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNextSeqSendResponse.Merge(m, src) } -func (m *NextSeqSendResponse) XXX_Size() int { +func (m *QueryNextSeqSendResponse) XXX_Size() int { return m.Size() } -func (m *NextSeqSendResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NextSeqSendResponse.DiscardUnknown(m) +func (m *QueryNextSeqSendResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNextSeqSendResponse.DiscardUnknown(m) } -var xxx_messageInfo_NextSeqSendResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryNextSeqSendResponse proto.InternalMessageInfo -func (m *NextSeqSendResponse) GetSeq() uint64 { +func (m *QueryNextSeqSendResponse) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type GreatestSeqByOperatorRequest struct { +type QueryGreatestSeqByOperatorRequest struct { // the address of the operator Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` } -func (m *GreatestSeqByOperatorRequest) Reset() { *m = GreatestSeqByOperatorRequest{} } -func (m *GreatestSeqByOperatorRequest) String() string { return proto.CompactTextString(m) } -func (*GreatestSeqByOperatorRequest) ProtoMessage() {} -func (*GreatestSeqByOperatorRequest) Descriptor() ([]byte, []int) { +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 *GreatestSeqByOperatorRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGreatestSeqByOperatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GreatestSeqByOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGreatestSeqByOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GreatestSeqByOperatorRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGreatestSeqByOperatorRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -215,41 +216,41 @@ func (m *GreatestSeqByOperatorRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *GreatestSeqByOperatorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GreatestSeqByOperatorRequest.Merge(m, src) +func (m *QueryGreatestSeqByOperatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestSeqByOperatorRequest.Merge(m, src) } -func (m *GreatestSeqByOperatorRequest) XXX_Size() int { +func (m *QueryGreatestSeqByOperatorRequest) XXX_Size() int { return m.Size() } -func (m *GreatestSeqByOperatorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GreatestSeqByOperatorRequest.DiscardUnknown(m) +func (m *QueryGreatestSeqByOperatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestSeqByOperatorRequest.DiscardUnknown(m) } -var xxx_messageInfo_GreatestSeqByOperatorRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGreatestSeqByOperatorRequest proto.InternalMessageInfo -func (m *GreatestSeqByOperatorRequest) GetOperator() string { +func (m *QueryGreatestSeqByOperatorRequest) GetOperator() string { if m != nil { return m.Operator } return "" } -type GreatestSeqByOperatorResponse struct { +type QueryGreatestSeqByOperatorResponse struct { Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *GreatestSeqByOperatorResponse) Reset() { *m = GreatestSeqByOperatorResponse{} } -func (m *GreatestSeqByOperatorResponse) String() string { return proto.CompactTextString(m) } -func (*GreatestSeqByOperatorResponse) ProtoMessage() {} -func (*GreatestSeqByOperatorResponse) Descriptor() ([]byte, []int) { +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 *GreatestSeqByOperatorResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGreatestSeqByOperatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GreatestSeqByOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGreatestSeqByOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GreatestSeqByOperatorResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGreatestSeqByOperatorResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -259,42 +260,44 @@ func (m *GreatestSeqByOperatorResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *GreatestSeqByOperatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GreatestSeqByOperatorResponse.Merge(m, src) +func (m *QueryGreatestSeqByOperatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestSeqByOperatorResponse.Merge(m, src) } -func (m *GreatestSeqByOperatorResponse) XXX_Size() int { +func (m *QueryGreatestSeqByOperatorResponse) XXX_Size() int { return m.Size() } -func (m *GreatestSeqByOperatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GreatestSeqByOperatorResponse.DiscardUnknown(m) +func (m *QueryGreatestSeqByOperatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestSeqByOperatorResponse.DiscardUnknown(m) } -var xxx_messageInfo_GreatestSeqByOperatorResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGreatestSeqByOperatorResponse proto.InternalMessageInfo -func (m *GreatestSeqByOperatorResponse) GetSeq() uint64 { +func (m *QueryGreatestSeqByOperatorResponse) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type GreatestConsecutiveConfirmedSeqRequest struct { +type QueryGreatestConsecutiveConfirmedSeqRequest struct { } -func (m *GreatestConsecutiveConfirmedSeqRequest) Reset() { - *m = GreatestConsecutiveConfirmedSeqRequest{} +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) Reset() { + *m = QueryGreatestConsecutiveConfirmedSeqRequest{} } -func (m *GreatestConsecutiveConfirmedSeqRequest) String() string { return proto.CompactTextString(m) } -func (*GreatestConsecutiveConfirmedSeqRequest) ProtoMessage() {} -func (*GreatestConsecutiveConfirmedSeqRequest) Descriptor() ([]byte, []int) { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryGreatestConsecutiveConfirmedSeqRequest) ProtoMessage() {} +func (*QueryGreatestConsecutiveConfirmedSeqRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e7780f9db9d346e, []int{6} } -func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -304,36 +307,38 @@ func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Marshal(b []byte, determini return b[:n], nil } } -func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest.Merge(m, src) +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest.Merge(m, src) } -func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_Size() int { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_Size() int { return m.Size() } -func (m *GreatestConsecutiveConfirmedSeqRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest.DiscardUnknown(m) +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest.DiscardUnknown(m) } -var xxx_messageInfo_GreatestConsecutiveConfirmedSeqRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqRequest proto.InternalMessageInfo -type GreatestConsecutiveConfirmedSeqResponse struct { +type QueryGreatestConsecutiveConfirmedSeqResponse struct { Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *GreatestConsecutiveConfirmedSeqResponse) Reset() { - *m = GreatestConsecutiveConfirmedSeqResponse{} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) Reset() { + *m = QueryGreatestConsecutiveConfirmedSeqResponse{} +} +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) String() string { + return proto.CompactTextString(m) } -func (m *GreatestConsecutiveConfirmedSeqResponse) String() string { return proto.CompactTextString(m) } -func (*GreatestConsecutiveConfirmedSeqResponse) ProtoMessage() {} -func (*GreatestConsecutiveConfirmedSeqResponse) Descriptor() ([]byte, []int) { +func (*QueryGreatestConsecutiveConfirmedSeqResponse) ProtoMessage() {} +func (*QueryGreatestConsecutiveConfirmedSeqResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e7780f9db9d346e, []int{7} } -func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -343,44 +348,44 @@ func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Marshal(b []byte, determin return b[:n], nil } } -func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse.Merge(m, src) +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse.Merge(m, src) } -func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_Size() int { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_Size() int { return m.Size() } -func (m *GreatestConsecutiveConfirmedSeqResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse.DiscardUnknown(m) +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse.DiscardUnknown(m) } -var xxx_messageInfo_GreatestConsecutiveConfirmedSeqResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGreatestConsecutiveConfirmedSeqResponse proto.InternalMessageInfo -func (m *GreatestConsecutiveConfirmedSeqResponse) GetSeq() uint64 { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type SubmittedProvisionRequest struct { +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 *SubmittedProvisionRequest) Reset() { *m = SubmittedProvisionRequest{} } -func (m *SubmittedProvisionRequest) String() string { return proto.CompactTextString(m) } -func (*SubmittedProvisionRequest) ProtoMessage() {} -func (*SubmittedProvisionRequest) Descriptor() ([]byte, []int) { +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 *SubmittedProvisionRequest) XXX_Unmarshal(b []byte) error { +func (m *QuerySubmittedProvisionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SubmittedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySubmittedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SubmittedProvisionRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySubmittedProvisionRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -390,49 +395,49 @@ func (m *SubmittedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *SubmittedProvisionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmittedProvisionRequest.Merge(m, src) +func (m *QuerySubmittedProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubmittedProvisionRequest.Merge(m, src) } -func (m *SubmittedProvisionRequest) XXX_Size() int { +func (m *QuerySubmittedProvisionRequest) XXX_Size() int { return m.Size() } -func (m *SubmittedProvisionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SubmittedProvisionRequest.DiscardUnknown(m) +func (m *QuerySubmittedProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubmittedProvisionRequest.DiscardUnknown(m) } -var xxx_messageInfo_SubmittedProvisionRequest proto.InternalMessageInfo +var xxx_messageInfo_QuerySubmittedProvisionRequest proto.InternalMessageInfo -func (m *SubmittedProvisionRequest) GetOperator() string { +func (m *QuerySubmittedProvisionRequest) GetOperator() string { if m != nil { return m.Operator } return "" } -func (m *SubmittedProvisionRequest) GetSeq() uint64 { +func (m *QuerySubmittedProvisionRequest) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type SubmittedProvisionResponse struct { +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 *SubmittedProvisionResponse) Reset() { *m = SubmittedProvisionResponse{} } -func (m *SubmittedProvisionResponse) String() string { return proto.CompactTextString(m) } -func (*SubmittedProvisionResponse) ProtoMessage() {} -func (*SubmittedProvisionResponse) Descriptor() ([]byte, []int) { +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 *SubmittedProvisionResponse) XXX_Unmarshal(b []byte) error { +func (m *QuerySubmittedProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SubmittedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySubmittedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SubmittedProvisionResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySubmittedProvisionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -442,51 +447,51 @@ func (m *SubmittedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *SubmittedProvisionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmittedProvisionResponse.Merge(m, src) +func (m *QuerySubmittedProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubmittedProvisionResponse.Merge(m, src) } -func (m *SubmittedProvisionResponse) XXX_Size() int { +func (m *QuerySubmittedProvisionResponse) XXX_Size() int { return m.Size() } -func (m *SubmittedProvisionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SubmittedProvisionResponse.DiscardUnknown(m) +func (m *QuerySubmittedProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubmittedProvisionResponse.DiscardUnknown(m) } -var xxx_messageInfo_SubmittedProvisionResponse proto.InternalMessageInfo +var xxx_messageInfo_QuerySubmittedProvisionResponse proto.InternalMessageInfo -func (m *SubmittedProvisionResponse) GetData() ProvisionData { +func (m *QuerySubmittedProvisionResponse) GetData() ProvisionData { if m != nil { return m.Data } return ProvisionData{} } -func (m *SubmittedProvisionResponse) GetStatus() ProvisionStatus { +func (m *QuerySubmittedProvisionResponse) GetStatus() ProvisionStatus { if m != nil { return m.Status } return ProvisionStatus{} } -type NeededSubmissionSeqsRequest struct { +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 *NeededSubmissionSeqsRequest) Reset() { *m = NeededSubmissionSeqsRequest{} } -func (m *NeededSubmissionSeqsRequest) String() string { return proto.CompactTextString(m) } -func (*NeededSubmissionSeqsRequest) ProtoMessage() {} -func (*NeededSubmissionSeqsRequest) Descriptor() ([]byte, []int) { +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 *NeededSubmissionSeqsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryNeededSubmissionSeqsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NeededSubmissionSeqsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryNeededSubmissionSeqsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NeededSubmissionSeqsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryNeededSubmissionSeqsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -496,48 +501,48 @@ func (m *NeededSubmissionSeqsRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *NeededSubmissionSeqsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NeededSubmissionSeqsRequest.Merge(m, src) +func (m *QueryNeededSubmissionSeqsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNeededSubmissionSeqsRequest.Merge(m, src) } -func (m *NeededSubmissionSeqsRequest) XXX_Size() int { +func (m *QueryNeededSubmissionSeqsRequest) XXX_Size() int { return m.Size() } -func (m *NeededSubmissionSeqsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NeededSubmissionSeqsRequest.DiscardUnknown(m) +func (m *QueryNeededSubmissionSeqsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNeededSubmissionSeqsRequest.DiscardUnknown(m) } -var xxx_messageInfo_NeededSubmissionSeqsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryNeededSubmissionSeqsRequest proto.InternalMessageInfo -func (m *NeededSubmissionSeqsRequest) GetOperator() string { +func (m *QueryNeededSubmissionSeqsRequest) GetOperator() string { if m != nil { return m.Operator } return "" } -func (m *NeededSubmissionSeqsRequest) GetRange() uint64 { +func (m *QueryNeededSubmissionSeqsRequest) GetRange() uint64 { if m != nil { return m.Range } return 0 } -type NeededSubmissionSeqsResponse struct { +type QueryNeededSubmissionSeqsResponse struct { Seqs []uint64 `protobuf:"varint,1,rep,packed,name=seqs,proto3" json:"seqs,omitempty"` } -func (m *NeededSubmissionSeqsResponse) Reset() { *m = NeededSubmissionSeqsResponse{} } -func (m *NeededSubmissionSeqsResponse) String() string { return proto.CompactTextString(m) } -func (*NeededSubmissionSeqsResponse) ProtoMessage() {} -func (*NeededSubmissionSeqsResponse) Descriptor() ([]byte, []int) { +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 *NeededSubmissionSeqsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryNeededSubmissionSeqsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NeededSubmissionSeqsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryNeededSubmissionSeqsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NeededSubmissionSeqsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryNeededSubmissionSeqsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -547,42 +552,42 @@ func (m *NeededSubmissionSeqsResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *NeededSubmissionSeqsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NeededSubmissionSeqsResponse.Merge(m, src) +func (m *QueryNeededSubmissionSeqsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNeededSubmissionSeqsResponse.Merge(m, src) } -func (m *NeededSubmissionSeqsResponse) XXX_Size() int { +func (m *QueryNeededSubmissionSeqsResponse) XXX_Size() int { return m.Size() } -func (m *NeededSubmissionSeqsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NeededSubmissionSeqsResponse.DiscardUnknown(m) +func (m *QueryNeededSubmissionSeqsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNeededSubmissionSeqsResponse.DiscardUnknown(m) } -var xxx_messageInfo_NeededSubmissionSeqsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryNeededSubmissionSeqsResponse proto.InternalMessageInfo -func (m *NeededSubmissionSeqsResponse) GetSeqs() []uint64 { +func (m *QueryNeededSubmissionSeqsResponse) GetSeqs() []uint64 { if m != nil { return m.Seqs } return nil } -type ConfirmedProvisionRequest struct { +type QueryConfirmedProvisionRequest struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *ConfirmedProvisionRequest) Reset() { *m = ConfirmedProvisionRequest{} } -func (m *ConfirmedProvisionRequest) String() string { return proto.CompactTextString(m) } -func (*ConfirmedProvisionRequest) ProtoMessage() {} -func (*ConfirmedProvisionRequest) Descriptor() ([]byte, []int) { +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 *ConfirmedProvisionRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryConfirmedProvisionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ConfirmedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryConfirmedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ConfirmedProvisionRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryConfirmedProvisionRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -592,42 +597,42 @@ func (m *ConfirmedProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *ConfirmedProvisionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfirmedProvisionRequest.Merge(m, src) +func (m *QueryConfirmedProvisionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConfirmedProvisionRequest.Merge(m, src) } -func (m *ConfirmedProvisionRequest) XXX_Size() int { +func (m *QueryConfirmedProvisionRequest) XXX_Size() int { return m.Size() } -func (m *ConfirmedProvisionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ConfirmedProvisionRequest.DiscardUnknown(m) +func (m *QueryConfirmedProvisionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConfirmedProvisionRequest.DiscardUnknown(m) } -var xxx_messageInfo_ConfirmedProvisionRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryConfirmedProvisionRequest proto.InternalMessageInfo -func (m *ConfirmedProvisionRequest) GetSeq() uint64 { +func (m *QueryConfirmedProvisionRequest) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type ConfirmedProvisionResponse struct { +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 *ConfirmedProvisionResponse) Reset() { *m = ConfirmedProvisionResponse{} } -func (m *ConfirmedProvisionResponse) String() string { return proto.CompactTextString(m) } -func (*ConfirmedProvisionResponse) ProtoMessage() {} -func (*ConfirmedProvisionResponse) Descriptor() ([]byte, []int) { +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 *ConfirmedProvisionResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryConfirmedProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ConfirmedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryConfirmedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ConfirmedProvisionResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryConfirmedProvisionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -637,49 +642,49 @@ func (m *ConfirmedProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *ConfirmedProvisionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfirmedProvisionResponse.Merge(m, src) +func (m *QueryConfirmedProvisionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConfirmedProvisionResponse.Merge(m, src) } -func (m *ConfirmedProvisionResponse) XXX_Size() int { +func (m *QueryConfirmedProvisionResponse) XXX_Size() int { return m.Size() } -func (m *ConfirmedProvisionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConfirmedProvisionResponse.DiscardUnknown(m) +func (m *QueryConfirmedProvisionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConfirmedProvisionResponse.DiscardUnknown(m) } -var xxx_messageInfo_ConfirmedProvisionResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryConfirmedProvisionResponse proto.InternalMessageInfo -func (m *ConfirmedProvisionResponse) GetData() ProvisionData { +func (m *QueryConfirmedProvisionResponse) GetData() ProvisionData { if m != nil { return m.Data } return ProvisionData{} } -func (m *ConfirmedProvisionResponse) GetStatus() ProvisionStatus { +func (m *QueryConfirmedProvisionResponse) GetStatus() ProvisionStatus { if m != nil { return m.Status } return ProvisionStatus{} } -type CommitmentsRequest struct { +type QueryCommitmentsRequest struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` } -func (m *CommitmentsRequest) Reset() { *m = CommitmentsRequest{} } -func (m *CommitmentsRequest) String() string { return proto.CompactTextString(m) } -func (*CommitmentsRequest) ProtoMessage() {} -func (*CommitmentsRequest) Descriptor() ([]byte, []int) { +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 *CommitmentsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryCommitmentsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *CommitmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCommitmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_CommitmentsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCommitmentsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -689,41 +694,41 @@ func (m *CommitmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *CommitmentsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentsRequest.Merge(m, src) +func (m *QueryCommitmentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommitmentsRequest.Merge(m, src) } -func (m *CommitmentsRequest) XXX_Size() int { +func (m *QueryCommitmentsRequest) XXX_Size() int { return m.Size() } -func (m *CommitmentsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentsRequest.DiscardUnknown(m) +func (m *QueryCommitmentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommitmentsRequest.DiscardUnknown(m) } -var xxx_messageInfo_CommitmentsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryCommitmentsRequest proto.InternalMessageInfo -func (m *CommitmentsRequest) GetSeq() uint64 { +func (m *QueryCommitmentsRequest) GetSeq() uint64 { if m != nil { return m.Seq } return 0 } -type CommitmentsResponse struct { +type QueryCommitmentsResponse struct { Commitments []string `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` } -func (m *CommitmentsResponse) Reset() { *m = CommitmentsResponse{} } -func (m *CommitmentsResponse) String() string { return proto.CompactTextString(m) } -func (*CommitmentsResponse) ProtoMessage() {} -func (*CommitmentsResponse) Descriptor() ([]byte, []int) { +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 *CommitmentsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryCommitmentsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *CommitmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCommitmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_CommitmentsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCommitmentsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -733,40 +738,40 @@ func (m *CommitmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *CommitmentsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentsResponse.Merge(m, src) +func (m *QueryCommitmentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommitmentsResponse.Merge(m, src) } -func (m *CommitmentsResponse) XXX_Size() int { +func (m *QueryCommitmentsResponse) XXX_Size() int { return m.Size() } -func (m *CommitmentsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentsResponse.DiscardUnknown(m) +func (m *QueryCommitmentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommitmentsResponse.DiscardUnknown(m) } -var xxx_messageInfo_CommitmentsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCommitmentsResponse proto.InternalMessageInfo -func (m *CommitmentsResponse) GetCommitments() []string { +func (m *QueryCommitmentsResponse) GetCommitments() []string { if m != nil { return m.Commitments } return nil } -type GuardiansRequest struct { +type QueryGuardiansRequest struct { } -func (m *GuardiansRequest) Reset() { *m = GuardiansRequest{} } -func (m *GuardiansRequest) String() string { return proto.CompactTextString(m) } -func (*GuardiansRequest) ProtoMessage() {} -func (*GuardiansRequest) Descriptor() ([]byte, []int) { +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 *GuardiansRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGuardiansRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GuardiansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGuardiansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GuardiansRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGuardiansRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -776,34 +781,34 @@ func (m *GuardiansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *GuardiansRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GuardiansRequest.Merge(m, src) +func (m *QueryGuardiansRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGuardiansRequest.Merge(m, src) } -func (m *GuardiansRequest) XXX_Size() int { +func (m *QueryGuardiansRequest) XXX_Size() int { return m.Size() } -func (m *GuardiansRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GuardiansRequest.DiscardUnknown(m) +func (m *QueryGuardiansRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGuardiansRequest.DiscardUnknown(m) } -var xxx_messageInfo_GuardiansRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGuardiansRequest proto.InternalMessageInfo -type GuardiansResponse struct { +type QueryGuardiansResponse struct { Guardians []string `protobuf:"bytes,1,rep,name=guardians,proto3" json:"guardians,omitempty"` } -func (m *GuardiansResponse) Reset() { *m = GuardiansResponse{} } -func (m *GuardiansResponse) String() string { return proto.CompactTextString(m) } -func (*GuardiansResponse) ProtoMessage() {} -func (*GuardiansResponse) Descriptor() ([]byte, []int) { +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 *GuardiansResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGuardiansResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GuardiansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGuardiansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GuardiansResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGuardiansResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -813,40 +818,40 @@ func (m *GuardiansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *GuardiansResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GuardiansResponse.Merge(m, src) +func (m *QueryGuardiansResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGuardiansResponse.Merge(m, src) } -func (m *GuardiansResponse) XXX_Size() int { +func (m *QueryGuardiansResponse) XXX_Size() int { return m.Size() } -func (m *GuardiansResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GuardiansResponse.DiscardUnknown(m) +func (m *QueryGuardiansResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGuardiansResponse.DiscardUnknown(m) } -var xxx_messageInfo_GuardiansResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGuardiansResponse proto.InternalMessageInfo -func (m *GuardiansResponse) GetGuardians() []string { +func (m *QueryGuardiansResponse) GetGuardians() []string { if m != nil { return m.Guardians } return nil } -type OperatorsRequest struct { +type QueryOperatorsRequest struct { } -func (m *OperatorsRequest) Reset() { *m = OperatorsRequest{} } -func (m *OperatorsRequest) String() string { return proto.CompactTextString(m) } -func (*OperatorsRequest) ProtoMessage() {} -func (*OperatorsRequest) Descriptor() ([]byte, []int) { +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 *OperatorsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryOperatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *OperatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryOperatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_OperatorsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryOperatorsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -856,34 +861,34 @@ func (m *OperatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *OperatorsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperatorsRequest.Merge(m, src) +func (m *QueryOperatorsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOperatorsRequest.Merge(m, src) } -func (m *OperatorsRequest) XXX_Size() int { +func (m *QueryOperatorsRequest) XXX_Size() int { return m.Size() } -func (m *OperatorsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OperatorsRequest.DiscardUnknown(m) +func (m *QueryOperatorsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOperatorsRequest.DiscardUnknown(m) } -var xxx_messageInfo_OperatorsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryOperatorsRequest proto.InternalMessageInfo -type OperatorsResponse struct { +type QueryOperatorsResponse struct { Operators []string `protobuf:"bytes,1,rep,name=operators,proto3" json:"operators,omitempty"` } -func (m *OperatorsResponse) Reset() { *m = OperatorsResponse{} } -func (m *OperatorsResponse) String() string { return proto.CompactTextString(m) } -func (*OperatorsResponse) ProtoMessage() {} -func (*OperatorsResponse) Descriptor() ([]byte, []int) { +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 *OperatorsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryOperatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *OperatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryOperatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_OperatorsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryOperatorsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -893,40 +898,40 @@ func (m *OperatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *OperatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperatorsResponse.Merge(m, src) +func (m *QueryOperatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOperatorsResponse.Merge(m, src) } -func (m *OperatorsResponse) XXX_Size() int { +func (m *QueryOperatorsResponse) XXX_Size() int { return m.Size() } -func (m *OperatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_OperatorsResponse.DiscardUnknown(m) +func (m *QueryOperatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOperatorsResponse.DiscardUnknown(m) } -var xxx_messageInfo_OperatorsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryOperatorsResponse proto.InternalMessageInfo -func (m *OperatorsResponse) GetOperators() []string { +func (m *QueryOperatorsResponse) GetOperators() []string { if m != nil { return m.Operators } return nil } -type JudgesRequest struct { +type QueryJudgesRequest struct { } -func (m *JudgesRequest) Reset() { *m = JudgesRequest{} } -func (m *JudgesRequest) String() string { return proto.CompactTextString(m) } -func (*JudgesRequest) ProtoMessage() {} -func (*JudgesRequest) Descriptor() ([]byte, []int) { +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 *JudgesRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryJudgesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *JudgesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryJudgesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_JudgesRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryJudgesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -936,34 +941,34 @@ func (m *JudgesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *JudgesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_JudgesRequest.Merge(m, src) +func (m *QueryJudgesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJudgesRequest.Merge(m, src) } -func (m *JudgesRequest) XXX_Size() int { +func (m *QueryJudgesRequest) XXX_Size() int { return m.Size() } -func (m *JudgesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_JudgesRequest.DiscardUnknown(m) +func (m *QueryJudgesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJudgesRequest.DiscardUnknown(m) } -var xxx_messageInfo_JudgesRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryJudgesRequest proto.InternalMessageInfo -type JudgesResponse struct { +type QueryJudgesResponse struct { Judges []string `protobuf:"bytes,1,rep,name=judges,proto3" json:"judges,omitempty"` } -func (m *JudgesResponse) Reset() { *m = JudgesResponse{} } -func (m *JudgesResponse) String() string { return proto.CompactTextString(m) } -func (*JudgesResponse) ProtoMessage() {} -func (*JudgesResponse) Descriptor() ([]byte, []int) { +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 *JudgesResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryJudgesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *JudgesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryJudgesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_JudgesResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryJudgesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -973,113 +978,308 @@ func (m *JudgesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *JudgesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JudgesResponse.Merge(m, src) +func (m *QueryJudgesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJudgesResponse.Merge(m, src) } -func (m *JudgesResponse) XXX_Size() int { +func (m *QueryJudgesResponse) XXX_Size() int { return m.Size() } -func (m *JudgesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_JudgesResponse.DiscardUnknown(m) +func (m *QueryJudgesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJudgesResponse.DiscardUnknown(m) } -var xxx_messageInfo_JudgesResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryJudgesResponse proto.InternalMessageInfo -func (m *JudgesResponse) GetJudges() []string { +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((*NextSeqSendRequest)(nil), "lbm.fbridge.v1.NextSeqSendRequest") - proto.RegisterType((*NextSeqSendResponse)(nil), "lbm.fbridge.v1.NextSeqSendResponse") - proto.RegisterType((*GreatestSeqByOperatorRequest)(nil), "lbm.fbridge.v1.GreatestSeqByOperatorRequest") - proto.RegisterType((*GreatestSeqByOperatorResponse)(nil), "lbm.fbridge.v1.GreatestSeqByOperatorResponse") - proto.RegisterType((*GreatestConsecutiveConfirmedSeqRequest)(nil), "lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqRequest") - proto.RegisterType((*GreatestConsecutiveConfirmedSeqResponse)(nil), "lbm.fbridge.v1.GreatestConsecutiveConfirmedSeqResponse") - proto.RegisterType((*SubmittedProvisionRequest)(nil), "lbm.fbridge.v1.SubmittedProvisionRequest") - proto.RegisterType((*SubmittedProvisionResponse)(nil), "lbm.fbridge.v1.SubmittedProvisionResponse") - proto.RegisterType((*NeededSubmissionSeqsRequest)(nil), "lbm.fbridge.v1.NeededSubmissionSeqsRequest") - proto.RegisterType((*NeededSubmissionSeqsResponse)(nil), "lbm.fbridge.v1.NeededSubmissionSeqsResponse") - proto.RegisterType((*ConfirmedProvisionRequest)(nil), "lbm.fbridge.v1.ConfirmedProvisionRequest") - proto.RegisterType((*ConfirmedProvisionResponse)(nil), "lbm.fbridge.v1.ConfirmedProvisionResponse") - proto.RegisterType((*CommitmentsRequest)(nil), "lbm.fbridge.v1.CommitmentsRequest") - proto.RegisterType((*CommitmentsResponse)(nil), "lbm.fbridge.v1.CommitmentsResponse") - proto.RegisterType((*GuardiansRequest)(nil), "lbm.fbridge.v1.GuardiansRequest") - proto.RegisterType((*GuardiansResponse)(nil), "lbm.fbridge.v1.GuardiansResponse") - proto.RegisterType((*OperatorsRequest)(nil), "lbm.fbridge.v1.OperatorsRequest") - proto.RegisterType((*OperatorsResponse)(nil), "lbm.fbridge.v1.OperatorsResponse") - proto.RegisterType((*JudgesRequest)(nil), "lbm.fbridge.v1.JudgesRequest") - proto.RegisterType((*JudgesResponse)(nil), "lbm.fbridge.v1.JudgesResponse") + 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{ - // 943 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0x5e, 0xb7, 0x69, 0x44, 0x5e, 0xa0, 0x94, 0xd9, 0x65, 0xd5, 0x75, 0x53, 0x67, 0xe3, 0xa2, - 0xdd, 0xb4, 0x74, 0xe3, 0x26, 0x54, 0x5d, 0x89, 0xd2, 0xcb, 0x06, 0x51, 0x51, 0xa4, 0xb6, 0x24, - 0x37, 0x2e, 0xd1, 0x24, 0x9e, 0x75, 0x0d, 0x6b, 0x4f, 0xec, 0x19, 0x47, 0xbb, 0x2a, 0x3d, 0xc0, - 0x2f, 0x40, 0xa2, 0xbf, 0x01, 0x89, 0x3f, 0x80, 0xc4, 0x95, 0x53, 0x8f, 0x2b, 0x71, 0xe1, 0x84, - 0xd0, 0x2e, 0x3f, 0x04, 0x79, 0x3c, 0x76, 0x12, 0x4f, 0x9c, 0x0d, 0xa7, 0xde, 0xc6, 0xcf, 0xef, - 0x7d, 0xdf, 0xf7, 0xde, 0xcb, 0x7c, 0x0e, 0xe8, 0x47, 0x43, 0xcf, 0x3a, 0x1c, 0x86, 0xae, 0xed, - 0x10, 0x6b, 0xd2, 0xb6, 0x82, 0x88, 0x84, 0x27, 0xad, 0x71, 0x48, 0x39, 0x45, 0x57, 0x8f, 0x86, - 0x5e, 0x4b, 0xbe, 0x6b, 0x4d, 0xda, 0x7a, 0xcd, 0xa1, 0xd4, 0x39, 0x22, 0x16, 0x1e, 0xbb, 0x16, - 0xf6, 0x7d, 0xca, 0x31, 0x77, 0xa9, 0xcf, 0x92, 0x6c, 0x7d, 0xc3, 0xa1, 0x0e, 0x15, 0x47, 0x2b, - 0x3e, 0xc9, 0x68, 0x2d, 0x87, 0x9f, 0xc2, 0x89, 0xb7, 0xe6, 0x06, 0xa0, 0xaf, 0x63, 0xc2, 0xe7, - 0x38, 0xc4, 0x1e, 0xeb, 0x91, 0x20, 0x22, 0x8c, 0x9b, 0x5f, 0xc1, 0xfa, 0x5c, 0x94, 0x8d, 0xa9, - 0xcf, 0x08, 0xba, 0x0f, 0xe5, 0xb1, 0x88, 0x5c, 0xd7, 0xb6, 0xb5, 0x66, 0xb5, 0xb3, 0xd9, 0x9a, - 0xd7, 0xd7, 0x4a, 0xf2, 0x0f, 0x4a, 0x6f, 0xfe, 0xae, 0xaf, 0xf5, 0x64, 0x6e, 0x4c, 0xf1, 0x94, - 0x1c, 0xf3, 0x3e, 0x09, 0xfa, 0xc4, 0xb7, 0x53, 0x8a, 0x5d, 0x58, 0x9f, 0x8b, 0x4a, 0x8a, 0x6b, - 0x70, 0x99, 0x91, 0x40, 0xe0, 0x97, 0x7a, 0xf1, 0xd1, 0xfc, 0x14, 0x6a, 0x8f, 0x43, 0x82, 0x39, - 0x61, 0x71, 0xf2, 0xc1, 0xc9, 0xb3, 0x31, 0x09, 0x31, 0xa7, 0xa1, 0x04, 0x42, 0x3a, 0xbc, 0x43, - 0x65, 0x48, 0x94, 0x55, 0x7a, 0xd9, 0xb3, 0xd9, 0x86, 0x9b, 0x05, 0xb5, 0x85, 0x74, 0x4d, 0xd8, - 0x49, 0x4b, 0xba, 0x71, 0xca, 0x28, 0xe2, 0xee, 0x84, 0x74, 0xa9, 0x7f, 0xe8, 0x86, 0x1e, 0xb1, - 0xfb, 0x24, 0x48, 0x3b, 0x78, 0x08, 0xbb, 0x17, 0x66, 0x16, 0xd2, 0x7c, 0x09, 0x5b, 0xfd, 0x68, - 0xe8, 0xb9, 0x9c, 0x13, 0xfb, 0x79, 0x48, 0x27, 0x2e, 0x73, 0xa9, 0xbf, 0x42, 0x4b, 0x29, 0xd4, - 0xa5, 0x29, 0xd4, 0x6b, 0x0d, 0xf4, 0x45, 0x58, 0x92, 0x7b, 0x1f, 0x4a, 0x36, 0xe6, 0x58, 0xae, - 0xec, 0xa6, 0xb2, 0xb2, 0xb4, 0xe0, 0x73, 0xcc, 0xb1, 0xdc, 0x9c, 0x28, 0x40, 0x8f, 0xa0, 0xcc, - 0x38, 0xe6, 0x11, 0x13, 0x64, 0xd5, 0x4e, 0xbd, 0xb0, 0xb4, 0x2f, 0xd2, 0xd2, 0xb5, 0x27, 0x45, - 0xe6, 0x33, 0xb8, 0xf1, 0x94, 0x10, 0x9b, 0xd8, 0x42, 0x1b, 0x13, 0x79, 0x24, 0x60, 0xab, 0xf4, - 0xb8, 0x01, 0x57, 0x42, 0xec, 0x3b, 0x44, 0x76, 0x99, 0x3c, 0x98, 0x1d, 0xa8, 0x2d, 0x06, 0x94, - 0x8d, 0x22, 0x28, 0x31, 0x12, 0xc4, 0xbf, 0xcd, 0xcb, 0xcd, 0x52, 0x4f, 0x9c, 0xcd, 0x3d, 0xd8, - 0xca, 0x16, 0xa2, 0x8c, 0x59, 0xdd, 0x4a, 0x3c, 0xca, 0x45, 0xf9, 0x6f, 0x79, 0x94, 0x3b, 0x80, - 0xba, 0xd4, 0xf3, 0x5c, 0xee, 0x11, 0x9f, 0xb3, 0x62, 0xf9, 0xfb, 0xb0, 0x3e, 0x97, 0x27, 0x65, - 0x6f, 0x43, 0x75, 0x34, 0x0d, 0x8b, 0xf9, 0x54, 0x7a, 0xb3, 0x21, 0x13, 0xc1, 0xb5, 0xc7, 0x11, - 0x0e, 0x6d, 0x17, 0xfb, 0x99, 0x07, 0xb4, 0xe1, 0x83, 0x99, 0x98, 0x84, 0xaa, 0x41, 0xc5, 0x49, - 0x83, 0x12, 0x68, 0x1a, 0x88, 0x61, 0xd2, 0x1b, 0x36, 0x0b, 0x33, 0x13, 0x9b, 0xc2, 0xa4, 0xcb, - 0xce, 0x60, 0xb2, 0x80, 0xf9, 0x3e, 0xbc, 0xf7, 0x24, 0xb2, 0x1d, 0x92, 0x61, 0x34, 0xe1, 0x6a, - 0x1a, 0x90, 0x00, 0x9b, 0x50, 0xfe, 0x56, 0x44, 0x64, 0xb5, 0x7c, 0xea, 0xfc, 0xfe, 0x2e, 0x5c, - 0x11, 0xce, 0x85, 0x02, 0x28, 0x27, 0x6e, 0x84, 0xcc, 0xfc, 0xb0, 0x55, 0xc3, 0xd3, 0x6f, 0x2d, - 0xcd, 0x49, 0x48, 0x4d, 0xe3, 0xc7, 0x3f, 0xff, 0xfd, 0xf9, 0xd2, 0x75, 0xb4, 0x69, 0xe5, 0x2c, - 0x35, 0x31, 0x3a, 0xf4, 0x3d, 0x54, 0x67, 0x2c, 0x4d, 0xe5, 0x55, 0x5d, 0x50, 0xe5, 0x5d, 0xe0, - 0x89, 0xe6, 0x47, 0x82, 0xd7, 0x40, 0xb5, 0x3c, 0xaf, 0x4f, 0x8e, 0x39, 0x23, 0xc1, 0x80, 0xc5, - 0x74, 0xbf, 0x68, 0xf0, 0xe1, 0x42, 0xb3, 0x43, 0x77, 0xf3, 0x24, 0xcb, 0xfc, 0x54, 0xdf, 0x5b, - 0x31, 0x5b, 0x8a, 0xbb, 0x27, 0xc4, 0xdd, 0x41, 0xcd, 0xbc, 0xb8, 0x6c, 0x9f, 0xd6, 0xcb, 0xf4, - 0xf8, 0xca, 0x62, 0x24, 0x40, 0x7f, 0x68, 0x50, 0xbf, 0xc0, 0x38, 0xd1, 0x83, 0x22, 0x11, 0xcb, - 0x3d, 0x59, 0xdf, 0xff, 0xdf, 0x75, 0xb2, 0x8d, 0x96, 0x68, 0xa3, 0x89, 0x76, 0xf2, 0x6d, 0x38, - 0x12, 0x60, 0x30, 0x4a, 0xcb, 0x06, 0x71, 0x13, 0xbf, 0x6a, 0x80, 0x54, 0xd3, 0x45, 0xb7, 0xf3, - 0xfc, 0x85, 0x26, 0xaf, 0xdf, 0x59, 0x25, 0x55, 0xaa, 0xfb, 0x4c, 0xa8, 0x7b, 0x80, 0xee, 0xaf, - 0x34, 0xe4, 0x71, 0x5a, 0x6f, 0xbd, 0x64, 0x24, 0x78, 0x85, 0x5e, 0x6b, 0xb1, 0x7f, 0xe4, 0x5d, - 0x4d, 0xd5, 0x5a, 0xe8, 0x94, 0xaa, 0xd6, 0x62, 0x93, 0x34, 0x77, 0x85, 0xd6, 0x06, 0xaa, 0x2b, - 0xb7, 0x24, 0x27, 0xeb, 0x37, 0x0d, 0x36, 0x16, 0x19, 0x3a, 0xfa, 0x58, 0xbd, 0x14, 0x85, 0xdf, - 0x11, 0xfd, 0xee, 0x6a, 0xc9, 0x52, 0x5c, 0x57, 0x88, 0x7b, 0x84, 0x1e, 0xae, 0x34, 0x48, 0x5f, - 0x40, 0x0d, 0x58, 0x86, 0x15, 0xaf, 0x9e, 0xa1, 0x1f, 0x34, 0xa8, 0xce, 0xf8, 0xac, 0x7a, 0xd1, - 0x55, 0xb3, 0x56, 0x2f, 0xfa, 0x02, 0xa3, 0x36, 0x6f, 0x0b, 0x75, 0xb7, 0x50, 0x23, 0xaf, 0x6e, - 0xc6, 0xab, 0xe5, 0xf0, 0x18, 0x54, 0x32, 0x77, 0x46, 0xdb, 0xca, 0xaf, 0x3e, 0x67, 0xe6, 0x7a, - 0x63, 0x49, 0x86, 0x24, 0x6f, 0x08, 0xf2, 0x1b, 0x68, 0x4b, 0xb9, 0x01, 0x19, 0x0f, 0x83, 0x4a, - 0xe6, 0xe5, 0x2a, 0x69, 0xde, 0xfa, 0x55, 0x52, 0xe5, 0x43, 0x50, 0x4c, 0x9a, 0xed, 0x03, 0x39, - 0x50, 0x4e, 0xcc, 0x1f, 0x29, 0x1f, 0xdc, 0xb9, 0xaf, 0x84, 0x6e, 0x14, 0xbd, 0xbe, 0xc8, 0xbe, - 0x93, 0x6f, 0xc7, 0xc1, 0x93, 0x37, 0x67, 0x86, 0x76, 0x7a, 0x66, 0x68, 0xff, 0x9c, 0x19, 0xda, - 0x4f, 0xe7, 0xc6, 0xda, 0xe9, 0xb9, 0xb1, 0xf6, 0xd7, 0xb9, 0xb1, 0xf6, 0xcd, 0x3d, 0xc7, 0xe5, - 0x2f, 0xa2, 0x61, 0x6b, 0x44, 0x3d, 0xeb, 0x0b, 0xd7, 0x67, 0xa3, 0x17, 0x2e, 0xb6, 0x0e, 0xe5, - 0x61, 0x8f, 0xd9, 0xdf, 0x59, 0xc7, 0x19, 0x1e, 0x3f, 0x19, 0x13, 0x36, 0x2c, 0x8b, 0x7f, 0xd7, - 0x9f, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x20, 0x1a, 0xcc, 0x0b, 0xdd, 0x0b, 0x00, 0x00, + // 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. @@ -1096,29 +1296,33 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries the parameters of x/fbridge module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // NextSeqSend to be used when the next bridge request is made - NextSeqSend(ctx context.Context, in *NextSeqSendRequest, opts ...grpc.CallOption) (*NextSeqSendResponse, error) - // Get a greatest sequence number confirmed by a particular operator - GreatestSeqByOperator(ctx context.Context, in *GreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*GreatestSeqByOperatorResponse, error) - // Get a greatest consecutive sequence number confirmed by n-of-m operators - GreatestConsecutiveConfirmedSeq(ctx context.Context, in *GreatestConsecutiveConfirmedSeqRequest, opts ...grpc.CallOption) (*GreatestConsecutiveConfirmedSeqResponse, error) - // Get a provision submitted by a particular operator - SubmittedProvision(ctx context.Context, in *SubmittedProvisionRequest, opts ...grpc.CallOption) (*SubmittedProvisionResponse, error) - // Get a particular sequence of confirmed provisions - ConfirmedProvision(ctx context.Context, in *ConfirmedProvisionRequest, opts ...grpc.CallOption) (*ConfirmedProvisionResponse, error) - // Get a list of sequence numbers that need to be submitted by a particular operator + // 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 *NeededSubmissionSeqsRequest, opts ...grpc.CallOption) (*NeededSubmissionSeqsResponse, error) - // Get commitments of a specific sequence number - Commitments(ctx context.Context, in *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, error) - // Get a list of Guardians registered on the bridge - Guardians(ctx context.Context, in *GuardiansRequest, opts ...grpc.CallOption) (*GuardiansResponse, error) - // Get a list of Operators registered on the bridge - Operators(ctx context.Context, in *OperatorsRequest, opts ...grpc.CallOption) (*OperatorsResponse, error) - // Get a list of Judges registered on the bridge - Judges(ctx context.Context, in *JudgesRequest, opts ...grpc.CallOption) (*JudgesResponse, error) + 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 { @@ -1138,8 +1342,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) NextSeqSend(ctx context.Context, in *NextSeqSendRequest, opts ...grpc.CallOption) (*NextSeqSendResponse, error) { - out := new(NextSeqSendResponse) +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 @@ -1147,8 +1351,8 @@ func (c *queryClient) NextSeqSend(ctx context.Context, in *NextSeqSendRequest, o return out, nil } -func (c *queryClient) GreatestSeqByOperator(ctx context.Context, in *GreatestSeqByOperatorRequest, opts ...grpc.CallOption) (*GreatestSeqByOperatorResponse, error) { - out := new(GreatestSeqByOperatorResponse) +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 @@ -1156,8 +1360,8 @@ func (c *queryClient) GreatestSeqByOperator(ctx context.Context, in *GreatestSeq return out, nil } -func (c *queryClient) GreatestConsecutiveConfirmedSeq(ctx context.Context, in *GreatestConsecutiveConfirmedSeqRequest, opts ...grpc.CallOption) (*GreatestConsecutiveConfirmedSeqResponse, error) { - out := new(GreatestConsecutiveConfirmedSeqResponse) +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 @@ -1165,8 +1369,8 @@ func (c *queryClient) GreatestConsecutiveConfirmedSeq(ctx context.Context, in *G return out, nil } -func (c *queryClient) SubmittedProvision(ctx context.Context, in *SubmittedProvisionRequest, opts ...grpc.CallOption) (*SubmittedProvisionResponse, error) { - out := new(SubmittedProvisionResponse) +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 @@ -1174,8 +1378,8 @@ func (c *queryClient) SubmittedProvision(ctx context.Context, in *SubmittedProvi return out, nil } -func (c *queryClient) ConfirmedProvision(ctx context.Context, in *ConfirmedProvisionRequest, opts ...grpc.CallOption) (*ConfirmedProvisionResponse, error) { - out := new(ConfirmedProvisionResponse) +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 @@ -1183,8 +1387,8 @@ func (c *queryClient) ConfirmedProvision(ctx context.Context, in *ConfirmedProvi return out, nil } -func (c *queryClient) NeededSubmissionSeqs(ctx context.Context, in *NeededSubmissionSeqsRequest, opts ...grpc.CallOption) (*NeededSubmissionSeqsResponse, error) { - out := new(NeededSubmissionSeqsResponse) +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 @@ -1192,8 +1396,8 @@ func (c *queryClient) NeededSubmissionSeqs(ctx context.Context, in *NeededSubmis return out, nil } -func (c *queryClient) Commitments(ctx context.Context, in *CommitmentsRequest, opts ...grpc.CallOption) (*CommitmentsResponse, error) { - out := new(CommitmentsResponse) +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 @@ -1201,8 +1405,8 @@ func (c *queryClient) Commitments(ctx context.Context, in *CommitmentsRequest, o return out, nil } -func (c *queryClient) Guardians(ctx context.Context, in *GuardiansRequest, opts ...grpc.CallOption) (*GuardiansResponse, error) { - out := new(GuardiansResponse) +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 @@ -1210,8 +1414,8 @@ func (c *queryClient) Guardians(ctx context.Context, in *GuardiansRequest, opts return out, nil } -func (c *queryClient) Operators(ctx context.Context, in *OperatorsRequest, opts ...grpc.CallOption) (*OperatorsResponse, error) { - out := new(OperatorsResponse) +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 @@ -1219,8 +1423,8 @@ func (c *queryClient) Operators(ctx context.Context, in *OperatorsRequest, opts return out, nil } -func (c *queryClient) Judges(ctx context.Context, in *JudgesRequest, opts ...grpc.CallOption) (*JudgesResponse, error) { - out := new(JudgesResponse) +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 @@ -1228,33 +1432,55 @@ func (c *queryClient) Judges(ctx context.Context, in *JudgesRequest, opts ...grp 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 to be used when the next bridge request is made - NextSeqSend(context.Context, *NextSeqSendRequest) (*NextSeqSendResponse, error) - // Get a greatest sequence number confirmed by a particular operator - GreatestSeqByOperator(context.Context, *GreatestSeqByOperatorRequest) (*GreatestSeqByOperatorResponse, error) - // Get a greatest consecutive sequence number confirmed by n-of-m operators - GreatestConsecutiveConfirmedSeq(context.Context, *GreatestConsecutiveConfirmedSeqRequest) (*GreatestConsecutiveConfirmedSeqResponse, error) - // Get a provision submitted by a particular operator - SubmittedProvision(context.Context, *SubmittedProvisionRequest) (*SubmittedProvisionResponse, error) - // Get a particular sequence of confirmed provisions - ConfirmedProvision(context.Context, *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) - // Get a list of sequence numbers that need to be submitted by a particular operator + // 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, *NeededSubmissionSeqsRequest) (*NeededSubmissionSeqsResponse, error) - // Get commitments of a specific sequence number - Commitments(context.Context, *CommitmentsRequest) (*CommitmentsResponse, error) - // Get a list of Guardians registered on the bridge - Guardians(context.Context, *GuardiansRequest) (*GuardiansResponse, error) - // Get a list of Operators registered on the bridge - Operators(context.Context, *OperatorsRequest) (*OperatorsResponse, error) - // Get a list of Judges registered on the bridge - Judges(context.Context, *JudgesRequest) (*JudgesResponse, error) + 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. @@ -1264,36 +1490,42 @@ 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 *NextSeqSendRequest) (*NextSeqSendResponse, error) { +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 *GreatestSeqByOperatorRequest) (*GreatestSeqByOperatorResponse, error) { +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 *GreatestConsecutiveConfirmedSeqRequest) (*GreatestConsecutiveConfirmedSeqResponse, error) { +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 *SubmittedProvisionRequest) (*SubmittedProvisionResponse, error) { +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 *ConfirmedProvisionRequest) (*ConfirmedProvisionResponse, error) { +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 *NeededSubmissionSeqsRequest) (*NeededSubmissionSeqsResponse, error) { +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 *CommitmentsRequest) (*CommitmentsResponse, error) { +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 *GuardiansRequest) (*GuardiansResponse, error) { +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 *OperatorsRequest) (*OperatorsResponse, error) { +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 *JudgesRequest) (*JudgesResponse, error) { +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) @@ -1318,7 +1550,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } func _Query_NextSeqSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NextSeqSendRequest) + in := new(QueryNextSeqSendRequest) if err := dec(in); err != nil { return nil, err } @@ -1330,13 +1562,13 @@ func _Query_NextSeqSend_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/lbm.fbridge.v1.Query/NextSeqSend", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NextSeqSend(ctx, req.(*NextSeqSendRequest)) + 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(GreatestSeqByOperatorRequest) + in := new(QueryGreatestSeqByOperatorRequest) if err := dec(in); err != nil { return nil, err } @@ -1348,13 +1580,13 @@ func _Query_GreatestSeqByOperator_Handler(srv interface{}, ctx context.Context, FullMethod: "/lbm.fbridge.v1.Query/GreatestSeqByOperator", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GreatestSeqByOperator(ctx, req.(*GreatestSeqByOperatorRequest)) + 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(GreatestConsecutiveConfirmedSeqRequest) + in := new(QueryGreatestConsecutiveConfirmedSeqRequest) if err := dec(in); err != nil { return nil, err } @@ -1366,13 +1598,13 @@ func _Query_GreatestConsecutiveConfirmedSeq_Handler(srv interface{}, ctx context FullMethod: "/lbm.fbridge.v1.Query/GreatestConsecutiveConfirmedSeq", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GreatestConsecutiveConfirmedSeq(ctx, req.(*GreatestConsecutiveConfirmedSeqRequest)) + 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(SubmittedProvisionRequest) + in := new(QuerySubmittedProvisionRequest) if err := dec(in); err != nil { return nil, err } @@ -1384,13 +1616,13 @@ func _Query_SubmittedProvision_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/lbm.fbridge.v1.Query/SubmittedProvision", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SubmittedProvision(ctx, req.(*SubmittedProvisionRequest)) + 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(ConfirmedProvisionRequest) + in := new(QueryConfirmedProvisionRequest) if err := dec(in); err != nil { return nil, err } @@ -1402,13 +1634,13 @@ func _Query_ConfirmedProvision_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/lbm.fbridge.v1.Query/ConfirmedProvision", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ConfirmedProvision(ctx, req.(*ConfirmedProvisionRequest)) + 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(NeededSubmissionSeqsRequest) + in := new(QueryNeededSubmissionSeqsRequest) if err := dec(in); err != nil { return nil, err } @@ -1420,13 +1652,13 @@ func _Query_NeededSubmissionSeqs_Handler(srv interface{}, ctx context.Context, d FullMethod: "/lbm.fbridge.v1.Query/NeededSubmissionSeqs", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NeededSubmissionSeqs(ctx, req.(*NeededSubmissionSeqsRequest)) + 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(CommitmentsRequest) + in := new(QueryCommitmentsRequest) if err := dec(in); err != nil { return nil, err } @@ -1438,13 +1670,13 @@ func _Query_Commitments_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/lbm.fbridge.v1.Query/Commitments", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Commitments(ctx, req.(*CommitmentsRequest)) + 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(GuardiansRequest) + in := new(QueryGuardiansRequest) if err := dec(in); err != nil { return nil, err } @@ -1456,13 +1688,13 @@ func _Query_Guardians_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/lbm.fbridge.v1.Query/Guardians", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Guardians(ctx, req.(*GuardiansRequest)) + 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(OperatorsRequest) + in := new(QueryOperatorsRequest) if err := dec(in); err != nil { return nil, err } @@ -1474,13 +1706,13 @@ func _Query_Operators_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/lbm.fbridge.v1.Query/Operators", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Operators(ctx, req.(*OperatorsRequest)) + 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(JudgesRequest) + in := new(QueryJudgesRequest) if err := dec(in); err != nil { return nil, err } @@ -1492,7 +1724,43 @@ func _Query_Judges_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/lbm.fbridge.v1.Query/Judges", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Judges(ctx, req.(*JudgesRequest)) + 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) } @@ -1545,6 +1813,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ 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", @@ -1606,7 +1882,7 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NextSeqSendRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryNextSeqSendRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1616,12 +1892,12 @@ func (m *NextSeqSendRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NextSeqSendRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryNextSeqSendRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NextSeqSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryNextSeqSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1629,7 +1905,7 @@ func (m *NextSeqSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NextSeqSendResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryNextSeqSendResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1639,12 +1915,12 @@ func (m *NextSeqSendResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NextSeqSendResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryNextSeqSendResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NextSeqSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryNextSeqSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1657,7 +1933,7 @@ func (m *NextSeqSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GreatestSeqByOperatorRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGreatestSeqByOperatorRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1667,12 +1943,12 @@ func (m *GreatestSeqByOperatorRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GreatestSeqByOperatorRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGreatestSeqByOperatorRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GreatestSeqByOperatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGreatestSeqByOperatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1687,7 +1963,7 @@ func (m *GreatestSeqByOperatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *GreatestSeqByOperatorResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGreatestSeqByOperatorResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1697,12 +1973,12 @@ func (m *GreatestSeqByOperatorResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GreatestSeqByOperatorResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGreatestSeqByOperatorResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GreatestSeqByOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGreatestSeqByOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1715,7 +1991,7 @@ func (m *GreatestSeqByOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *GreatestConsecutiveConfirmedSeqRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1725,12 +2001,12 @@ func (m *GreatestConsecutiveConfirmedSeqRequest) Marshal() (dAtA []byte, err err return dAtA[:n], nil } -func (m *GreatestConsecutiveConfirmedSeqRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GreatestConsecutiveConfirmedSeqRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1738,7 +2014,7 @@ func (m *GreatestConsecutiveConfirmedSeqRequest) MarshalToSizedBuffer(dAtA []byt return len(dAtA) - i, nil } -func (m *GreatestConsecutiveConfirmedSeqResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1748,12 +2024,12 @@ func (m *GreatestConsecutiveConfirmedSeqResponse) Marshal() (dAtA []byte, err er return dAtA[:n], nil } -func (m *GreatestConsecutiveConfirmedSeqResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GreatestConsecutiveConfirmedSeqResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1766,7 +2042,7 @@ func (m *GreatestConsecutiveConfirmedSeqResponse) MarshalToSizedBuffer(dAtA []by return len(dAtA) - i, nil } -func (m *SubmittedProvisionRequest) Marshal() (dAtA []byte, err error) { +func (m *QuerySubmittedProvisionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1776,12 +2052,12 @@ func (m *SubmittedProvisionRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubmittedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySubmittedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubmittedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySubmittedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1801,7 +2077,7 @@ func (m *SubmittedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *SubmittedProvisionResponse) Marshal() (dAtA []byte, err error) { +func (m *QuerySubmittedProvisionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1811,12 +2087,12 @@ func (m *SubmittedProvisionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubmittedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySubmittedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubmittedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySubmittedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1844,7 +2120,7 @@ func (m *SubmittedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *NeededSubmissionSeqsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryNeededSubmissionSeqsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1854,12 +2130,12 @@ func (m *NeededSubmissionSeqsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NeededSubmissionSeqsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryNeededSubmissionSeqsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NeededSubmissionSeqsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryNeededSubmissionSeqsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1879,7 +2155,7 @@ func (m *NeededSubmissionSeqsRequest) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *NeededSubmissionSeqsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryNeededSubmissionSeqsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1889,12 +2165,12 @@ func (m *NeededSubmissionSeqsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NeededSubmissionSeqsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryNeededSubmissionSeqsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NeededSubmissionSeqsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryNeededSubmissionSeqsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1920,7 +2196,7 @@ func (m *NeededSubmissionSeqsResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *ConfirmedProvisionRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryConfirmedProvisionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1930,12 +2206,12 @@ func (m *ConfirmedProvisionRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConfirmedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryConfirmedProvisionRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfirmedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryConfirmedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1948,7 +2224,7 @@ func (m *ConfirmedProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *ConfirmedProvisionResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryConfirmedProvisionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1958,12 +2234,12 @@ func (m *ConfirmedProvisionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConfirmedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryConfirmedProvisionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfirmedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryConfirmedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1991,7 +2267,7 @@ func (m *ConfirmedProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *CommitmentsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCommitmentsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2001,12 +2277,12 @@ func (m *CommitmentsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CommitmentsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCommitmentsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CommitmentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCommitmentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2019,7 +2295,7 @@ func (m *CommitmentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *CommitmentsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCommitmentsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2029,12 +2305,12 @@ func (m *CommitmentsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CommitmentsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCommitmentsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2051,7 +2327,7 @@ func (m *CommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GuardiansRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGuardiansRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2061,12 +2337,12 @@ func (m *GuardiansRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GuardiansRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGuardiansRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GuardiansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGuardiansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2074,7 +2350,7 @@ func (m *GuardiansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GuardiansResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGuardiansResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2084,12 +2360,12 @@ func (m *GuardiansResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GuardiansResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGuardiansResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GuardiansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGuardiansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2106,7 +2382,7 @@ func (m *GuardiansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *OperatorsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryOperatorsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2116,12 +2392,12 @@ func (m *OperatorsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *OperatorsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryOperatorsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *OperatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryOperatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2129,7 +2405,7 @@ func (m *OperatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *OperatorsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryOperatorsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2139,12 +2415,12 @@ func (m *OperatorsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *OperatorsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryOperatorsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *OperatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryOperatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2161,7 +2437,7 @@ func (m *OperatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *JudgesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryJudgesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2171,12 +2447,12 @@ func (m *JudgesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JudgesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryJudgesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JudgesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryJudgesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2184,7 +2460,7 @@ func (m *JudgesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *JudgesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryJudgesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2194,12 +2470,12 @@ func (m *JudgesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JudgesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryJudgesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JudgesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryJudgesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2216,6 +2492,143 @@ func (m *JudgesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 @@ -2247,7 +2660,7 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func (m *NextSeqSendRequest) Size() (n int) { +func (m *QueryNextSeqSendRequest) Size() (n int) { if m == nil { return 0 } @@ -2256,7 +2669,7 @@ func (m *NextSeqSendRequest) Size() (n int) { return n } -func (m *NextSeqSendResponse) Size() (n int) { +func (m *QueryNextSeqSendResponse) Size() (n int) { if m == nil { return 0 } @@ -2268,7 +2681,7 @@ func (m *NextSeqSendResponse) Size() (n int) { return n } -func (m *GreatestSeqByOperatorRequest) Size() (n int) { +func (m *QueryGreatestSeqByOperatorRequest) Size() (n int) { if m == nil { return 0 } @@ -2281,7 +2694,7 @@ func (m *GreatestSeqByOperatorRequest) Size() (n int) { return n } -func (m *GreatestSeqByOperatorResponse) Size() (n int) { +func (m *QueryGreatestSeqByOperatorResponse) Size() (n int) { if m == nil { return 0 } @@ -2293,7 +2706,7 @@ func (m *GreatestSeqByOperatorResponse) Size() (n int) { return n } -func (m *GreatestConsecutiveConfirmedSeqRequest) Size() (n int) { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) Size() (n int) { if m == nil { return 0 } @@ -2302,7 +2715,7 @@ func (m *GreatestConsecutiveConfirmedSeqRequest) Size() (n int) { return n } -func (m *GreatestConsecutiveConfirmedSeqResponse) Size() (n int) { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) Size() (n int) { if m == nil { return 0 } @@ -2314,7 +2727,7 @@ func (m *GreatestConsecutiveConfirmedSeqResponse) Size() (n int) { return n } -func (m *SubmittedProvisionRequest) Size() (n int) { +func (m *QuerySubmittedProvisionRequest) Size() (n int) { if m == nil { return 0 } @@ -2330,7 +2743,7 @@ func (m *SubmittedProvisionRequest) Size() (n int) { return n } -func (m *SubmittedProvisionResponse) Size() (n int) { +func (m *QuerySubmittedProvisionResponse) Size() (n int) { if m == nil { return 0 } @@ -2343,7 +2756,7 @@ func (m *SubmittedProvisionResponse) Size() (n int) { return n } -func (m *NeededSubmissionSeqsRequest) Size() (n int) { +func (m *QueryNeededSubmissionSeqsRequest) Size() (n int) { if m == nil { return 0 } @@ -2359,7 +2772,7 @@ func (m *NeededSubmissionSeqsRequest) Size() (n int) { return n } -func (m *NeededSubmissionSeqsResponse) Size() (n int) { +func (m *QueryNeededSubmissionSeqsResponse) Size() (n int) { if m == nil { return 0 } @@ -2375,7 +2788,7 @@ func (m *NeededSubmissionSeqsResponse) Size() (n int) { return n } -func (m *ConfirmedProvisionRequest) Size() (n int) { +func (m *QueryConfirmedProvisionRequest) Size() (n int) { if m == nil { return 0 } @@ -2387,7 +2800,7 @@ func (m *ConfirmedProvisionRequest) Size() (n int) { return n } -func (m *ConfirmedProvisionResponse) Size() (n int) { +func (m *QueryConfirmedProvisionResponse) Size() (n int) { if m == nil { return 0 } @@ -2400,7 +2813,7 @@ func (m *ConfirmedProvisionResponse) Size() (n int) { return n } -func (m *CommitmentsRequest) Size() (n int) { +func (m *QueryCommitmentsRequest) Size() (n int) { if m == nil { return 0 } @@ -2412,7 +2825,7 @@ func (m *CommitmentsRequest) Size() (n int) { return n } -func (m *CommitmentsResponse) Size() (n int) { +func (m *QueryCommitmentsResponse) Size() (n int) { if m == nil { return 0 } @@ -2427,7 +2840,7 @@ func (m *CommitmentsResponse) Size() (n int) { return n } -func (m *GuardiansRequest) Size() (n int) { +func (m *QueryGuardiansRequest) Size() (n int) { if m == nil { return 0 } @@ -2436,7 +2849,7 @@ func (m *GuardiansRequest) Size() (n int) { return n } -func (m *GuardiansResponse) Size() (n int) { +func (m *QueryGuardiansResponse) Size() (n int) { if m == nil { return 0 } @@ -2451,7 +2864,7 @@ func (m *GuardiansResponse) Size() (n int) { return n } -func (m *OperatorsRequest) Size() (n int) { +func (m *QueryOperatorsRequest) Size() (n int) { if m == nil { return 0 } @@ -2460,7 +2873,7 @@ func (m *OperatorsRequest) Size() (n int) { return n } -func (m *OperatorsResponse) Size() (n int) { +func (m *QueryOperatorsResponse) Size() (n int) { if m == nil { return 0 } @@ -2475,7 +2888,7 @@ func (m *OperatorsResponse) Size() (n int) { return n } -func (m *JudgesRequest) Size() (n int) { +func (m *QueryJudgesRequest) Size() (n int) { if m == nil { return 0 } @@ -2484,7 +2897,7 @@ func (m *JudgesRequest) Size() (n int) { return n } -func (m *JudgesResponse) Size() (n int) { +func (m *QueryJudgesResponse) Size() (n int) { if m == nil { return 0 } @@ -2499,9 +2912,63 @@ func (m *JudgesResponse) Size() (n int) { return n } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} +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)))) } @@ -2638,7 +3105,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *NextSeqSendRequest) Unmarshal(dAtA []byte) error { +func (m *QueryNextSeqSendRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2661,10 +3128,10 @@ func (m *NextSeqSendRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NextSeqSendRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryNextSeqSendRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NextSeqSendRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryNextSeqSendRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2688,7 +3155,7 @@ func (m *NextSeqSendRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *NextSeqSendResponse) Unmarshal(dAtA []byte) error { +func (m *QueryNextSeqSendResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2711,10 +3178,10 @@ func (m *NextSeqSendResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NextSeqSendResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryNextSeqSendResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NextSeqSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryNextSeqSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2757,7 +3224,7 @@ func (m *NextSeqSendResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GreatestSeqByOperatorRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGreatestSeqByOperatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2780,10 +3247,10 @@ func (m *GreatestSeqByOperatorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GreatestSeqByOperatorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGreatestSeqByOperatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GreatestSeqByOperatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGreatestSeqByOperatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2839,7 +3306,7 @@ func (m *GreatestSeqByOperatorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GreatestSeqByOperatorResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGreatestSeqByOperatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2862,10 +3329,10 @@ func (m *GreatestSeqByOperatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GreatestSeqByOperatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGreatestSeqByOperatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GreatestSeqByOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGreatestSeqByOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2908,7 +3375,7 @@ func (m *GreatestSeqByOperatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GreatestConsecutiveConfirmedSeqRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGreatestConsecutiveConfirmedSeqRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2931,10 +3398,10 @@ func (m *GreatestConsecutiveConfirmedSeqRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGreatestConsecutiveConfirmedSeqRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGreatestConsecutiveConfirmedSeqRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2958,7 +3425,7 @@ func (m *GreatestConsecutiveConfirmedSeqRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GreatestConsecutiveConfirmedSeqResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGreatestConsecutiveConfirmedSeqResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2981,10 +3448,10 @@ func (m *GreatestConsecutiveConfirmedSeqResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGreatestConsecutiveConfirmedSeqResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GreatestConsecutiveConfirmedSeqResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGreatestConsecutiveConfirmedSeqResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3027,7 +3494,7 @@ func (m *GreatestConsecutiveConfirmedSeqResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubmittedProvisionRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySubmittedProvisionRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3050,10 +3517,10 @@ func (m *SubmittedProvisionRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubmittedProvisionRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySubmittedProvisionRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubmittedProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySubmittedProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3128,7 +3595,7 @@ func (m *SubmittedProvisionRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubmittedProvisionResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySubmittedProvisionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3151,10 +3618,10 @@ func (m *SubmittedProvisionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubmittedProvisionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySubmittedProvisionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubmittedProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySubmittedProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3244,7 +3711,7 @@ func (m *SubmittedProvisionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *NeededSubmissionSeqsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryNeededSubmissionSeqsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3267,10 +3734,10 @@ func (m *NeededSubmissionSeqsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NeededSubmissionSeqsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryNeededSubmissionSeqsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NeededSubmissionSeqsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryNeededSubmissionSeqsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3345,7 +3812,7 @@ func (m *NeededSubmissionSeqsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *NeededSubmissionSeqsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryNeededSubmissionSeqsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3368,10 +3835,10 @@ func (m *NeededSubmissionSeqsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NeededSubmissionSeqsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryNeededSubmissionSeqsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NeededSubmissionSeqsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryNeededSubmissionSeqsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3471,7 +3938,7 @@ func (m *NeededSubmissionSeqsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfirmedProvisionRequest) Unmarshal(dAtA []byte) error { +func (m *QueryConfirmedProvisionRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3494,10 +3961,10 @@ func (m *ConfirmedProvisionRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfirmedProvisionRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryConfirmedProvisionRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfirmedProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryConfirmedProvisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3540,7 +4007,7 @@ func (m *ConfirmedProvisionRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfirmedProvisionResponse) Unmarshal(dAtA []byte) error { +func (m *QueryConfirmedProvisionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3563,10 +4030,10 @@ func (m *ConfirmedProvisionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfirmedProvisionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryConfirmedProvisionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfirmedProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryConfirmedProvisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3656,7 +4123,7 @@ func (m *ConfirmedProvisionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *CommitmentsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCommitmentsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3679,10 +4146,10 @@ func (m *CommitmentsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CommitmentsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCommitmentsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CommitmentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCommitmentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3725,7 +4192,7 @@ func (m *CommitmentsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CommitmentsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCommitmentsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3748,10 +4215,10 @@ func (m *CommitmentsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CommitmentsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCommitmentsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CommitmentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCommitmentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3807,7 +4274,7 @@ func (m *CommitmentsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GuardiansRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGuardiansRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3830,10 +4297,10 @@ func (m *GuardiansRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GuardiansRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGuardiansRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GuardiansRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGuardiansRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3857,7 +4324,7 @@ func (m *GuardiansRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GuardiansResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGuardiansResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3880,10 +4347,10 @@ func (m *GuardiansResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GuardiansResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGuardiansResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GuardiansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGuardiansResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3939,7 +4406,7 @@ func (m *GuardiansResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *OperatorsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOperatorsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3962,10 +4429,10 @@ func (m *OperatorsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OperatorsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOperatorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OperatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOperatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3989,7 +4456,7 @@ func (m *OperatorsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *OperatorsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryOperatorsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4012,10 +4479,10 @@ func (m *OperatorsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OperatorsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOperatorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OperatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOperatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4071,7 +4538,7 @@ func (m *OperatorsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *JudgesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryJudgesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4094,10 +4561,10 @@ func (m *JudgesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JudgesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryJudgesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JudgesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryJudgesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4121,7 +4588,7 @@ func (m *JudgesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *JudgesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryJudgesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4144,10 +4611,10 @@ func (m *JudgesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JudgesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryJudgesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JudgesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryJudgesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4203,6 +4670,344 @@ func (m *JudgesResponse) Unmarshal(dAtA []byte) error { } 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 diff --git a/x/fbridge/types/query.pb.gw.go b/x/fbridge/types/query.pb.gw.go index 380319a8a8..8de3ab8ffe 100644 --- a/x/fbridge/types/query.pb.gw.go +++ b/x/fbridge/types/query.pb.gw.go @@ -50,7 +50,7 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } 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 NextSeqSendRequest + var protoReq QueryNextSeqSendRequest var metadata runtime.ServerMetadata msg, err := client.NextSeqSend(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -59,7 +59,7 @@ func request_Query_NextSeqSend_0(ctx context.Context, marshaler runtime.Marshale } 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 NextSeqSendRequest + var protoReq QueryNextSeqSendRequest var metadata runtime.ServerMetadata msg, err := server.NextSeqSend(ctx, &protoReq) @@ -68,7 +68,7 @@ func local_request_Query_NextSeqSend_0(ctx context.Context, marshaler runtime.Ma } 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 GreatestSeqByOperatorRequest + var protoReq QueryGreatestSeqByOperatorRequest var metadata runtime.ServerMetadata var ( @@ -95,7 +95,7 @@ func request_Query_GreatestSeqByOperator_0(ctx context.Context, marshaler runtim } 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 GreatestSeqByOperatorRequest + var protoReq QueryGreatestSeqByOperatorRequest var metadata runtime.ServerMetadata var ( @@ -122,7 +122,7 @@ func local_request_Query_GreatestSeqByOperator_0(ctx context.Context, marshaler } 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 GreatestConsecutiveConfirmedSeqRequest + var protoReq QueryGreatestConsecutiveConfirmedSeqRequest var metadata runtime.ServerMetadata msg, err := client.GreatestConsecutiveConfirmedSeq(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -131,7 +131,7 @@ func request_Query_GreatestConsecutiveConfirmedSeq_0(ctx context.Context, marsha } 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 GreatestConsecutiveConfirmedSeqRequest + var protoReq QueryGreatestConsecutiveConfirmedSeqRequest var metadata runtime.ServerMetadata msg, err := server.GreatestConsecutiveConfirmedSeq(ctx, &protoReq) @@ -140,7 +140,7 @@ func local_request_Query_GreatestConsecutiveConfirmedSeq_0(ctx context.Context, } 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 SubmittedProvisionRequest + var protoReq QuerySubmittedProvisionRequest var metadata runtime.ServerMetadata var ( @@ -178,7 +178,7 @@ func request_Query_SubmittedProvision_0(ctx context.Context, marshaler runtime.M } 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 SubmittedProvisionRequest + var protoReq QuerySubmittedProvisionRequest var metadata runtime.ServerMetadata var ( @@ -216,7 +216,7 @@ func local_request_Query_SubmittedProvision_0(ctx context.Context, marshaler run } 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 ConfirmedProvisionRequest + var protoReq QueryConfirmedProvisionRequest var metadata runtime.ServerMetadata var ( @@ -243,7 +243,7 @@ func request_Query_ConfirmedProvision_0(ctx context.Context, marshaler runtime.M } 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 ConfirmedProvisionRequest + var protoReq QueryConfirmedProvisionRequest var metadata runtime.ServerMetadata var ( @@ -274,7 +274,7 @@ var ( ) 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 NeededSubmissionSeqsRequest + var protoReq QueryNeededSubmissionSeqsRequest var metadata runtime.ServerMetadata var ( @@ -308,7 +308,7 @@ func request_Query_NeededSubmissionSeqs_0(ctx context.Context, marshaler runtime } 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 NeededSubmissionSeqsRequest + var protoReq QueryNeededSubmissionSeqsRequest var metadata runtime.ServerMetadata var ( @@ -342,7 +342,7 @@ func local_request_Query_NeededSubmissionSeqs_0(ctx context.Context, marshaler r } 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 CommitmentsRequest + var protoReq QueryCommitmentsRequest var metadata runtime.ServerMetadata var ( @@ -369,7 +369,7 @@ func request_Query_Commitments_0(ctx context.Context, marshaler runtime.Marshale } 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 CommitmentsRequest + var protoReq QueryCommitmentsRequest var metadata runtime.ServerMetadata var ( @@ -396,7 +396,7 @@ func local_request_Query_Commitments_0(ctx context.Context, marshaler runtime.Ma } 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 GuardiansRequest + var protoReq QueryGuardiansRequest var metadata runtime.ServerMetadata msg, err := client.Guardians(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -405,7 +405,7 @@ func request_Query_Guardians_0(ctx context.Context, marshaler runtime.Marshaler, } 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 GuardiansRequest + var protoReq QueryGuardiansRequest var metadata runtime.ServerMetadata msg, err := server.Guardians(ctx, &protoReq) @@ -414,7 +414,7 @@ func local_request_Query_Guardians_0(ctx context.Context, marshaler runtime.Mars } 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 OperatorsRequest + var protoReq QueryOperatorsRequest var metadata runtime.ServerMetadata msg, err := client.Operators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -423,7 +423,7 @@ func request_Query_Operators_0(ctx context.Context, marshaler runtime.Marshaler, } 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 OperatorsRequest + var protoReq QueryOperatorsRequest var metadata runtime.ServerMetadata msg, err := server.Operators(ctx, &protoReq) @@ -432,7 +432,7 @@ func local_request_Query_Operators_0(ctx context.Context, marshaler runtime.Mars } 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 JudgesRequest + var protoReq QueryJudgesRequest var metadata runtime.ServerMetadata msg, err := client.Judges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -441,7 +441,7 @@ func request_Query_Judges_0(ctx context.Context, marshaler runtime.Marshaler, cl } 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 JudgesRequest + var protoReq QueryJudgesRequest var metadata runtime.ServerMetadata msg, err := server.Judges(ctx, &protoReq) @@ -449,6 +449,96 @@ func local_request_Query_Judges_0(ctx context.Context, marshaler runtime.Marshal } +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. @@ -675,6 +765,46 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + 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 } @@ -936,6 +1066,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + 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 } @@ -961,6 +1131,10 @@ var ( 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 ( @@ -985,4 +1159,8 @@ var ( 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 index 6c0f55d96e..91346052d5 100644 --- a/x/fbridge/types/tx.pb.go +++ b/x/fbridge/types/tx.pb.go @@ -689,7 +689,7 @@ func (m *MsgClaimResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgClaimResponse proto.InternalMessageInfo // MsgUpdateRole is input values required for updating the role of an address -type MsgUpdateRole struct { +type MsgSuggestRole struct { // the guardian address From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // the address to update the role @@ -702,18 +702,18 @@ type MsgUpdateRole struct { Role Role `protobuf:"varint,3,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` } -func (m *MsgUpdateRole) Reset() { *m = MsgUpdateRole{} } -func (m *MsgUpdateRole) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateRole) ProtoMessage() {} -func (*MsgUpdateRole) Descriptor() ([]byte, []int) { +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 *MsgUpdateRole) XXX_Unmarshal(b []byte) error { +func (m *MsgSuggestRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSuggestRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateRole.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSuggestRole.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -723,54 +723,54 @@ func (m *MsgUpdateRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *MsgUpdateRole) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateRole.Merge(m, src) +func (m *MsgSuggestRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSuggestRole.Merge(m, src) } -func (m *MsgUpdateRole) XXX_Size() int { +func (m *MsgSuggestRole) XXX_Size() int { return m.Size() } -func (m *MsgUpdateRole) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateRole.DiscardUnknown(m) +func (m *MsgSuggestRole) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSuggestRole.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateRole proto.InternalMessageInfo +var xxx_messageInfo_MsgSuggestRole proto.InternalMessageInfo -func (m *MsgUpdateRole) GetFrom() string { +func (m *MsgSuggestRole) GetFrom() string { if m != nil { return m.From } return "" } -func (m *MsgUpdateRole) GetTarget() string { +func (m *MsgSuggestRole) GetTarget() string { if m != nil { return m.Target } return "" } -func (m *MsgUpdateRole) GetRole() Role { +func (m *MsgSuggestRole) GetRole() Role { if m != nil { return m.Role } return Role_UNSPECIFIED } -type MsgUpdateRoleResponse struct { +type MsgSuggestRoleResponse struct { } -func (m *MsgUpdateRoleResponse) Reset() { *m = MsgUpdateRoleResponse{} } -func (m *MsgUpdateRoleResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateRoleResponse) ProtoMessage() {} -func (*MsgUpdateRoleResponse) Descriptor() ([]byte, []int) { +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 *MsgUpdateRoleResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSuggestRoleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSuggestRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateRoleResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSuggestRoleResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -780,17 +780,118 @@ func (m *MsgUpdateRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *MsgUpdateRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateRoleResponse.Merge(m, src) +func (m *MsgSuggestRoleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSuggestRoleResponse.Merge(m, src) } -func (m *MsgUpdateRoleResponse) XXX_Size() int { +func (m *MsgSuggestRoleResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateRoleResponse.DiscardUnknown(m) +func (m *MsgSuggestRoleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSuggestRoleResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateRoleResponse proto.InternalMessageInfo +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 { @@ -802,7 +903,7 @@ 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{16} + return fileDescriptor_54a336bc5ea063bb, []int{18} } func (m *MsgHalt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -845,7 +946,7 @@ 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{17} + return fileDescriptor_54a336bc5ea063bb, []int{19} } func (m *MsgHaltResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -884,7 +985,7 @@ 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{18} + return fileDescriptor_54a336bc5ea063bb, []int{20} } func (m *MsgResume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -927,7 +1028,7 @@ 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{19} + return fileDescriptor_54a336bc5ea063bb, []int{21} } func (m *MsgResumeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -971,8 +1072,10 @@ func init() { 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((*MsgUpdateRole)(nil), "lbm.fbridge.v1.MsgUpdateRole") - proto.RegisterType((*MsgUpdateRoleResponse)(nil), "lbm.fbridge.v1.MsgUpdateRoleResponse") + 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") @@ -982,50 +1085,55 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } var fileDescriptor_54a336bc5ea063bb = []byte{ - // 678 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdd, 0x6e, 0xd3, 0x30, - 0x18, 0x6d, 0x68, 0x57, 0xd6, 0x8f, 0xb1, 0x1f, 0xef, 0xa7, 0x5d, 0xd8, 0xda, 0x11, 0x98, 0x98, - 0x26, 0x91, 0x6c, 0xe3, 0x02, 0x89, 0x2b, 0xd4, 0x49, 0x13, 0x4c, 0x54, 0xa0, 0x08, 0x24, 0xc4, - 0x0d, 0x72, 0x5b, 0x37, 0x8b, 0x48, 0xe2, 0x12, 0xbb, 0x55, 0x79, 0x08, 0x24, 0x1e, 0x86, 0x3b, - 0x5e, 0x60, 0x97, 0xbb, 0x44, 0x5c, 0x4c, 0x68, 0x7b, 0x11, 0x14, 0x2f, 0x71, 0x93, 0xce, 0xd9, - 0x8f, 0xb8, 0xb3, 0x75, 0xbe, 0x73, 0xbe, 0xf3, 0xd9, 0x3e, 0x32, 0x54, 0xbd, 0xb6, 0x6f, 0xf5, - 0xda, 0xa1, 0xdb, 0x75, 0x88, 0x35, 0xdc, 0xb5, 0xf8, 0xc8, 0xec, 0x87, 0x94, 0x53, 0x34, 0xeb, - 0xb5, 0x7d, 0x33, 0x06, 0xcc, 0xe1, 0xae, 0xbe, 0xe4, 0x50, 0x87, 0x0a, 0xc8, 0x8a, 0x56, 0x17, - 0x55, 0xfa, 0xda, 0x04, 0x3d, 0x21, 0x08, 0xd4, 0xf8, 0xae, 0xc1, 0xbd, 0x16, 0x73, 0xde, 0x87, - 0x38, 0x60, 0x3d, 0x12, 0xa2, 0x15, 0x28, 0x33, 0x12, 0x74, 0x49, 0x58, 0xd3, 0x36, 0xb4, 0xad, - 0x8a, 0x1d, 0xef, 0x90, 0x0e, 0xd3, 0x21, 0xe9, 0x10, 0x77, 0x48, 0xc2, 0xda, 0x1d, 0x81, 0xc8, - 0x3d, 0x3a, 0x84, 0x32, 0xf6, 0xe9, 0x20, 0xe0, 0xb5, 0x62, 0x84, 0x34, 0xf7, 0x8e, 0x4f, 0x1b, - 0x85, 0x3f, 0xa7, 0x8d, 0x6d, 0xc7, 0xe5, 0x47, 0x83, 0xb6, 0xd9, 0xa1, 0xbe, 0x75, 0xe0, 0x06, - 0xac, 0x73, 0xe4, 0x62, 0xab, 0x17, 0x2f, 0x9e, 0xb2, 0xee, 0x17, 0x8b, 0x7f, 0xeb, 0x13, 0x66, - 0xbe, 0x0e, 0xb8, 0x1d, 0x2b, 0x18, 0xcb, 0xb0, 0x98, 0xb2, 0x63, 0x13, 0xd6, 0xa7, 0x01, 0x23, - 0xc6, 0x4f, 0x0d, 0x66, 0x5a, 0xcc, 0x79, 0x17, 0xd2, 0xa1, 0xcb, 0x5c, 0x1a, 0x20, 0x04, 0xa5, - 0x5e, 0x48, 0xfd, 0xd8, 0xa5, 0x58, 0xa3, 0x79, 0x28, 0x32, 0xf2, 0x55, 0xd8, 0x2b, 0xd9, 0xd1, - 0x32, 0x35, 0x4d, 0x31, 0x77, 0x9a, 0x52, 0xee, 0x34, 0x53, 0xff, 0x3d, 0xcd, 0x0a, 0x2c, 0xa5, - 0x5d, 0xcb, 0x71, 0x9e, 0xc3, 0x5c, 0x8b, 0x39, 0xaf, 0xa8, 0xd7, 0x95, 0x07, 0x7f, 0xa3, 0x81, - 0x8c, 0x55, 0xa8, 0x4e, 0x10, 0xa5, 0xe6, 0x0b, 0x40, 0x2d, 0xe6, 0xd8, 0xc4, 0x23, 0x98, 0x91, - 0x5b, 0xca, 0xae, 0x81, 0x7e, 0x99, 0x7b, 0x49, 0xd9, 0xa7, 0x43, 0x72, 0xcb, 0x1b, 0x90, 0xca, - 0x19, 0xae, 0x54, 0x6e, 0xc2, 0xfd, 0x16, 0x73, 0xf6, 0x3d, 0xec, 0xfa, 0x4d, 0xcc, 0x3b, 0x47, - 0x4a, 0xd1, 0x75, 0x00, 0x1f, 0x8f, 0x3e, 0x77, 0xa2, 0x2a, 0x16, 0x6b, 0x57, 0x7c, 0x3c, 0x12, - 0x34, 0x66, 0x54, 0x61, 0x39, 0xa3, 0x21, 0xc5, 0x77, 0x60, 0x3a, 0x01, 0x6e, 0x68, 0x16, 0xc1, - 0x7c, 0xc2, 0x90, 0x2a, 0x44, 0x58, 0xfc, 0xd0, 0xef, 0x62, 0x4e, 0x6c, 0xea, 0x11, 0xa5, 0xd4, - 0x0a, 0x94, 0x39, 0x0e, 0x1d, 0xc2, 0xe3, 0x6c, 0xc4, 0x3b, 0xb4, 0x05, 0xa5, 0x90, 0x7a, 0x44, - 0xbc, 0xbe, 0xd9, 0xbd, 0x25, 0x33, 0x1b, 0x58, 0x33, 0xd2, 0xb3, 0x45, 0x45, 0x3c, 0xc5, 0xb8, - 0x8d, 0xec, 0xbf, 0x09, 0x77, 0xa3, 0x1b, 0xc7, 0x1e, 0x8f, 0x5e, 0xad, 0x33, 0xc0, 0x61, 0xd7, - 0xc5, 0x41, 0xdc, 0x5d, 0xee, 0x8d, 0x85, 0x8b, 0x17, 0x85, 0x3d, 0x2e, 0x99, 0x0d, 0xa8, 0x88, - 0xa3, 0x67, 0x03, 0x5f, 0xe9, 0xda, 0x58, 0x84, 0x05, 0x59, 0x90, 0xb0, 0xf6, 0x7e, 0x95, 0xa1, - 0xd8, 0x62, 0x0e, 0x7a, 0x03, 0xd3, 0xf2, 0x11, 0x3d, 0x98, 0x34, 0x9e, 0x8a, 0xa8, 0xfe, 0xe8, - 0x0a, 0x30, 0x51, 0x45, 0x6f, 0xa1, 0x32, 0x7e, 0x39, 0x6b, 0x0a, 0x86, 0x44, 0xf5, 0xc7, 0x57, - 0xa1, 0x52, 0xf0, 0x23, 0xcc, 0x64, 0xe2, 0xd3, 0x50, 0xb0, 0xd2, 0x05, 0xfa, 0x93, 0x6b, 0x0a, - 0xa4, 0x32, 0x86, 0xb9, 0xc9, 0x10, 0x19, 0x0a, 0xee, 0x44, 0x8d, 0xbe, 0x7d, 0x7d, 0x4d, 0xb6, - 0x45, 0x36, 0x4d, 0xea, 0x16, 0x99, 0x9a, 0x9c, 0x16, 0xca, 0x64, 0x21, 0x1b, 0x20, 0x15, 0xab, - 0x75, 0x05, 0x73, 0x0c, 0xeb, 0x9b, 0x57, 0xc2, 0x52, 0x73, 0x1f, 0xa6, 0x2e, 0xd2, 0x54, 0xcb, - 0xab, 0xd7, 0x37, 0xf2, 0x90, 0xb4, 0xb1, 0x54, 0x98, 0x54, 0xc6, 0xc6, 0xb0, 0xd2, 0xd8, 0xe5, - 0x8c, 0xa0, 0x97, 0x50, 0x12, 0x01, 0xa9, 0xaa, 0xee, 0x18, 0x7b, 0x5c, 0x6f, 0xe4, 0x00, 0x52, - 0xe1, 0x00, 0xca, 0x71, 0x50, 0x56, 0x95, 0x87, 0x1c, 0x41, 0xfa, 0xc3, 0x5c, 0x28, 0xd1, 0x69, - 0x1e, 0x1e, 0x9f, 0xd5, 0xb5, 0x93, 0xb3, 0xba, 0xf6, 0xf7, 0xac, 0xae, 0xfd, 0x38, 0xaf, 0x17, - 0x4e, 0xce, 0xeb, 0x85, 0xdf, 0xe7, 0xf5, 0xc2, 0xa7, 0x9d, 0x6b, 0xbf, 0x8f, 0x91, 0xfc, 0xa5, - 0xc5, 0x47, 0xd2, 0x2e, 0x8b, 0x1f, 0xfa, 0xd9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x11, 0x7f, - 0xc2, 0x98, 0x00, 0x08, 0x00, 0x00, + // 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. @@ -1054,9 +1162,12 @@ type MsgClient interface { 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) - // UpdateRole updates the role of an address in the bridge module. + // SuggestRole suggests updating the role of an address in the bridge module. // The role can be one of the following: guardian, operator, judge. - UpdateRole(ctx context.Context, in *MsgUpdateRole, opts ...grpc.CallOption) (*MsgUpdateRoleResponse, error) + // 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. @@ -1134,9 +1245,18 @@ func (c *msgClient) Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOp return out, nil } -func (c *msgClient) UpdateRole(ctx context.Context, in *MsgUpdateRole, opts ...grpc.CallOption) (*MsgUpdateRoleResponse, error) { - out := new(MsgUpdateRoleResponse) - err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/UpdateRole", in, out, opts...) +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 } @@ -1177,9 +1297,12 @@ type MsgServer interface { ClaimBatch(context.Context, *MsgClaimBatch) (*MsgClaimBatchResponse, error) // Claim processes the claiming of a provision with a specific sequence number Claim(context.Context, *MsgClaim) (*MsgClaimResponse, error) - // UpdateRole updates the role of an address in the bridge module. + // SuggestRole suggests updating the role of an address in the bridge module. // The role can be one of the following: guardian, operator, judge. - UpdateRole(context.Context, *MsgUpdateRole) (*MsgUpdateRoleResponse, error) + // 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. @@ -1211,8 +1334,11 @@ func (*UnimplementedMsgServer) ClaimBatch(ctx context.Context, req *MsgClaimBatc func (*UnimplementedMsgServer) Claim(ctx context.Context, req *MsgClaim) (*MsgClaimResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") } -func (*UnimplementedMsgServer) UpdateRole(ctx context.Context, req *MsgUpdateRole) (*MsgUpdateRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateRole 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") @@ -1351,20 +1477,38 @@ func _Msg_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface return interceptor(ctx, in, info, handler) } -func _Msg_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateRole) +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).UpdateRole(ctx, in) + return srv.(MsgServer).SuggestRole(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/lbm.fbridge.v1.Msg/UpdateRole", + FullMethod: "/lbm.fbridge.v1.Msg/SuggestRole", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateRole(ctx, req.(*MsgUpdateRole)) + 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) } @@ -1438,8 +1582,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_Claim_Handler, }, { - MethodName: "UpdateRole", - Handler: _Msg_UpdateRole_Handler, + MethodName: "SuggestRole", + Handler: _Msg_SuggestRole_Handler, + }, + { + MethodName: "AddVoteForRole", + Handler: _Msg_AddVoteForRole_Handler, }, { MethodName: "Halt", @@ -1896,7 +2044,7 @@ func (m *MsgClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateRole) Marshal() (dAtA []byte, err error) { +func (m *MsgSuggestRole) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1906,12 +2054,12 @@ func (m *MsgUpdateRole) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateRole) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSuggestRole) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSuggestRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1938,7 +2086,75 @@ func (m *MsgUpdateRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateRoleResponse) Marshal() (dAtA []byte, err error) { +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]) @@ -1948,12 +2164,12 @@ func (m *MsgUpdateRoleResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateRoleResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAddVoteForRoleResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAddVoteForRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2266,7 +2482,7 @@ func (m *MsgClaimResponse) Size() (n int) { return n } -func (m *MsgUpdateRole) Size() (n int) { +func (m *MsgSuggestRole) Size() (n int) { if m == nil { return 0 } @@ -2286,7 +2502,35 @@ func (m *MsgUpdateRole) Size() (n int) { return n } -func (m *MsgUpdateRoleResponse) Size() (n int) { +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 } @@ -3547,7 +3791,7 @@ func (m *MsgClaimResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateRole) Unmarshal(dAtA []byte) error { +func (m *MsgSuggestRole) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3570,10 +3814,10 @@ func (m *MsgUpdateRole) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateRole: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSuggestRole: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRole: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSuggestRole: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3680,7 +3924,178 @@ func (m *MsgUpdateRole) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateRoleResponse) Unmarshal(dAtA []byte) error { +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 { @@ -3703,10 +4118,10 @@ func (m *MsgUpdateRoleResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateRoleResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddVoteForRoleResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddVoteForRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: