From 900d3bb266c33f806847a5e00a1b94f04ec20193 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 27 Dec 2023 03:38:12 +0000 Subject: [PATCH 01/26] Copy x/foundation --- x/foundation/README.md | 1619 +++++ x/foundation/authz.go | 59 + x/foundation/authz.pb.go | 273 + x/foundation/authz_test.go | 42 + x/foundation/client/cli/query.go | 445 ++ x/foundation/client/cli/tx.go | 813 +++ x/foundation/client/proposal_handler.go | 9 + x/foundation/client/testutil/cli_test.go | 18 + x/foundation/client/testutil/grpc.go | 52 + x/foundation/client/testutil/query.go | 605 ++ x/foundation/client/testutil/suite.go | 240 + x/foundation/client/testutil/tx.go | 630 ++ x/foundation/codec.go | 86 + x/foundation/codec/cdc.go | 18 + x/foundation/config.go | 20 + x/foundation/errors.go | 1 + x/foundation/event.pb.go | 2556 ++++++++ x/foundation/events.go | 40 + x/foundation/expected_keepers.go | 23 + x/foundation/foundation.go | 553 ++ x/foundation/foundation.pb.go | 4554 ++++++++++++++ x/foundation/foundation_test.go | 638 ++ x/foundation/genesis.go | 230 + x/foundation/genesis.pb.go | 984 +++ x/foundation/genesis_test.go | 501 ++ x/foundation/keeper/exported.go | 103 + x/foundation/keeper/internal/abci.go | 24 + x/foundation/keeper/internal/abci_test.go | 132 + x/foundation/keeper/internal/censorship.go | 220 + .../keeper/internal/censorship_test.go | 191 + x/foundation/keeper/internal/exec.go | 109 + x/foundation/keeper/internal/exec_test.go | 44 + x/foundation/keeper/internal/genesis.go | 100 + x/foundation/keeper/internal/genesis_test.go | 287 + x/foundation/keeper/internal/grpc_query.go | 290 + .../keeper/internal/grpc_query_test.go | 98 + x/foundation/keeper/internal/invariants.go | 72 + .../keeper/internal/invariants_test.go | 102 + x/foundation/keeper/internal/keeper.go | 89 + x/foundation/keeper/internal/keeper_test.go | 298 + x/foundation/keeper/internal/keys.go | 169 + x/foundation/keeper/internal/member.go | 191 + x/foundation/keeper/internal/member_test.go | 102 + x/foundation/keeper/internal/migrations.go | 32 + .../keeper/internal/migrations/v2/expected.go | 14 + .../keeper/internal/migrations/v2/keys.go | 3 + .../keeper/internal/migrations/v2/store.go | 39 + .../internal/migrations/v2/store_test.go | 86 + x/foundation/keeper/internal/msg_server.go | 311 + .../keeper/internal/msg_server_test.go | 738 +++ x/foundation/keeper/internal/params.go | 29 + x/foundation/keeper/internal/proposal.go | 245 + .../keeper/internal/proposal_handler.go | 56 + .../keeper/internal/proposal_handler_test.go | 116 + x/foundation/keeper/internal/proposal_test.go | 140 + x/foundation/keeper/internal/tally.go | 82 + x/foundation/keeper/internal/treasury.go | 73 + x/foundation/keeper/internal/treasury_test.go | 152 + x/foundation/keeper/internal/vote.go | 111 + x/foundation/keeper/internal/vote_test.go | 86 + x/foundation/keys.go | 19 + x/foundation/module/module.go | 187 + x/foundation/msgs.go | 585 ++ x/foundation/msgs_test.go | 894 +++ x/foundation/proposal.go | 70 + x/foundation/query.pb.go | 5289 ++++++++++++++++ x/foundation/query.pb.gw.go | 1218 ++++ x/foundation/tx.pb.go | 5381 +++++++++++++++++ 68 files changed, 33586 insertions(+) create mode 100644 x/foundation/README.md create mode 100644 x/foundation/authz.go create mode 100644 x/foundation/authz.pb.go create mode 100644 x/foundation/authz_test.go create mode 100644 x/foundation/client/cli/query.go create mode 100644 x/foundation/client/cli/tx.go create mode 100644 x/foundation/client/proposal_handler.go create mode 100644 x/foundation/client/testutil/cli_test.go create mode 100644 x/foundation/client/testutil/grpc.go create mode 100644 x/foundation/client/testutil/query.go create mode 100644 x/foundation/client/testutil/suite.go create mode 100644 x/foundation/client/testutil/tx.go create mode 100644 x/foundation/codec.go create mode 100644 x/foundation/codec/cdc.go create mode 100644 x/foundation/config.go create mode 100644 x/foundation/errors.go create mode 100644 x/foundation/event.pb.go create mode 100644 x/foundation/events.go create mode 100644 x/foundation/expected_keepers.go create mode 100644 x/foundation/foundation.go create mode 100644 x/foundation/foundation.pb.go create mode 100644 x/foundation/foundation_test.go create mode 100644 x/foundation/genesis.go create mode 100644 x/foundation/genesis.pb.go create mode 100644 x/foundation/genesis_test.go create mode 100644 x/foundation/keeper/exported.go create mode 100644 x/foundation/keeper/internal/abci.go create mode 100644 x/foundation/keeper/internal/abci_test.go create mode 100644 x/foundation/keeper/internal/censorship.go create mode 100644 x/foundation/keeper/internal/censorship_test.go create mode 100644 x/foundation/keeper/internal/exec.go create mode 100644 x/foundation/keeper/internal/exec_test.go create mode 100644 x/foundation/keeper/internal/genesis.go create mode 100644 x/foundation/keeper/internal/genesis_test.go create mode 100644 x/foundation/keeper/internal/grpc_query.go create mode 100644 x/foundation/keeper/internal/grpc_query_test.go create mode 100644 x/foundation/keeper/internal/invariants.go create mode 100644 x/foundation/keeper/internal/invariants_test.go create mode 100644 x/foundation/keeper/internal/keeper.go create mode 100644 x/foundation/keeper/internal/keeper_test.go create mode 100644 x/foundation/keeper/internal/keys.go create mode 100644 x/foundation/keeper/internal/member.go create mode 100644 x/foundation/keeper/internal/member_test.go create mode 100644 x/foundation/keeper/internal/migrations.go create mode 100644 x/foundation/keeper/internal/migrations/v2/expected.go create mode 100644 x/foundation/keeper/internal/migrations/v2/keys.go create mode 100644 x/foundation/keeper/internal/migrations/v2/store.go create mode 100644 x/foundation/keeper/internal/migrations/v2/store_test.go create mode 100644 x/foundation/keeper/internal/msg_server.go create mode 100644 x/foundation/keeper/internal/msg_server_test.go create mode 100644 x/foundation/keeper/internal/params.go create mode 100644 x/foundation/keeper/internal/proposal.go create mode 100644 x/foundation/keeper/internal/proposal_handler.go create mode 100644 x/foundation/keeper/internal/proposal_handler_test.go create mode 100644 x/foundation/keeper/internal/proposal_test.go create mode 100644 x/foundation/keeper/internal/tally.go create mode 100644 x/foundation/keeper/internal/treasury.go create mode 100644 x/foundation/keeper/internal/treasury_test.go create mode 100644 x/foundation/keeper/internal/vote.go create mode 100644 x/foundation/keeper/internal/vote_test.go create mode 100644 x/foundation/keys.go create mode 100644 x/foundation/module/module.go create mode 100644 x/foundation/msgs.go create mode 100644 x/foundation/msgs_test.go create mode 100644 x/foundation/proposal.go create mode 100644 x/foundation/query.pb.go create mode 100644 x/foundation/query.pb.gw.go create mode 100644 x/foundation/tx.pb.go diff --git a/x/foundation/README.md b/x/foundation/README.md new file mode 100644 index 0000000000..9e972d3ced --- /dev/null +++ b/x/foundation/README.md @@ -0,0 +1,1619 @@ + + +# `x/foundation` + +## Abstract + +This module provides the functionalities related to the foundation. +The foundation can turn off these functionalities irreversibly, through the +corresponding proposal. Therefore, the users can ensure that no one can bring +back these foundation-specific functionalities. + +## Contents + +* [Concepts](#concepts) +* [Parameters](#parameters) +* [State](#state) +* [Msg Service](#msg-service) + * [Msg/UpdateDecisionPolicy](#msgupdatedecisionpolicy) + * [Msg/UpdateMembers](#msgupdatemembers) + * [Msg/LeaveFoundation](#msgleavefoundation) + * [Msg/SubmitProposal](#msgsubmitproposal) + * [Msg/WithdrawProposal](#msgwithdrawproposal) + * [Msg/Vote](#msgvote) + * [Msg/Exec](#msgexec) + * [Msg/UpdateCensorship](#msgupdatecensorship) + * [Msg/Grant](#msggrant) + * [Msg/Revoke](#msgrevoke) + * [Msg/FundTreasury](#msgfundtreasury) + * [Msg/WithdrawFromTreasury](#msgwithdrawfromtreasury) +* [Events](#events) + * [EventUpdateDecisionPolicy](#eventupdatedecisionpolicy) + * [EventUpdateMembers](#eventupdatedmembers) + * [EventLeaveFoundation](#eventleavefoundation) + * [EventSubmitProposal](#eventsubmitproposal) + * [EventWithdrawProposal](#eventwithdrawproposal) + * [EventVote](#eventvote) + * [EventExec](#eventexec) + * [EventUpdateCensorship](#eventupdatecensorship) + * [EventGrant](#eventgrant) + * [EventRevoke](#eventrevoke) + * [EventFundTreasury](#eventfundedtreasury) + * [EventWithdrawFromTreasury](#eventwithdrawedfromtreasury) +* [Client](#client) + * [CLI](#cli) + * [gRPC](#grpc) + +# Concepts + +## Authority + +`x/foundation`'s authority is a module account associated with the foundation +and a decision policy. It is an "administrator" which has the ability to add, +remove and update members in the foundation. +`x/foundation` has several messages which cannot be triggered but by the +authority. It includes membership management messages, and other messages which +controls the assets of the foundation. + +**Note:** The authority is a module account, which means no one has the private +key of the authority. Hence, foundation members MUST propose, vote and execute +the corresponding proposal. + +## Decision Policy + +A decision policy is the rules that dictate whether a proposal should pass or +not based on its tally outcome. + +All decision policies generally would have a mininum execution period and a +maximum voting window. The minimum execution period is the minimum amount of +time that must pass after submission in order for a proposal to potentially be +executed, and it may be set to 0. The maximum voting window is the maximum time +after submission that a proposal may be voted on before it is tallied. + +The chain developer also defines an app-wide maximum execution period, which is +the maximum amount of time after a proposal's voting period end where the +members are allowed to execute a proposal. + +The current foundation module comes shipped with two decision policies: +threshold and percentage. Any chain developer can extend upon these two, by +creating custom decision policies, as long as they adhere to the +`DecisionPolicy` interface: + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/foundation/foundation.go#L90-L103 + +### Threshold decision policy + +A threshold decision policy defines a threshold of yes votes (based on a tally +of voter weights) that must be achieved in order for a proposal to pass. For +this decision policy, abstain and veto are simply treated as no's. + ++++ https://github.com/Finschia/finschia-sdk/blob/ba75f8e7845a740afdce6e5f1c91f1a97433b7e2/proto/lbm/foundation/v1/foundation.proto#L63-L77 + +### Percentage decision policy + +A percentage decision policy is similar to a threshold decision policy, except +that the threshold is not defined as a constant weight, but as a percentage. +It's more suited for a foundation where the membership can be updated, as the +percentage threshold stays the same, and doesn't depend on how the number of +members get updated. + ++++ https://github.com/Finschia/finschia-sdk/blob/ba75f8e7845a740afdce6e5f1c91f1a97433b7e2/proto/lbm/foundation/v1/foundation.proto#L79-L93 + +### Outsourcing decision policy + +A outsourcing decision policy is a policy set after `x/foundation` decides to +outsource its proposal relevant features to other modules (e.g. `x/group`). +It means one can expect that any states relevant to the feature must be removed +in the update to this policy. + ++++ https://github.com/Finschia/finschia-sdk/blob/ba75f8e7845a740afdce6e5f1c91f1a97433b7e2/proto/lbm/foundation/v1/foundation.proto#L115-L121 + +## Proposal + +Any foundation member(s) can submit a proposal for the foundation policy +account to decide upon. A proposal consists of a set of messages that will be +executed if the proposal passes as well as any metadata associated with the +proposal. + +### Voting + +There are four choices to choose while voting - yes, no, abstain and veto. Not +all decision policies will take the four choices into account. Votes can +contain some optional metadata. + +In the current implementation, the voting window begins as soon as a proposal +is submitted, and the end is defined by the decision policy. + +### Withdrawing Proposals + +Proposals can be withdrawn any time before the voting period end, either by the +module's authority or by one of the proposers. Once withdrawn, it is marked as +`PROPOSAL_STATUS_WITHDRAWN`, and no more voting or execution is allowed on it. + +### Aborted Proposals + +If the decision policy is updated during the voting period of the proposal, +then the proposal is marked as `PROPOSAL_STATUS_ABORTED`, and no more voting or +execution is allowed on it. This is because the decision policy defines the +rules of proposal voting and execution, so if those rules change during the +lifecycle of a proposal, then the proposal should be marked as stale. + +### Tallying + +Tallying is the counting of all votes on a proposal. It can be triggered by the +following two factors: + +* either someone tries to execute the proposal (see next section), which can + happen on a `Msg/Exec` transaction, or a `Msg/{SubmitProposal,Vote}` + transaction with the `Exec` field set. When a proposal execution is + attempted, a tally is done first to make sure the proposal passes. +* or on `EndBlock` when the proposal's voting period end just passed. + +If the tally result passes the decision policy's rules, then the proposal is +marked as `PROPOSAL_STATUS_ACCEPTED`, or else it is marked as +`PROPOSAL_STATUS_REJECTED`. In any case, no more voting is allowed anymore, and +the tally result is persisted to state in the proposal's `FinalTallyResult`. + +### Executing Proposals + +Proposals are executed only when the tallying is done, and the decision policy +allows the proposal to pass based on the tally outcome. They are marked by the +status `PROPOSAL_STATUS_ACCEPTED`. Execution must happen before a duration of +`MaxExecutionPeriod` (set by the chain developer) after each proposal's voting +period end. + +Proposals will not be automatically executed by the chain in this current +design, but rather a member must submit a `Msg/Exec` transaction to attempt to +execute the proposal based on the current votes and decision policy. Any member +can execute proposals that have been accepted, and execution fees are paid by +the proposal executor. + +It's also possible to try to execute a proposal immediately on creation or on +new votes using the `Exec` field of `Msg/SubmitProposal` and `Msg/Vote` +requests. In the former case, proposers signatures are considered as yes votes. +In these cases, if the proposal can't be executed (i.e. it didn't pass the +decision policy's rules), it will still be opened for new votes and +could be tallied and executed later on. + +A successful proposal execution will have its `ExecutorResult` marked as +`PROPOSAL_EXECUTOR_RESULT_SUCCESS`. The proposal will be automatically pruned +after execution. On the other hand, a failed proposal execution will be marked +as `PROPOSAL_EXECUTOR_RESULT_FAILURE`. Such a proposal can be re-executed +multiple times, until it expires after `MaxExecutionPeriod` after voting period +end. + +## Pruning + +Proposals and votes are automatically pruned to avoid state bloat. + +Votes are pruned: + +* either after a successful tally, i.e. a tally whose result passes the + decision policy's rules, which can be trigged by a `Msg/Exec` or a + `Msg/{SubmitProposal,Vote}` with the `Exec` field set, +* or on `EndBlock` right after the proposal's voting period end. This applies + to proposals with status `aborted` or `withdrawn` too. +* or after updating the membership or decision policy. + +whichever happens first. + +Proposals are pruned: + +* on `EndBlock` whose proposal status is `withdrawn` or `aborted` on proposal's + voting period end before tallying, +* and either after a successful proposal execution, +* or on `EndBlock` right after the proposal's `voting_period_end` + + `max_execution_period` (defined as an app-wide configuration) is passed, + +whichever happens first. + +## Censorship + +The foundation module defines interfaces of authorizations on messages to +enforce _censorship_ on its execution. The other modules may deny the execution +of the message based on the information in the foundation. + +A censorship has its target message type URL and authority which can trigger +the messages which manipulate the relevant censorship information: + +* [Msg/UpdateCensorship](#msgupdatecensorship) +* [Msg/Grant](#msggrant) +* [Msg/Revoke](#msgrevoke) + +`Authorization` is an interface that must be implemented by a concrete +authorization logic to validate and execute grants. `Authorization`s are +extensible and can be defined for any Msg service method even outside of the +module where the Msg method is defined. + +**Note:** The foundation module's `Authorization` is different from that of +`x/authz`, while the latter allows an account to perform actions on behalf of +another account. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/foundation/authz.go#L10-L27 + +## Built-in Authorizations + +### ReceiveFromTreasuryAuthorization + +`ReceiveFromTreasuryAuthorization` implements the `Authorization` interface for +the [Msg/WithdrawFromTreasury](#msgwithdrawfromtreasury). + +**Note:** The subject which executes +`lbm.foundation.v1.MsgWithdrawFromTreasury` is the foundation. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/authz.proto#L9-L13 + +### CreateValidatorAuthorization + +`CreateValidatorAuthorization` implements the `Authorization` interface for the +[Msg/CreateValidator](../stakingplus/spec/03_messages.md#msgcreatevalidator). +An account must have this authorization prior to sending the message. + +**Note:** You MUST provide the `CreateValidatorAuthorization`s into the genesis +if `Msg/CreateValidator` is being censored (`CensoredMsgTypeUrls` contains the +url of `Msg/CreateValidator`), or the chain cannot be started. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/stakingplus/v1/authz.proto#L9-L15 + +## Foundation Treasury + +`x/foundation` intercepts the rewards prior to its distribution +(by `x/distribution`). The rate would be `FoundationTax`. + +The foundation can withdraw coins from the treasury. The recipient must have +the corresponding authorization (`ReceiveFromTreasuryAuthorization`) prior to +sending the message `Msg/WithdrawFromTreasury`. + +# Parameters + +## FoundationTax + +The value of `FoundationTax` is the foundation tax rate. + +* FoundationTax: `sdk.Dec` + +# State + +## FoundationInfo + +`FoundationInfo` contains the information relevant to the foundation. + +* FoundationInfo: `0x01 -> ProtocolBuffer(FoundationInfo)`. + +### Version + +The `Version` is used to track changes to the foundation membership. Whenever +the membership is changed, this value is incremented, which will cause +proposals based on older versions to fail. + +### TotalWeight + +The `TotalWeight` is the number of the foundation members. + +### DecisionPolicy + +The `DecisionPolicy` is the decision policy of the foundation. + +## Member + +The `Member` is the foundation member. + +* Member: `0x10 | []byte(member.Address) -> ProtocolBuffer(Member)`. + +## PreviousProposalID + +The value of the `PreviousProposalID` is the last used proposal ID. The chain +uses this value to issue the ID of the next new proposal. + +* PreviousProposalID: `0x11 -> BigEndian(ProposalId)`. + +## Proposal + +* Proposal: `0x12 | BigEndian(ProposalId) -> ProtocolBuffer(Proposal)`. + +## ProposalByVotingPeriodEnd + +`ProposalByVotingPeriodEnd` allows to retrieve proposals sorted by +chronological `voting_period_end`. This index is used when tallying the +proposal votes at the end of the voting period, and for pruning proposals at +`VotingPeriodEnd + MaxExecutionPeriod`. + +* ProposalByVotingPeriodEnd: + `0x13 | sdk.FormatTimeBytes(proposal.VotingPeriodEnd) | BigEndian(ProposalId) -> []byte()`. + +## Vote + +* Vote: `0x40 | BigEndian(ProposalId) | []byte(voter.Address) -> ProtocolBuffer(Vote)`. + +## Censorship + +Censorships are identified by its target message type URL. + +* Censorship: `0x20 | []byte(censorship.MsgTypeURL) -> ProtocolBuffer(Censorship)` + +## Grant + +Grants are identified by combining grantee address and `Authorization` type +(its target message type URL). Hence we only allow one grant for the (grantee, +Authorization) tuple. + +* Grant: `0x21 | len(grant.Grantee) (1 byte) | []byte(grant.Grantee) | []byte(grant.Authorization.MsgTypeURL()) -> ProtocolBuffer(Authorization)` + +# Msg Service + +## Msg/UpdateDecisionPolicy + +The `MsgUpdateDecisionPolicy` can be used to update the decision policy. + ++++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L111-L118 + +It's expected to fail if: + +* the authority is not the module's authority. +* the new decision policy's `Validate()` method doesn't pass. + +## Msg/UpdateMembers + +Foundation members can be updated with the `MsgUpdateMembers`. + ++++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L98-L106 + +In the list of `MemberUpdates`, an existing member can be removed by setting +its `remove` flag to true. + +It's expected to fail if: + +* the authority is not the module's authority. +* if the decision policy's `Validate()` method fails against the updated + membership. + +## Msg/LeaveFoundation + +The `MsgLeaveFoundation` allows a foundation member to leave the foundation. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L205-L209 + +It's expected to fail if: + +* the address is not of a foundation member. +* if the decision policy's `Validate()` method fails against the updated + membership. + +## Msg/SubmitProposal + +A new proposal can be created with the `MsgSubmitProposal`, which has a list of +proposers addresses, a list of messages to execute if the proposal is accepted +and some optional metadata. +An optional `Exec` value can be provided to try to execute the proposal +immediately after proposal creation. Proposers signatures are considered as yes +votes in this case. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L135-L151 + +It's expected to fail if: + +* metadata length is greater than `MaxMetadataLen` config. +* if any of the proposers is not a foundation member. + +## Msg/WithdrawProposal + +A proposal can be withdrawn using `MsgWithdrawProposal` which has an `address` +(can be either a proposer or the module's authority) and a `proposal_id` (which +has to be withdrawn). + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L159-L166 + +It's expected to fail if: + +* the address is neither the module's authority nor a proposer of the proposal. +* the proposal is already closed or aborted. + +## Msg/Vote + +A new vote can be created with the `MsgVote`, given a proposal id, a voter +address, a choice (yes, no, veto or abstain) and some optional metadata. +An optional `Exec` value can be provided to try to execute the proposal +immediately after voting. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L171-L188 + +It's expected to fail if: + +* metadata length is greater than `MaxMetadataLen` config. +* the proposal is not in voting period anymore. + +## Msg/Exec + +A proposal can be executed with the `MsgExec`. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L193-L200 + +The messages that are part of this proposal won't be executed if: + +* the proposal has not been accepted by the decision policy. +* the proposal has already been successfully executed. + +## Msg/UpdateCensorship + +A censorship information is updated by using the `MsgUpdateCensorship` message. +One cannot introduce a censorship over a new message type URL by this message. + ++++ https://github.com/Finschia/finschia-sdk/blob/d9428ec5d825dfd9964f510e32bd03a01adade8c/proto/lbm/foundation/v1/tx.proto#L215-L222 + +The authority of the following modules are candidates of censorship authority: + +* `CENSORSHIP_AUTHORITY_GOVERNANCE`: `x/gov` +* `CENSORSHIP_AUTHORITY_FOUNDATION`: `x/foundation` + +One may specify `CENSORSHIP_AUTHORITY_UNSPECIFIED` to remove the censorship. + ++++ https://github.com/Finschia/finschia-sdk/blob/d9428ec5d825dfd9964f510e32bd03a01adade8c/proto/lbm/foundation/v1/foundation.proto#L26-L35 + +The message handling should fail if: + +* the authority is not the current censorship's authority. +* corresponding enum value of the current censorship's authority is lesser than that of the provided censorship's authority. + +**Note:** Do NOT confuse with that of `x/authz`. + +## Msg/Grant + +An authorization grant is created by using the `MsgGrant` message. +If there is already a grant for the `(grantee, Authorization)` tuple, then the +new grant overwrites the previous one. To update or extend an existing grant, a +new grant with the same `(grantee, Authorization)` tuple should be created. + ++++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L215-L224 + +The message handling should fail if: + +* the authority is not the current censorship's authority. +* provided `Authorization` is not implemented. +* `Authorization.MsgTypeURL()` is not defined in the router (there is no + defined handler in the app router to handle that Msg types). + +**Note:** Do NOT confuse with that of `x/authz`. + +## Msg/Revoke + +A grant can be removed with the `MsgRevoke` message. + ++++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L229-L235 + +The message handling should fail if: + +* the authority is not the current censorship's authority. +* provided `MsgTypeUrl` is empty. + +## Msg/FundTreasury + +Anyone can fund treasury with `MsgFundTreasury`. + ++++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L76-L81 + +## Msg/WithdrawFromTreasury + +The foundation can withdraw coins from the treasury with +`MsgWithdrawFromTreasury`. + ++++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L86-L93 + +The message handling should fail if: + +* the authority is not the module's authority. +* the address which receives the coins has no authorization of + `ReceiveFromTreasuryAuthorization`. + +# Events + +## EventUpdateDecisionPolicy + +`EventUpdateDecisionPolicy` is an event emitted when the decision policy have +been updated. + +| Attribute Key | Attribute Value | +|-----------------|------------------| +| decision_policy | {decisionPolicy} | + +## EventUpdateMembers + +`EventUpdateMembers` is an event emitted when the foundation members have been +updated. + +| Attribute Key | Attribute Value | +|----------------|-----------------| +| member_updates | {members} | + +## EventLeaveFoundation + +`EventLeaveFoundation` is an event emitted when a foundation member leaves the +foundation. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| address | {memberAddress} | + +## EventSubmitProposal + +`EventSubmitProposal` is an event emitted when a proposal is submitted. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| proposal | {proposal} | + +## EventWithdrawProposal + +`EventWithdrawProposal` is an event emitted when a proposal is withdrawn. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| proposal_id | {proposalId} | + +## EventVote + +`EventVote` is an event emitted when a voter votes on a proposal. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| vote | {vote} | + +## EventExec + +`EventExec` is an event emitted when a proposal is executed. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| proposal_id | {proposalId} | +| result | {result} | + +## EventUpdateCensorship + +`EventCensorship` is an event emitted when a censorship is updated. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| censorship | {censorship} | + +## EventGrant + +`EventGrant` is an event emitted when an authorization is granted to a grantee. + +| Attribute Key | Attribute Value | +|---------------|------------------| +| grantee | {granteeAddress} | +| authorization | {authorization} | + +## EventRevoke + +`EventRevoke` is an event emitted when an authorization is revoked from a +grantee. + +| Attribute Key | Attribute Value | +|---------------|------------------| +| grantee | {granteeAddress} | +| msg_type_url | {msgTypeURL} | + +## EventFundTreasury + +`EventFundTreasury` is an event emitted when one funds the treasury. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| from | {fromAddress} | +| amount | {amount} | + +## EventWithdrawFromTreasury + +`EventWithdrawFromTreasury` is an event emitted when coins are withdrawn from +the treasury. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| to | {toAddress} | +| amount | {amount} | + +# Client + +## CLI + +A user can query and interact with the `foundation` module using the CLI. + +### Query + +The `query` commands allow users to query `foundation` state. + +```bash +simd query foundation --help +``` + +#### params + +The `params` command allows users to query for the parameters of `foundation`. + +```bash +simd query foundation params [flags] +``` + +Example: + +```bash +simd query foundation params +``` + +Example Output: + +```bash +params: + foundation_tax: "0.200000000000000000" +``` + +#### foundation-info + +The `foundation-info` command allows users to query for the foundation info. + +```bash +simd query foundation foundation-info [flags] +``` + +Example: + +```bash +simd query foundation foundation-info +``` + +Example Output: + +```bash +info: + decision_policy: + '@type': /lbm.foundation.v1.ThresholdDecisionPolicy + threshold: "3.000000000000000000" + windows: + min_execution_period: 0s + voting_period: 86400s + total_weight: "3.000000000000000000" + version: "1" +``` + +#### member + +The `member` command allows users to query for a foundation member by address. + +```bash +simd query foundation member [address] [flags] +``` + +Example: + +```bash +simd query foundation member link1... +``` + +Example Output: + +```bash +member: + added_at: "0001-01-01T00:00:00Z" + address: link1... + metadata: genesis member +``` + +#### members + +The `members` command allows users to query for the foundation members with +pagination flags. + +```bash +simd query foundation members [flags] +``` + +Example: + +```bash +simd query foundation members +``` + +Example Output: + +```bash +members: +- added_at: "0001-01-01T00:00:00Z" + address: link1... + metadata: genesis member +- added_at: "0001-01-01T00:00:00Z" + address: link1... + metadata: genesis member +- added_at: "0001-01-01T00:00:00Z" + address: link1... + metadata: genesis member +pagination: + next_key: null + total: "3" +``` + +#### proposal + +The `proposal` command allows users to query for proposal by id. + +```bash +simd query foundation proposal [id] [flags] +``` + +Example: + +```bash +simd query foundation proposal 1 +``` + +Example Output: + +```bash +proposal: + executor_result: PROPOSAL_EXECUTOR_RESULT_NOT_RUN + final_tally_result: + abstain_count: "0.000000000000000000" + no_count: "0.000000000000000000" + no_with_veto_count: "0.000000000000000000" + yes_count: "0.000000000000000000" + foundation_version: "1" + id: "1" + messages: + - '@type': /lbm.foundation.v1.MsgWithdrawFromTreasury + authority: link1... + amount: + - amount: "1000000000" + denom: stake + to: link1... + metadata: show-me-the-money + proposers: + - link1... + status: PROPOSAL_STATUS_SUBMITTED + submit_time: "2022-09-19T01:26:38.544943184Z" + voting_period_end: "2022-09-20T01:26:38.544943184Z" +``` + +#### proposals + +The `proposals` command allows users to query for proposals with pagination +flags. + +```bash +simd query foundation proposals [flags] +``` + +Example: + +```bash +simd query foundation proposals +``` + +Example Output: + +```bash +pagination: + next_key: null + total: "1" +proposals: +- executor_result: PROPOSAL_EXECUTOR_RESULT_NOT_RUN + final_tally_result: + abstain_count: "0.000000000000000000" + no_count: "0.000000000000000000" + no_with_veto_count: "0.000000000000000000" + yes_count: "0.000000000000000000" + foundation_version: "1" + id: "1" + messages: + - '@type': /lbm.foundation.v1.MsgWithdrawFromTreasury + authority: link1... + amount: + - amount: "1000000000" + denom: stake + to: link1... + metadata: show-me-the-money + proposers: + - link1... + status: PROPOSAL_STATUS_SUBMITTED + submit_time: "2022-09-19T01:26:38.544943184Z" + voting_period_end: "2022-09-20T01:26:38.544943184Z" +``` + +#### vote + +The `vote` command allows users to query for vote by proposal id and voter +account address. + +```bash +simd query foundation vote [proposal-id] [voter] [flags] +``` + +Example: + +```bash +simd query foundation vote 1 link1... +``` + +Example Output: + +```bash +vote: + metadata: nope + option: VOTE_OPTION_NO + proposal_id: "1" + submit_time: "2022-09-19T01:35:30.920689570Z" + voter: link1... +``` + +#### votes + +The `votes` command allows users to query for votes by proposal id with +pagination flags. + +```bash +simd query foundation votes [proposal-id] [flags] +``` + +Example: + +```bash +simd query foundation votes 1 +``` + +Example Output: + +```bash +pagination: + next_key: null + total: "1" +votes: +- metadata: nope + option: VOTE_OPTION_NO + proposal_id: "1" + submit_time: "2022-09-19T01:35:30.920689570Z" + voter: link1... +``` + +#### tally + +The `tally` command allows users to query for the tally in progress by its +proposal id. + +```bash +simd query foundation tally [proposal-id] [flags] +``` + +Example: + +```bash +simd query foundation tally 1 +``` + +Example Output: + +```bash +tally: + abstain_count: "0.000000000000000000" + no_count: "1.000000000000000000" + no_with_veto_count: "0.000000000000000000" + yes_count: "0.000000000000000000" +``` + +#### censorships + +The `censorships` command allows users to query for all the censorships. + +```bash +simd query foundation censorships [flags] +``` + +Example: + +```bash +simd query foundation censorships +``` + +Example Output: + +```bash +censorships: +- authority: CENSORSHIP_AUTHORITY_GOVERNANCE + msg_type_url: /cosmos.staking.v1beta1.MsgCreateValidator +- authority: CENSORSHIP_AUTHORITY_FOUNDATION + msg_type_url: /lbm.foundation.v1.MsgWithdrawFromTreasury +pagination: + next_key: null + total: "2" +``` + +#### grants + +The `grants` command allows users to query grants for a grantee. If the message +type URL is set, it selects grants only for that message type. + +```bash +simd query foundation grants [grantee] [msg-type-url]? [flags] +``` + +Example: + +```bash +simd query foundation grants link1... /lbm.foundation.v1.MsgWithdrawFromTreasury +``` + +Example Output: + +```bash +authorizations: +- '@type': /lbm.foundation.v1.ReceiveFromTreasuryAuthorization +pagination: null +``` + +#### treasury + +The `treasury` command allows users to query for the foundation treasury. + +```bash +simd query foundation treasury [flags] +``` + +Example: + +```bash +simd query foundation treasury +``` + +Example Output: + +```bash +amount: +- amount: "1000000000000.000000000000000000" + denom: stake +``` + +### Transactions + +The `tx` commands allow users to interact with the `foundation` module. + +```bash +simd tx foundation --help +``` + +**Note:** Some commands must be signed by the module's authority, which means +you cannot broadcast the message directly. The use of those commands is to make +it easier to generate the messages by end users. + +#### update-members + +The `update-members` command allows users to update the foundation's members. + +```bash +simd tx foundation update-members [authority] [members-json] [flags] +``` + +Example: + +```bash +simd tx foundation update-members link1... \ + '[ + { + "address": "link1...", + "metadata": "some new metadata" + }, + { + "address": "link1...", + "remove": true, + } + ]' +``` + +**Note:** The signer MUST be the module's authority. + +#### update-decision-policy + +The `update-decision-policy` command allows users to update the foundation's +decision policy. + +```bash +simd tx foundation update-decision-policy [authority] [decision-policy-json] [flags] +``` + +Example: + +```bash +simd tx foundation update-decision-policy link1... \ + '{ + "@type": "/lbm.foundation.v1.ThresholdDecisionPolicy", + "threshold": "4", + "windows": { + "voting_period": "1h", + "min_execution_period": "0s" + } + }' +``` + +**Note:** The signer MUST be the module's authority. + +#### submit-proposal + +The `submit-proposal` command allows users to submit a new proposal. + +```bash +simd tx foundation submit-proposal [metadata] [proposers-json] [messages-json] [flags] +``` + +Example: + +```bash +simd tx foundation submit-proposal show-me-the-money \ + '[ + "link1...", + "link1..." + ]' \ + '[ + { + "@type": "/lbm.foundation.v1.MsgWithdrawFromTreasury", + "authority": "link1...", + "to": "link1...", + "amount": [ + { + "denom": "stake", + "amount": "10000000000" + } + ] + } + ]' +``` + +#### withdraw-proposal + +The `withdraw-proposal` command allows users to withdraw a proposal. + +```bash +simd tx foundation withdraw-proposal [proposal-id] [authority-or-proposer] [flags] +``` + +Example: + +```bash +simd tx foundation withdraw-proposal 1 link1... +``` + +#### vote + +The `vote` command allows users to vote on a proposal. + +```bash +simd tx foundation vote [proposal-id] [voter] [option] [metadata] [flags] +``` + +Example: + +```bash +simd tx foundation vote 1 link1... VOTE_OPTION_NO nope +``` + +#### exec + +The `exec` command allows users to execute a proposal. + +```bash +simd tx foundation exec [proposal-id] [flags] +``` + +Example: + +```bash +simd tx foundation exec 1 +``` + +#### leave-foundation + +The `leave-foundation` command allows foundation member to leave the +foundation. + +```bash +simd tx foundation leave-foundation [address] [flags] +``` + +Example: + +```bash +simd tx foundation leave-foundation link1... +``` + +#### update-censorship + +The `update-censorship` command allows users to update a censorship information. + +```bash +simd tx foundation update-censorship [authority] [msg-type-url] [new-authority] [flags] +``` + +Example: + +```bash +simd tx foundation update-censorship link1.. /lbm.foundation.v1.MsgWithdrawFromTreasury CENSORSHIP_AUTHORITY_UNSPECIFIED +``` + +**Note:** The signer MUST be the current authority of the censorship. + +#### grant + +The `grant` command allows users to grant an authorization to a grantee. + +```bash +simd tx foundation grant [authority] [grantee] [authorization-json] [flags] +``` + +Example: + +```bash +simd tx foundation grant link1.. link1... \ + '{ + "@type": "/lbm.foundation.v1.ReceiveFromTreasuryAuthorization", + }' +``` + +**Note:** The signer MUST be the authority of the censorship. + +#### revoke + +The `revoke` command allows users to revoke an authorization from a grantee. + +```bash +simd tx foundation revoke [authority] [grantee] [msg-type-url] [flags] +``` + +Example: + +```bash +simd tx foundation revoke link1.. link1... /lbm.foundation.v1.MsgWithdrawFromTreasury +``` + +**Note:** The signer MUST be the authority of the censorship. + +#### fund-treasury + +The `fund-treasury` command allows users to fund the foundation treasury. + +```bash +simd tx foundation fund-treasury [from] [amount] [flags] +``` + +Example: + +```bash +simd tx foundation fund-treasury link1.. 1000stake +``` + +#### withdraw-from-treasury + +The `withdraw-from-treasury` command allows users to withdraw coins from the +foundation treasury. + +```bash +simd tx foundation withdraw-from-treasury [authority] [to] [amount] [flags] +``` + +Example: + +```bash +simd tx foundation withdraw-from-treasury link1.. link1... 1000stake +``` + +**Note:** The signer MUST be the module's authority. + +## gRPC + +A user can query the `foundation` module using gRPC endpoints. + +```bash +grpcurl -plaintext \ + localhost:9090 list lbm.foundation.v1.Query +``` + +### Params + +The `Params` endpoint allows users to query for the parameters of `foundation`. + +```bash +lbm.foundation.v1.Query/Params +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 lbm.foundation.v1.Query/Params +``` + +Example Output: + +```bash +{ + "params": { + "foundationTax": "200000000000000000" + } +} +``` + +### FoundationInfo + +The `FoundationInfo` endpoint allows users to query for the foundation info. + +```bash +lbm.foundation.v1.Query/FoundationInfo +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 lbm.foundation.v1.Query/FoundationInfo +``` + +Example Output: + +```bash +{ + "info": { + "version": "1", + "totalWeight": "3000000000000000000", + "decisionPolicy": {"@type":"/lbm.foundation.v1.ThresholdDecisionPolicy","threshold":"3000000000000000000","windows":{"votingPeriod":"86400s","minExecutionPeriod":"0s"}} + } +} +``` + +### Member + +The `Member` endpoint allows users to query for a foundation member by address. + +```bash +lbm.foundation.v1.Query/Member +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"address": "link1..."}' + localhost:9090 lbm.foundation.v1.Query/Member +``` + +Example Output: + +```bash +{ + "member": { + "address": "link1...", + "metadata": "genesis member", + "addedAt": "0001-01-01T00:00:00Z" + } +} +``` + +### Members + +The `Members` endpoint allows users to query for the foundation members with +pagination flags. + +```bash +lbm.foundation.v1.Query/Members +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 lbm.foundation.v1.Query/Members +``` + +Example Output: + +```bash +{ + "members": [ + { + "address": "link1...", + "metadata": "genesis member", + "addedAt": "0001-01-01T00:00:00Z" + }, + { + "address": "link1...", + "metadata": "genesis member", + "addedAt": "0001-01-01T00:00:00Z" + }, + { + "address": "link1...", + "metadata": "genesis member", + "addedAt": "0001-01-01T00:00:00Z" + } + ], + "pagination": { + "total": "3" + } +} +``` + +### Proposal + +The `Proposal` endpoint allows users to query for proposal by id. + +```bash +lbm.foundation.v1.Query/Proposal +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id": "1"}' \ + localhost:9090 lbm.foundation.v1.Query/Proposal +``` + +Example Output: + +```bash +{ + "proposal": { + "id": "1", + "metadata": "show-me-the-money", + "proposers": [ + "link1..." + ], + "submitTime": "2022-09-19T01:26:38.544943184Z", + "foundationVersion": "1", + "status": "PROPOSAL_STATUS_SUBMITTED", + "finalTallyResult": { + "yesCount": "0", + "abstainCount": "0", + "noCount": "0", + "noWithVetoCount": "0" + }, + "votingPeriodEnd": "2022-09-20T01:26:38.544943184Z", + "executorResult": "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + "messages": [ + {"@type":"/lbm.foundation.v1.MsgWithdrawFromTreasury","authority":"link1...","amount":[{"denom":"stake","amount":"1000000000"}],"to":"link1..."} + ] + } +} +``` + +### Proposals + +The `Proposals` endpoint allows users to query for proposals with pagination +flags. + +```bash +lbm.foundation.v1.Query/Proposals +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 lbm.foundation.v1.Query/Proposals +``` + +Example Output: + +```bash +{ + "proposals": [ + { + "id": "1", + "metadata": "show-me-the-money", + "proposers": [ + "link1..." + ], + "submitTime": "2022-09-19T01:26:38.544943184Z", + "foundationVersion": "1", + "status": "PROPOSAL_STATUS_SUBMITTED", + "finalTallyResult": { + "yesCount": "0", + "abstainCount": "0", + "noCount": "0", + "noWithVetoCount": "0" + }, + "votingPeriodEnd": "2022-09-20T01:26:38.544943184Z", + "executorResult": "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + "messages": [ + {"@type":"/lbm.foundation.v1.MsgWithdrawFromTreasury","authority":"link1...","amount":[{"denom":"stake","amount":"1000000000"}],"to":"link1..."} + ] + } + ], + "pagination": { + "total": "1" + } +} +``` + +### Vote + +The `Vote` endpoint allows users to query for vote by proposal id and voter account address. + +```bash +lbm.foundation.v1.Query/Vote +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id": "1", "voter": "link1..."}' \ + localhost:9090 lbm.foundation.v1.Query/Vote +``` + +Example Output: + +```bash +{ + "vote": { + "proposalId": "1", + "voter": "link1...", + "option": "VOTE_OPTION_NO", + "metadata": "nope", + "submitTime": "2022-09-19T01:35:30.920689570Z" + } +} +``` + +### Votes + +The `Votes` endpoint allows users to query for votes by proposal id with +pagination flags. + +```bash +lbm.foundation.v1.Query/Votes +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id": "1"}' \ + localhost:9090 lbm.foundation.v1.Query/Votes +``` + +Example Output: + +```bash +{ + "votes": [ + { + "proposalId": "1", + "voter": "link1...", + "option": "VOTE_OPTION_NO", + "metadata": "nope", + "submitTime": "2022-09-19T01:35:30.920689570Z" + } + ], + "pagination": { + "total": "1" + } +} +``` + +### TallyResult + +The `TallyResult` endpoint allows users to query for the tally in progress by +its proposal id. + +```bash +lbm.foundation.v1.Query/Vote +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id": "1"}' \ + localhost:9090 lbm.foundation.v1.Query/TallyResult +``` + +Example Output: + +```bash +{ + "tally": { + "yesCount": "0", + "abstainCount": "0", + "noCount": "1000000000000000000", + "noWithVetoCount": "0" + } +} +``` + +### Censorships + +The `Censorships` endpoint allows users to query for all the censorships. + +```bash +lbm.foundation.v1.Query/Censorships +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 lbm.foundation.v1.Query/Censorships +``` + +Example Output: + +```bash +{ + "censorships": [ + { + "msgTypeUrl": "/cosmos.staking.v1beta1.MsgCreateValidator", + "authority": "CENSORSHIP_AUTHORITY_GOVERNANCE" + }, + { + "msgTypeUrl": "/lbm.foundation.v1.MsgWithdrawFromTreasury", + "authority": "CENSORSHIP_AUTHORITY_FOUNDATION" + } + ], + "pagination": { + "total": "2" + } +} +``` + +### Grants + +The `Grants` endpoint allows users to query grants for a grantee. If the +message type URL is set, it selects grants only for that message type. + +```bash +lbm.foundation.v1.Query/Grants +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"grantee": "link1...", "msg_type_url": "/lbm.foundation.v1.MsgWithdrawFromTreasury"}' \ + localhost:9090 lbm.foundation.v1.Query/Grants +``` + +Example Output: + +```bash +{ + "authorizations": [ + {"@type":"/lbm.foundation.v1.ReceiveFromTreasuryAuthorization"} + ] +} +``` + +### Treasury + +The `Treasury` endpoint allows users to query for the foundation treasury. + +```bash +lbm.foundation.v1.Query/Treasury +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 lbm.foundation.v1.Query/Treasury +``` + +Example Output: + +```bash +{ + "amount": [ + { + "denom": "stake", + "amount": "1000000000000000000000000000000" + } + ] +} +``` diff --git a/x/foundation/authz.go b/x/foundation/authz.go new file mode 100644 index 0000000000..cb1399071a --- /dev/null +++ b/x/foundation/authz.go @@ -0,0 +1,59 @@ +package foundation + +import ( + "github.com/gogo/protobuf/proto" + + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" +) + +// Authorization represents the interface of various Authorization types implemented +// by other modules. +// Caution: It's not for x/authz exec. +type Authorization interface { + proto.Message + + // MsgTypeURL returns the fully-qualified Msg service method URL (as described in ADR 031), + // which will process and accept or reject a request. + MsgTypeURL() string + + // Accept determines whether this grant permits the provided sdk.Msg to be performed, + // and if so provides an updated authorization instance. + Accept(ctx sdk.Context, msg sdk.Msg) (AcceptResponse, error) + + // ValidateBasic does a simple validation check that + // doesn't require access to any other information. + ValidateBasic() error +} + +// AcceptResponse instruments the controller of an authz message if the request is accepted +// and if it should be updated or deleted. +type AcceptResponse struct { + // If Accept=true, the controller can accept and authorization and handle the update. + Accept bool + // If Delete=true, the controller must delete the authorization object and release + // storage resources. + Delete bool + // Controller, who is calling Authorization.Accept must check if `Updated != nil`. If yes, + // it must use the updated version and handle the update on the storage level. + Updated Authorization +} + +var _ Authorization = (*ReceiveFromTreasuryAuthorization)(nil) + +func (a ReceiveFromTreasuryAuthorization) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgWithdrawFromTreasury{}) +} + +func (a ReceiveFromTreasuryAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (AcceptResponse, error) { + _, ok := msg.(*MsgWithdrawFromTreasury) + if !ok { + return AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + + return AcceptResponse{Accept: true}, nil +} + +func (a ReceiveFromTreasuryAuthorization) ValidateBasic() error { + return nil +} diff --git a/x/foundation/authz.pb.go b/x/foundation/authz.pb.go new file mode 100644 index 0000000000..70c3a9be21 --- /dev/null +++ b/x/foundation/authz.pb.go @@ -0,0 +1,273 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/foundation/v1/authz.proto + +package foundation + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/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 + +// ReceiveFromTreasuryAuthorization allows the grantee to receive coins +// up to receive_limit from the treasury. +type ReceiveFromTreasuryAuthorization struct { +} + +func (m *ReceiveFromTreasuryAuthorization) Reset() { *m = ReceiveFromTreasuryAuthorization{} } +func (m *ReceiveFromTreasuryAuthorization) String() string { return proto.CompactTextString(m) } +func (*ReceiveFromTreasuryAuthorization) ProtoMessage() {} +func (*ReceiveFromTreasuryAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_8bdb89c90659aa0e, []int{0} +} +func (m *ReceiveFromTreasuryAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReceiveFromTreasuryAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReceiveFromTreasuryAuthorization.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 *ReceiveFromTreasuryAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReceiveFromTreasuryAuthorization.Merge(m, src) +} +func (m *ReceiveFromTreasuryAuthorization) XXX_Size() int { + return m.Size() +} +func (m *ReceiveFromTreasuryAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_ReceiveFromTreasuryAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_ReceiveFromTreasuryAuthorization proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ReceiveFromTreasuryAuthorization)(nil), "lbm.foundation.v1.ReceiveFromTreasuryAuthorization") +} + +func init() { proto.RegisterFile("lbm/foundation/v1/authz.proto", fileDescriptor_8bdb89c90659aa0e) } + +var fileDescriptor_8bdb89c90659aa0e = []byte{ + // 228 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x49, 0xca, 0xd5, + 0x4f, 0xcb, 0x2f, 0xcd, 0x4b, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x4f, 0x2c, + 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xcc, 0x49, 0xca, 0xd5, 0x43, + 0x48, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, + 0x42, 0x29, 0xc9, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0xe2, 0x78, 0x88, 0x04, 0x84, 0x03, 0x95, 0x12, + 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x21, 0xa5, 0x09, 0x8c, 0x5c, 0x0a, 0x41, + 0xa9, 0xc9, 0xa9, 0x99, 0x65, 0xa9, 0x6e, 0x45, 0xf9, 0xb9, 0x21, 0x45, 0xa9, 0x89, 0xc5, 0xa5, + 0x45, 0x95, 0x8e, 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x55, 0x60, 0xbb, 0xac, 0x72, 0x4e, 0x6d, + 0xd1, 0xb5, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x77, 0xcb, 0xcc, + 0x2b, 0x4e, 0xce, 0xc8, 0x4c, 0xd4, 0x4f, 0x83, 0x32, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x90, + 0x5c, 0xaf, 0x87, 0x62, 0x40, 0xd7, 0xf3, 0x0d, 0x5a, 0x1a, 0x39, 0x49, 0xb9, 0x60, 0x65, 0x84, + 0x6c, 0x73, 0x72, 0x3f, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, + 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x5d, 0x92, + 0xdc, 0x90, 0xc4, 0x06, 0xf6, 0xa2, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x91, 0x7b, 0x62, 0xde, + 0x5a, 0x01, 0x00, 0x00, +} + +func (m *ReceiveFromTreasuryAuthorization) 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 *ReceiveFromTreasuryAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReceiveFromTreasuryAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { + offset -= sovAuthz(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ReceiveFromTreasuryAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovAuthz(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuthz(x uint64) (n int) { + return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ReceiveFromTreasuryAuthorization) 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 ErrIntOverflowAuthz + } + 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: ReceiveFromTreasuryAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReceiveFromTreasuryAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthz(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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrInvalidLengthAuthz + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuthz + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuthz + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/foundation/authz_test.go b/x/foundation/authz_test.go new file mode 100644 index 0000000000..19f1d605ad --- /dev/null +++ b/x/foundation/authz_test.go @@ -0,0 +1,42 @@ +package foundation_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func TestReceiveFromTreasuryAuthorization(t *testing.T) { + testCases := map[string]struct { + msg sdk.Msg + valid bool + accept bool + }{ + "valid": { + msg: &foundation.MsgWithdrawFromTreasury{}, + valid: true, + accept: true, + }, + "msg mismatch": { + msg: &foundation.MsgVote{}, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + authorization := &foundation.ReceiveFromTreasuryAuthorization{} + + resp, err := authorization.Accept(sdk.Context{}, tc.msg) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.accept, resp.Accept) + }) + } +} diff --git a/x/foundation/client/cli/query.go b/x/foundation/client/cli/query.go new file mode 100644 index 0000000000..8d0ad01e05 --- /dev/null +++ b/x/foundation/client/cli/query.go @@ -0,0 +1,445 @@ +package cli + +import ( + "context" + "strconv" + + "github.com/spf13/cobra" + + "github.com/Finschia/finschia-sdk/client" + "github.com/Finschia/finschia-sdk/client/flags" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +// NewQueryCmd returns the parent command for all x/foundation CLi query commands. +func NewQueryCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: foundation.ModuleName, + Short: "Querying commands for the foundation module", + } + + cmd.AddCommand( + NewQueryCmdParams(), + NewQueryCmdTreasury(), + NewQueryCmdFoundationInfo(), + NewQueryCmdMember(), + NewQueryCmdMembers(), + NewQueryCmdProposal(), + NewQueryCmdProposals(), + NewQueryCmdVote(), + NewQueryCmdVotes(), + NewQueryCmdTallyResult(), + NewQueryCmdCensorships(), + NewQueryCmdGrants(), + ) + + return cmd +} + +// NewQueryCmdParams returns the query foundation parameters command. +func NewQueryCmdParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Short: "Query foundation params", + Long: "Gets the current parameters of foundation", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + params := foundation.QueryParamsRequest{} + res, err := queryClient.Params(context.Background(), ¶ms) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// NewQueryCmdTreasury returns the amount of coins in the foundation treasury +func NewQueryCmdTreasury() *cobra.Command { + cmd := &cobra.Command{ + Use: "treasury", + Short: "Query foundation treasury", + Long: "Gets the amount of coins in the foundation treasury", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + req := foundation.QueryTreasuryRequest{} + res, err := queryClient.Treasury(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// NewQueryCmdFoundationInfo returns the information of the foundation. +func NewQueryCmdFoundationInfo() *cobra.Command { + cmd := &cobra.Command{ + Use: "foundation-info", + Args: cobra.NoArgs, + Short: "Query the foundation information", + Long: `Query the foundation information +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + req := foundation.QueryFoundationInfoRequest{} + res, err := queryClient.FoundationInfo(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdMember returns a member of the foundation. +func NewQueryCmdMember() *cobra.Command { + cmd := &cobra.Command{ + Use: "member [address]", + Args: cobra.ExactArgs(1), + Short: "Query a foundation member", + Long: `Query a foundation member +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + address := args[0] + if _, err := sdk.AccAddressFromBech32(address); err != nil { + return err + } + + req := foundation.QueryMemberRequest{Address: address} + res, err := queryClient.Member(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdMembers returns the members of the foundation. +func NewQueryCmdMembers() *cobra.Command { + cmd := &cobra.Command{ + Use: "members", + Args: cobra.NoArgs, + Short: "Query the foundation members", + Long: `Query the foundation members +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + req := foundation.QueryMembersRequest{} + res, err := queryClient.Members(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdProposal returns a proposal baesd on proposal id. +func NewQueryCmdProposal() *cobra.Command { + cmd := &cobra.Command{ + Use: "proposal [proposal-id]", + Args: cobra.ExactArgs(1), + Short: "Query a proposal", + Long: `Query a proposal +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + req := foundation.QueryProposalRequest{ProposalId: proposalID} + res, err := queryClient.Proposal(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdProposals returns all proposals of the foundation. +func NewQueryCmdProposals() *cobra.Command { + cmd := &cobra.Command{ + Use: "proposals", + Args: cobra.NoArgs, + Short: "Query all proposals", + Long: `Query all proposals +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + req := foundation.QueryProposalsRequest{} + res, err := queryClient.Proposals(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdVote returns the vote of a voter on a proposal. +func NewQueryCmdVote() *cobra.Command { + cmd := &cobra.Command{ + Use: "vote [proposal-id] [voter]", + Args: cobra.ExactArgs(2), + Short: "Query the vote of a voter on a proposal", + Long: `Query the vote of a voter on a proposal +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + voter := args[1] + if _, err := sdk.AccAddressFromBech32(voter); err != nil { + return err + } + + req := foundation.QueryVoteRequest{ProposalId: proposalID, Voter: voter} + res, err := queryClient.Vote(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdVotes returns the votes on a proposal. +func NewQueryCmdVotes() *cobra.Command { + cmd := &cobra.Command{ + Use: "votes [proposal-id]", + Args: cobra.ExactArgs(1), + Short: "Query the votes on a proposal", + Long: `Query the votes on a proposal +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + req := foundation.QueryVotesRequest{ProposalId: proposalID} + res, err := queryClient.Votes(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdTallyResult returns the tally of proposal votes. +func NewQueryCmdTallyResult() *cobra.Command { + cmd := &cobra.Command{ + Use: "tally [proposal-id]", + Args: cobra.ExactArgs(1), + Short: "Query the tally of proposal votes", + Long: `Query the tally of proposal votes +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + req := foundation.QueryTallyResultRequest{ProposalId: proposalID} + res, err := queryClient.TallyResult(context.Background(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// NewQueryCmdCensorships returns the query censorships command. +func NewQueryCmdCensorships() *cobra.Command { + cmd := &cobra.Command{ + Use: "censorships", + Short: "Query censorships", + Long: "Gets the current censorships", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + censorships := foundation.QueryCensorshipsRequest{ + Pagination: pageReq, + } + res, err := queryClient.Censorships(context.Background(), &censorships) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "censorships") + + return cmd +} + +// NewQueryCmdGrants returns grants on a grantee +func NewQueryCmdGrants() *cobra.Command { + cmd := &cobra.Command{ + Use: "grants [grantee] [msg-type-url]?", + Short: "Query grants for a grantee and optionally a msg-type-url", + Long: `Query grants for a grantee and optionally a msg-type-url +`, + Args: cobra.RangeArgs(1, 2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := foundation.NewQueryClient(clientCtx) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + grantee, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + msgTypeURL := "" + if len(args) >= 2 { + msgTypeURL = args[1] + } + + params := foundation.QueryGrantsRequest{ + Grantee: grantee.String(), + MsgTypeUrl: msgTypeURL, + Pagination: pageReq, + } + res, err := queryClient.Grants(context.Background(), ¶ms) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "grants") + + return cmd +} diff --git a/x/foundation/client/cli/tx.go b/x/foundation/client/cli/tx.go new file mode 100644 index 0000000000..c52fd7b7ad --- /dev/null +++ b/x/foundation/client/cli/tx.go @@ -0,0 +1,813 @@ +package cli + +import ( + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/spf13/cobra" + + "github.com/Finschia/finschia-sdk/client" + "github.com/Finschia/finschia-sdk/client/flags" + "github.com/Finschia/finschia-sdk/client/tx" + "github.com/Finschia/finschia-sdk/codec" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + govcli "github.com/Finschia/finschia-sdk/x/gov/client/cli" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" +) + +// Proposal flags +const ( + FlagExec = "exec" + ExecTry = "try" +) + +func validateGenerateOnly(cmd *cobra.Command) error { + generateOnly, err := cmd.Flags().GetBool(flags.FlagGenerateOnly) + if err != nil { + return err + } + if !generateOnly { + return fmt.Errorf("you must use it with the flag --%s", flags.FlagGenerateOnly) + } + return nil +} + +func parseMemberRequests(codec codec.Codec, membersJSON string) ([]foundation.MemberRequest, error) { + var cliMembers []json.RawMessage + if err := json.Unmarshal([]byte(membersJSON), &cliMembers); err != nil { + return nil, err + } + + members := make([]foundation.MemberRequest, len(cliMembers)) + for i, cliMember := range cliMembers { + var member foundation.MemberRequest + if err := codec.UnmarshalJSON(cliMember, &member); err != nil { + return nil, err + } + members[i] = member + } + + return members, nil +} + +func parseAddresses(addressesJSON string) ([]string, error) { + var addresses []string + if err := json.Unmarshal([]byte(addressesJSON), &addresses); err != nil { + return nil, err + } + if len(addresses) == 0 { + return nil, fmt.Errorf("you must provide one address at least") + } + + return addresses, nil +} + +func parseDecisionPolicy(codec codec.Codec, policyJSON string) (foundation.DecisionPolicy, error) { + var policy foundation.DecisionPolicy + if err := codec.UnmarshalInterfaceJSON([]byte(policyJSON), &policy); err != nil { + return nil, err + } + + return policy, nil +} + +func parseAuthorization(codec codec.Codec, authorizationJSON string) (foundation.Authorization, error) { + var authorization foundation.Authorization + if err := codec.UnmarshalInterfaceJSON([]byte(authorizationJSON), &authorization); err != nil { + return nil, err + } + + return authorization, nil +} + +func execFromString(execStr string) foundation.Exec { + exec := foundation.Exec_EXEC_UNSPECIFIED + if execStr == ExecTry { + exec = foundation.Exec_EXEC_TRY + } + return exec +} + +func normalizeCensorshipAuthority(option string) string { + prefix := getEnumPrefix(foundation.CensorshipAuthority_name[0]) + candidate := strings.ToUpper(prefix + option) + if _, ok := foundation.CensorshipAuthority_value[candidate]; ok { + return candidate + } + + return option +} + +func getEnumPrefix(str string) string { + delimiter := "_" + splitted := strings.Split(str, delimiter) + return strings.Join(splitted[:len(splitted)-1], delimiter) + delimiter +} + +// VoteOptionFromString returns a VoteOption from a string. It returns an error +// if the string is invalid. +func voteOptionFromString(str string) (foundation.VoteOption, error) { + vo, ok := foundation.VoteOption_value[str] + if !ok { + return foundation.VOTE_OPTION_UNSPECIFIED, fmt.Errorf("'%s' is not a valid vote option", str) + } + return foundation.VoteOption(vo), nil +} + +// CensorshipAuthorityFromString returns a CensorshipAuthority from a string. It returns an error if the string is invalid. +func censorshipAuthorityFromString(str string) (foundation.CensorshipAuthority, error) { + ca, ok := foundation.CensorshipAuthority_value[str] + if !ok { + return foundation.CensorshipAuthorityUnspecified, fmt.Errorf("'%s' is not a valid censorship authority", str) + } + return foundation.CensorshipAuthority(ca), nil +} + +func parseMsgs(cdc codec.Codec, msgsJSON string) ([]sdk.Msg, error) { + var cliMsgs []json.RawMessage + if err := json.Unmarshal([]byte(msgsJSON), &cliMsgs); err != nil { + return nil, err + } + + msgs := make([]sdk.Msg, len(cliMsgs)) + for i, anyJSON := range cliMsgs { + var msg sdk.Msg + err := cdc.UnmarshalInterfaceJSON(anyJSON, &msg) + if err != nil { + return nil, err + } + + msgs[i] = msg + } + + return msgs, nil +} + +// NewTxCmd returns the transaction commands for this module +func NewTxCmd() *cobra.Command { + txCmd := &cobra.Command{ + Use: foundation.ModuleName, + Short: fmt.Sprintf("%s transactions subcommands", foundation.ModuleName), + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand( + NewTxCmdFundTreasury(), + NewTxCmdWithdrawFromTreasury(), + NewTxCmdUpdateMembers(), + NewTxCmdUpdateDecisionPolicy(), + NewTxCmdSubmitProposal(), + NewTxCmdWithdrawProposal(), + NewTxCmdVote(), + NewTxCmdExec(), + NewTxCmdLeaveFoundation(), + NewTxCmdGrant(), + NewTxCmdRevoke(), + ) + + return txCmd +} + +func NewTxCmdFundTreasury() *cobra.Command { + cmd := &cobra.Command{ + Use: "fund-treasury [from] [amount]", + Args: cobra.ExactArgs(2), + Short: "Fund the treasury", + Long: `Fund the treasury +`, + RunE: func(cmd *cobra.Command, args []string) error { + from := args[0] + if err := cmd.Flags().Set(flags.FlagFrom, from); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinsNormalized(args[1]) + if err != nil { + return err + } + + msg := foundation.MsgFundTreasury{ + From: from, + Amount: amount, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdWithdrawFromTreasury() *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-from-treasury [authority] [to] [amount]", + Args: cobra.ExactArgs(3), + Short: "Withdraw coins from the treasury", + Long: `Withdraw coins from the treasury +`, + RunE: func(cmd *cobra.Command, args []string) error { + if err := validateGenerateOnly(cmd); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinsNormalized(args[2]) + if err != nil { + return err + } + + msg := foundation.MsgWithdrawFromTreasury{ + Authority: args[0], + To: args[1], + Amount: amount, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdUpdateMembers() *cobra.Command { + cmd := &cobra.Command{ + Use: "update-members [authority] [members-json]", + Args: cobra.ExactArgs(2), + Short: "Update the foundation members", + Long: `Update the foundation members + +Example of the content of members-json: + +[ + { + "address": "addr1", + "participating": true, + "metadata": "some new metadata" + }, + { + "address": "addr2", + "participating": false, + "metadata": "some metadata" + } +] + +Set a member's participating to false to delete it. +`, + RunE: func(cmd *cobra.Command, args []string) error { + if err := validateGenerateOnly(cmd); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + updates, err := parseMemberRequests(clientCtx.Codec, args[1]) + if err != nil { + return err + } + + msg := foundation.MsgUpdateMembers{ + Authority: args[0], + MemberUpdates: updates, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdUpdateDecisionPolicy() *cobra.Command { + cmd := &cobra.Command{ + Use: "update-decision-policy [authority] [policy-json]", + Args: cobra.ExactArgs(2), + Short: "Update the foundation decision policy", + Long: `Update the foundation decision policy + +Example of the content of policy-json: + +{ + "@type": "/lbm.foundation.v1.ThresholdDecisionPolicy", + "threshold": "10", + "windows": { + "voting_period": "24h", + "min_execution_period": "0s" + } +} +`, + RunE: func(cmd *cobra.Command, args []string) error { + if err := validateGenerateOnly(cmd); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := foundation.MsgUpdateDecisionPolicy{ + Authority: args[0], + } + policy, err := parseDecisionPolicy(clientCtx.Codec, args[1]) + if err != nil { + return err + } + if err := msg.SetDecisionPolicy(policy); err != nil { + return err + } + + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdSubmitProposal() *cobra.Command { + cmd := &cobra.Command{ + Use: "submit-proposal [metadata] [proposers-json] [messages-json]", + Args: cobra.ExactArgs(3), + Short: "Submit a new proposal", + Long: `Submit a new proposal + +Parameters: + metadata: metadata of the proposal. + proposers-json: the addresses of the proposers in json format. + messages-json: messages in json format that will be executed if the proposal is accepted. + +Example of the content of proposers-json: + +[ + "addr1", + "addr2" +] + +Example of the content of messages-json: + +[ + { + "@type": "/lbm.foundation.v1.MsgWithdrawFromTreasury", + "authority": "addr1", + "to": "addr2", + "amount": "10000stake" + } +] +`, + RunE: func(cmd *cobra.Command, args []string) error { + proposers, err := parseAddresses(args[1]) + if err != nil { + return err + } + + signer := proposers[0] + if err := cmd.Flags().Set(flags.FlagFrom, signer); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + messages, err := parseMsgs(clientCtx.Codec, args[2]) + if err != nil { + return err + } + + execStr, err := cmd.Flags().GetString(FlagExec) + if err != nil { + return err + } + exec := execFromString(execStr) + + msg := foundation.MsgSubmitProposal{ + Proposers: proposers, + Metadata: args[0], + Exec: exec, + } + if err := msg.SetMsgs(messages); err != nil { + return err + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + cmd.Flags().String(FlagExec, "", "Set to 'try' to try to execute proposal immediately after creation (proposers signatures are considered as Yes votes)") + + return cmd +} + +func NewTxCmdWithdrawProposal() *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-proposal [proposal-id] [address]", + Args: cobra.ExactArgs(2), + Short: "Withdraw a submitted proposal", + Long: `Withdraw a submitted proposal. + +Parameters: + proposal-id: unique ID of the proposal. + address: one of the proposer of the proposal. +`, + RunE: func(cmd *cobra.Command, args []string) error { + address := args[1] + if err := cmd.Flags().Set(flags.FlagFrom, address); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + msg := foundation.MsgWithdrawProposal{ + ProposalId: proposalID, + Address: address, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdVote() *cobra.Command { + cmd := &cobra.Command{ + Use: "vote [proposal-id] [voter] [option] [metadata]", + Args: cobra.ExactArgs(4), + Short: "Vote on a proposal", + Long: `Vote on a proposal. + +Parameters: + proposal-id: unique ID of the proposal + voter: voter account addresses. + vote-option: choice of the voter(s) + VOTE_OPTION_UNSPECIFIED: no-op + VOTE_OPTION_NO: no + VOTE_OPTION_YES: yes + VOTE_OPTION_ABSTAIN: abstain + VOTE_OPTION_NO_WITH_VETO: no-with-veto + metadata: metadata for the vote +`, + RunE: func(cmd *cobra.Command, args []string) error { + voter := args[1] + if err := cmd.Flags().Set(flags.FlagFrom, voter); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + option, err := voteOptionFromString(args[2]) + if err != nil { + return err + } + + execStr, err := cmd.Flags().GetString(FlagExec) + if err != nil { + return err + } + exec := execFromString(execStr) + + msg := foundation.MsgVote{ + ProposalId: proposalID, + Voter: voter, + Option: option, + Metadata: args[3], + Exec: exec, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + cmd.Flags().String(FlagExec, "", "Set to 'try' to try to execute proposal immediately after voting") + + return cmd +} + +func NewTxCmdExec() *cobra.Command { + cmd := &cobra.Command{ + Use: "exec [proposal-id] [signer]", + Args: cobra.ExactArgs(2), + Short: "Execute a proposal", + RunE: func(cmd *cobra.Command, args []string) error { + signer := args[1] + if err := cmd.Flags().Set(flags.FlagFrom, signer); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + proposalID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + msg := foundation.MsgExec{ + ProposalId: proposalID, + Signer: signer, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdUpdateCensorship() *cobra.Command { + cmd := &cobra.Command{ + Use: "update-censorship [authority] [msg-type-url] [new-authority]", + Args: cobra.ExactArgs(3), + Short: "Update censorship over a message", + Long: `Update censorship over a message + +Parameters: + authority: the current authority of the censorship + msg-type-url: the message type url of the censorship + new-authority: a new authority of the censorship + unspecified: no authority, which means removing the censorship + governance: x/gov + foundation: x/foundation +`, + RunE: func(cmd *cobra.Command, args []string) error { + if err := validateGenerateOnly(cmd); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + newAuthority, err := censorshipAuthorityFromString(normalizeCensorshipAuthority(args[2])) + if err != nil { + return err + } + + msg := foundation.MsgUpdateCensorship{ + Authority: args[0], + Censorship: foundation.Censorship{ + MsgTypeUrl: args[1], + Authority: newAuthority, + }, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdLeaveFoundation() *cobra.Command { + cmd := &cobra.Command{ + Use: "leave-foundation [address]", + Args: cobra.ExactArgs(1), + Short: "Leave the foundation", + RunE: func(cmd *cobra.Command, args []string) error { + address := args[0] + if err := cmd.Flags().Set(flags.FlagFrom, address); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := foundation.MsgLeaveFoundation{ + Address: address, + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdGrant() *cobra.Command { + cmd := &cobra.Command{ + Use: "grant [authority] [grantee] [authorization-json]", + Args: cobra.ExactArgs(3), + Short: "Grant an authorization to grantee", + Long: `Grant an authorization to grantee + +Example of the content of authorization-json: + +{ + "@type": "/lbm.foundation.v1.ReceiveFromTreasuryAuthorization", + "receive_limit": [ + "denom": "stake", + "amount": "10000" + ] +} +`, + RunE: func(cmd *cobra.Command, args []string) error { + if err := validateGenerateOnly(cmd); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := foundation.MsgGrant{ + Authority: args[0], + Grantee: args[1], + } + authorization, err := parseAuthorization(clientCtx.Codec, args[2]) + if err != nil { + return err + } + if err := msg.SetAuthorization(authorization); err != nil { + return err + } + + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func NewTxCmdRevoke() *cobra.Command { + cmd := &cobra.Command{ + Use: "revoke [authority] [grantee] [msg-type-url]", + Args: cobra.ExactArgs(3), + Short: "Revoke an authorization of grantee", + Long: `Revoke an authorization of grantee +`, + RunE: func(cmd *cobra.Command, args []string) error { + if err := validateGenerateOnly(cmd); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := foundation.MsgRevoke{ + Authority: args[0], + Grantee: args[1], + MsgTypeUrl: args[2], + } + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +// NewProposalCmdFoundationExecProposal returns a CLI command handler for +// creating a foundation exec proposal governance transaction. +func NewProposalCmdFoundationExec() *cobra.Command { + cmd := &cobra.Command{ + Use: "foundation-exec [messages-json]", + Args: cobra.ExactArgs(1), + Short: "Submit a foundation exec proposal", + Long: ` +Parameters: + messages-json: messages in json format that will be executed if the proposal is accepted. + +Example of the content of messages-json: + +[ + { + "@type": "/lbm.foundation.v1.MsgUpdateCensorship", + "authority": "addr1", + "censorship": { + "msg_type_url": "/cosmos.staking.v1beta1.MsgCreateValidator", + "authority": "CENSORSHIP_AUTHORITY_UNSPECIFIED" + } + } +] +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + from := clientCtx.GetFromAddress() + + title, err := cmd.Flags().GetString(govcli.FlagTitle) + if err != nil { + return err + } + + description, err := cmd.Flags().GetString(govcli.FlagDescription) + if err != nil { + return err + } + + messages, err := parseMsgs(clientCtx.Codec, args[0]) + if err != nil { + return err + } + + content := foundation.NewFoundationExecProposal(title, description, messages) + + depositStr, err := cmd.Flags().GetString(govcli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositStr) + if err != nil { + return err + } + + msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) + if err != nil { + return err + } + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().String(govcli.FlagTitle, "", "title of proposal") + cmd.Flags().String(govcli.FlagDescription, "", "description of proposal") + cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal") + + return cmd +} diff --git a/x/foundation/client/proposal_handler.go b/x/foundation/client/proposal_handler.go new file mode 100644 index 0000000000..954f9a3aab --- /dev/null +++ b/x/foundation/client/proposal_handler.go @@ -0,0 +1,9 @@ +package client + +import ( + "github.com/Finschia/finschia-sdk/x/foundation/client/cli" + govclient "github.com/Finschia/finschia-sdk/x/gov/client" +) + +// ProposalHandler is the param change proposal handler. +var ProposalHandler = govclient.NewProposalHandler(cli.NewProposalCmdFoundationExec) diff --git a/x/foundation/client/testutil/cli_test.go b/x/foundation/client/testutil/cli_test.go new file mode 100644 index 0000000000..15c377bbb9 --- /dev/null +++ b/x/foundation/client/testutil/cli_test.go @@ -0,0 +1,18 @@ +//go:build norace +// +build norace + +package testutil + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/Finschia/finschia-sdk/testutil/network" +) + +func TestIntegrationTestSuite(t *testing.T) { + cfg := network.DefaultConfig() + cfg.NumValidators = 1 + suite.Run(t, NewIntegrationTestSuite(cfg)) +} diff --git a/x/foundation/client/testutil/grpc.go b/x/foundation/client/testutil/grpc.go new file mode 100644 index 0000000000..7f16e5675f --- /dev/null +++ b/x/foundation/client/testutil/grpc.go @@ -0,0 +1,52 @@ +package testutil + +import ( + "fmt" + + "github.com/gogo/protobuf/proto" + + "github.com/Finschia/finschia-sdk/testutil/rest" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (s *IntegrationTestSuite) TestGRPCParams() { + val := s.network.Validators[0] + + testCases := []struct { + name string + url string + expErr bool + respType proto.Message + expectResp proto.Message + }{ + { + "valid request", + fmt.Sprintf("%s/lbm/foundation/v1/params", val.APIAddress), + false, + &foundation.QueryParamsResponse{}, + &foundation.QueryParamsResponse{ + Params: foundation.Params{ + FoundationTax: sdk.MustNewDecFromStr("0.2"), + }, + }, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + resp, err := rest.GetRequest(tc.url) + s.Require().NoError(err) + + err = s.cfg.Codec.UnmarshalJSON(resp, tc.respType) + + if tc.expErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(tc.expectResp.String(), tc.respType.String()) + } + }) + } +} diff --git a/x/foundation/client/testutil/query.go b/x/foundation/client/testutil/query.go new file mode 100644 index 0000000000..a7d16e38d2 --- /dev/null +++ b/x/foundation/client/testutil/query.go @@ -0,0 +1,605 @@ +package testutil + +import ( + "fmt" + + "github.com/gogo/protobuf/proto" + tmcli "github.com/tendermint/tendermint/libs/cli" + + "github.com/Finschia/finschia-sdk/client/flags" + clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/client/cli" +) + +func (s *IntegrationTestSuite) TestNewQueryCmdParams() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + expected proto.Message + }{ + "valid query": { + []string{}, + true, + &foundation.QueryParamsResponse{ + Params: foundation.Params{ + FoundationTax: sdk.MustNewDecFromStr("0.2"), + }, + }, + }, + "wrong number of args": { + []string{ + "extra", + }, + false, + nil, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdParams() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryParamsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + s.Require().Equal(tc.expected, &actual) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdTreasury() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{}, + true, + }, + "wrong number of args": { + []string{ + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdTreasury() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryTreasuryResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdFoundationInfo() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{}, + true, + }, + "wrong number of args": { + []string{ + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdFoundationInfo() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryFoundationInfoResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdMember() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + expected *foundation.Member + }{ + "valid query": { + []string{ + s.permanentMember.String(), + }, + true, + &foundation.Member{ + Address: s.permanentMember.String(), + Metadata: "permanent member", + }, + }, + "wrong number of args": { + []string{ + s.permanentMember.String(), + "extra", + }, + false, + nil, + }, + "invalid member": { + []string{ + "", + }, + false, + nil, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdMember() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryMemberResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + s.Require().Equal(tc.expected, actual.Member) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdMembers() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{}, + true, + }, + "wrong number of args": { + []string{ + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdMembers() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryMembersResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdProposal() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{ + fmt.Sprintf("%d", s.proposalID), + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprintf("%d", s.proposalID), + "extra", + }, + false, + }, + "invalid id": { + []string{ + fmt.Sprintf("%d", -1), + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdProposal() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryProposalResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdProposals() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{}, + true, + }, + "wrong number of args": { + []string{ + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdProposals() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryProposalsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdVote() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{ + fmt.Sprintf("%d", s.proposalID), + s.permanentMember.String(), + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprintf("%d", s.proposalID), + s.permanentMember.String(), + "extra", + }, + false, + }, + "invalid proposal id": { + []string{ + fmt.Sprintf("%d", -1), + s.permanentMember.String(), + }, + false, + }, + "invalid voter": { + []string{ + fmt.Sprintf("%d", s.proposalID), + "", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdVote() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryVoteResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdVotes() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{ + fmt.Sprintf("%d", s.proposalID), + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprintf("%d", s.proposalID), + "extra", + }, + false, + }, + "invalid proposal id": { + []string{ + fmt.Sprintf("%d", -1), + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdVotes() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryVotesResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdTallyResult() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid query": { + []string{ + fmt.Sprintf("%d", s.proposalID), + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprintf("%d", s.proposalID), + "extra", + }, + false, + }, + "invalid proposal id": { + []string{ + fmt.Sprintf("%d", -1), + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdTallyResult() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryTallyResultResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdCensorships() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + expected int + }{ + "valid query": { + []string{}, + true, + 1, + }, + "wrong number of args": { + []string{ + "extra", + }, + false, + 0, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdCensorships() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryCensorshipsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + s.Require().Len(actual.Censorships, tc.expected) + }) + } +} + +func (s *IntegrationTestSuite) TestNewQueryCmdGrants() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + + testCases := map[string]struct { + args []string + valid bool + expected int + }{ + "valid query": { + []string{ + s.stranger.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + true, + 1, + }, + "no msg type url": { + []string{ + s.stranger.String(), + }, + true, + 1, + }, + "wrong number of args": { + []string{ + s.stranger.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + "extra", + }, + false, + 0, + }, + "invalid grantee": { + []string{ + "", + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + false, + 0, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewQueryCmdGrants() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var actual foundation.QueryGrantsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &actual), out.String()) + s.Require().Equal(tc.expected, len(actual.Authorizations)) + }) + } +} diff --git a/x/foundation/client/testutil/suite.go b/x/foundation/client/testutil/suite.go new file mode 100644 index 0000000000..2e1e9746a9 --- /dev/null +++ b/x/foundation/client/testutil/suite.go @@ -0,0 +1,240 @@ +package testutil + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/stretchr/testify/suite" + + "github.com/Finschia/finschia-sdk/client/flags" + "github.com/Finschia/finschia-sdk/crypto/hd" + "github.com/Finschia/finschia-sdk/crypto/keyring" + clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" + "github.com/Finschia/finschia-sdk/testutil/network" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + bankcli "github.com/Finschia/finschia-sdk/x/bank/client/cli" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/client/cli" +) + +type IntegrationTestSuite struct { + suite.Suite + + cfg network.Config + network *network.Network + + setupHeight int64 + + authority sdk.AccAddress + comingMember sdk.AccAddress + leavingMember sdk.AccAddress + permanentMember sdk.AccAddress + stranger sdk.AccAddress + + proposalID uint64 +} + +var commonArgs = []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)))), +} + +func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { + return &IntegrationTestSuite{cfg: cfg} +} + +func (s *IntegrationTestSuite) SetupSuite() { + s.T().Log("setting up integration test suite") + testdata.RegisterInterfaces(s.cfg.InterfaceRegistry) + + genesisState := s.cfg.GenesisState + + var foundationData foundation.GenesisState + s.Require().NoError(s.cfg.Codec.UnmarshalJSON(genesisState[foundation.ModuleName], &foundationData)) + + // enable foundation tax + params := foundation.Params{ + FoundationTax: sdk.MustNewDecFromStr("0.2"), + } + foundationData.Params = params + + var strangerMnemonic string + strangerMnemonic, s.stranger = s.createMnemonic("stranger") + var leavingMemberMnemonic string + leavingMemberMnemonic, s.leavingMember = s.createMnemonic("leavingmember") + var permanentMemberMnemonic string + permanentMemberMnemonic, s.permanentMember = s.createMnemonic("permanentmember") + + foundationData.Members = []foundation.Member{ + { + Address: s.leavingMember.String(), + Metadata: "leaving member", + }, + { + Address: s.permanentMember.String(), + Metadata: "permanent member", + }, + } + + info := foundation.DefaultFoundation() + info.TotalWeight = sdk.NewDecFromInt(sdk.NewInt(int64(len(foundationData.Members)))) + err := info.SetDecisionPolicy(&foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: 7 * 24 * time.Hour, + }, + }) + s.Require().NoError(err) + foundationData.Foundation = info + + // enable censorship + censorships := []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + } + foundationData.Censorships = censorships + + treasuryReceivers := []sdk.AccAddress{s.stranger, s.leavingMember} + for _, receiver := range treasuryReceivers { + ga := foundation.GrantAuthorization{ + Grantee: receiver.String(), + }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}) + s.Require().NotNil(ga) + foundationData.Authorizations = append(foundationData.Authorizations, *ga) + } + + foundationDataBz, err := s.cfg.Codec.MarshalJSON(&foundationData) + s.Require().NoError(err) + genesisState[foundation.ModuleName] = foundationDataBz + s.cfg.GenesisState = genesisState + + s.network = network.New(s.T(), s.cfg) + + _, err = s.network.WaitForHeight(1) + s.Require().NoError(err) + + var comingMemberMnemonic string + comingMemberMnemonic, s.comingMember = s.createMnemonic("comingmember") + + s.authority = foundation.DefaultAuthority() + s.createAccount("stranger", strangerMnemonic) + s.createAccount("comingmember", comingMemberMnemonic) + s.createAccount("leavingmember", leavingMemberMnemonic) + s.createAccount("permanentmember", permanentMemberMnemonic) + + s.proposalID = s.submitProposal(testdata.NewTestMsg(s.authority), false) + s.vote(s.proposalID, []sdk.AccAddress{s.leavingMember, s.permanentMember}) + s.Require().NoError(s.network.WaitForNextBlock()) + + s.setupHeight, err = s.network.LatestHeight() + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + s.network.Cleanup() +} + +// submit a proposal +func (s *IntegrationTestSuite) submitProposal(msg sdk.Msg, try bool) uint64 { + val := s.network.Validators[0] + + proposers := []string{s.permanentMember.String()} + proposersBz, err := json.Marshal(&proposers) + s.Require().NoError(err) + + args := append([]string{ + "test proposal", + string(proposersBz), + s.msgToString(msg), + }, commonArgs...) + if try { + args = append(args, fmt.Sprintf("--%s=%s", cli.FlagExec, cli.ExecTry)) + } + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cli.NewTxCmdSubmitProposal(), args) + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) + s.Require().Zero(res.Code, out.String()) + + events := res.Logs[0].Events + proposalEvent, _ := sdk.TypedEventToEvent(&foundation.EventSubmitProposal{}) + for _, e := range events { + if e.Type == proposalEvent.Type { + var proposal foundation.Proposal + err := val.ClientCtx.Codec.UnmarshalJSON([]byte(e.Attributes[0].Value), &proposal) + s.Require().NoError(err) + + return proposal.Id + } + } + panic("You cannot reach here") +} + +func (s *IntegrationTestSuite) vote(proposalID uint64, voters []sdk.AccAddress) { + val := s.network.Validators[0] + + for _, voter := range voters { + args := append([]string{ + fmt.Sprint(proposalID), + voter.String(), + foundation.VOTE_OPTION_YES.String(), + "test vote", + }, commonArgs...) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cli.NewTxCmdVote(), args) + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) + s.Require().Zero(res.Code, out.String()) + } +} + +func (s *IntegrationTestSuite) msgToString(msg sdk.Msg) string { + anyJSON, err := s.cfg.Codec.MarshalInterfaceJSON(msg) + s.Require().NoError(err) + + cliMsgs := []json.RawMessage{anyJSON} + msgsBz, err := json.Marshal(cliMsgs) + s.Require().NoError(err) + + return string(msgsBz) +} + +// creates an account +func (s *IntegrationTestSuite) createMnemonic(uid string) (string, sdk.AccAddress) { + cstore := keyring.NewInMemory() + info, mnemonic, err := cstore.NewMnemonic(uid, keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + + return mnemonic, info.GetAddress() +} + +// creates an account and send some coins to it for the future transactions. +func (s *IntegrationTestSuite) createAccount(uid, mnemonic string) { + val := s.network.Validators[0] + info, err := val.ClientCtx.Keyring.NewAccount(uid, mnemonic, keyring.DefaultBIP39Passphrase, sdk.FullFundraiserPath, hd.Secp256k1) + s.Require().NoError(err) + + addr := info.GetAddress() + fee := sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1000))) + args := append([]string{ + val.Address.String(), + addr.String(), + fee.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), + }, commonArgs...) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, bankcli.NewSendTxCmd(), args) + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) + s.Require().Zero(res.Code, out.String()) +} diff --git a/x/foundation/client/testutil/tx.go b/x/foundation/client/testutil/tx.go new file mode 100644 index 0000000000..ccc283cb8c --- /dev/null +++ b/x/foundation/client/testutil/tx.go @@ -0,0 +1,630 @@ +package testutil + +import ( + "fmt" + "time" + + "github.com/Finschia/finschia-sdk/client/flags" + clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + txtypes "github.com/Finschia/finschia-sdk/types/tx" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/client/cli" +) + +func (s *IntegrationTestSuite) TestNewTxCmdFundTreasury() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + val.Address.String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + }, + true, + }, + "wrong number of args": { + []string{ + val.Address.String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdFundTreasury() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + s.Require().Zero(res.Code, out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdWithdrawFromTreasury() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s", flags.FlagGenerateOnly), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.authority.String(), + s.stranger.String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + }, + true, + }, + "wrong number of args": { + []string{ + s.authority.String(), + s.stranger.String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdWithdrawFromTreasury() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res txtypes.Tx + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdUpdateMembers() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s", flags.FlagGenerateOnly), + } + + updates := `[{"address":"%s"}]` + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.authority.String(), + fmt.Sprintf(updates, s.comingMember), + }, + true, + }, + "wrong number of args": { + []string{ + s.authority.String(), + fmt.Sprintf(updates, s.comingMember), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdUpdateMembers() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res txtypes.Tx + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s", flags.FlagGenerateOnly), + } + + doMarshal := func(policy foundation.DecisionPolicy) string { + bz, err := val.ClientCtx.Codec.MarshalInterfaceJSON(policy) + s.Require().NoError(err) + return string(bz) + } + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.authority.String(), + doMarshal(&foundation.ThresholdDecisionPolicy{ + Threshold: sdk.NewDec(10), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }), + }, + true, + }, + "wrong number of args": { + []string{ + s.authority.String(), + doMarshal(&foundation.ThresholdDecisionPolicy{ + Threshold: sdk.NewDec(10), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdUpdateDecisionPolicy() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res txtypes.Tx + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdSubmitProposal() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + } + + proposers := `["%s"]` + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + "test proposal", + fmt.Sprintf(proposers, s.permanentMember), + s.msgToString(testdata.NewTestMsg()), + }, + true, + }, + "wrong number of args": { + []string{ + "test proposal", + fmt.Sprintf(proposers, s.permanentMember), + s.msgToString(testdata.NewTestMsg()), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdSubmitProposal() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + s.Require().Zero(res.Code, out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdWithdrawProposal() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + } + + id := s.submitProposal(testdata.NewTestMsg(s.authority), false) + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + fmt.Sprint(id), + s.permanentMember.String(), + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprint(id), + s.permanentMember.String(), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdWithdrawProposal() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + s.Require().Zero(res.Code, out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdVote() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + } + + id := s.submitProposal(testdata.NewTestMsg(s.authority), false) + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + fmt.Sprint(id), + s.permanentMember.String(), + "VOTE_OPTION_YES", + "test vote", + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprint(id), + s.permanentMember.String(), + "VOTE_OPTION_YES", + "test vote", + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdVote() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + s.Require().Zero(res.Code, out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdExec() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + fmt.Sprintf("%d", s.proposalID), + s.permanentMember.String(), + }, + true, + }, + "wrong number of args": { + []string{ + fmt.Sprintf("%d", s.proposalID), + s.permanentMember.String(), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdExec() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + s.Require().Zero(res.Code, out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s", flags.FlagGenerateOnly), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.authority.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + foundation.CensorshipAuthorityGovernance.String(), + }, + true, + }, + "valid abbreviation": { + []string{ + s.authority.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + "governance", + }, + true, + }, + "wrong number of args": { + []string{ + s.authority.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + foundation.CensorshipAuthorityGovernance.String(), + "extra", + }, + false, + }, + "invalid new authority": { + []string{ + s.authority.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + "invalid-new-authority", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdUpdateCensorship() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res txtypes.Tx + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdLeaveFoundation() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.leavingMember), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.leavingMember.String(), + }, + true, + }, + "wrong number of args": { + []string{ + s.leavingMember.String(), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdLeaveFoundation() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + s.Require().Zero(res.Code, out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdGrant() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s", flags.FlagGenerateOnly), + } + + doMarshal := func(authorization foundation.Authorization) string { + bz, err := val.ClientCtx.Codec.MarshalInterfaceJSON(authorization) + s.Require().NoError(err) + return string(bz) + } + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.authority.String(), + s.comingMember.String(), + doMarshal(&foundation.ReceiveFromTreasuryAuthorization{}), + }, + true, + }, + "wrong number of args": { + []string{ + s.authority.String(), + s.comingMember.String(), + doMarshal(&foundation.ReceiveFromTreasuryAuthorization{}), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdGrant() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res txtypes.Tx + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + }) + } +} + +func (s *IntegrationTestSuite) TestNewTxCmdRevoke() { + val := s.network.Validators[0] + commonArgs := []string{ + fmt.Sprintf("--%s", flags.FlagGenerateOnly), + } + + testCases := map[string]struct { + args []string + valid bool + }{ + "valid transaction": { + []string{ + s.authority.String(), + s.leavingMember.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + true, + }, + "wrong number of args": { + []string{ + s.authority.String(), + s.leavingMember.String(), + foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + "extra", + }, + false, + }, + } + + for name, tc := range testCases { + tc := tc + + s.Run(name, func() { + cmd := cli.NewTxCmdRevoke() + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + var res txtypes.Tx + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) + }) + } +} diff --git a/x/foundation/codec.go b/x/foundation/codec.go new file mode 100644 index 0000000000..2a0b02964c --- /dev/null +++ b/x/foundation/codec.go @@ -0,0 +1,86 @@ +package foundation + +import ( + "github.com/Finschia/finschia-sdk/codec" + "github.com/Finschia/finschia-sdk/codec/legacy" + "github.com/Finschia/finschia-sdk/codec/types" + 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" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" +) + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgFundTreasury{}, "lbm-sdk/MsgFundTreasury") + legacy.RegisterAminoMsg(cdc, &MsgSubmitProposal{}, "lbm-sdk/MsgSubmitProposal") + legacy.RegisterAminoMsg(cdc, &MsgVote{}, "lbm-sdk/MsgVote") + legacy.RegisterAminoMsg(cdc, &MsgExec{}, "lbm-sdk/MsgExec") + legacy.RegisterAminoMsg(cdc, &MsgLeaveFoundation{}, "lbm-sdk/MsgLeaveFoundation") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawProposal{}, "lbm-sdk/MsgWithdrawProposal") + + // proposal from foundation operator + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "lbm-sdk/MsgUpdateParams") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawFromTreasury{}, "lbm-sdk/MsgWithdrawFromTreasury") + legacy.RegisterAminoMsg(cdc, &MsgUpdateMembers{}, "lbm-sdk/MsgUpdateMembers") + legacy.RegisterAminoMsg(cdc, &MsgUpdateDecisionPolicy{}, "lbm-sdk/MsgUpdateDecisionPolicy") + legacy.RegisterAminoMsg(cdc, &MsgUpdateCensorship{}, "lbm-sdk/MsgUpdateCensorship") + legacy.RegisterAminoMsg(cdc, &MsgGrant{}, "lbm-sdk/MsgGrant") + legacy.RegisterAminoMsg(cdc, &MsgRevoke{}, "lbm-sdk/MsgRevoke") + + cdc.RegisterInterface((*Authorization)(nil), nil) + cdc.RegisterInterface((*DecisionPolicy)(nil), nil) + cdc.RegisterConcrete(&ThresholdDecisionPolicy{}, "lbm-sdk/ThresholdDecisionPolicy", nil) + cdc.RegisterConcrete(&PercentageDecisionPolicy{}, "lbm-sdk/PercentageDecisionPolicy", nil) + cdc.RegisterConcrete(&ReceiveFromTreasuryAuthorization{}, "lbm-sdk/ReceiveFromTreasuryAuthorization", nil) + + cdc.RegisterConcrete(&FoundationExecProposal{}, "lbm-sdk/FoundationExecProposal", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgUpdateParams{}, + &MsgFundTreasury{}, + &MsgWithdrawFromTreasury{}, + &MsgUpdateMembers{}, + &MsgUpdateDecisionPolicy{}, + &MsgSubmitProposal{}, + &MsgWithdrawProposal{}, + &MsgVote{}, + &MsgExec{}, + &MsgLeaveFoundation{}, + &MsgUpdateCensorship{}, + &MsgGrant{}, + &MsgRevoke{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + + registry.RegisterInterface( + "lbm.foundation.v1.DecisionPolicy", + (*DecisionPolicy)(nil), + &ThresholdDecisionPolicy{}, + &PercentageDecisionPolicy{}, + &OutsourcingDecisionPolicy{}, + ) + + registry.RegisterImplementations( + (*Authorization)(nil), + &ReceiveFromTreasuryAuthorization{}, + ) + + registry.RegisterImplementations( + (*govtypes.Content)(nil), + &FoundationExecProposal{}, + ) +} + +func init() { + // 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/foundation/codec/cdc.go b/x/foundation/codec/cdc.go new file mode 100644 index 0000000000..7cbd4f6a69 --- /dev/null +++ b/x/foundation/codec/cdc.go @@ -0,0 +1,18 @@ +package codec + +import ( + "github.com/Finschia/finschia-sdk/codec" + cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" + sdk "github.com/Finschia/finschia-sdk/types" +) + +var ( + Amino = codec.NewLegacyAmino() + ModuleCdc = codec.NewAminoCodec(Amino) +) + +func init() { + cryptocodec.RegisterCrypto(Amino) + codec.RegisterEvidences(Amino) + sdk.RegisterLegacyAminoCodec(Amino) +} diff --git a/x/foundation/config.go b/x/foundation/config.go new file mode 100644 index 0000000000..3b73268d66 --- /dev/null +++ b/x/foundation/config.go @@ -0,0 +1,20 @@ +package foundation + +import ( + "time" +) + +// Config is a config struct used for intialising the group module to avoid using globals. +type Config struct { + // MaxExecutionPeriod defines the max duration after a proposal's voting period ends that members can send a MsgExec to execute the proposal. + MaxExecutionPeriod time.Duration + // MaxMetadataLen defines the max length of the metadata bytes field for various entities within the foundation module. Defaults to 255 if not explicitly set. + MaxMetadataLen uint64 +} + +func DefaultConfig() Config { + return Config{ + MaxExecutionPeriod: 2 * 7 * 24 * time.Hour, // two weeks + MaxMetadataLen: 255, + } +} diff --git a/x/foundation/errors.go b/x/foundation/errors.go new file mode 100644 index 0000000000..00e00bff0e --- /dev/null +++ b/x/foundation/errors.go @@ -0,0 +1 @@ +package foundation diff --git a/x/foundation/event.pb.go b/x/foundation/event.pb.go new file mode 100644 index 0000000000..dac1e939b3 --- /dev/null +++ b/x/foundation/event.pb.go @@ -0,0 +1,2556 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/foundation/v1/event.proto + +package foundation + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/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 + +// EventFundTreasury is an event emitted when one funds the treasury. +type EventFundTreasury struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *EventFundTreasury) Reset() { *m = EventFundTreasury{} } +func (m *EventFundTreasury) String() string { return proto.CompactTextString(m) } +func (*EventFundTreasury) ProtoMessage() {} +func (*EventFundTreasury) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{0} +} +func (m *EventFundTreasury) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventFundTreasury) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventFundTreasury.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 *EventFundTreasury) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventFundTreasury.Merge(m, src) +} +func (m *EventFundTreasury) XXX_Size() int { + return m.Size() +} +func (m *EventFundTreasury) XXX_DiscardUnknown() { + xxx_messageInfo_EventFundTreasury.DiscardUnknown(m) +} + +var xxx_messageInfo_EventFundTreasury proto.InternalMessageInfo + +func (m *EventFundTreasury) GetFrom() string { + if m != nil { + return m.From + } + return "" +} + +func (m *EventFundTreasury) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// EventWithdrawFromTreasury is an event emitted when coins are withdrawn from the treasury. +type EventWithdrawFromTreasury struct { + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *EventWithdrawFromTreasury) Reset() { *m = EventWithdrawFromTreasury{} } +func (m *EventWithdrawFromTreasury) String() string { return proto.CompactTextString(m) } +func (*EventWithdrawFromTreasury) ProtoMessage() {} +func (*EventWithdrawFromTreasury) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{1} +} +func (m *EventWithdrawFromTreasury) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventWithdrawFromTreasury) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventWithdrawFromTreasury.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 *EventWithdrawFromTreasury) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventWithdrawFromTreasury.Merge(m, src) +} +func (m *EventWithdrawFromTreasury) XXX_Size() int { + return m.Size() +} +func (m *EventWithdrawFromTreasury) XXX_DiscardUnknown() { + xxx_messageInfo_EventWithdrawFromTreasury.DiscardUnknown(m) +} + +var xxx_messageInfo_EventWithdrawFromTreasury proto.InternalMessageInfo + +func (m *EventWithdrawFromTreasury) GetTo() string { + if m != nil { + return m.To + } + return "" +} + +func (m *EventWithdrawFromTreasury) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// EventUpdateMembers is an event emitted when the members have been updated. +type EventUpdateMembers struct { + MemberUpdates []MemberRequest `protobuf:"bytes,1,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"` +} + +func (m *EventUpdateMembers) Reset() { *m = EventUpdateMembers{} } +func (m *EventUpdateMembers) String() string { return proto.CompactTextString(m) } +func (*EventUpdateMembers) ProtoMessage() {} +func (*EventUpdateMembers) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{2} +} +func (m *EventUpdateMembers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateMembers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateMembers.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 *EventUpdateMembers) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateMembers.Merge(m, src) +} +func (m *EventUpdateMembers) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateMembers) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateMembers.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateMembers proto.InternalMessageInfo + +func (m *EventUpdateMembers) GetMemberUpdates() []MemberRequest { + if m != nil { + return m.MemberUpdates + } + return nil +} + +// EventUpdateDecisionPolicy is an event emitted when the decision policy have been updated. +type EventUpdateDecisionPolicy struct { + DecisionPolicy *types1.Any `protobuf:"bytes,1,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *EventUpdateDecisionPolicy) Reset() { *m = EventUpdateDecisionPolicy{} } +func (m *EventUpdateDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*EventUpdateDecisionPolicy) ProtoMessage() {} +func (*EventUpdateDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{3} +} +func (m *EventUpdateDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateDecisionPolicy.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 *EventUpdateDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateDecisionPolicy.Merge(m, src) +} +func (m *EventUpdateDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateDecisionPolicy proto.InternalMessageInfo + +// EventSubmitProposal is an event emitted when a proposal is created. +type EventSubmitProposal struct { + // proposal is the unique ID of the proposal. + Proposal Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` +} + +func (m *EventSubmitProposal) Reset() { *m = EventSubmitProposal{} } +func (m *EventSubmitProposal) String() string { return proto.CompactTextString(m) } +func (*EventSubmitProposal) ProtoMessage() {} +func (*EventSubmitProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{4} +} +func (m *EventSubmitProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSubmitProposal.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 *EventSubmitProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSubmitProposal.Merge(m, src) +} +func (m *EventSubmitProposal) XXX_Size() int { + return m.Size() +} +func (m *EventSubmitProposal) XXX_DiscardUnknown() { + xxx_messageInfo_EventSubmitProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSubmitProposal proto.InternalMessageInfo + +func (m *EventSubmitProposal) GetProposal() Proposal { + if m != nil { + return m.Proposal + } + return Proposal{} +} + +// EventWithdrawProposal is an event emitted when a proposal is withdrawn. +type EventWithdrawProposal struct { + // proposal_id is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *EventWithdrawProposal) Reset() { *m = EventWithdrawProposal{} } +func (m *EventWithdrawProposal) String() string { return proto.CompactTextString(m) } +func (*EventWithdrawProposal) ProtoMessage() {} +func (*EventWithdrawProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{5} +} +func (m *EventWithdrawProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventWithdrawProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventWithdrawProposal.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 *EventWithdrawProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventWithdrawProposal.Merge(m, src) +} +func (m *EventWithdrawProposal) XXX_Size() int { + return m.Size() +} +func (m *EventWithdrawProposal) XXX_DiscardUnknown() { + xxx_messageInfo_EventWithdrawProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_EventWithdrawProposal proto.InternalMessageInfo + +func (m *EventWithdrawProposal) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +// EventVote is an event emitted when a voter votes on a proposal. +type EventVote struct { + Vote Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"` +} + +func (m *EventVote) Reset() { *m = EventVote{} } +func (m *EventVote) String() string { return proto.CompactTextString(m) } +func (*EventVote) ProtoMessage() {} +func (*EventVote) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{6} +} +func (m *EventVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventVote.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 *EventVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventVote.Merge(m, src) +} +func (m *EventVote) XXX_Size() int { + return m.Size() +} +func (m *EventVote) XXX_DiscardUnknown() { + xxx_messageInfo_EventVote.DiscardUnknown(m) +} + +var xxx_messageInfo_EventVote proto.InternalMessageInfo + +func (m *EventVote) GetVote() Vote { + if m != nil { + return m.Vote + } + return Vote{} +} + +// EventExec is an event emitted when a proposal is executed. +type EventExec struct { + // proposal_id is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // result is the proposal execution result. + Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=lbm.foundation.v1.ProposalExecutorResult" json:"result,omitempty"` + // logs contains error logs in case the execution result is FAILURE. + Logs string `protobuf:"bytes,3,opt,name=logs,proto3" json:"logs,omitempty"` +} + +func (m *EventExec) Reset() { *m = EventExec{} } +func (m *EventExec) String() string { return proto.CompactTextString(m) } +func (*EventExec) ProtoMessage() {} +func (*EventExec) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{7} +} +func (m *EventExec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventExec.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 *EventExec) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventExec.Merge(m, src) +} +func (m *EventExec) XXX_Size() int { + return m.Size() +} +func (m *EventExec) XXX_DiscardUnknown() { + xxx_messageInfo_EventExec.DiscardUnknown(m) +} + +var xxx_messageInfo_EventExec proto.InternalMessageInfo + +func (m *EventExec) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *EventExec) GetResult() ProposalExecutorResult { + if m != nil { + return m.Result + } + return PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED +} + +func (m *EventExec) GetLogs() string { + if m != nil { + return m.Logs + } + return "" +} + +// EventLeaveFoundation is an event emitted when a foundation member leaves the foundation. +type EventLeaveFoundation struct { + // address is the account address of the foundation member. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *EventLeaveFoundation) Reset() { *m = EventLeaveFoundation{} } +func (m *EventLeaveFoundation) String() string { return proto.CompactTextString(m) } +func (*EventLeaveFoundation) ProtoMessage() {} +func (*EventLeaveFoundation) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{8} +} +func (m *EventLeaveFoundation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventLeaveFoundation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventLeaveFoundation.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 *EventLeaveFoundation) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventLeaveFoundation.Merge(m, src) +} +func (m *EventLeaveFoundation) XXX_Size() int { + return m.Size() +} +func (m *EventLeaveFoundation) XXX_DiscardUnknown() { + xxx_messageInfo_EventLeaveFoundation.DiscardUnknown(m) +} + +var xxx_messageInfo_EventLeaveFoundation proto.InternalMessageInfo + +func (m *EventLeaveFoundation) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// EventUpdateCensorship is emitted when a censorship information updated. +type EventUpdateCensorship struct { + Censorship Censorship `protobuf:"bytes,1,opt,name=censorship,proto3" json:"censorship"` +} + +func (m *EventUpdateCensorship) Reset() { *m = EventUpdateCensorship{} } +func (m *EventUpdateCensorship) String() string { return proto.CompactTextString(m) } +func (*EventUpdateCensorship) ProtoMessage() {} +func (*EventUpdateCensorship) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{9} +} +func (m *EventUpdateCensorship) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateCensorship) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateCensorship.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 *EventUpdateCensorship) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateCensorship.Merge(m, src) +} +func (m *EventUpdateCensorship) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateCensorship) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateCensorship.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateCensorship proto.InternalMessageInfo + +func (m *EventUpdateCensorship) GetCensorship() Censorship { + if m != nil { + return m.Censorship + } + return Censorship{} +} + +// EventGrant is emitted on Msg/Grant +type EventGrant struct { + // the address of the grantee. + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + // authorization granted. + Authorization *types1.Any `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` +} + +func (m *EventGrant) Reset() { *m = EventGrant{} } +func (m *EventGrant) String() string { return proto.CompactTextString(m) } +func (*EventGrant) ProtoMessage() {} +func (*EventGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{10} +} +func (m *EventGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventGrant.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 *EventGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGrant.Merge(m, src) +} +func (m *EventGrant) XXX_Size() int { + return m.Size() +} +func (m *EventGrant) XXX_DiscardUnknown() { + xxx_messageInfo_EventGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGrant proto.InternalMessageInfo + +func (m *EventGrant) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *EventGrant) GetAuthorization() *types1.Any { + if m != nil { + return m.Authorization + } + return nil +} + +// EventRevoke is emitted on Msg/Revoke +type EventRevoke struct { + // address of the grantee. + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + // message type url for which an autorization is revoked. + MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` +} + +func (m *EventRevoke) Reset() { *m = EventRevoke{} } +func (m *EventRevoke) String() string { return proto.CompactTextString(m) } +func (*EventRevoke) ProtoMessage() {} +func (*EventRevoke) Descriptor() ([]byte, []int) { + return fileDescriptor_2b66c645bbb34fbc, []int{11} +} +func (m *EventRevoke) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRevoke.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 *EventRevoke) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRevoke.Merge(m, src) +} +func (m *EventRevoke) XXX_Size() int { + return m.Size() +} +func (m *EventRevoke) XXX_DiscardUnknown() { + xxx_messageInfo_EventRevoke.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRevoke proto.InternalMessageInfo + +func (m *EventRevoke) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *EventRevoke) GetMsgTypeUrl() string { + if m != nil { + return m.MsgTypeUrl + } + return "" +} + +func init() { + proto.RegisterType((*EventFundTreasury)(nil), "lbm.foundation.v1.EventFundTreasury") + proto.RegisterType((*EventWithdrawFromTreasury)(nil), "lbm.foundation.v1.EventWithdrawFromTreasury") + proto.RegisterType((*EventUpdateMembers)(nil), "lbm.foundation.v1.EventUpdateMembers") + proto.RegisterType((*EventUpdateDecisionPolicy)(nil), "lbm.foundation.v1.EventUpdateDecisionPolicy") + proto.RegisterType((*EventSubmitProposal)(nil), "lbm.foundation.v1.EventSubmitProposal") + proto.RegisterType((*EventWithdrawProposal)(nil), "lbm.foundation.v1.EventWithdrawProposal") + proto.RegisterType((*EventVote)(nil), "lbm.foundation.v1.EventVote") + proto.RegisterType((*EventExec)(nil), "lbm.foundation.v1.EventExec") + proto.RegisterType((*EventLeaveFoundation)(nil), "lbm.foundation.v1.EventLeaveFoundation") + proto.RegisterType((*EventUpdateCensorship)(nil), "lbm.foundation.v1.EventUpdateCensorship") + proto.RegisterType((*EventGrant)(nil), "lbm.foundation.v1.EventGrant") + proto.RegisterType((*EventRevoke)(nil), "lbm.foundation.v1.EventRevoke") +} + +func init() { proto.RegisterFile("lbm/foundation/v1/event.proto", fileDescriptor_2b66c645bbb34fbc) } + +var fileDescriptor_2b66c645bbb34fbc = []byte{ + // 745 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6f, 0xd3, 0x4a, + 0x10, 0xc7, 0xe3, 0x36, 0xea, 0x7b, 0xdd, 0xbc, 0xe6, 0xa9, 0x26, 0x88, 0xb4, 0xa8, 0x49, 0xe4, + 0x53, 0x90, 0x88, 0x4d, 0xc2, 0x05, 0x81, 0x00, 0x25, 0xa5, 0xa9, 0x40, 0x54, 0x2a, 0x6e, 0x0b, + 0x12, 0x42, 0x8a, 0xfc, 0x63, 0xe3, 0xac, 0x6a, 0x7b, 0xcc, 0xee, 0x3a, 0x34, 0x70, 0xe4, 0xc2, + 0x91, 0x3f, 0x81, 0x13, 0x87, 0x9e, 0x7b, 0xe5, 0x5e, 0xf5, 0x54, 0x71, 0xe2, 0x04, 0xa8, 0xfd, + 0x47, 0x90, 0xd7, 0x9b, 0x34, 0x51, 0x0b, 0x11, 0x1c, 0x38, 0x65, 0x66, 0x77, 0xe6, 0x3b, 0x9f, + 0x99, 0xcc, 0x1a, 0xad, 0xf8, 0x76, 0x60, 0x74, 0x21, 0x0e, 0x5d, 0x8b, 0x13, 0x08, 0x8d, 0x7e, + 0xdd, 0xc0, 0x7d, 0x1c, 0x72, 0x3d, 0xa2, 0xc0, 0x41, 0x5d, 0xf4, 0xed, 0x40, 0x3f, 0xbb, 0xd6, + 0xfb, 0xf5, 0xe5, 0x82, 0x07, 0x1e, 0x88, 0x5b, 0x23, 0xb1, 0xd2, 0xc0, 0xe5, 0x25, 0x0f, 0xc0, + 0xf3, 0xb1, 0x21, 0x3c, 0x3b, 0xee, 0x1a, 0x56, 0x38, 0x18, 0x5e, 0x39, 0xc0, 0x02, 0x60, 0x9d, + 0x34, 0x27, 0x75, 0xe4, 0x55, 0x29, 0xf5, 0x0c, 0xdb, 0x62, 0xd8, 0xe8, 0xd7, 0x6d, 0xcc, 0xad, + 0xba, 0xe1, 0x00, 0x09, 0xe5, 0xbd, 0x76, 0x9e, 0x6e, 0x0c, 0x46, 0xc4, 0x68, 0x1f, 0x15, 0xb4, + 0xb8, 0x96, 0x20, 0xb7, 0xe3, 0xd0, 0xdd, 0xa6, 0xd8, 0x62, 0x31, 0x1d, 0xa8, 0xd7, 0x51, 0xb6, + 0x4b, 0x21, 0x28, 0x2a, 0x15, 0xa5, 0x3a, 0xdf, 0x2a, 0x7e, 0x3e, 0xa8, 0x15, 0x64, 0xe5, 0xa6, + 0xeb, 0x52, 0xcc, 0xd8, 0x16, 0xa7, 0x24, 0xf4, 0x4c, 0x11, 0xa5, 0x3a, 0x68, 0xce, 0x0a, 0x20, + 0x0e, 0x79, 0x71, 0xa6, 0x32, 0x5b, 0xcd, 0x35, 0x96, 0x74, 0x19, 0x9c, 0x80, 0xe9, 0x12, 0x4c, + 0x5f, 0x05, 0x12, 0xb6, 0x6e, 0x1c, 0x7e, 0x2d, 0x67, 0xf6, 0xbf, 0x95, 0xab, 0x1e, 0xe1, 0xbd, + 0xd8, 0xd6, 0x1d, 0x08, 0x64, 0x4f, 0xf2, 0xa7, 0xc6, 0xdc, 0x5d, 0x83, 0x0f, 0x22, 0xcc, 0x44, + 0x02, 0x33, 0xa5, 0xb4, 0xb6, 0xaf, 0xa0, 0x25, 0x01, 0xfa, 0x8c, 0xf0, 0x9e, 0x4b, 0xad, 0x57, + 0x6d, 0x0a, 0xc1, 0x08, 0xb8, 0x8a, 0x66, 0x38, 0x4c, 0xc5, 0x9d, 0xe1, 0xf0, 0x77, 0x60, 0x1d, + 0xa4, 0x0a, 0xd6, 0x9d, 0xc8, 0xb5, 0x38, 0xde, 0xc0, 0x81, 0x8d, 0x29, 0x53, 0x37, 0x50, 0x3e, + 0x10, 0x66, 0x27, 0x16, 0xe7, 0xac, 0xa8, 0x08, 0x84, 0x8a, 0x7e, 0x6e, 0x4f, 0xf4, 0x34, 0xc7, + 0xc4, 0x2f, 0x63, 0xcc, 0x78, 0x2b, 0x9b, 0x90, 0x98, 0x0b, 0x69, 0x76, 0x2a, 0xca, 0x34, 0x2e, + 0x07, 0x92, 0xfa, 0x0f, 0xb0, 0x43, 0x18, 0x81, 0x70, 0x13, 0x7c, 0xe2, 0x0c, 0xd4, 0x27, 0xe8, + 0x7f, 0x57, 0x9e, 0x74, 0x22, 0x71, 0x24, 0xa6, 0x93, 0x6b, 0x14, 0xf4, 0x74, 0xd7, 0xf4, 0xe1, + 0xae, 0xe9, 0xcd, 0x70, 0xd0, 0x52, 0x8f, 0x0e, 0x6a, 0xf9, 0x49, 0x09, 0x33, 0xef, 0x4e, 0xf8, + 0xb7, 0xb3, 0xef, 0x3e, 0x94, 0x33, 0xda, 0x36, 0xba, 0x24, 0xaa, 0x6e, 0xc5, 0x76, 0x40, 0xf8, + 0x26, 0x85, 0x08, 0x98, 0xe5, 0xab, 0x77, 0xd1, 0xbf, 0x91, 0xb4, 0x65, 0xa1, 0xab, 0x17, 0x74, + 0x35, 0x0c, 0x97, 0x0d, 0x8d, 0x52, 0xb4, 0x5b, 0xe8, 0xf2, 0xc4, 0x9f, 0x3b, 0xd2, 0x2d, 0xa3, + 0xdc, 0x30, 0xa8, 0x43, 0x5c, 0x21, 0x9d, 0x35, 0xd1, 0xf0, 0xe8, 0xa1, 0xab, 0xdd, 0x43, 0xf3, + 0x22, 0xf3, 0x29, 0x70, 0xac, 0xd6, 0x51, 0xb6, 0x0f, 0x1c, 0x4b, 0x82, 0x2b, 0x17, 0x10, 0x24, + 0x61, 0xb2, 0xba, 0x08, 0xd5, 0xde, 0x2a, 0x52, 0x60, 0x6d, 0x0f, 0x3b, 0x53, 0xcb, 0xa9, 0x4d, + 0x34, 0x47, 0x31, 0x8b, 0xfd, 0x64, 0x7d, 0x94, 0x6a, 0xbe, 0x71, 0xed, 0x17, 0x5d, 0x26, 0x8a, + 0x31, 0x07, 0x6a, 0x8a, 0x04, 0x53, 0x26, 0xaa, 0x2a, 0xca, 0xfa, 0xe0, 0xb1, 0xe2, 0x6c, 0xb2, + 0xad, 0xa6, 0xb0, 0xb5, 0x47, 0xa8, 0x20, 0x20, 0x1e, 0x63, 0xab, 0x8f, 0xdb, 0x23, 0x35, 0xb5, + 0x81, 0xfe, 0xb1, 0xd2, 0x15, 0x9e, 0xba, 0xdc, 0xc3, 0x40, 0xed, 0x85, 0x9c, 0x65, 0xba, 0x17, + 0xab, 0x38, 0x64, 0x40, 0x59, 0x8f, 0x44, 0xea, 0x2a, 0x42, 0xce, 0xc8, 0x93, 0x33, 0x5a, 0xb9, + 0x80, 0xff, 0x2c, 0x45, 0x4e, 0x6a, 0x2c, 0x4d, 0xfb, 0xa4, 0x20, 0x24, 0xe4, 0xd7, 0xa9, 0x15, + 0xf2, 0x04, 0xd0, 0x4b, 0x0c, 0x8c, 0xa7, 0x03, 0xca, 0x40, 0xf5, 0x0d, 0x5a, 0xb0, 0x62, 0xde, + 0x03, 0x4a, 0x5e, 0x8b, 0x9a, 0x62, 0x94, 0x3f, 0xdb, 0xcc, 0xfb, 0x47, 0x07, 0xb5, 0x3b, 0x63, + 0x0f, 0xb0, 0x4d, 0x42, 0xe6, 0xf4, 0x88, 0x65, 0x74, 0xa5, 0x21, 0x1e, 0xe1, 0xde, 0xf8, 0x97, + 0xad, 0x39, 0x2e, 0x6e, 0x4e, 0xd6, 0xd2, 0x1c, 0x94, 0x13, 0xf8, 0x26, 0xee, 0xc3, 0x2e, 0xfe, + 0x23, 0xfe, 0x0a, 0xfa, 0x2f, 0x60, 0x5e, 0x27, 0x79, 0xf8, 0x9d, 0x98, 0xfa, 0x02, 0x7f, 0xde, + 0x44, 0x01, 0xf3, 0xb6, 0x07, 0x11, 0xde, 0xa1, 0x7e, 0x6b, 0xfd, 0xf0, 0xa4, 0xa4, 0x1c, 0x9f, + 0x94, 0x94, 0xef, 0x27, 0x25, 0xe5, 0xfd, 0x69, 0x29, 0x73, 0x7c, 0x5a, 0xca, 0x7c, 0x39, 0x2d, + 0x65, 0x9e, 0xd7, 0x7e, 0xab, 0x15, 0x7b, 0x4e, 0xcc, 0xe2, 0xe6, 0x8f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x1b, 0x87, 0xaf, 0xdb, 0x69, 0x06, 0x00, 0x00, +} + +func (m *EventFundTreasury) 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 *EventFundTreasury) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventFundTreasury) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintEvent(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventWithdrawFromTreasury) 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 *EventWithdrawFromTreasury) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventWithdrawFromTreasury) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintEvent(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateMembers) 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 *EventUpdateMembers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateMembers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MemberUpdates) > 0 { + for iNdEx := len(m.MemberUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MemberUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateDecisionPolicy) 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 *EventUpdateDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSubmitProposal) 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 *EventSubmitProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventWithdrawProposal) 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 *EventWithdrawProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventWithdrawProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventVote) 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 *EventVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventExec) 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 *EventExec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Logs) > 0 { + i -= len(m.Logs) + copy(dAtA[i:], m.Logs) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Logs))) + i-- + dAtA[i] = 0x1a + } + if m.Result != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x10 + } + if m.ProposalId != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventLeaveFoundation) 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 *EventLeaveFoundation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventLeaveFoundation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateCensorship) 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 *EventUpdateCensorship) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateCensorship) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Censorship.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventGrant) 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 *EventGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Authorization != nil { + { + size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventRevoke) 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 *EventRevoke) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintEvent(dAtA, i, uint64(len(m.MsgTypeUrl))) + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + 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 *EventFundTreasury) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovEvent(uint64(l)) + } + } + return n +} + +func (m *EventWithdrawFromTreasury) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.To) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovEvent(uint64(l)) + } + } + return n +} + +func (m *EventUpdateMembers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MemberUpdates) > 0 { + for _, e := range m.MemberUpdates { + l = e.Size() + n += 1 + l + sovEvent(uint64(l)) + } + } + return n +} + +func (m *EventUpdateDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventSubmitProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Proposal.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventWithdrawProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovEvent(uint64(m.ProposalId)) + } + return n +} + +func (m *EventVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Vote.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventExec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovEvent(uint64(m.ProposalId)) + } + if m.Result != 0 { + n += 1 + sovEvent(uint64(m.Result)) + } + l = len(m.Logs) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventLeaveFoundation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventUpdateCensorship) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Censorship.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.Authorization != nil { + l = m.Authorization.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventRevoke) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.MsgTypeUrl) + 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 *EventFundTreasury) 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: EventFundTreasury: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventFundTreasury: 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 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.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventWithdrawFromTreasury) 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: EventWithdrawFromTreasury: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventWithdrawFromTreasury: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", 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.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventUpdateMembers) 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: EventUpdateMembers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateMembers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemberUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MemberUpdates = append(m.MemberUpdates, MemberRequest{}) + if err := m.MemberUpdates[len(m.MemberUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventUpdateDecisionPolicy) 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: EventUpdateDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types1.Any{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventSubmitProposal) 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: EventSubmitProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSubmitProposal: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventWithdrawProposal) 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: EventWithdrawProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= 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 *EventVote) 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: EventVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventExec) 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: EventExec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventExec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + m.Result = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= ProposalExecutorResult(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", 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.Logs = 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 *EventLeaveFoundation) 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: EventLeaveFoundation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventLeaveFoundation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Address = 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 *EventUpdateCensorship) 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: EventUpdateCensorship: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateCensorship: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Censorship", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Censorship.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventGrant) 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: EventGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Authorization == nil { + m.Authorization = &types1.Any{} + } + if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *EventRevoke) 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: EventRevoke: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRevoke: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = 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/foundation/events.go b/x/foundation/events.go new file mode 100644 index 0000000000..88ab67fd65 --- /dev/null +++ b/x/foundation/events.go @@ -0,0 +1,40 @@ +package foundation + +import ( + "github.com/gogo/protobuf/proto" + + codectypes "github.com/Finschia/finschia-sdk/codec/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" +) + +func (m EventUpdateDecisionPolicy) GetDecisionPolicy() DecisionPolicy { + if m.DecisionPolicy == nil { + return nil + } + + policy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return policy +} + +func (m *EventUpdateDecisionPolicy) SetDecisionPolicy(policy DecisionPolicy) error { + event, ok := policy.(proto.Message) + if !ok { + return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", event) + } + + any, err := codectypes.NewAnyWithValue(event) + if err != nil { + return err + } + m.DecisionPolicy = any + + return nil +} + +func (m EventUpdateDecisionPolicy) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var policy DecisionPolicy + return unpacker.UnpackAny(m.DecisionPolicy, &policy) +} diff --git a/x/foundation/expected_keepers.go b/x/foundation/expected_keepers.go new file mode 100644 index 0000000000..baab36376b --- /dev/null +++ b/x/foundation/expected_keepers.go @@ -0,0 +1,23 @@ +package foundation + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" +) + +type ( + // AuthKeeper defines the auth module interface contract needed by the + // foundation module. + AuthKeeper interface { + GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI + } + + // BankKeeper defines the bank module interface contract needed by the + // foundation module. + BankKeeper interface { + GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + } +) diff --git a/x/foundation/foundation.go b/x/foundation/foundation.go new file mode 100644 index 0000000000..4eb6013152 --- /dev/null +++ b/x/foundation/foundation.go @@ -0,0 +1,553 @@ +package foundation + +import ( + "fmt" + "time" + + "github.com/gogo/protobuf/proto" + + "github.com/Finschia/finschia-sdk/codec" + codectypes "github.com/Finschia/finschia-sdk/codec/types" + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + paramtypes "github.com/Finschia/finschia-sdk/x/params/types" +) + +func validateProposers(proposers []string) error { + if len(proposers) == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("no proposers") + } + + addrs := map[string]bool{} + for _, proposer := range proposers { + if addrs[proposer] { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicated proposer: %s", proposer) + } + addrs[proposer] = true + + if _, err := sdk.AccAddressFromBech32(proposer); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid proposer address: %s", proposer) + } + } + + return nil +} + +func validateMsgs(msgs []sdk.Msg) error { + if len(msgs) == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("no msgs") + } + + for i, msg := range msgs { + if err := msg.ValidateBasic(); err != nil { + return sdkerrors.Wrapf(err, "msg %d", i) + } + } + + return nil +} + +func validateVoteOption(option VoteOption) error { + if option == VOTE_OPTION_UNSPECIFIED { + return sdkerrors.ErrInvalidRequest.Wrap("empty vote option") + } + if _, ok := VoteOption_name[int32(option)]; !ok { + return sdkerrors.ErrInvalidRequest.Wrap("invalid vote option") + } + + return nil +} + +func (c Censorship) ValidateBasic() error { + url := c.MsgTypeUrl + if len(url) == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("empty msg type url") + } + + authority := c.Authority + if _, found := CensorshipAuthority_name[int32(authority)]; !found { + return sdkerrors.ErrInvalidRequest.Wrapf("censorship authority %s over %s", authority, url) + } + + return nil +} + +func (p Params) ValidateBasic() error { + if err := validateRatio(p.FoundationTax, ParamKeyFoundationTax); err != nil { + return err + } + + return nil +} + +// ParamSetPairs implements params.ParamSet +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(ParamKeyFoundationTax), &p.FoundationTax, func(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return sdkerrors.Wrap(sdkerrors.ErrInvalidType.Wrapf("%T", i), ParamKeyFoundationTax) + } + + return validateRatio(v, ParamKeyFoundationTax) + }), + } +} + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (m Member) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", m.Address) + } + + return nil +} + +// ValidateBasic performs stateless validation on a member. +func (m MemberRequest) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", m.Address) + } + + return nil +} + +type DecisionPolicyResult struct { + Allow bool + Final bool +} + +type DecisionPolicy interface { + codec.ProtoMarshaler + + // GetVotingPeriod returns the duration after proposal submission where + // votes are accepted. + GetVotingPeriod() time.Duration + // Allow defines policy-specific logic to allow a proposal to pass or not, + // based on its tally result, the foundation's total power and the time since + // the proposal was submitted. + Allow(tallyResult TallyResult, totalPower sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) + + ValidateBasic() error + Validate(info FoundationInfo, config Config) error +} + +// DefaultTallyResult returns a TallyResult with all counts set to 0. +func DefaultTallyResult() TallyResult { + return NewTallyResult(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) +} + +func NewTallyResult(yes, abstain, no, veto sdk.Dec) TallyResult { + return TallyResult{ + YesCount: yes, + AbstainCount: abstain, + NoCount: no, + NoWithVetoCount: veto, + } +} + +func (t *TallyResult) Add(option VoteOption) error { + weight := sdk.OneDec() + + switch option { + case VOTE_OPTION_YES: + t.YesCount = t.YesCount.Add(weight) + case VOTE_OPTION_NO: + t.NoCount = t.NoCount.Add(weight) + case VOTE_OPTION_ABSTAIN: + t.AbstainCount = t.AbstainCount.Add(weight) + case VOTE_OPTION_NO_WITH_VETO: + t.NoWithVetoCount = t.NoWithVetoCount.Add(weight) + default: + return sdkerrors.ErrInvalidRequest.Wrapf("unknown vote option %s", option) + } + + return nil +} + +// TotalCounts is the sum of all weights. +func (t TallyResult) TotalCounts() sdk.Dec { + totalCounts := sdk.ZeroDec() + + totalCounts = totalCounts.Add(t.YesCount) + totalCounts = totalCounts.Add(t.NoCount) + totalCounts = totalCounts.Add(t.AbstainCount) + totalCounts = totalCounts.Add(t.NoWithVetoCount) + + return totalCounts +} + +var _ codectypes.UnpackInterfacesMessage = (*Proposal)(nil) + +func (p Proposal) ValidateBasic() error { + if p.Id == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("id must be > 0") + } + if p.FoundationVersion == 0 { + return sdkerrors.ErrInvalidVersion.Wrap("foundation version must be > 0") + } + if err := validateProposers(p.Proposers); err != nil { + return err + } + if err := validateMsgs(p.GetMsgs()); err != nil { + return err + } + return nil +} + +func (p *Proposal) GetMsgs() []sdk.Msg { + msgs, err := GetMsgs(p.Messages, "proposal") + if err != nil { + panic(err) + } + return msgs +} + +func (p *Proposal) SetMsgs(msgs []sdk.Msg) error { + anys, err := SetMsgs(msgs) + if err != nil { + return err + } + p.Messages = anys + return nil +} + +// for the tests +func (p Proposal) WithMsgs(msgs []sdk.Msg) *Proposal { + proposal := p + if err := proposal.SetMsgs(msgs); err != nil { + return nil + } + return &proposal +} + +func (p Proposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return UnpackInterfaces(unpacker, p.Messages) +} + +// UnpackInterfaces unpacks Any's to sdk.Msg's. +func UnpackInterfaces(unpacker codectypes.AnyUnpacker, anys []*codectypes.Any) error { + for _, any := range anys { + var msg sdk.Msg + err := unpacker.UnpackAny(any, &msg) + if err != nil { + return err + } + } + + return nil +} + +// GetMsgs takes a slice of Any's and turn them into sdk.Msg's. +func GetMsgs(anys []*codectypes.Any, name string) ([]sdk.Msg, error) { + msgs := make([]sdk.Msg, len(anys)) + for i, any := range anys { + cached := any.GetCachedValue() + if cached == nil { + return nil, fmt.Errorf("any cached value is nil, %s messages must be correctly packed any values", name) + } + msgs[i] = cached.(sdk.Msg) + } + return msgs, nil +} + +// SetMsgs takes a slice of sdk.Msg's and turn them into Any's. +func SetMsgs(msgs []sdk.Msg) ([]*codectypes.Any, error) { + anys := make([]*codectypes.Any, len(msgs)) + for i, msg := range msgs { + var err error + anys[i], err = codectypes.NewAnyWithValue(msg) + if err != nil { + return nil, err + } + } + return anys, nil +} + +func validateDecisionPolicyWindows(windows DecisionPolicyWindows, config Config) error { + if windows.MinExecutionPeriod >= windows.VotingPeriod+config.MaxExecutionPeriod { + return sdkerrors.ErrInvalidRequest.Wrap("min_execution_period should be smaller than voting_period + max_execution_period") + } + return nil +} + +func validateDecisionPolicyWindowsBasic(windows *DecisionPolicyWindows) error { + if windows == nil || windows.VotingPeriod == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("voting period cannot be zero") + } + + return nil +} + +var _ DecisionPolicy = (*ThresholdDecisionPolicy)(nil) + +func (p ThresholdDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { + if sinceSubmission < p.Windows.MinExecutionPeriod { + return nil, sdkerrors.ErrUnauthorized.Wrapf("must wait %s after submission before execution, currently at %s", p.Windows.MinExecutionPeriod, sinceSubmission) + } + + // the real threshold of the policy is `min(threshold,total_weight)`. If + // the foundation member weights changes (member leaving, member weight update) + // and the threshold doesn't, we can end up with threshold > total_weight. + // In this case, as long as everyone votes yes (in which case + // `yesCount`==`realThreshold`), then the proposal still passes. + realThreshold := sdk.MinDec(p.Threshold, totalWeight) + if result.YesCount.GTE(realThreshold) { + return &DecisionPolicyResult{Allow: true, Final: true}, nil + } + + totalCounts := result.TotalCounts() + undecided := totalWeight.Sub(totalCounts) + + // maxYesCount is the max potential number of yes count, i.e the current yes count + // plus all undecided count (supposing they all vote yes). + maxYesCount := result.YesCount.Add(undecided) + if maxYesCount.LT(realThreshold) { + return &DecisionPolicyResult{Final: true}, nil + } + + return &DecisionPolicyResult{}, nil +} + +func (p ThresholdDecisionPolicy) GetVotingPeriod() time.Duration { + return p.Windows.VotingPeriod +} + +func (p ThresholdDecisionPolicy) ValidateBasic() error { + if p.Threshold.IsNil() || !p.Threshold.IsPositive() { + return sdkerrors.ErrInvalidRequest.Wrap("threshold must be a positive number") + } + + if err := validateDecisionPolicyWindowsBasic(p.Windows); err != nil { + return err + } + return nil +} + +func (p ThresholdDecisionPolicy) Validate(info FoundationInfo, config Config) error { + if !info.TotalWeight.IsPositive() { + return sdkerrors.ErrInvalidRequest.Wrapf("total weight must be positive") + } + + if err := validateDecisionPolicyWindows(*p.Windows, config); err != nil { + return err + } + + return nil +} + +var _ DecisionPolicy = (*PercentageDecisionPolicy)(nil) + +func (p PercentageDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { + if sinceSubmission < p.Windows.MinExecutionPeriod { + return nil, sdkerrors.ErrUnauthorized.Wrapf("must wait %s after submission before execution, currently at %s", p.Windows.MinExecutionPeriod, sinceSubmission) + } + + notAbstaining := totalWeight.Sub(result.AbstainCount) + // If no one votes (everyone abstains), proposal fails + if notAbstaining.IsZero() { + return &DecisionPolicyResult{Final: true}, nil + } + + yesPercentage := result.YesCount.Quo(notAbstaining) + if yesPercentage.GTE(p.Percentage) { + return &DecisionPolicyResult{Allow: true, Final: true}, nil + } + + totalCounts := result.TotalCounts() + undecided := totalWeight.Sub(totalCounts) + maxYesCount := result.YesCount.Add(undecided) + maxYesPercentage := maxYesCount.Quo(notAbstaining) + if maxYesPercentage.LT(p.Percentage) { + return &DecisionPolicyResult{Final: true}, nil + } + + return &DecisionPolicyResult{}, nil +} + +func (p PercentageDecisionPolicy) GetVotingPeriod() time.Duration { + return p.Windows.VotingPeriod +} + +func (p PercentageDecisionPolicy) ValidateBasic() error { + if err := validateDecisionPolicyWindowsBasic(p.Windows); err != nil { + return err + } + + if err := validateRatio(p.Percentage, "percentage"); err != nil { + return err + } + + return nil +} + +func (p PercentageDecisionPolicy) Validate(info FoundationInfo, config Config) error { + // total weight must be positive, because the admin is group policy + // (in x/group words) + if !info.TotalWeight.IsPositive() { + return sdkerrors.ErrInvalidRequest.Wrapf("total weight must be positive") + } + + if err := validateDecisionPolicyWindows(*p.Windows, config); err != nil { + return err + } + + return nil +} + +func validateRatio(ratio sdk.Dec, name string) error { + if ratio.IsNil() { + return sdkerrors.ErrInvalidRequest.Wrapf("%s is nil", name) + } + + if ratio.GT(sdk.OneDec()) || ratio.IsNegative() { + return sdkerrors.ErrInvalidRequest.Wrapf("%s must be >= 0 and <= 1", name) + } + return nil +} + +var _ DecisionPolicy = (*OutsourcingDecisionPolicy)(nil) + +func (p OutsourcingDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { + return nil, sdkerrors.ErrInvalidRequest.Wrap(p.Description) +} + +func (p OutsourcingDecisionPolicy) GetVotingPeriod() time.Duration { + return 0 +} + +func (p OutsourcingDecisionPolicy) ValidateBasic() error { + return nil +} + +func (p OutsourcingDecisionPolicy) Validate(info FoundationInfo, config Config) error { + return sdkerrors.ErrInvalidRequest.Wrap(p.Description) +} + +var _ codectypes.UnpackInterfacesMessage = (*FoundationInfo)(nil) + +func (i FoundationInfo) GetDecisionPolicy() DecisionPolicy { + if i.DecisionPolicy == nil { + return nil + } + + policy, ok := i.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return policy +} + +func (i *FoundationInfo) SetDecisionPolicy(policy DecisionPolicy) error { + msg, ok := policy.(proto.Message) + if !ok { + return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) + } + + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return err + } + i.DecisionPolicy = any + + return nil +} + +// for the tests +func (i FoundationInfo) WithDecisionPolicy(policy DecisionPolicy) *FoundationInfo { + info := i + if err := info.SetDecisionPolicy(policy); err != nil { + return nil + } + return &info +} + +func (i *FoundationInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var policy DecisionPolicy + return unpacker.UnpackAny(i.DecisionPolicy, &policy) +} + +func GetAuthorization(any *codectypes.Any, name string) (Authorization, error) { + cached := any.GetCachedValue() + if cached == nil { + return nil, fmt.Errorf("any cached value is nil, %s authorization must be correctly packed any values", name) + } + + a, ok := cached.(Authorization) + if !ok { + return nil, sdkerrors.ErrInvalidType.Wrapf("can't proto unmarshal %T", a) + } + return a, nil +} + +func SetAuthorization(a Authorization) (*codectypes.Any, error) { + msg, ok := a.(proto.Message) + if !ok { + return nil, sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) + } + + any, err := codectypes.NewAnyWithValue(a) + if err != nil { + return nil, err + } + return any, nil +} + +func (p Pool) ValidateBasic() error { + if err := p.Treasury.Validate(); err != nil { + return err + } + + return nil +} + +// Members defines a repeated slice of Member objects. +type Members struct { + Members []Member +} + +// ValidateBasic performs stateless validation on an array of members. On top +// of validating each member individually, it also makes sure there are no +// duplicate addresses. +func (ms Members) ValidateBasic() error { + index := make(map[string]struct{}, len(ms.Members)) + for i := range ms.Members { + member := ms.Members[i] + if err := member.ValidateBasic(); err != nil { + return err + } + addr := member.Address + if _, exists := index[addr]; exists { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicated address: %s", member.Address) + } + index[addr] = struct{}{} + } + return nil +} + +// MemberRequests defines a repeated slice of MemberRequest objects. +type MemberRequests struct { + Members []MemberRequest +} + +// ValidateBasic performs stateless validation on an array of members. On top +// of validating each member individually, it also makes sure there are no +// duplicate addresses. +func (ms MemberRequests) ValidateBasic() error { + index := make(map[string]struct{}, len(ms.Members)) + for i := range ms.Members { + member := ms.Members[i] + if err := member.ValidateBasic(); err != nil { + return err + } + addr := member.Address + if _, exists := index[addr]; exists { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicated address: %s", member.Address) + } + index[addr] = struct{}{} + } + return nil +} diff --git a/x/foundation/foundation.pb.go b/x/foundation/foundation.pb.go new file mode 100644 index 0000000000..73f3be2ead --- /dev/null +++ b/x/foundation/foundation.pb.go @@ -0,0 +1,4554 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/foundation/v1/foundation.proto + +package foundation + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 CensorshipAuthority int32 + +const ( + // CENSORSHIP_AUTHORITY_UNSPECIFIED defines an invalid authority. + CensorshipAuthorityUnspecified CensorshipAuthority = 0 + // CENSORSHIP_AUTHORITY_GOVERNANCE defines x/gov authority. + CensorshipAuthorityGovernance CensorshipAuthority = 1 + // CENSORSHIP_AUTHORITY_FOUNDATION defines x/foundation authority. + CensorshipAuthorityFoundation CensorshipAuthority = 2 +) + +var CensorshipAuthority_name = map[int32]string{ + 0: "CENSORSHIP_AUTHORITY_UNSPECIFIED", + 1: "CENSORSHIP_AUTHORITY_GOVERNANCE", + 2: "CENSORSHIP_AUTHORITY_FOUNDATION", +} + +var CensorshipAuthority_value = map[string]int32{ + "CENSORSHIP_AUTHORITY_UNSPECIFIED": 0, + "CENSORSHIP_AUTHORITY_GOVERNANCE": 1, + "CENSORSHIP_AUTHORITY_FOUNDATION": 2, +} + +func (x CensorshipAuthority) String() string { + return proto.EnumName(CensorshipAuthority_name, int32(x)) +} + +func (CensorshipAuthority) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{0} +} + +// VoteOption enumerates the valid vote options for a given proposal. +type VoteOption int32 + +const ( + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VOTE_OPTION_UNSPECIFIED VoteOption = 0 + // VOTE_OPTION_YES defines a yes vote option. + VOTE_OPTION_YES VoteOption = 1 + // VOTE_OPTION_ABSTAIN defines an abstain vote option. + VOTE_OPTION_ABSTAIN VoteOption = 2 + // VOTE_OPTION_NO defines a no vote option. + VOTE_OPTION_NO VoteOption = 3 + // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + VOTE_OPTION_NO_WITH_VETO VoteOption = 4 +) + +var VoteOption_name = map[int32]string{ + 0: "VOTE_OPTION_UNSPECIFIED", + 1: "VOTE_OPTION_YES", + 2: "VOTE_OPTION_ABSTAIN", + 3: "VOTE_OPTION_NO", + 4: "VOTE_OPTION_NO_WITH_VETO", +} + +var VoteOption_value = map[string]int32{ + "VOTE_OPTION_UNSPECIFIED": 0, + "VOTE_OPTION_YES": 1, + "VOTE_OPTION_ABSTAIN": 2, + "VOTE_OPTION_NO": 3, + "VOTE_OPTION_NO_WITH_VETO": 4, +} + +func (x VoteOption) String() string { + return proto.EnumName(VoteOption_name, int32(x)) +} + +func (VoteOption) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{1} +} + +// ProposalStatus defines proposal statuses. +type ProposalStatus int32 + +const ( + // An empty value is invalid and not allowed. + PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 + // Initial status of a proposal when submitted. + PROPOSAL_STATUS_SUBMITTED ProposalStatus = 1 + // Final status of a proposal when the final tally is done and the outcome + // passes the foundation's decision policy. + PROPOSAL_STATUS_ACCEPTED ProposalStatus = 2 + // Final status of a proposal when the final tally is done and the outcome + // is rejected by the foundation's decision policy. + PROPOSAL_STATUS_REJECTED ProposalStatus = 3 + // Final status of a proposal when the decision policy is modified before the + // final tally. + PROPOSAL_STATUS_ABORTED ProposalStatus = 4 + // A proposal can be withdrawn before the voting start time by the owner. + // When this happens the final status is Withdrawn. + PROPOSAL_STATUS_WITHDRAWN ProposalStatus = 5 +) + +var ProposalStatus_name = map[int32]string{ + 0: "PROPOSAL_STATUS_UNSPECIFIED", + 1: "PROPOSAL_STATUS_SUBMITTED", + 2: "PROPOSAL_STATUS_ACCEPTED", + 3: "PROPOSAL_STATUS_REJECTED", + 4: "PROPOSAL_STATUS_ABORTED", + 5: "PROPOSAL_STATUS_WITHDRAWN", +} + +var ProposalStatus_value = map[string]int32{ + "PROPOSAL_STATUS_UNSPECIFIED": 0, + "PROPOSAL_STATUS_SUBMITTED": 1, + "PROPOSAL_STATUS_ACCEPTED": 2, + "PROPOSAL_STATUS_REJECTED": 3, + "PROPOSAL_STATUS_ABORTED": 4, + "PROPOSAL_STATUS_WITHDRAWN": 5, +} + +func (x ProposalStatus) String() string { + return proto.EnumName(ProposalStatus_name, int32(x)) +} + +func (ProposalStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{2} +} + +// ProposalExecutorResult defines types of proposal executor results. +type ProposalExecutorResult int32 + +const ( + // An empty value is not allowed. + PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED ProposalExecutorResult = 0 + // We have not yet run the executor. + PROPOSAL_EXECUTOR_RESULT_NOT_RUN ProposalExecutorResult = 1 + // The executor was successful and proposed action updated state. + PROPOSAL_EXECUTOR_RESULT_SUCCESS ProposalExecutorResult = 2 + // The executor returned an error and proposed action didn't update state. + PROPOSAL_EXECUTOR_RESULT_FAILURE ProposalExecutorResult = 3 +) + +var ProposalExecutorResult_name = map[int32]string{ + 0: "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", + 1: "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + 2: "PROPOSAL_EXECUTOR_RESULT_SUCCESS", + 3: "PROPOSAL_EXECUTOR_RESULT_FAILURE", +} + +var ProposalExecutorResult_value = map[string]int32{ + "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED": 0, + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN": 1, + "PROPOSAL_EXECUTOR_RESULT_SUCCESS": 2, + "PROPOSAL_EXECUTOR_RESULT_FAILURE": 3, +} + +func (x ProposalExecutorResult) String() string { + return proto.EnumName(ProposalExecutorResult_name, int32(x)) +} + +func (ProposalExecutorResult) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{3} +} + +// Params defines the parameters for the foundation module. +type Params struct { + FoundationTax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=foundation_tax,json=foundationTax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"foundation_tax"` +} + +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_1980496a233f02f4, []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 + +type Censorship struct { + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + Authority CensorshipAuthority `protobuf:"varint,2,opt,name=authority,proto3,enum=lbm.foundation.v1.CensorshipAuthority" json:"authority,omitempty"` +} + +func (m *Censorship) Reset() { *m = Censorship{} } +func (m *Censorship) String() string { return proto.CompactTextString(m) } +func (*Censorship) ProtoMessage() {} +func (*Censorship) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{1} +} +func (m *Censorship) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Censorship) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Censorship.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 *Censorship) XXX_Merge(src proto.Message) { + xxx_messageInfo_Censorship.Merge(m, src) +} +func (m *Censorship) XXX_Size() int { + return m.Size() +} +func (m *Censorship) XXX_DiscardUnknown() { + xxx_messageInfo_Censorship.DiscardUnknown(m) +} + +var xxx_messageInfo_Censorship proto.InternalMessageInfo + +func (m *Censorship) GetMsgTypeUrl() string { + if m != nil { + return m.MsgTypeUrl + } + return "" +} + +func (m *Censorship) GetAuthority() CensorshipAuthority { + if m != nil { + return m.Authority + } + return CensorshipAuthorityUnspecified +} + +// Member represents a foundation member with an account address and metadata. +type Member struct { + // address is the member's account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // metadata is any arbitrary metadata to attached to the member. + Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // added_at is a timestamp specifying when a member was added. + AddedAt time.Time `protobuf:"bytes,4,opt,name=added_at,json=addedAt,proto3,stdtime" json:"added_at"` +} + +func (m *Member) Reset() { *m = Member{} } +func (m *Member) String() string { return proto.CompactTextString(m) } +func (*Member) ProtoMessage() {} +func (*Member) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{2} +} +func (m *Member) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Member.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 *Member) XXX_Merge(src proto.Message) { + xxx_messageInfo_Member.Merge(m, src) +} +func (m *Member) XXX_Size() int { + return m.Size() +} +func (m *Member) XXX_DiscardUnknown() { + xxx_messageInfo_Member.DiscardUnknown(m) +} + +var xxx_messageInfo_Member proto.InternalMessageInfo + +func (m *Member) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Member) GetMetadata() string { + if m != nil { + return m.Metadata + } + return "" +} + +func (m *Member) GetAddedAt() time.Time { + if m != nil { + return m.AddedAt + } + return time.Time{} +} + +// MemberRequest represents a foundation member to be used in Msg server requests. +// Contrary to `Member`, it doesn't have any `added_at` field +// since this field cannot be set as part of requests. +type MemberRequest struct { + // address is the member's account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // remove is the flag which allows one to remove the member by setting the flag to true. + Remove bool `protobuf:"varint,2,opt,name=remove,proto3" json:"remove,omitempty"` + // metadata is any arbitrary metadata attached to the member. + Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *MemberRequest) Reset() { *m = MemberRequest{} } +func (m *MemberRequest) String() string { return proto.CompactTextString(m) } +func (*MemberRequest) ProtoMessage() {} +func (*MemberRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{3} +} +func (m *MemberRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemberRequest.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 *MemberRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberRequest.Merge(m, src) +} +func (m *MemberRequest) XXX_Size() int { + return m.Size() +} +func (m *MemberRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MemberRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberRequest proto.InternalMessageInfo + +func (m *MemberRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MemberRequest) GetRemove() bool { + if m != nil { + return m.Remove + } + return false +} + +func (m *MemberRequest) GetMetadata() string { + if m != nil { + return m.Metadata + } + return "" +} + +// ThresholdDecisionPolicy is a decision policy where a proposal passes when it +// satisfies the two following conditions: +// 1. The sum of all `YES` voters' weights is greater or equal than the defined +// `threshold`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. +type ThresholdDecisionPolicy struct { + // threshold is the minimum sum of yes votes that must be met or exceeded for a proposal to succeed. + Threshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=threshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"threshold"` + // windows defines the different windows for voting and execution. + Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"` +} + +func (m *ThresholdDecisionPolicy) Reset() { *m = ThresholdDecisionPolicy{} } +func (m *ThresholdDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*ThresholdDecisionPolicy) ProtoMessage() {} +func (*ThresholdDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{4} +} +func (m *ThresholdDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ThresholdDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ThresholdDecisionPolicy.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 *ThresholdDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ThresholdDecisionPolicy.Merge(m, src) +} +func (m *ThresholdDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_ThresholdDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_ThresholdDecisionPolicy proto.InternalMessageInfo + +func (m *ThresholdDecisionPolicy) GetWindows() *DecisionPolicyWindows { + if m != nil { + return m.Windows + } + return nil +} + +// PercentageDecisionPolicy is a decision policy where a proposal passes when +// it satisfies the two following conditions: +// 1. The percentage of all `YES` voters' weights out of the total group weight +// is greater or equal than the given `percentage`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. +type PercentageDecisionPolicy struct { + // percentage is the minimum percentage the sum of yes votes must meet for a proposal to succeed. + Percentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=percentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"percentage"` + // windows defines the different windows for voting and execution. + Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"` +} + +func (m *PercentageDecisionPolicy) Reset() { *m = PercentageDecisionPolicy{} } +func (m *PercentageDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*PercentageDecisionPolicy) ProtoMessage() {} +func (*PercentageDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{5} +} +func (m *PercentageDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PercentageDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PercentageDecisionPolicy.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 *PercentageDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_PercentageDecisionPolicy.Merge(m, src) +} +func (m *PercentageDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *PercentageDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_PercentageDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_PercentageDecisionPolicy proto.InternalMessageInfo + +func (m *PercentageDecisionPolicy) GetWindows() *DecisionPolicyWindows { + if m != nil { + return m.Windows + } + return nil +} + +// DecisionPolicyWindows defines the different windows for voting and execution. +type DecisionPolicyWindows struct { + // voting_period is the duration from submission of a proposal to the end of voting period + // Within this times votes can be submitted with MsgVote. + VotingPeriod time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period"` + // min_execution_period is the minimum duration after the proposal submission + // where members can start sending MsgExec. This means that the window for + // sending a MsgExec transaction is: + // `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` + // where max_execution_period is a app-specific config, defined in the keeper. + // If not set, min_execution_period will default to 0. + // + // Please make sure to set a `min_execution_period` that is smaller than + // `voting_period + max_execution_period`, or else the above execution window + // is empty, meaning that all proposals created with this decision policy + // won't be able to be executed. + MinExecutionPeriod time.Duration `protobuf:"bytes,2,opt,name=min_execution_period,json=minExecutionPeriod,proto3,stdduration" json:"min_execution_period"` +} + +func (m *DecisionPolicyWindows) Reset() { *m = DecisionPolicyWindows{} } +func (m *DecisionPolicyWindows) String() string { return proto.CompactTextString(m) } +func (*DecisionPolicyWindows) ProtoMessage() {} +func (*DecisionPolicyWindows) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{6} +} +func (m *DecisionPolicyWindows) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DecisionPolicyWindows) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DecisionPolicyWindows.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 *DecisionPolicyWindows) XXX_Merge(src proto.Message) { + xxx_messageInfo_DecisionPolicyWindows.Merge(m, src) +} +func (m *DecisionPolicyWindows) XXX_Size() int { + return m.Size() +} +func (m *DecisionPolicyWindows) XXX_DiscardUnknown() { + xxx_messageInfo_DecisionPolicyWindows.DiscardUnknown(m) +} + +var xxx_messageInfo_DecisionPolicyWindows proto.InternalMessageInfo + +func (m *DecisionPolicyWindows) GetVotingPeriod() time.Duration { + if m != nil { + return m.VotingPeriod + } + return 0 +} + +func (m *DecisionPolicyWindows) GetMinExecutionPeriod() time.Duration { + if m != nil { + return m.MinExecutionPeriod + } + return 0 +} + +// OutsourcingDecisionPolicy is a dummy decision policy which is set after +// the proposal feature has been outsourced to x/group. +type OutsourcingDecisionPolicy struct { + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *OutsourcingDecisionPolicy) Reset() { *m = OutsourcingDecisionPolicy{} } +func (m *OutsourcingDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*OutsourcingDecisionPolicy) ProtoMessage() {} +func (*OutsourcingDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{7} +} +func (m *OutsourcingDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OutsourcingDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OutsourcingDecisionPolicy.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 *OutsourcingDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutsourcingDecisionPolicy.Merge(m, src) +} +func (m *OutsourcingDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *OutsourcingDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_OutsourcingDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_OutsourcingDecisionPolicy proto.InternalMessageInfo + +func (m *OutsourcingDecisionPolicy) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +// FoundationInfo represents the high-level on-chain information for the foundation. +type FoundationInfo struct { + // version is used to track changes to the foundation's membership structure that + // would break existing proposals. Whenever any member is added or removed, + // this version is incremented and will cause proposals based on older versions + // of the foundation to fail + Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // total_weight is the number of the foundation members. + TotalWeight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=total_weight,json=totalWeight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total_weight"` + // decision_policy specifies the foundation's decision policy. + DecisionPolicy *types.Any `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *FoundationInfo) Reset() { *m = FoundationInfo{} } +func (m *FoundationInfo) String() string { return proto.CompactTextString(m) } +func (*FoundationInfo) ProtoMessage() {} +func (*FoundationInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{8} +} +func (m *FoundationInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FoundationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FoundationInfo.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 *FoundationInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FoundationInfo.Merge(m, src) +} +func (m *FoundationInfo) XXX_Size() int { + return m.Size() +} +func (m *FoundationInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FoundationInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FoundationInfo proto.InternalMessageInfo + +// Proposal defines a foundation proposal. Any member of the foundation can submit a proposal +// for a group policy to decide upon. +// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal +// passes as well as some optional metadata associated with the proposal. +type Proposal struct { + // id is the unique id of the proposal. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // metadata is any arbitrary metadata to attached to the proposal. + Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // proposers are the account addresses of the proposers. + Proposers []string `protobuf:"bytes,3,rep,name=proposers,proto3" json:"proposers,omitempty"` + // submit_time is a timestamp specifying when a proposal was submitted. + SubmitTime time.Time `protobuf:"bytes,4,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"` + // foundation_version tracks the version of the foundation that this proposal corresponds to. + // When foundation info is changed, existing proposals from previous foundation versions will become invalid. + FoundationVersion uint64 `protobuf:"varint,5,opt,name=foundation_version,json=foundationVersion,proto3" json:"foundation_version,omitempty"` + // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. + Status ProposalStatus `protobuf:"varint,6,opt,name=status,proto3,enum=lbm.foundation.v1.ProposalStatus" json:"status,omitempty"` + // final_tally_result contains the sums of all votes for this + // proposal for each vote option, after tallying. When querying a proposal + // via gRPC, this field is not populated until the proposal's voting period + // has ended. + FinalTallyResult TallyResult `protobuf:"bytes,7,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"` + // voting_period_end is the timestamp before which voting must be done. + // Unless a successfull MsgExec is called before (to execute a proposal whose + // tally is successful before the voting period ends), tallying will be done + // at this point, and the `final_tally_result`, as well + // as `status` and `result` fields will be accordingly updated. + VotingPeriodEnd time.Time `protobuf:"bytes,8,opt,name=voting_period_end,json=votingPeriodEnd,proto3,stdtime" json:"voting_period_end"` + // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + ExecutorResult ProposalExecutorResult `protobuf:"varint,9,opt,name=executor_result,json=executorResult,proto3,enum=lbm.foundation.v1.ProposalExecutorResult" json:"executor_result,omitempty"` + // messages is a list of Msgs that will be executed if the proposal passes. + Messages []*types.Any `protobuf:"bytes,10,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (m *Proposal) Reset() { *m = Proposal{} } +func (m *Proposal) String() string { return proto.CompactTextString(m) } +func (*Proposal) ProtoMessage() {} +func (*Proposal) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{9} +} +func (m *Proposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Proposal.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 *Proposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proposal.Merge(m, src) +} +func (m *Proposal) XXX_Size() int { + return m.Size() +} +func (m *Proposal) XXX_DiscardUnknown() { + xxx_messageInfo_Proposal.DiscardUnknown(m) +} + +var xxx_messageInfo_Proposal proto.InternalMessageInfo + +// TallyResult represents the sum of votes for each vote option. +type TallyResult struct { + // yes_count is the sum of yes votes. + YesCount cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"yes_count"` + // abstain_count is the sum of abstainers. + AbstainCount cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"abstain_count"` + // no is the sum of no votes. + NoCount cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"no_count"` + // no_with_veto_count is the sum of veto. + NoWithVetoCount cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"no_with_veto_count"` +} + +func (m *TallyResult) Reset() { *m = TallyResult{} } +func (m *TallyResult) String() string { return proto.CompactTextString(m) } +func (*TallyResult) ProtoMessage() {} +func (*TallyResult) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{10} +} +func (m *TallyResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TallyResult.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 *TallyResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TallyResult.Merge(m, src) +} +func (m *TallyResult) XXX_Size() int { + return m.Size() +} +func (m *TallyResult) XXX_DiscardUnknown() { + xxx_messageInfo_TallyResult.DiscardUnknown(m) +} + +var xxx_messageInfo_TallyResult proto.InternalMessageInfo + +// Vote represents a vote for a proposal. +type Vote struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // voter is the account address of the voter. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + // option is the voter's choice on the proposal. + Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=lbm.foundation.v1.VoteOption" json:"option,omitempty"` + // metadata is any arbitrary metadata to attached to the vote. + Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + // submit_time is the timestamp when the vote was submitted. + SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"` +} + +func (m *Vote) Reset() { *m = Vote{} } +func (m *Vote) String() string { return proto.CompactTextString(m) } +func (*Vote) ProtoMessage() {} +func (*Vote) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{11} +} +func (m *Vote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Vote.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 *Vote) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vote.Merge(m, src) +} +func (m *Vote) XXX_Size() int { + return m.Size() +} +func (m *Vote) XXX_DiscardUnknown() { + xxx_messageInfo_Vote.DiscardUnknown(m) +} + +var xxx_messageInfo_Vote proto.InternalMessageInfo + +func (m *Vote) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *Vote) GetVoter() string { + if m != nil { + return m.Voter + } + return "" +} + +func (m *Vote) GetOption() VoteOption { + if m != nil { + return m.Option + } + return VOTE_OPTION_UNSPECIFIED +} + +func (m *Vote) GetMetadata() string { + if m != nil { + return m.Metadata + } + return "" +} + +func (m *Vote) GetSubmitTime() time.Time { + if m != nil { + return m.SubmitTime + } + return time.Time{} +} + +// Pool is used for tracking treasury. +type Pool struct { + Treasury github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=treasury,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"treasury"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (m *Pool) String() string { return proto.CompactTextString(m) } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{12} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.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 *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +func (m *Pool) GetTreasury() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Treasury + } + return nil +} + +// FoundationExecProposal is x/gov proposal to trigger the x/foundation messages on behalf of x/gov. +type FoundationExecProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // x/foundation messages to execute + // all the signers must be x/gov authority. + Messages []*types.Any `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (m *FoundationExecProposal) Reset() { *m = FoundationExecProposal{} } +func (m *FoundationExecProposal) String() string { return proto.CompactTextString(m) } +func (*FoundationExecProposal) ProtoMessage() {} +func (*FoundationExecProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_1980496a233f02f4, []int{13} +} +func (m *FoundationExecProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FoundationExecProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FoundationExecProposal.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 *FoundationExecProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_FoundationExecProposal.Merge(m, src) +} +func (m *FoundationExecProposal) XXX_Size() int { + return m.Size() +} +func (m *FoundationExecProposal) XXX_DiscardUnknown() { + xxx_messageInfo_FoundationExecProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_FoundationExecProposal proto.InternalMessageInfo + +func (m *FoundationExecProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *FoundationExecProposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *FoundationExecProposal) GetMessages() []*types.Any { + if m != nil { + return m.Messages + } + return nil +} + +func init() { + proto.RegisterEnum("lbm.foundation.v1.CensorshipAuthority", CensorshipAuthority_name, CensorshipAuthority_value) + proto.RegisterEnum("lbm.foundation.v1.VoteOption", VoteOption_name, VoteOption_value) + proto.RegisterEnum("lbm.foundation.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) + proto.RegisterEnum("lbm.foundation.v1.ProposalExecutorResult", ProposalExecutorResult_name, ProposalExecutorResult_value) + proto.RegisterType((*Params)(nil), "lbm.foundation.v1.Params") + proto.RegisterType((*Censorship)(nil), "lbm.foundation.v1.Censorship") + proto.RegisterType((*Member)(nil), "lbm.foundation.v1.Member") + proto.RegisterType((*MemberRequest)(nil), "lbm.foundation.v1.MemberRequest") + proto.RegisterType((*ThresholdDecisionPolicy)(nil), "lbm.foundation.v1.ThresholdDecisionPolicy") + proto.RegisterType((*PercentageDecisionPolicy)(nil), "lbm.foundation.v1.PercentageDecisionPolicy") + proto.RegisterType((*DecisionPolicyWindows)(nil), "lbm.foundation.v1.DecisionPolicyWindows") + proto.RegisterType((*OutsourcingDecisionPolicy)(nil), "lbm.foundation.v1.OutsourcingDecisionPolicy") + proto.RegisterType((*FoundationInfo)(nil), "lbm.foundation.v1.FoundationInfo") + proto.RegisterType((*Proposal)(nil), "lbm.foundation.v1.Proposal") + proto.RegisterType((*TallyResult)(nil), "lbm.foundation.v1.TallyResult") + proto.RegisterType((*Vote)(nil), "lbm.foundation.v1.Vote") + proto.RegisterType((*Pool)(nil), "lbm.foundation.v1.Pool") + proto.RegisterType((*FoundationExecProposal)(nil), "lbm.foundation.v1.FoundationExecProposal") +} + +func init() { + proto.RegisterFile("lbm/foundation/v1/foundation.proto", fileDescriptor_1980496a233f02f4) +} + +var fileDescriptor_1980496a233f02f4 = []byte{ + // 1595 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x4f, 0xdb, 0x4e, 0xe2, 0x3c, 0x67, 0x1c, 0xa7, 0x26, 0xcc, 0x38, 0x9e, 0x1d, 0xdb, 0xeb, + 0x5d, 0xa1, 0x30, 0x28, 0x36, 0xc9, 0x8a, 0x45, 0xcc, 0x01, 0xf0, 0x47, 0x67, 0xe3, 0x21, 0xeb, + 0xf6, 0xb6, 0xdb, 0x09, 0xbb, 0x97, 0x56, 0xdb, 0x5d, 0xb1, 0x4b, 0xdb, 0xdd, 0x65, 0xba, 0xaa, + 0x9d, 0xf8, 0x3f, 0x58, 0xcd, 0x85, 0x3d, 0xc2, 0x61, 0x24, 0x24, 0x0e, 0x20, 0x4e, 0x20, 0xcd, + 0x01, 0xf1, 0x17, 0x8c, 0x40, 0x42, 0x03, 0xa7, 0x11, 0x42, 0x33, 0x28, 0x73, 0xe0, 0xcc, 0x81, + 0x3b, 0xea, 0x2f, 0x7f, 0xc5, 0x89, 0x92, 0xd1, 0x5e, 0x66, 0x5c, 0xf5, 0xde, 0xef, 0xd7, 0xbf, + 0xf7, 0xaa, 0xde, 0x7b, 0x15, 0x28, 0x18, 0x1d, 0xb3, 0x74, 0x4a, 0x1d, 0x4b, 0xd7, 0x38, 0xa1, + 0x56, 0x69, 0xb8, 0x37, 0xb5, 0x2a, 0x0e, 0x6c, 0xca, 0x29, 0xda, 0x34, 0x3a, 0x66, 0x71, 0x6a, + 0x77, 0xb8, 0x97, 0xd9, 0xea, 0xd1, 0x1e, 0xf5, 0xac, 0x25, 0xf7, 0x97, 0xef, 0x98, 0xc9, 0xf6, + 0x28, 0xed, 0x19, 0xb8, 0xe4, 0xad, 0x3a, 0xce, 0x69, 0x49, 0x77, 0xec, 0x29, 0xa2, 0x4c, 0x6e, + 0xde, 0xce, 0x89, 0x89, 0x19, 0xd7, 0xcc, 0x41, 0xe0, 0xb0, 0x3d, 0xef, 0xa0, 0x59, 0xa3, 0x90, + 0xbb, 0x4b, 0x99, 0x49, 0x59, 0xa9, 0xa3, 0x31, 0x5c, 0x1a, 0xee, 0x75, 0x30, 0xd7, 0xf6, 0x4a, + 0x5d, 0x4a, 0x42, 0xee, 0x6d, 0xdf, 0xae, 0xfa, 0xa2, 0xfc, 0x45, 0x60, 0xda, 0xd4, 0x4c, 0x62, + 0xd1, 0x92, 0xf7, 0xaf, 0xbf, 0x55, 0xf8, 0x02, 0x56, 0x9a, 0x9a, 0xad, 0x99, 0x0c, 0x3d, 0x81, + 0xe4, 0x24, 0x34, 0x95, 0x6b, 0xe7, 0x69, 0x21, 0x2f, 0xec, 0xac, 0x55, 0x3e, 0x78, 0xf1, 0x3a, + 0xb7, 0xf4, 0xcf, 0xd7, 0xb9, 0x07, 0x3e, 0x15, 0xd3, 0xbf, 0x2c, 0x12, 0x5a, 0x32, 0x35, 0xde, + 0x2f, 0x1e, 0xe1, 0x9e, 0xd6, 0x1d, 0xd5, 0x70, 0x57, 0xbe, 0x33, 0x81, 0x2a, 0xda, 0xf9, 0x93, + 0x58, 0x3c, 0x92, 0x8a, 0x16, 0x38, 0x40, 0x15, 0x5b, 0x8c, 0xda, 0xac, 0x4f, 0x06, 0x28, 0x0f, + 0xeb, 0x26, 0xeb, 0xa9, 0x7c, 0x34, 0xc0, 0xaa, 0x63, 0x1b, 0x3e, 0xbb, 0x0c, 0x26, 0xeb, 0x29, + 0xa3, 0x01, 0x6e, 0xdb, 0x06, 0xaa, 0xc1, 0x9a, 0xe6, 0xf0, 0x3e, 0xb5, 0x09, 0x1f, 0xa5, 0x23, + 0x79, 0x61, 0x27, 0xb9, 0xff, 0xed, 0xe2, 0xa5, 0x94, 0x17, 0x27, 0x9c, 0xe5, 0xd0, 0x5b, 0x9e, + 0x00, 0x0b, 0xbf, 0x12, 0x60, 0xe5, 0x53, 0x6c, 0x76, 0xb0, 0x8d, 0xf6, 0x61, 0x55, 0xd3, 0x75, + 0x1b, 0x33, 0x16, 0xc4, 0x92, 0xfe, 0xc7, 0xf3, 0xdd, 0xad, 0x20, 0x25, 0x65, 0xdf, 0xd2, 0xe2, + 0x36, 0xb1, 0x7a, 0x72, 0xe8, 0x88, 0x32, 0x10, 0x37, 0x31, 0xd7, 0x74, 0x8d, 0x6b, 0x9e, 0x86, + 0x35, 0x79, 0xbc, 0x46, 0x3f, 0x86, 0xb8, 0xa6, 0xeb, 0x58, 0x57, 0x35, 0x9e, 0x8e, 0xe5, 0x85, + 0x9d, 0xc4, 0x7e, 0xa6, 0xe8, 0x1f, 0x54, 0x31, 0x3c, 0xa8, 0xa2, 0x12, 0x9e, 0x64, 0x25, 0xee, + 0x26, 0xee, 0xeb, 0x37, 0x39, 0xc1, 0x23, 0xc7, 0x7a, 0x99, 0x17, 0xce, 0xe0, 0x8e, 0x2f, 0x4d, + 0xc6, 0x3f, 0x77, 0x30, 0xe3, 0xef, 0xa4, 0xf0, 0x1e, 0xac, 0xd8, 0xd8, 0xa4, 0x43, 0xec, 0xe9, + 0x8b, 0xcb, 0xc1, 0x6a, 0x46, 0x79, 0x74, 0x56, 0x79, 0xe1, 0x95, 0x00, 0xf7, 0x95, 0xbe, 0x8d, + 0x59, 0x9f, 0x1a, 0x7a, 0x0d, 0x77, 0x09, 0x23, 0xd4, 0x6a, 0x52, 0x83, 0x74, 0x47, 0xa8, 0x0c, + 0x6b, 0x3c, 0x34, 0xdd, 0xe6, 0xcc, 0x27, 0x28, 0x54, 0x81, 0xd5, 0x33, 0x62, 0xe9, 0xf4, 0x8c, + 0x79, 0x9a, 0x12, 0xfb, 0x3b, 0x0b, 0xce, 0x6d, 0xf6, 0xb3, 0x27, 0xbe, 0xbf, 0x1c, 0x02, 0x1f, + 0x7f, 0xfc, 0x97, 0xe7, 0xbb, 0xc9, 0x59, 0x9f, 0xa7, 0xff, 0xf9, 0xc3, 0xa3, 0x9c, 0xd1, 0x31, + 0x77, 0x99, 0xfe, 0x65, 0xe9, 0x0a, 0xf9, 0x85, 0x7f, 0x09, 0x90, 0x6e, 0x62, 0xbb, 0x8b, 0x2d, + 0xae, 0xf5, 0xf0, 0x5c, 0x6c, 0x55, 0x80, 0xc1, 0xd8, 0x76, 0x9b, 0xe0, 0xa6, 0x60, 0xdf, 0x48, + 0x74, 0x3f, 0x58, 0x1c, 0x5d, 0x3e, 0x8c, 0xee, 0xaa, 0x08, 0x0a, 0x7f, 0x12, 0xe0, 0x5b, 0x0b, + 0xb9, 0xd1, 0x21, 0xdc, 0x19, 0x52, 0x4e, 0xac, 0x9e, 0x3a, 0xc0, 0x36, 0xa1, 0xfe, 0xd9, 0x25, + 0xf6, 0xb7, 0x2f, 0x5d, 0xc9, 0x5a, 0xd0, 0x7c, 0xfc, 0x1b, 0xf9, 0x4b, 0xf7, 0x46, 0xae, 0xfb, + 0xc8, 0xa6, 0x07, 0x44, 0x6d, 0xd8, 0x32, 0x89, 0xa5, 0xe2, 0x73, 0xdc, 0x75, 0xbc, 0xea, 0x0f, + 0x08, 0x23, 0x37, 0x27, 0x44, 0x26, 0xb1, 0xc4, 0x10, 0xef, 0xd3, 0x16, 0x3e, 0x83, 0x6d, 0xc9, + 0xe1, 0x8c, 0x3a, 0x76, 0x97, 0x58, 0xbd, 0xb9, 0x93, 0xc9, 0x43, 0x42, 0xc7, 0xac, 0x6b, 0x93, + 0x81, 0x8b, 0x08, 0xba, 0xc1, 0xf4, 0xd6, 0x63, 0x74, 0x39, 0x65, 0x85, 0xbf, 0x0a, 0x90, 0x3c, + 0x18, 0xe7, 0xbd, 0x6e, 0x9d, 0x52, 0x94, 0x86, 0xd5, 0x21, 0xb6, 0x59, 0x48, 0x12, 0x93, 0xc3, + 0x25, 0x3a, 0x80, 0x75, 0x4e, 0xb9, 0x66, 0xa8, 0x67, 0x98, 0xf4, 0xfa, 0xdc, 0x2f, 0xe7, 0x9b, + 0x1d, 0x7f, 0xc2, 0x03, 0x9e, 0x78, 0x38, 0xf4, 0x19, 0x6c, 0xe8, 0x81, 0x0c, 0x75, 0xe0, 0xe9, + 0xf0, 0xea, 0x2b, 0xb1, 0xbf, 0x75, 0x29, 0x33, 0x65, 0x6b, 0x54, 0x59, 0xa0, 0x5b, 0x4e, 0xea, + 0x33, 0xeb, 0xc7, 0xb1, 0xaf, 0x7e, 0x9d, 0x5b, 0x2a, 0xfc, 0x3d, 0x06, 0xf1, 0xa6, 0x4d, 0x07, + 0x94, 0x69, 0x06, 0x4a, 0x42, 0x84, 0xe8, 0x41, 0x08, 0x11, 0xa2, 0x5f, 0xdb, 0x88, 0x3e, 0x86, + 0xb5, 0x81, 0x87, 0xc3, 0x36, 0x4b, 0x47, 0xf3, 0xd1, 0x6b, 0x1b, 0xc7, 0xc4, 0x15, 0x89, 0x90, + 0x60, 0x4e, 0xc7, 0x24, 0x5c, 0x75, 0x07, 0xce, 0xad, 0x7a, 0x18, 0xf8, 0x40, 0xd7, 0x84, 0x76, + 0x01, 0x4d, 0x8d, 0x8a, 0x30, 0xfb, 0xcb, 0x9e, 0xf4, 0xcd, 0x89, 0xe5, 0x38, 0x38, 0x87, 0x1f, + 0xc2, 0x0a, 0xe3, 0x1a, 0x77, 0x58, 0x7a, 0xc5, 0x6b, 0xea, 0xef, 0x2f, 0x28, 0x9f, 0x30, 0x0d, + 0x2d, 0xcf, 0x51, 0x0e, 0x00, 0x48, 0x06, 0x74, 0x4a, 0x2c, 0xcd, 0x50, 0xb9, 0x66, 0x18, 0x23, + 0xd5, 0xc6, 0xcc, 0x31, 0x78, 0x7a, 0xd5, 0xd3, 0x9d, 0x5d, 0x40, 0xa3, 0xb8, 0x6e, 0xb2, 0xe7, + 0x55, 0x89, 0xb9, 0xda, 0xe5, 0x94, 0x87, 0x9f, 0xda, 0x47, 0x4d, 0xd8, 0x9c, 0xa9, 0x1b, 0x15, + 0x5b, 0x7a, 0x3a, 0x7e, 0x8b, 0x54, 0x6c, 0x4c, 0x17, 0x8f, 0x68, 0xe9, 0x48, 0x86, 0x0d, 0xbf, + 0x76, 0xa8, 0x1d, 0x4a, 0x5c, 0xf3, 0x22, 0xfd, 0xce, 0x35, 0x91, 0x8a, 0x01, 0xc2, 0x57, 0x25, + 0x27, 0xf1, 0xcc, 0x1a, 0x7d, 0xcf, 0x3d, 0x7e, 0xc6, 0xb4, 0x1e, 0x66, 0x69, 0xc8, 0x47, 0xaf, + 0xba, 0x6d, 0xf2, 0xd8, 0x2b, 0xb8, 0x53, 0x7f, 0x8c, 0x40, 0x62, 0x3a, 0xda, 0x9f, 0xc0, 0xda, + 0x08, 0x33, 0xb5, 0x4b, 0x1d, 0x8b, 0xdf, 0xa6, 0x01, 0xc6, 0x47, 0x98, 0x55, 0x5d, 0x90, 0xdb, + 0x67, 0xb4, 0x0e, 0xe3, 0x1a, 0xb1, 0x02, 0x96, 0x5b, 0xd4, 0xd1, 0x7a, 0x80, 0xf4, 0x99, 0x7e, + 0x04, 0x71, 0x8b, 0x06, 0x24, 0xd1, 0x9b, 0x93, 0xac, 0x5a, 0xd4, 0xc7, 0x37, 0x01, 0x59, 0x54, + 0x3d, 0x23, 0xbc, 0xaf, 0x0e, 0x31, 0x0f, 0x99, 0x62, 0x37, 0x67, 0xda, 0xb0, 0xe8, 0x09, 0xe1, + 0xfd, 0x63, 0xcc, 0x7d, 0xc6, 0x20, 0x67, 0xff, 0x15, 0x20, 0x76, 0x4c, 0x39, 0x46, 0x39, 0x48, + 0x0c, 0x82, 0xe3, 0x51, 0xc7, 0xc5, 0x08, 0xe1, 0x56, 0x5d, 0x47, 0x45, 0x58, 0x1e, 0x52, 0x8e, + 0xed, 0x20, 0x07, 0x57, 0x17, 0x9d, 0xef, 0x86, 0xbe, 0x0f, 0x2b, 0xd4, 0x6f, 0x70, 0x51, 0xef, + 0x42, 0x3c, 0x5c, 0x70, 0x21, 0xdc, 0x2f, 0x4b, 0x9e, 0x93, 0x1c, 0x38, 0xcf, 0xd4, 0x7e, 0x6c, + 0xae, 0xf6, 0xe7, 0x6a, 0x78, 0xf9, 0xdd, 0x6a, 0xb8, 0xe0, 0x40, 0xac, 0x49, 0xa9, 0x81, 0x4c, + 0x88, 0x73, 0x1b, 0x6b, 0xcc, 0xb1, 0x47, 0x69, 0xc1, 0xbb, 0x67, 0xef, 0x15, 0x83, 0x88, 0xdc, + 0x17, 0x66, 0x31, 0x78, 0x61, 0xba, 0xf3, 0xad, 0x4a, 0x89, 0x55, 0xf9, 0xc8, 0x65, 0xfb, 0xfd, + 0x9b, 0xdc, 0x77, 0x7b, 0x84, 0xf7, 0x9d, 0x4e, 0xb1, 0x4b, 0xcd, 0xe0, 0x91, 0x19, 0xfc, 0xe7, + 0x8d, 0x33, 0xf7, 0x95, 0xc7, 0x42, 0x0c, 0x93, 0xc7, 0x9f, 0x28, 0xfc, 0x56, 0x80, 0x7b, 0x93, + 0x06, 0xee, 0xd6, 0xc0, 0xb8, 0x01, 0x6e, 0xc1, 0x32, 0x27, 0xdc, 0x08, 0xc6, 0xb4, 0xec, 0x2f, + 0xe6, 0xe7, 0x44, 0xe4, 0xd2, 0x9c, 0x98, 0xa9, 0x94, 0xe8, 0x8d, 0x2a, 0xe5, 0x03, 0x77, 0xf4, + 0x66, 0xc3, 0xd1, 0xbb, 0x58, 0xce, 0xa3, 0xff, 0x09, 0x70, 0x77, 0xc1, 0x53, 0x13, 0x1d, 0x42, + 0xbe, 0x2a, 0x36, 0x5a, 0x92, 0xdc, 0x3a, 0xac, 0x37, 0xd5, 0x72, 0x5b, 0x39, 0x94, 0xe4, 0xba, + 0xf2, 0xb9, 0xda, 0x6e, 0xb4, 0x9a, 0x62, 0xb5, 0x7e, 0x50, 0x17, 0x6b, 0xa9, 0xa5, 0x4c, 0xe1, + 0xe9, 0xb3, 0x7c, 0x76, 0x01, 0xbc, 0x6d, 0xb1, 0x01, 0xee, 0x92, 0x53, 0x82, 0x75, 0x74, 0x00, + 0xb9, 0x85, 0x4c, 0x9f, 0x48, 0xc7, 0xa2, 0xdc, 0x28, 0x37, 0xaa, 0x62, 0x4a, 0xc8, 0xbc, 0xff, + 0xf4, 0x59, 0xfe, 0xe1, 0x02, 0xa2, 0x4f, 0xe8, 0x10, 0xdb, 0x96, 0x66, 0x75, 0xf1, 0x95, 0x3c, + 0x07, 0x52, 0xbb, 0x51, 0x2b, 0x2b, 0x75, 0xa9, 0x91, 0x8a, 0x5c, 0xc9, 0x33, 0x89, 0x3e, 0x13, + 0xfb, 0xea, 0x37, 0xd9, 0xa5, 0x47, 0xbf, 0x10, 0x00, 0x26, 0x57, 0x12, 0x3d, 0x80, 0xfb, 0xc7, + 0x92, 0x22, 0xaa, 0x52, 0xd3, 0x25, 0x9a, 0x8d, 0x12, 0xdd, 0x85, 0x8d, 0x69, 0xe3, 0xe7, 0x62, + 0x2b, 0x25, 0xa0, 0xfb, 0x70, 0x77, 0x7a, 0xb3, 0x5c, 0x69, 0x29, 0xe5, 0x7a, 0x23, 0x15, 0x41, + 0x08, 0x92, 0xd3, 0x86, 0x86, 0x94, 0x8a, 0xa2, 0xf7, 0x20, 0x3d, 0xbb, 0xa7, 0x9e, 0xd4, 0x95, + 0x43, 0xf5, 0x58, 0x54, 0xa4, 0x54, 0x2c, 0x50, 0xf4, 0x37, 0x01, 0x92, 0xb3, 0xf3, 0x01, 0xe5, + 0xe0, 0x41, 0x53, 0x96, 0x9a, 0x52, 0xab, 0x7c, 0xa4, 0xb6, 0x94, 0xb2, 0xd2, 0x6e, 0xcd, 0x29, + 0x7b, 0x08, 0xdb, 0xf3, 0x0e, 0xad, 0x76, 0xe5, 0xd3, 0xba, 0xa2, 0x88, 0xb5, 0x94, 0xe0, 0x7e, + 0x76, 0xde, 0x5c, 0xae, 0x56, 0xc5, 0xa6, 0x6b, 0x8d, 0x2c, 0xb2, 0xca, 0xe2, 0x13, 0xb1, 0xea, + 0x5a, 0xa3, 0x6e, 0x46, 0x2e, 0x61, 0x2b, 0x92, 0xec, 0x1a, 0x63, 0x8b, 0xbe, 0xeb, 0x06, 0x54, + 0x93, 0xcb, 0x27, 0x8d, 0xd4, 0x72, 0x10, 0xd0, 0x9f, 0x05, 0xb8, 0xb7, 0x78, 0x0c, 0xa0, 0x1d, + 0xf8, 0x70, 0x8c, 0x17, 0x7f, 0x26, 0x56, 0xdb, 0x8a, 0x24, 0xab, 0xb2, 0xd8, 0x6a, 0x1f, 0x29, + 0x73, 0x11, 0x7e, 0x08, 0xf9, 0x2b, 0x3d, 0x1b, 0x92, 0xa2, 0xca, 0xed, 0x46, 0x4a, 0xb8, 0xd6, + 0xab, 0xd5, 0xae, 0x56, 0xc5, 0x56, 0x2b, 0x15, 0xb9, 0xd6, 0xeb, 0xa0, 0x5c, 0x3f, 0x6a, 0xcb, + 0x62, 0x2a, 0xea, 0x8b, 0xaf, 0xfc, 0xf4, 0x77, 0x17, 0x59, 0xe1, 0xc5, 0x45, 0x56, 0x78, 0x79, + 0x91, 0x15, 0xfe, 0x7d, 0x91, 0x15, 0xbe, 0x7e, 0x9b, 0x5d, 0x7a, 0xf9, 0x36, 0xbb, 0xf4, 0xea, + 0x6d, 0x76, 0xe9, 0x8b, 0xdd, 0xa9, 0xb6, 0x70, 0x40, 0x2c, 0xd6, 0xed, 0x13, 0xad, 0x74, 0x1a, + 0xfc, 0xf0, 0xca, 0xed, 0x7c, 0xea, 0xef, 0xea, 0xce, 0x8a, 0x57, 0xa1, 0x1f, 0xfd, 0x3f, 0x00, + 0x00, 0xff, 0xff, 0x5e, 0xfe, 0x91, 0x56, 0x7e, 0x0f, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.FoundationTax.Equal(that1.FoundationTax) { + return false + } + return true +} +func (this *Censorship) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Censorship) + if !ok { + that2, ok := that.(Censorship) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MsgTypeUrl != that1.MsgTypeUrl { + return false + } + if this.Authority != that1.Authority { + return false + } + return true +} +func (this *Member) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Member) + if !ok { + that2, ok := that.(Member) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Address != that1.Address { + return false + } + if this.Metadata != that1.Metadata { + return false + } + if !this.AddedAt.Equal(that1.AddedAt) { + return false + } + return true +} +func (this *MemberRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MemberRequest) + if !ok { + that2, ok := that.(MemberRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Address != that1.Address { + return false + } + if this.Remove != that1.Remove { + return false + } + if this.Metadata != that1.Metadata { + return false + } + return true +} +func (this *ThresholdDecisionPolicy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ThresholdDecisionPolicy) + if !ok { + that2, ok := that.(ThresholdDecisionPolicy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Threshold.Equal(that1.Threshold) { + return false + } + if !this.Windows.Equal(that1.Windows) { + return false + } + return true +} +func (this *PercentageDecisionPolicy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PercentageDecisionPolicy) + if !ok { + that2, ok := that.(PercentageDecisionPolicy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Percentage.Equal(that1.Percentage) { + return false + } + if !this.Windows.Equal(that1.Windows) { + return false + } + return true +} +func (this *DecisionPolicyWindows) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DecisionPolicyWindows) + if !ok { + that2, ok := that.(DecisionPolicyWindows) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.VotingPeriod != that1.VotingPeriod { + return false + } + if this.MinExecutionPeriod != that1.MinExecutionPeriod { + return false + } + return true +} +func (this *OutsourcingDecisionPolicy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OutsourcingDecisionPolicy) + if !ok { + that2, ok := that.(OutsourcingDecisionPolicy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Description != that1.Description { + return false + } + return true +} +func (this *FoundationInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FoundationInfo) + if !ok { + that2, ok := that.(FoundationInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Version != that1.Version { + return false + } + if !this.TotalWeight.Equal(that1.TotalWeight) { + return false + } + if !this.DecisionPolicy.Equal(that1.DecisionPolicy) { + return false + } + return true +} +func (this *Proposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Proposal) + if !ok { + that2, ok := that.(Proposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Metadata != that1.Metadata { + return false + } + if len(this.Proposers) != len(that1.Proposers) { + return false + } + for i := range this.Proposers { + if this.Proposers[i] != that1.Proposers[i] { + return false + } + } + if !this.SubmitTime.Equal(that1.SubmitTime) { + return false + } + if this.FoundationVersion != that1.FoundationVersion { + return false + } + if this.Status != that1.Status { + return false + } + if !this.FinalTallyResult.Equal(&that1.FinalTallyResult) { + return false + } + if !this.VotingPeriodEnd.Equal(that1.VotingPeriodEnd) { + return false + } + if this.ExecutorResult != that1.ExecutorResult { + return false + } + if len(this.Messages) != len(that1.Messages) { + return false + } + for i := range this.Messages { + if !this.Messages[i].Equal(that1.Messages[i]) { + return false + } + } + return true +} +func (this *TallyResult) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TallyResult) + if !ok { + that2, ok := that.(TallyResult) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.YesCount.Equal(that1.YesCount) { + return false + } + if !this.AbstainCount.Equal(that1.AbstainCount) { + return false + } + if !this.NoCount.Equal(that1.NoCount) { + return false + } + if !this.NoWithVetoCount.Equal(that1.NoWithVetoCount) { + return false + } + return true +} +func (this *Vote) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Vote) + if !ok { + that2, ok := that.(Vote) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ProposalId != that1.ProposalId { + return false + } + if this.Voter != that1.Voter { + return false + } + if this.Option != that1.Option { + return false + } + if this.Metadata != that1.Metadata { + return false + } + if !this.SubmitTime.Equal(that1.SubmitTime) { + return false + } + return true +} +func (this *Pool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Pool) + if !ok { + that2, ok := that.(Pool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Treasury) != len(that1.Treasury) { + return false + } + for i := range this.Treasury { + if !this.Treasury[i].Equal(&that1.Treasury[i]) { + return false + } + } + return true +} +func (this *FoundationExecProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FoundationExecProposal) + if !ok { + that2, ok := that.(FoundationExecProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.Messages) != len(that1.Messages) { + return false + } + for i := range this.Messages { + if !this.Messages[i].Equal(that1.Messages[i]) { + return false + } + } + return true +} +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 + { + size := m.FoundationTax.Size() + i -= size + if _, err := m.FoundationTax.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Censorship) 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 *Censorship) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Censorship) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Authority != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.Authority)) + i-- + dAtA[i] = 0x10 + } + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.MsgTypeUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Member) 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 *Member) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.AddedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.AddedAt):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintFoundation(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x22 + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MemberRequest) 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 *MemberRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MemberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if m.Remove { + i-- + if m.Remove { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ThresholdDecisionPolicy) 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 *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Windows != nil { + { + size, err := m.Windows.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size := m.Threshold.Size() + i -= size + if _, err := m.Threshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PercentageDecisionPolicy) 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 *PercentageDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PercentageDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Windows != nil { + { + size, err := m.Windows.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size := m.Percentage.Size() + i -= size + if _, err := m.Percentage.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DecisionPolicyWindows) 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 *DecisionPolicyWindows) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DecisionPolicyWindows) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MinExecutionPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MinExecutionPeriod):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintFoundation(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x12 + n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintFoundation(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OutsourcingDecisionPolicy) 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 *OutsourcingDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutsourcingDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FoundationInfo) 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 *FoundationInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FoundationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size := m.TotalWeight.Size() + i -= size + if _, err := m.TotalWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Version != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Proposal) 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 *Proposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if m.ExecutorResult != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.ExecutorResult)) + i-- + dAtA[i] = 0x48 + } + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.VotingPeriodEnd, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingPeriodEnd):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintFoundation(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x42 + { + size, err := m.FinalTallyResult.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if m.Status != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + if m.FoundationVersion != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.FoundationVersion)) + i-- + dAtA[i] = 0x28 + } + n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintFoundation(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x22 + if len(m.Proposers) > 0 { + for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Proposers[iNdEx]) + copy(dAtA[i:], m.Proposers[iNdEx]) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Proposers[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TallyResult) 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 *TallyResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.NoWithVetoCount.Size() + i -= size + if _, err := m.NoWithVetoCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.NoCount.Size() + i -= size + if _, err := m.NoCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.AbstainCount.Size() + i -= size + if _, err := m.AbstainCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.YesCount.Size() + i -= size + if _, err := m.YesCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Vote) 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 *Vote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintFoundation(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x2a + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 + } + if m.Option != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.Option)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintFoundation(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Pool) 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 *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Treasury) > 0 { + for iNdEx := len(m.Treasury) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Treasury[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *FoundationExecProposal) 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 *FoundationExecProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FoundationExecProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFoundation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintFoundation(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFoundation(dAtA []byte, offset int, v uint64) int { + offset -= sovFoundation(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 + l = m.FoundationTax.Size() + n += 1 + l + sovFoundation(uint64(l)) + return n +} + +func (m *Censorship) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MsgTypeUrl) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + if m.Authority != 0 { + n += 1 + sovFoundation(uint64(m.Authority)) + } + return n +} + +func (m *Member) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.AddedAt) + n += 1 + l + sovFoundation(uint64(l)) + return n +} + +func (m *MemberRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + if m.Remove { + n += 2 + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + return n +} + +func (m *ThresholdDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Threshold.Size() + n += 1 + l + sovFoundation(uint64(l)) + if m.Windows != nil { + l = m.Windows.Size() + n += 1 + l + sovFoundation(uint64(l)) + } + return n +} + +func (m *PercentageDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Percentage.Size() + n += 1 + l + sovFoundation(uint64(l)) + if m.Windows != nil { + l = m.Windows.Size() + n += 1 + l + sovFoundation(uint64(l)) + } + return n +} + +func (m *DecisionPolicyWindows) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod) + n += 1 + l + sovFoundation(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MinExecutionPeriod) + n += 1 + l + sovFoundation(uint64(l)) + return n +} + +func (m *OutsourcingDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Description) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + return n +} + +func (m *FoundationInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovFoundation(uint64(m.Version)) + } + l = m.TotalWeight.Size() + n += 1 + l + sovFoundation(uint64(l)) + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovFoundation(uint64(l)) + } + return n +} + +func (m *Proposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovFoundation(uint64(m.Id)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + if len(m.Proposers) > 0 { + for _, s := range m.Proposers { + l = len(s) + n += 1 + l + sovFoundation(uint64(l)) + } + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime) + n += 1 + l + sovFoundation(uint64(l)) + if m.FoundationVersion != 0 { + n += 1 + sovFoundation(uint64(m.FoundationVersion)) + } + if m.Status != 0 { + n += 1 + sovFoundation(uint64(m.Status)) + } + l = m.FinalTallyResult.Size() + n += 1 + l + sovFoundation(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingPeriodEnd) + n += 1 + l + sovFoundation(uint64(l)) + if m.ExecutorResult != 0 { + n += 1 + sovFoundation(uint64(m.ExecutorResult)) + } + if len(m.Messages) > 0 { + for _, e := range m.Messages { + l = e.Size() + n += 1 + l + sovFoundation(uint64(l)) + } + } + return n +} + +func (m *TallyResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.YesCount.Size() + n += 1 + l + sovFoundation(uint64(l)) + l = m.AbstainCount.Size() + n += 1 + l + sovFoundation(uint64(l)) + l = m.NoCount.Size() + n += 1 + l + sovFoundation(uint64(l)) + l = m.NoWithVetoCount.Size() + n += 1 + l + sovFoundation(uint64(l)) + return n +} + +func (m *Vote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovFoundation(uint64(m.ProposalId)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + if m.Option != 0 { + n += 1 + sovFoundation(uint64(m.Option)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime) + n += 1 + l + sovFoundation(uint64(l)) + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Treasury) > 0 { + for _, e := range m.Treasury { + l = e.Size() + n += 1 + l + sovFoundation(uint64(l)) + } + } + return n +} + +func (m *FoundationExecProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovFoundation(uint64(l)) + } + if len(m.Messages) > 0 { + for _, e := range m.Messages { + l = e.Size() + n += 1 + l + sovFoundation(uint64(l)) + } + } + return n +} + +func sovFoundation(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFoundation(x uint64) (n int) { + return sovFoundation(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 ErrIntOverflowFoundation + } + 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 FoundationTax", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FoundationTax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Censorship) 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 ErrIntOverflowFoundation + } + 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: Censorship: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Censorship: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + m.Authority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Authority |= CensorshipAuthority(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Member) 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 ErrIntOverflowFoundation + } + 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: Member: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.AddedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MemberRequest) 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 ErrIntOverflowFoundation + } + 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: MemberRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MemberRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Remove", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Remove = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ThresholdDecisionPolicy) 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 ErrIntOverflowFoundation + } + 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: ThresholdDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ThresholdDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Threshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Windows", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Windows == nil { + m.Windows = &DecisionPolicyWindows{} + } + if err := m.Windows.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PercentageDecisionPolicy) 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 ErrIntOverflowFoundation + } + 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: PercentageDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PercentageDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Percentage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Windows", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Windows == nil { + m.Windows = &DecisionPolicyWindows{} + } + if err := m.Windows.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DecisionPolicyWindows) 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 ErrIntOverflowFoundation + } + 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: DecisionPolicyWindows: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DecisionPolicyWindows: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinExecutionPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MinExecutionPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OutsourcingDecisionPolicy) 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 ErrIntOverflowFoundation + } + 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: OutsourcingDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OutsourcingDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FoundationInfo) 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 ErrIntOverflowFoundation + } + 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: FoundationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FoundationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Proposal) 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 ErrIntOverflowFoundation + } + 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: Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proposal: 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 ErrIntOverflowFoundation + } + 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 Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposers = append(m.Proposers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FoundationVersion", wireType) + } + m.FoundationVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FoundationVersion |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= ProposalStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FinalTallyResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriodEnd", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.VotingPeriodEnd, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorResult", wireType) + } + m.ExecutorResult = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutorResult |= ProposalExecutorResult(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Messages = append(m.Messages, &types.Any{}) + if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TallyResult) 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 ErrIntOverflowFoundation + } + 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: TallyResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TallyResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field YesCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.YesCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AbstainCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AbstainCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NoCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NoCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NoWithVetoCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NoWithVetoCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Vote) 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 ErrIntOverflowFoundation + } + 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: Vote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) + } + m.Option = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Option |= VoteOption(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) 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 ErrIntOverflowFoundation + } + 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: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Treasury", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Treasury = append(m.Treasury, types1.DecCoin{}) + if err := m.Treasury[len(m.Treasury)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FoundationExecProposal) 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 ErrIntOverflowFoundation + } + 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: FoundationExecProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FoundationExecProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + 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 ErrInvalidLengthFoundation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFoundation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFoundation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFoundation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Messages = append(m.Messages, &types.Any{}) + if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFoundation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFoundation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFoundation(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, ErrIntOverflowFoundation + } + 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, ErrIntOverflowFoundation + } + 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, ErrIntOverflowFoundation + } + 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, ErrInvalidLengthFoundation + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFoundation + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFoundation + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFoundation = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFoundation = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFoundation = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/foundation/foundation_test.go b/x/foundation/foundation_test.go new file mode 100644 index 0000000000..903b877c21 --- /dev/null +++ b/x/foundation/foundation_test.go @@ -0,0 +1,638 @@ +package foundation_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func TestTallyResult(t *testing.T) { + result := foundation.DefaultTallyResult() + + err := result.Add(foundation.VOTE_OPTION_UNSPECIFIED) + require.Error(t, err) + + err = result.Add(foundation.VOTE_OPTION_YES) + require.NoError(t, err) + require.Equal(t, sdk.OneDec(), result.YesCount) + + err = result.Add(foundation.VOTE_OPTION_ABSTAIN) + require.NoError(t, err) + require.Equal(t, sdk.OneDec(), result.AbstainCount) + + err = result.Add(foundation.VOTE_OPTION_NO) + require.NoError(t, err) + require.Equal(t, sdk.OneDec(), result.NoCount) + + err = result.Add(foundation.VOTE_OPTION_NO_WITH_VETO) + require.NoError(t, err) + require.Equal(t, sdk.OneDec(), result.NoWithVetoCount) + + require.Equal(t, sdk.NewDec(4), result.TotalCounts()) +} + +func TestThresholdDecisionPolicy(t *testing.T) { + config := foundation.DefaultConfig() + + testCases := map[string]struct { + threshold sdk.Dec + votingPeriod time.Duration + minExecutionPeriod time.Duration + totalWeight sdk.Dec + validBasic bool + valid bool + }{ + "valid policy": { + threshold: sdk.OneDec(), + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, + totalWeight: sdk.OneDec(), + validBasic: true, + valid: true, + }, + "invalid threshold": { + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, + totalWeight: sdk.OneDec(), + }, + "invalid voting period": { + threshold: sdk.OneDec(), + minExecutionPeriod: config.MaxExecutionPeriod - time.Nanosecond, + totalWeight: sdk.OneDec(), + }, + "invalid min execution period": { + threshold: sdk.OneDec(), + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour, + totalWeight: sdk.OneDec(), + validBasic: true, + }, + "invalid total weight": { + threshold: sdk.OneDec(), + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, + totalWeight: sdk.ZeroDec(), + validBasic: true, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + policy := foundation.ThresholdDecisionPolicy{ + Threshold: tc.threshold, + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: tc.votingPeriod, + MinExecutionPeriod: tc.minExecutionPeriod, + }, + } + require.Equal(t, tc.votingPeriod, policy.GetVotingPeriod()) + + err := policy.ValidateBasic() + if !tc.validBasic { + require.Error(t, err) + return + } + require.NoError(t, err) + + info := foundation.FoundationInfo{ + TotalWeight: tc.totalWeight, + } + err = policy.Validate(info, config) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestThresholdDecisionPolicyAllow(t *testing.T) { + config := foundation.DefaultConfig() + policy := foundation.ThresholdDecisionPolicy{ + Threshold: sdk.NewDec(10), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + } + require.NoError(t, policy.ValidateBasic()) + + info := foundation.FoundationInfo{ + TotalWeight: sdk.OneDec(), + } + require.NoError(t, policy.Validate(info, config)) + require.Equal(t, time.Hour, policy.GetVotingPeriod()) + + testCases := map[string]struct { + sinceSubmission time.Duration + totalWeight sdk.Dec + tally foundation.TallyResult + valid bool + final bool + allow bool + }{ + "allow": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + totalWeight: policy.Threshold, + tally: foundation.NewTallyResult(policy.Threshold, sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + valid: true, + final: true, + allow: true, + }, + "allow (member size < threshold)": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + totalWeight: sdk.OneDec(), + tally: foundation.NewTallyResult(sdk.OneDec(), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + valid: true, + final: true, + allow: true, + }, + "not final": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + totalWeight: policy.Threshold, + tally: foundation.NewTallyResult(policy.Threshold.Sub(sdk.OneDec()), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + valid: true, + }, + "deny": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + totalWeight: policy.Threshold.Add(sdk.OneDec()), + tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.OneDec(), sdk.OneDec(), sdk.ZeroDec()), + valid: true, + final: true, + }, + "too early": { + sinceSubmission: policy.Windows.MinExecutionPeriod - time.Nanosecond, + totalWeight: policy.Threshold, + tally: foundation.NewTallyResult(policy.Threshold, sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + result, err := policy.Allow(tc.tally, tc.totalWeight, tc.sinceSubmission) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.final, result.Final) + if tc.final { + require.Equal(t, tc.allow, result.Allow) + } + }) + } +} + +func TestPercentageDecisionPolicy(t *testing.T) { + config := foundation.DefaultConfig() + + testCases := map[string]struct { + percentage sdk.Dec + votingPeriod time.Duration + minExecutionPeriod time.Duration + totalWeight sdk.Dec + validBasic bool + valid bool + }{ + "valid policy": { + percentage: sdk.OneDec(), + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, + totalWeight: sdk.OneDec(), + validBasic: true, + valid: true, + }, + "invalid percentage": { + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, + totalWeight: sdk.OneDec(), + }, + "invalid voting period": { + percentage: sdk.OneDec(), + minExecutionPeriod: config.MaxExecutionPeriod - time.Nanosecond, + totalWeight: sdk.OneDec(), + }, + "invalid min execution period": { + percentage: sdk.OneDec(), + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour, + totalWeight: sdk.OneDec(), + validBasic: true, + }, + "invalid total weight": { + percentage: sdk.OneDec(), + votingPeriod: time.Hour, + minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, + totalWeight: sdk.ZeroDec(), + validBasic: true, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + policy := foundation.PercentageDecisionPolicy{ + Percentage: tc.percentage, + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: tc.votingPeriod, + MinExecutionPeriod: tc.minExecutionPeriod, + }, + } + require.Equal(t, tc.votingPeriod, policy.GetVotingPeriod()) + + err := policy.ValidateBasic() + if !tc.validBasic { + require.Error(t, err) + return + } + require.NoError(t, err) + + info := foundation.FoundationInfo{ + TotalWeight: tc.totalWeight, + } + err = policy.Validate(info, config) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestPercentageDecisionPolicyAllow(t *testing.T) { + config := foundation.DefaultConfig() + policy := foundation.PercentageDecisionPolicy{ + Percentage: sdk.MustNewDecFromStr("0.8"), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + } + require.NoError(t, policy.ValidateBasic()) + + info := foundation.FoundationInfo{ + TotalWeight: sdk.OneDec(), + } + require.NoError(t, policy.Validate(info, config)) + require.Equal(t, time.Hour, policy.GetVotingPeriod()) + + totalWeight := sdk.NewDec(10) + testCases := map[string]struct { + sinceSubmission time.Duration + tally foundation.TallyResult + valid bool + final bool + allow bool + }{ + "allow": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + tally: foundation.NewTallyResult(sdk.NewDec(8), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + valid: true, + final: true, + allow: true, + }, + "allow (abstain)": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + tally: foundation.NewTallyResult(sdk.NewDec(4), sdk.NewDec(5), sdk.ZeroDec(), sdk.ZeroDec()), + valid: true, + final: true, + allow: true, + }, + "not final": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.NewDec(5), sdk.NewDec(1), sdk.ZeroDec()), + valid: true, + }, + "deny": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.ZeroDec(), sdk.NewDec(3), sdk.ZeroDec()), + valid: true, + final: true, + }, + "deny (all abstain)": { + sinceSubmission: policy.Windows.MinExecutionPeriod, + tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.NewDec(10), sdk.ZeroDec(), sdk.ZeroDec()), + valid: true, + final: true, + }, + "too early": { + sinceSubmission: policy.Windows.MinExecutionPeriod - time.Nanosecond, + tally: foundation.NewTallyResult(sdk.NewDec(8), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + result, err := policy.Allow(tc.tally, totalWeight, tc.sinceSubmission) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.final, result.Final) + if tc.final { + require.Equal(t, tc.allow, result.Allow) + } + }) + } +} + +func TestMembers(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + members []foundation.Member + valid bool + }{ + "valid updates": { + members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + { + Address: addrs[1].String(), + }, + }, + valid: true, + }, + "invalid member": { + members: []foundation.Member{{}}, + }, + "duplicate members": { + members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + { + Address: addrs[0].String(), + }, + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + members := foundation.Members{tc.members} + err := members.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMemberRequests(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + members []foundation.MemberRequest + valid bool + }{ + "valid requests": { + members: []foundation.MemberRequest{ + { + Address: addrs[0].String(), + }, + { + Address: addrs[1].String(), + Remove: true, + }, + }, + valid: true, + }, + "invalid member": { + members: []foundation.MemberRequest{{}}, + }, + "duplicate requests": { + members: []foundation.MemberRequest{ + { + Address: addrs[0].String(), + }, + { + Address: addrs[0].String(), + Remove: true, + }, + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + requests := foundation.MemberRequests{tc.members} + err := requests.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestProposal(t *testing.T) { + addrs := make([]sdk.AccAddress, 4) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + id uint64 + proposers []string + version uint64 + msgs []sdk.Msg + valid bool + }{ + "valid proposal": { + id: 1, + proposers: []string{ + addrs[0].String(), + addrs[1].String(), + }, + version: 1, + msgs: []sdk.Msg{ + testdata.NewTestMsg(), + }, + valid: true, + }, + "invalid id": { + proposers: []string{ + addrs[0].String(), + addrs[1].String(), + }, + version: 1, + msgs: []sdk.Msg{ + testdata.NewTestMsg(), + }, + }, + "empty proposers": { + id: 1, + version: 1, + msgs: []sdk.Msg{ + testdata.NewTestMsg(), + }, + }, + "invalid proposer": { + id: 1, + proposers: []string{""}, + version: 1, + msgs: []sdk.Msg{ + testdata.NewTestMsg(), + }, + }, + "duplicate proposers": { + id: 1, + proposers: []string{ + addrs[0].String(), + addrs[0].String(), + }, + version: 1, + msgs: []sdk.Msg{ + testdata.NewTestMsg(), + }, + }, + "invalid version": { + id: 1, + proposers: []string{ + addrs[0].String(), + addrs[1].String(), + }, + msgs: []sdk.Msg{ + testdata.NewTestMsg(), + }, + }, + "empty msgs": { + id: 1, + proposers: []string{ + addrs[0].String(), + addrs[1].String(), + }, + version: 1, + }, + "invalid msg": { + id: 1, + proposers: []string{ + addrs[0].String(), + addrs[1].String(), + }, + version: 1, + msgs: []sdk.Msg{ + &foundation.MsgWithdrawFromTreasury{}, + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + proposal := foundation.Proposal{ + Id: tc.id, + Proposers: tc.proposers, + FoundationVersion: tc.version, + }.WithMsgs(tc.msgs) + require.NotNil(t, proposal) + + err := proposal.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestOutsourcingDecisionPolicy(t *testing.T) { + config := foundation.DefaultConfig() + + testCases := map[string]struct { + totalWeight sdk.Dec + validBasic bool + valid bool + }{ + "invalid policy": { + totalWeight: sdk.OneDec(), + validBasic: true, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + policy := foundation.OutsourcingDecisionPolicy{} + require.Zero(t, policy.GetVotingPeriod()) + + err := policy.ValidateBasic() + if !tc.validBasic { + require.Error(t, err) + return + } + require.NoError(t, err) + + info := foundation.FoundationInfo{ + TotalWeight: tc.totalWeight, + } + err = policy.Validate(info, config) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestOutsourcingDecisionPolicyAllow(t *testing.T) { + config := foundation.DefaultConfig() + policy := foundation.OutsourcingDecisionPolicy{} + require.NoError(t, policy.ValidateBasic()) + + info := foundation.FoundationInfo{ + TotalWeight: sdk.OneDec(), + } + require.Error(t, policy.Validate(info, config)) + require.Zero(t, policy.GetVotingPeriod()) + + testCases := map[string]struct { + sinceSubmission time.Duration + totalWeight sdk.Dec + tally foundation.TallyResult + valid bool + final bool + allow bool + }{ + "deny": { + sinceSubmission: 0, + totalWeight: sdk.OneDec(), + tally: foundation.NewTallyResult(sdk.OneDec(), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + result, err := policy.Allow(tc.tally, tc.totalWeight, tc.sinceSubmission) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.final, result.Final) + if tc.final { + require.Equal(t, tc.allow, result.Allow) + } + }) + } +} diff --git a/x/foundation/genesis.go b/x/foundation/genesis.go new file mode 100644 index 0000000000..2fb323f393 --- /dev/null +++ b/x/foundation/genesis.go @@ -0,0 +1,230 @@ +package foundation + +import ( + "github.com/gogo/protobuf/proto" + + codectypes "github.com/Finschia/finschia-sdk/codec/types" + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" +) + +// DefaultGenesisState creates a default GenesisState object +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + Foundation: DefaultFoundation(), + } +} + +func DefaultFoundation() FoundationInfo { + return *FoundationInfo{ + Version: 1, + TotalWeight: sdk.ZeroDec(), + }.WithDecisionPolicy(DefaultDecisionPolicy()) +} + +func DefaultDecisionPolicy() DecisionPolicy { + return &OutsourcingDecisionPolicy{ + Description: "using x/group", + } +} + +func DefaultAuthority() sdk.AccAddress { + return authtypes.NewModuleAddress(ModuleName) +} + +func DefaultParams() Params { + return Params{ + FoundationTax: sdk.ZeroDec(), + } +} + +func (data GenesisState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + if err := data.Foundation.UnpackInterfaces(unpacker); err != nil { + return err + } + + for _, p := range data.Proposals { + if err := p.UnpackInterfaces(unpacker); err != nil { + return err + } + } + + for _, ga := range data.Authorizations { + if err := ga.UnpackInterfaces(unpacker); err != nil { + return err + } + } + + return nil +} + +func (i FoundationInfo) ValidateBasic() error { + if i.Version == 0 { + return sdkerrors.ErrInvalidVersion.Wrap("version must be > 0") + } + + if i.TotalWeight.IsNil() || i.TotalWeight.IsNegative() { + return sdkerrors.ErrInvalidRequest.Wrap("total weight must be >= 0") + } + + policy := i.GetDecisionPolicy() + if policy == nil { + return sdkerrors.ErrInvalidRequest.Wrap("must provide decision policy") + } + if err := policy.ValidateBasic(); err != nil { + return err + } + + // Is foundation outsourcing the proposal feature + _, isOutsourcing := i.GetDecisionPolicy().(*OutsourcingDecisionPolicy) + memberNotExists := i.TotalWeight.IsZero() + if isOutsourcing && !memberNotExists { + return sdkerrors.ErrInvalidRequest.Wrap("outsourcing policy not allows members") + } + if !isOutsourcing && memberNotExists { + return sdkerrors.ErrInvalidRequest.Wrap("one member must exist at least") + } + + return nil +} + +// ValidateGenesis validates the provided genesis state to ensure the +// expected invariants holds. +func ValidateGenesis(data GenesisState) error { + if err := data.Params.ValidateBasic(); err != nil { + return err + } + + info := data.Foundation + if err := info.ValidateBasic(); err != nil { + return err + } + // Is x/foundation outsourcing the proposal feature + isOutsourcing := info.TotalWeight.IsZero() + + if realWeight := sdk.NewDec(int64(len(data.Members))); !info.TotalWeight.Equal(realWeight) { + return sdkerrors.ErrInvalidRequest.Wrapf("total weight not match, %s != %s", info.TotalWeight, realWeight) + } + members := Members{Members: data.Members} + if err := members.ValidateBasic(); err != nil { + return err + } + + if isOutsourcing && len(data.Proposals) != 0 { + return sdkerrors.ErrInvalidRequest.Wrap("outsourcing policy not allows proposals") + } + proposalIDs := map[uint64]bool{} + for _, proposal := range data.Proposals { + id := proposal.Id + if id > data.PreviousProposalId { + return sdkerrors.ErrInvalidRequest.Wrapf("proposal %d has not yet been submitted", id) + } + if proposalIDs[id] { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicated proposal id of %d", id) + } + proposalIDs[id] = true + + if err := proposal.ValidateBasic(); err != nil { + return err + } + + if proposal.FoundationVersion > info.Version { + return sdkerrors.ErrInvalidRequest.Wrapf("invalid foundation version of proposal %d", id) + } + } + + for _, vote := range data.Votes { + if !proposalIDs[vote.ProposalId] { + return sdkerrors.ErrInvalidRequest.Wrapf("vote for a proposal which does not exist: id %d", vote.ProposalId) + } + + if _, err := sdk.AccAddressFromBech32(vote.Voter); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", vote.Voter) + } + + if err := validateVoteOption(vote.Option); err != nil { + return err + } + } + + seenURLs := map[string]bool{} + for _, censorship := range data.Censorships { + if err := censorship.ValidateBasic(); err != nil { + return err + } + if censorship.Authority == CensorshipAuthorityUnspecified { + return sdkerrors.ErrInvalidRequest.Wrap("authority unspecified") + } + + url := censorship.MsgTypeUrl + if seenURLs[url] { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate censorship over %s", url) + } + seenURLs[url] = true + } + + for _, ga := range data.Authorizations { + auth := ga.GetAuthorization() + if auth == nil { + return sdkerrors.ErrInvalidType.Wrap("invalid authorization") + } + + url := auth.MsgTypeURL() + if !seenURLs[url] { + return sdkerrors.ErrInvalidRequest.Wrapf("no censorship over %s", url) + } + + if _, err := sdk.AccAddressFromBech32(ga.Grantee); err != nil { + return err + } + } + + if err := data.Pool.ValidateBasic(); err != nil { + return err + } + + return nil +} + +func (g GrantAuthorization) GetAuthorization() Authorization { + if g.Authorization == nil { + return nil + } + + a, ok := g.Authorization.GetCachedValue().(Authorization) + if !ok { + return nil + } + return a +} + +func (g *GrantAuthorization) SetAuthorization(a Authorization) error { + msg, ok := a.(proto.Message) + if !ok { + return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) + } + + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return err + } + g.Authorization = any + + return nil +} + +// for the tests +func (g GrantAuthorization) WithAuthorization(authorization Authorization) *GrantAuthorization { + grant := g + if err := grant.SetAuthorization(authorization); err != nil { + return nil + } + return &grant +} + +func (g GrantAuthorization) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var authorization Authorization + return unpacker.UnpackAny(g.Authorization, &authorization) +} diff --git a/x/foundation/genesis.pb.go b/x/foundation/genesis.pb.go new file mode 100644 index 0000000000..911f21c763 --- /dev/null +++ b/x/foundation/genesis.pb.go @@ -0,0 +1,984 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/foundation/v1/genesis.proto + +package foundation + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/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 foundation module's genesis state. +type GenesisState struct { + // params defines the module parameters at genesis. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // foundation is the foundation info. + Foundation FoundationInfo `protobuf:"bytes,2,opt,name=foundation,proto3" json:"foundation"` + // members is the list of the foundation members. + Members []Member `protobuf:"bytes,3,rep,name=members,proto3" json:"members"` + // it is used to get the next proposal ID. + PreviousProposalId uint64 `protobuf:"varint,4,opt,name=previous_proposal_id,json=previousProposalId,proto3" json:"previous_proposal_id,omitempty"` + // proposals is the list of proposals. + Proposals []Proposal `protobuf:"bytes,5,rep,name=proposals,proto3" json:"proposals"` + // votes is the list of votes. + Votes []Vote `protobuf:"bytes,6,rep,name=votes,proto3" json:"votes"` + // grants + Authorizations []GrantAuthorization `protobuf:"bytes,7,rep,name=authorizations,proto3" json:"authorizations"` + // pool + Pool Pool `protobuf:"bytes,8,opt,name=pool,proto3" json:"pool"` + Censorships []Censorship `protobuf:"bytes,10,rep,name=censorships,proto3" json:"censorships"` +} + +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_c5e13dd78b24d473, []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 + +// GrantAuthorization defines authorization grant to grantee via route. +type GrantAuthorization struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + Authorization *types.Any `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` +} + +func (m *GrantAuthorization) Reset() { *m = GrantAuthorization{} } +func (m *GrantAuthorization) String() string { return proto.CompactTextString(m) } +func (*GrantAuthorization) ProtoMessage() {} +func (*GrantAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_c5e13dd78b24d473, []int{1} +} +func (m *GrantAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GrantAuthorization.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 *GrantAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_GrantAuthorization.Merge(m, src) +} +func (m *GrantAuthorization) XXX_Size() int { + return m.Size() +} +func (m *GrantAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_GrantAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_GrantAuthorization proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisState)(nil), "lbm.foundation.v1.GenesisState") + proto.RegisterType((*GrantAuthorization)(nil), "lbm.foundation.v1.GrantAuthorization") +} + +func init() { proto.RegisterFile("lbm/foundation/v1/genesis.proto", fileDescriptor_c5e13dd78b24d473) } + +var fileDescriptor_c5e13dd78b24d473 = []byte{ + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6e, 0xd3, 0x40, + 0x14, 0x87, 0x6d, 0xea, 0xe6, 0xcf, 0x14, 0x10, 0x8c, 0x22, 0xe1, 0x16, 0xe1, 0x84, 0x48, 0x48, + 0xdd, 0xc4, 0x26, 0xed, 0x02, 0x51, 0x16, 0x55, 0x82, 0x68, 0x54, 0x10, 0x52, 0x94, 0x48, 0x2c, + 0xd8, 0x54, 0x76, 0x3c, 0x71, 0x46, 0xc4, 0xf3, 0x2c, 0xcf, 0x24, 0xa2, 0x70, 0x01, 0x96, 0x1c, + 0xa1, 0x4b, 0x0e, 0xd0, 0x43, 0x54, 0xb0, 0xa9, 0xba, 0x62, 0x85, 0x50, 0xb2, 0xe1, 0x18, 0x28, + 0xe3, 0x71, 0xe3, 0x10, 0xb3, 0xe8, 0xce, 0x93, 0xf7, 0x7d, 0xf3, 0x7e, 0x6f, 0xf4, 0x82, 0xaa, + 0x63, 0x2f, 0x74, 0x86, 0x30, 0x61, 0xbe, 0x2b, 0x28, 0x30, 0x67, 0xda, 0x74, 0x02, 0xc2, 0x08, + 0xa7, 0xdc, 0x8e, 0x62, 0x10, 0x80, 0xef, 0x8f, 0xbd, 0xd0, 0x5e, 0x02, 0xf6, 0xb4, 0xb9, 0x53, + 0x09, 0x20, 0x00, 0x59, 0x75, 0x16, 0x5f, 0x09, 0xb8, 0x53, 0x5f, 0xbf, 0x29, 0xa3, 0x25, 0xcc, + 0xf6, 0x00, 0x78, 0x08, 0xfc, 0x24, 0x91, 0x93, 0x43, 0x5a, 0x0a, 0x00, 0x82, 0x31, 0x71, 0xe4, + 0xc9, 0x9b, 0x0c, 0x1d, 0x97, 0x9d, 0x26, 0xa5, 0xfa, 0x95, 0x81, 0x6e, 0x77, 0x92, 0x50, 0x7d, + 0xe1, 0x0a, 0x82, 0x9f, 0xa1, 0x42, 0xe4, 0xc6, 0x6e, 0xc8, 0x4d, 0xbd, 0xa6, 0xef, 0x6e, 0xed, + 0x6d, 0xdb, 0x6b, 0x21, 0xed, 0xae, 0x04, 0xda, 0xc6, 0xc5, 0xaf, 0xaa, 0xd6, 0x53, 0x38, 0xee, + 0x20, 0xb4, 0xa4, 0xcc, 0x5b, 0x52, 0x7e, 0x9c, 0x23, 0x1f, 0x5d, 0x9f, 0x8e, 0xd9, 0x10, 0xd4, + 0x25, 0x19, 0x15, 0x3f, 0x47, 0xc5, 0x90, 0x84, 0x1e, 0x89, 0xb9, 0xb9, 0x51, 0xdb, 0xf8, 0x4f, + 0x84, 0xb7, 0x92, 0x50, 0x76, 0xca, 0xe3, 0xa7, 0xa8, 0x12, 0xc5, 0x64, 0x4a, 0x61, 0x22, 0xdf, + 0x21, 0x02, 0xee, 0x8e, 0x4f, 0xa8, 0x6f, 0x1a, 0x35, 0x7d, 0xd7, 0xe8, 0xe1, 0xb4, 0xd6, 0x55, + 0xa5, 0x63, 0x1f, 0x1f, 0xa2, 0x72, 0x0a, 0x72, 0x73, 0x53, 0xb6, 0x7b, 0x98, 0x37, 0xb1, 0x62, + 0x54, 0xc3, 0xa5, 0x83, 0xf7, 0xd1, 0xe6, 0x14, 0x04, 0xe1, 0x66, 0x41, 0xca, 0x0f, 0x72, 0xe4, + 0x77, 0x20, 0x88, 0x12, 0x13, 0x16, 0xf7, 0xd1, 0x5d, 0x77, 0x22, 0x46, 0x10, 0xd3, 0x4f, 0x92, + 0xe2, 0x66, 0x51, 0xda, 0x4f, 0x72, 0xec, 0x4e, 0xec, 0x32, 0xd1, 0xca, 0xd2, 0xea, 0xae, 0x7f, + 0xae, 0xc0, 0x4d, 0x64, 0x44, 0x00, 0x63, 0xb3, 0x24, 0x9f, 0x3e, 0x2f, 0x48, 0x17, 0x20, 0x9d, + 0x40, 0xa2, 0xf8, 0x15, 0xda, 0x1a, 0x10, 0xc6, 0x21, 0xe6, 0x23, 0x1a, 0x71, 0x13, 0xc9, 0x10, + 0x8f, 0x72, 0xcc, 0x97, 0xd7, 0x94, 0xf2, 0xb3, 0xde, 0x41, 0xe9, 0xcb, 0x59, 0x55, 0xfb, 0x73, + 0x56, 0xd5, 0x5e, 0x1b, 0xa5, 0xf2, 0x3d, 0x54, 0xff, 0xa1, 0x23, 0xbc, 0x1e, 0x1b, 0xef, 0xa1, + 0x62, 0xb0, 0xf8, 0x95, 0x10, 0xb9, 0x5b, 0xe5, 0xb6, 0x79, 0x75, 0xde, 0xa8, 0xa8, 0x4d, 0x6d, + 0xf9, 0x7e, 0x4c, 0x38, 0xef, 0x8b, 0x98, 0xb2, 0xa0, 0x97, 0x82, 0xf8, 0x33, 0xba, 0xb3, 0x32, + 0xa6, 0x5a, 0xac, 0x8a, 0x9d, 0xac, 0xb4, 0x9d, 0xae, 0xb4, 0xdd, 0x62, 0xa7, 0xed, 0xc3, 0xef, + 0xe7, 0x8d, 0x17, 0x01, 0x15, 0xa3, 0x89, 0x67, 0x0f, 0x20, 0x74, 0x8e, 0x28, 0xe3, 0x83, 0x11, + 0x75, 0x9d, 0xa1, 0xfa, 0x68, 0x70, 0xff, 0x83, 0xf3, 0x31, 0xfb, 0xdf, 0x59, 0x49, 0xd8, 0x5b, + 0xed, 0x75, 0x60, 0x2c, 0xe6, 0x6a, 0xbf, 0xf9, 0x36, 0xb3, 0xf4, 0x8b, 0x99, 0xa5, 0x5f, 0xce, + 0x2c, 0xfd, 0xf7, 0xcc, 0xd2, 0xbf, 0xce, 0x2d, 0xed, 0x72, 0x6e, 0x69, 0x3f, 0xe7, 0x96, 0xf6, + 0xbe, 0x71, 0xa3, 0x7e, 0x5e, 0x41, 0x06, 0xde, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x8a, + 0x7f, 0xa1, 0x1c, 0x04, 0x00, 0x00, +} + +func (this *GrantAuthorization) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GrantAuthorization) + if !ok { + that2, ok := that.(GrantAuthorization) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Grantee != that1.Grantee { + return false + } + if !this.Authorization.Equal(that1.Authorization) { + return false + } + return true +} +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 + if len(m.Censorships) > 0 { + for iNdEx := len(m.Censorships) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Censorships[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + { + size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.Authorizations) > 0 { + for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Authorizations[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.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.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 = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.PreviousProposalId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.PreviousProposalId)) + i-- + dAtA[i] = 0x20 + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Foundation.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 *GrantAuthorization) 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 *GrantAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Authorization != nil { + { + size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + 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.Foundation.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.PreviousProposalId != 0 { + n += 1 + sovGenesis(uint64(m.PreviousProposalId)) + } + if len(m.Proposals) > 0 { + for _, e := range m.Proposals { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Authorizations) > 0 { + for _, e := range m.Authorizations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Pool.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Censorships) > 0 { + for _, e := range m.Censorships { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GrantAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Authorization != nil { + l = m.Authorization.Size() + 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 Foundation", 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.Foundation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", 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.Members = append(m.Members, Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousProposalId", wireType) + } + m.PreviousProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PreviousProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + 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 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.Proposals = append(m.Proposals, Proposal{}) + if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", 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.Votes = append(m.Votes, Vote{}) + if err := m.Votes[len(m.Votes)-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 Authorizations", 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.Authorizations = append(m.Authorizations, GrantAuthorization{}) + if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", 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.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Censorships", 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.Censorships = append(m.Censorships, Censorship{}) + if err := m.Censorships[len(m.Censorships)-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 *GrantAuthorization) 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: GrantAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GrantAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authorization", 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.Authorization == nil { + m.Authorization = &types.Any{} + } + if err := m.Authorization.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 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/foundation/genesis_test.go b/x/foundation/genesis_test.go new file mode 100644 index 0000000000..ba0807f6b6 --- /dev/null +++ b/x/foundation/genesis_test.go @@ -0,0 +1,501 @@ +package foundation_test + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/Finschia/finschia-sdk/codec" + codectypes "github.com/Finschia/finschia-sdk/codec/types" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func workingFoundation() foundation.FoundationInfo { + return *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()) +} + +func workingPolicy() foundation.DecisionPolicy { + return &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: 7 * 24 * time.Hour, // one week + }, + } +} + +func TestDefaultGenesisState(t *testing.T) { + gs := foundation.DefaultGenesisState() + require.NoError(t, foundation.ValidateGenesis(*gs)) + + require.True(t, gs.Params.FoundationTax.IsZero()) + + require.EqualValues(t, 1, gs.Foundation.Version) + require.True(t, gs.Foundation.TotalWeight.IsZero()) + + require.Empty(t, gs.Members) + require.Zero(t, gs.PreviousProposalId) + require.Empty(t, gs.Proposals) + require.Empty(t, gs.Votes) + + require.Empty(t, gs.Censorships) + require.Empty(t, gs.Authorizations) +} + +func TestValidateGenesis(t *testing.T) { + addrs := make([]sdk.AccAddress, 3) + for i := range addrs { + addrs[i] = sdk.AccAddress(fmt.Sprint(i)) + } + + ir := codectypes.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(ir) + foundation.RegisterInterfaces(ir) + testdata.RegisterInterfaces(ir) + + testCases := map[string]struct { + data foundation.GenesisState + valid bool + raw []byte + }{ + "minimal": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + }, + valid: true, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "members": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + }, + valid: true, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "censorships": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + Authorizations: []foundation.GrantAuthorization{ + *foundation.GrantAuthorization{ + Grantee: addrs[0].String(), + }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), + }, + }, + valid: true, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x22, 0x7d, 0x5d, 0x7d}, + }, + "proposals": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + }, + valid: true, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid foundation tax": { + data: foundation.GenesisState{ + Params: foundation.Params{ + FoundationTax: sdk.NewDec(2), + }, + Foundation: foundation.DefaultFoundation(), + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x32, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid members": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{{}}, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid foundation info": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "number of members is different from total weight": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "non empty proposals with outsourcing decision policy": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[0].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid proposal": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{{}}, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "proposal of too far ahead id": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 0, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "proposal of too far ahead version": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 2, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x32, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "duplicate proposals": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x2c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "no proposal for the vote": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Votes: []foundation.Vote{ + { + ProposalId: 1, + Voter: addrs[0].String(), + Option: foundation.VOTE_OPTION_YES, + }, + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid voter": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + Votes: []foundation.Vote{ + { + ProposalId: 1, + Option: foundation.VOTE_OPTION_YES, + }, + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid vote option": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: workingFoundation(), + Members: []foundation.Member{ + { + Address: addrs[0].String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{addrs[1].String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + Votes: []foundation.Vote{ + { + ProposalId: 1, + Voter: addrs[2].String(), + }, + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x67, 0x79, 0x33, 0x78, 0x71, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid censorship": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{{}}, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x7d, 0x5d, 0x7d}, + }, + "duplicate censorship": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }, + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x22, 0x7d, 0x2c, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x22, 0x7d, 0x5d, 0x7d}, + }, + "invalid authorization": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + Authorizations: []foundation.GrantAuthorization{{ + Grantee: addrs[0].String(), + }}, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x22, 0x7d, 0x5d, 0x7d}, + }, + "no censorship": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Authorizations: []foundation.GrantAuthorization{ + *foundation.GrantAuthorization{ + Grantee: addrs[0].String(), + }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + "invalid grantee": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + Authorizations: []foundation.GrantAuthorization{ + *foundation.GrantAuthorization{}.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x22, 0x7d, 0x5d, 0x7d}, + }, + "invalid pool": { + data: foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Pool: foundation.Pool{ + Treasury: sdk.DecCoins{ + { + Denom: sdk.DefaultBondDenom, + Amount: sdk.ZeroDec(), + }, + }, + }, + }, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + }, + } + + for name, tc := range testCases { + tc := tc + + t.Run(name, func(t *testing.T) { + var unmarshalled foundation.GenesisState + err := cdc.UnmarshalJSON(tc.raw, &unmarshalled) + require.NoError(t, err) + + marshaled, err := cdc.MarshalJSON(&tc.data) + require.NoError(t, err) + require.Equal(t, tc.raw, marshaled) + + err = foundation.ValidateGenesis(unmarshalled) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestFoundationInfo(t *testing.T) { + testCases := map[string]struct { + version uint64 + totalWeight sdk.Dec + policy foundation.DecisionPolicy + valid bool + }{ + "valid info (default)": { + version: 1, + totalWeight: sdk.ZeroDec(), + policy: foundation.DefaultDecisionPolicy(), + valid: true, + }, + "valid info (working policy)": { + version: 1, + totalWeight: sdk.OneDec(), + policy: workingPolicy(), + valid: true, + }, + "invalid version": { + totalWeight: sdk.ZeroDec(), + policy: foundation.DefaultDecisionPolicy(), + }, + "invalid total weight": { + version: 1, + policy: foundation.DefaultDecisionPolicy(), + }, + "empty policy": { + version: 1, + totalWeight: sdk.ZeroDec(), + }, + "invalid policy": { + version: 1, + totalWeight: sdk.ZeroDec(), + policy: &foundation.ThresholdDecisionPolicy{}, + }, + "outsourcing with members": { + version: 1, + totalWeight: sdk.OneDec(), + policy: foundation.DefaultDecisionPolicy(), + }, + "working policy without members": { + version: 1, + totalWeight: sdk.ZeroDec(), + policy: workingPolicy(), + }, + } + + for name, tc := range testCases { + info := foundation.FoundationInfo{ + Version: tc.version, + TotalWeight: tc.totalWeight, + } + if tc.policy != nil { + err := info.SetDecisionPolicy(tc.policy) + require.NoError(t, err, name) + } + + err := info.ValidateBasic() + if !tc.valid { + require.Error(t, err, name) + continue + } + require.NoError(t, err, name) + } +} + +func TestDefaultAuthority(t *testing.T) { + // the literal must be retained + require.Equal(t, sdk.AccAddress([]byte("\x2B\xD8\xB7\xB0\xD8\x3E\x0E\xC9\x2A\xBD\xF6\xF7\x14\xCA\x19\x9A\x78\x74\xD0\x86")), foundation.DefaultAuthority()) +} diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go new file mode 100644 index 0000000000..9d7f64bc8b --- /dev/null +++ b/x/foundation/keeper/exported.go @@ -0,0 +1,103 @@ +package keeper + +import ( + "github.com/Finschia/finschia-sdk/baseapp" + "github.com/Finschia/finschia-sdk/codec" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" + paramtypes "github.com/Finschia/finschia-sdk/x/params/types" +) + +type Keeper interface { + GetAuthority() string + Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error + + InitGenesis(ctx sdk.Context, gs *foundation.GenesisState) error + ExportGenesis(ctx sdk.Context) *foundation.GenesisState +} + +type keeper struct { + impl internal.Keeper +} + +func NewKeeper( + cdc codec.Codec, + key sdk.StoreKey, + router *baseapp.MsgServiceRouter, + authKeeper foundation.AuthKeeper, + bankKeeper foundation.BankKeeper, + feeCollectorName string, + config foundation.Config, + authority string, + paramspace paramtypes.Subspace, +) Keeper { + return &keeper{ + impl: internal.NewKeeper( + cdc, + key, + router, + authKeeper, + bankKeeper, + feeCollectorName, + config, + authority, + paramspace, + ), + } +} + +// GetAuthority returns the x/foundation module's authority. +func (k keeper) GetAuthority() string { + return k.impl.GetAuthority() +} + +func (k keeper) Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error { + return k.impl.Accept(ctx, grantee, msg) +} + +func (k keeper) InitGenesis(ctx sdk.Context, gs *foundation.GenesisState) error { + return k.impl.InitGenesis(ctx, gs) +} + +func (k keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState { + return k.impl.ExportGenesis(ctx) +} + +func NewMsgServer(k Keeper) foundation.MsgServer { + impl := k.(*keeper).impl + return internal.NewMsgServer(impl) +} + +func NewQueryServer(k Keeper) foundation.QueryServer { + impl := k.(*keeper).impl + return internal.NewQueryServer(impl) +} + +func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { + impl := k.(*keeper).impl + internal.RegisterInvariants(ir, impl) +} + +func BeginBlocker(ctx sdk.Context, k Keeper) { + impl := k.(*keeper).impl + internal.BeginBlocker(ctx, impl) +} + +func EndBlocker(ctx sdk.Context, k Keeper) { + impl := k.(*keeper).impl + internal.EndBlocker(ctx, impl) +} + +func NewFoundationProposalsHandler(k Keeper) govtypes.Handler { + impl := k.(*keeper).impl + return internal.NewFoundationProposalsHandler(impl) +} + +type Migrator = internal.Migrator + +func NewMigrator(k Keeper) Migrator { + impl := k.(*keeper).impl + return internal.NewMigrator(impl) +} diff --git a/x/foundation/keeper/internal/abci.go b/x/foundation/keeper/internal/abci.go new file mode 100644 index 0000000000..efc9f9da38 --- /dev/null +++ b/x/foundation/keeper/internal/abci.go @@ -0,0 +1,24 @@ +package internal + +import ( + "time" + + "github.com/Finschia/finschia-sdk/telemetry" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +// BeginBlocker withdraws rewards from fee-collector before the distribution +// module's withdraw. +func BeginBlocker(ctx sdk.Context, k Keeper) { + defer telemetry.ModuleMeasureSince(foundation.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + + if err := k.CollectFoundationTax(ctx); err != nil { + panic(err) + } +} + +func EndBlocker(ctx sdk.Context, k Keeper) { + k.UpdateTallyOfVPEndProposals(ctx) + k.PruneExpiredProposals(ctx) +} diff --git a/x/foundation/keeper/internal/abci_test.go b/x/foundation/keeper/internal/abci_test.go new file mode 100644 index 0000000000..dea3cf35fc --- /dev/null +++ b/x/foundation/keeper/internal/abci_test.go @@ -0,0 +1,132 @@ +package internal_test + +import ( + abci "github.com/tendermint/tendermint/abci/types" + + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" +) + +func (s *KeeperTestSuite) TestBeginBlocker() { + for name, tc := range map[string]struct { + taxRatio sdk.Dec + valid bool + }{ + "valid ratio": { + taxRatio: sdk.OneDec(), + valid: true, + }, + "ratio > 1": { + taxRatio: sdk.MustNewDecFromStr("1.00000001"), + }, + } { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + // collect + testing := func() { + s.impl.SetParams(ctx, foundation.Params{ + FoundationTax: tc.taxRatio, + }) + internal.BeginBlocker(ctx, s.impl) + } + if !tc.valid { + s.Require().Panics(testing) + return + } + s.Require().NotPanics(testing) + + if s.deterministic { + expectedEvents := sdk.Events{sdk.Event{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x37, 0x78, 0x70, 0x66, 0x76, 0x61, 0x6b, 0x6d, 0x32, 0x61, 0x6d, 0x67, 0x39, 0x36, 0x32, 0x79, 0x6c, 0x73, 0x36, 0x66, 0x38, 0x34, 0x7a, 0x33, 0x6b, 0x65, 0x6c, 0x6c, 0x38, 0x63, 0x35, 0x6c, 0x39, 0x68, 0x72, 0x7a, 0x73, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, sdk.Event{Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, sdk.Event{Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x37, 0x78, 0x70, 0x66, 0x76, 0x61, 0x6b, 0x6d, 0x32, 0x61, 0x6d, 0x67, 0x39, 0x36, 0x32, 0x79, 0x6c, 0x73, 0x36, 0x66, 0x38, 0x34, 0x7a, 0x33, 0x6b, 0x65, 0x6c, 0x6c, 0x38, 0x63, 0x35, 0x6c, 0x39, 0x68, 0x72, 0x7a, 0x73, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}} + s.Require().Equal(expectedEvents, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestEndBlocker() { + ctx, _ := s.ctx.CacheContext() + + // check preconditions + for name, tc := range map[string]struct { + id uint64 + status foundation.ProposalStatus + }{ + "active proposal": { + s.activeProposal, + foundation.PROPOSAL_STATUS_SUBMITTED, + }, + "voted proposal": { + s.votedProposal, + foundation.PROPOSAL_STATUS_SUBMITTED, + }, + "withdrawn proposal": { + s.withdrawnProposal, + foundation.PROPOSAL_STATUS_WITHDRAWN, + }, + "invalid proposal": { + s.invalidProposal, + foundation.PROPOSAL_STATUS_SUBMITTED, + }, + } { + s.Run(name, func() { + proposal, err := s.impl.GetProposal(ctx, tc.id) + s.Require().NoError(err) + s.Require().NotNil(proposal) + s.Require().Equal(tc.status, proposal.Status) + }) + } + + // voting periods end + votingPeriod := s.impl.GetFoundationInfo(ctx).GetDecisionPolicy().GetVotingPeriod() + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod)) + internal.EndBlocker(ctx, s.impl) + + for name, tc := range map[string]struct { + id uint64 + removed bool + status foundation.ProposalStatus + }{ + "active proposal": { + id: s.activeProposal, + status: foundation.PROPOSAL_STATUS_ACCEPTED, + }, + "voted proposal": { + id: s.votedProposal, + status: foundation.PROPOSAL_STATUS_REJECTED, + }, + "withdrawn proposal": { + id: s.withdrawnProposal, + removed: true, + }, + "invalid proposal": { + id: s.invalidProposal, + status: foundation.PROPOSAL_STATUS_ACCEPTED, + }, + } { + s.Run(name, func() { + proposal, err := s.impl.GetProposal(ctx, tc.id) + if tc.removed { + s.Require().Error(err) + return + } + s.Require().NoError(err) + s.Require().NotNil(proposal) + s.Require().Equal(tc.status, proposal.Status) + }) + } + + // proposals expire + maxExecutionPeriod := foundation.DefaultConfig().MaxExecutionPeriod + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(maxExecutionPeriod)) + internal.EndBlocker(ctx, s.impl) + + // all proposals must be pruned + s.Require().Empty(s.impl.GetProposals(ctx)) + + if s.deterministic { + expectedEvents := sdk.Events{} + s.Require().Equal(expectedEvents, ctx.EventManager().Events()) + } +} diff --git a/x/foundation/keeper/internal/censorship.go b/x/foundation/keeper/internal/censorship.go new file mode 100644 index 0000000000..c08420ab6a --- /dev/null +++ b/x/foundation/keeper/internal/censorship.go @@ -0,0 +1,220 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (k Keeper) GetCensorship(ctx sdk.Context, msgTypeURL string) (*foundation.Censorship, error) { + store := ctx.KVStore(k.storeKey) + key := censorshipKey(msgTypeURL) + bz := store.Get(key) + if bz == nil { + return nil, sdkerrors.ErrNotFound.Wrap("censorship not found") + } + + var censorship foundation.Censorship + k.cdc.MustUnmarshal(bz, &censorship) + + return &censorship, nil +} + +func (k Keeper) UpdateCensorship(ctx sdk.Context, censorship foundation.Censorship) error { + url := censorship.MsgTypeUrl + + oldCensorship, err := k.GetCensorship(ctx, url) + if err != nil { + return err + } + + newAuthority := censorship.Authority + oldAuthority := oldCensorship.Authority + if newAuthority >= oldAuthority { + return sdkerrors.ErrInvalidRequest.Wrapf("bad transition; %s -> %s over %s", oldAuthority, newAuthority, url) + } + + // clean up relevant authorizations + if newAuthority == foundation.CensorshipAuthorityUnspecified { + k.pruneAuthorizations(ctx, url) + } + + k.SetCensorship(ctx, censorship) + + return nil +} + +func (k Keeper) SetCensorship(ctx sdk.Context, censorship foundation.Censorship) { + store := ctx.KVStore(k.storeKey) + key := censorshipKey(censorship.MsgTypeUrl) + + if censorship.Authority == foundation.CensorshipAuthorityUnspecified { + store.Delete(key) + return + } + + bz := k.cdc.MustMarshal(&censorship) + store.Set(key, bz) +} + +func (k Keeper) iterateCensorships(ctx sdk.Context, fn func(censorship foundation.Censorship) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, censorshipKeyPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var censorship foundation.Censorship + k.cdc.MustUnmarshal(iterator.Value(), &censorship) + + if stop := fn(censorship); stop { + break + } + } +} + +func (k Keeper) Grant(ctx sdk.Context, grantee sdk.AccAddress, authorization foundation.Authorization) error { + msgTypeURL := authorization.MsgTypeURL() + if !k.IsCensoredMessage(ctx, msgTypeURL) { + return sdkerrors.ErrInvalidRequest.Wrapf("%s is not being censored", msgTypeURL) + } + + if _, err := k.GetAuthorization(ctx, grantee, msgTypeURL); err == nil { + return sdkerrors.ErrInvalidRequest.Wrapf("authorization for %s already exists", msgTypeURL) + } + + k.setAuthorization(ctx, grantee, authorization) + + any, err := foundation.SetAuthorization(authorization) + if err != nil { + return err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventGrant{ + Grantee: grantee.String(), + Authorization: any, + }); err != nil { + panic(err) + } + + return nil +} + +func (k Keeper) Revoke(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL string) error { + if _, err := k.GetAuthorization(ctx, grantee, msgTypeURL); err != nil { + return err + } + k.deleteAuthorization(ctx, grantee, msgTypeURL) + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventRevoke{ + Grantee: grantee.String(), + MsgTypeUrl: msgTypeURL, + }); err != nil { + panic(err) + } + + return nil +} + +func (k Keeper) pruneAuthorizations(ctx sdk.Context, msgTypeURL string) { + var pruning []foundation.GrantAuthorization + k.iterateAuthorizations(ctx, func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool) { + if authorization.MsgTypeURL() == msgTypeURL { + grant := foundation.GrantAuthorization{ + Grantee: grantee.String(), + }.WithAuthorization(authorization) + + pruning = append(pruning, *grant) + } + return false + }) + + for _, grant := range pruning { + k.deleteAuthorization(ctx, sdk.MustAccAddressFromBech32(grant.Grantee), grant.GetAuthorization().MsgTypeURL()) + } +} + +func (k Keeper) GetAuthorization(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL string) (foundation.Authorization, error) { + store := ctx.KVStore(k.storeKey) + key := grantKey(grantee, msgTypeURL) + bz := store.Get(key) + if bz == nil { + return nil, sdkerrors.ErrUnauthorized.Wrap("authorization not found") + } + + var auth foundation.Authorization + if err := k.cdc.UnmarshalInterface(bz, &auth); err != nil { + panic(err) + } + + return auth, nil +} + +func (k Keeper) setAuthorization(ctx sdk.Context, grantee sdk.AccAddress, authorization foundation.Authorization) { + store := ctx.KVStore(k.storeKey) + key := grantKey(grantee, authorization.MsgTypeURL()) + + bz, err := k.cdc.MarshalInterface(authorization) + if err != nil { + panic(err) + } + store.Set(key, bz) +} + +func (k Keeper) deleteAuthorization(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL string) { + store := ctx.KVStore(k.storeKey) + key := grantKey(grantee, msgTypeURL) + store.Delete(key) +} + +func (k Keeper) Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error { + msgTypeURL := sdk.MsgTypeURL(msg) + + // check whether the msg is being censored + if !k.IsCensoredMessage(ctx, msgTypeURL) { + return nil + } + + authorization, err := k.GetAuthorization(ctx, grantee, msgTypeURL) + if err != nil { + return err + } + + resp, err := authorization.Accept(ctx, msg) + if err != nil { + return err + } + + if resp.Delete { + k.deleteAuthorization(ctx, grantee, msgTypeURL) + } else if resp.Updated != nil { + k.setAuthorization(ctx, grantee, resp.Updated) + } + + if !resp.Accept { + return sdkerrors.ErrUnauthorized + } + + return nil +} + +func (k Keeper) iterateAuthorizations(ctx sdk.Context, fn func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool)) { + k.iterateAuthorizationsImpl(ctx, grantKeyPrefix, fn) +} + +func (k Keeper) iterateAuthorizationsImpl(ctx sdk.Context, prefix []byte, fn func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, prefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var authorization foundation.Authorization + if err := k.cdc.UnmarshalInterface(iterator.Value(), &authorization); err != nil { + panic(err) + } + + grantee, _ := splitGrantKey(iterator.Key()) + if stop := fn(grantee, authorization); stop { + break + } + } +} diff --git a/x/foundation/keeper/internal/censorship_test.go b/x/foundation/keeper/internal/censorship_test.go new file mode 100644 index 0000000000..42ec6990f4 --- /dev/null +++ b/x/foundation/keeper/internal/censorship_test.go @@ -0,0 +1,191 @@ +package internal_test + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (s *KeeperTestSuite) TestUpdateCensorship() { + ctx, _ := s.ctx.CacheContext() + + // add a dummy url to censorship + msgTypeURL := sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)) + dummyURL := sdk.MsgTypeURL((*foundation.MsgFundTreasury)(nil)) + for _, url := range []string{ + msgTypeURL, + dummyURL, + } { + s.impl.SetCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: url, + Authority: foundation.CensorshipAuthorityFoundation, + }) + } + + // check preconditions + s.Require().True(s.impl.IsCensoredMessage(ctx, msgTypeURL)) + _, err := s.impl.GetAuthorization(ctx, s.stranger, msgTypeURL) + s.Require().NoError(err) + + // test update censorship + removingCensorship := foundation.Censorship{ + MsgTypeUrl: msgTypeURL, + Authority: foundation.CensorshipAuthorityUnspecified, + } + s.Require().NoError(removingCensorship.ValidateBasic()) + err = s.impl.UpdateCensorship(ctx, removingCensorship) + s.Require().NoError(err) + + // check censorship + _, err = s.impl.GetCensorship(ctx, msgTypeURL) + s.Require().Error(err) + s.Require().False(s.impl.IsCensoredMessage(ctx, msgTypeURL)) + + // check authorizations + _, err = s.impl.GetAuthorization(ctx, s.stranger, msgTypeURL) + s.Require().Error(err) + + // 2. re-enable the removed censorship, which must fail + newCensorship := foundation.Censorship{ + MsgTypeUrl: msgTypeURL, + Authority: foundation.CensorshipAuthorityGovernance, + } + s.Require().NoError(newCensorship.ValidateBasic()) + err = s.impl.UpdateCensorship(ctx, newCensorship) + s.Require().Error(err) +} + +func (s *KeeperTestSuite) TestGrant() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + grantee sdk.AccAddress + auth foundation.Authorization + valid bool + }{ + "valid authz": { + grantee: s.members[0], + auth: &foundation.ReceiveFromTreasuryAuthorization{}, + valid: true, + }, + "not being censored": { + malleate: func(ctx sdk.Context) { + err := s.impl.UpdateCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityUnspecified, + }) + s.Require().NoError(err) + }, + grantee: s.members[0], + auth: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + "override attempt": { + grantee: s.stranger, + auth: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + err := s.impl.Grant(ctx, tc.grantee, tc.auth) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} + +func (s *KeeperTestSuite) TestRevoke() { + testCases := map[string]struct { + grantee sdk.AccAddress + url string + valid bool + }{ + "valid url": { + grantee: s.stranger, + url: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + valid: true, + }, + "grant not found": { + grantee: s.members[0], + url: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + err := s.impl.Revoke(ctx, tc.grantee, tc.url) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} + +func (s *KeeperTestSuite) TestAccept() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + grantee sdk.AccAddress + msg sdk.Msg + valid bool + }{ + "valid request": { + grantee: s.stranger, + msg: &foundation.MsgWithdrawFromTreasury{ + Authority: s.authority.String(), + To: s.stranger.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + }, + valid: true, + }, + "not being censored": { + malleate: func(ctx sdk.Context) { + err := s.impl.UpdateCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityUnspecified, + }) + s.Require().NoError(err) + }, + grantee: s.members[0], + msg: &foundation.MsgWithdrawFromTreasury{ + Authority: s.authority.String(), + To: s.members[0].String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + }, + valid: true, + }, + "no authorization": { + grantee: s.members[0], + msg: &foundation.MsgWithdrawFromTreasury{ + Authority: s.authority.String(), + To: s.members[0].String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + err := s.impl.Accept(ctx, tc.grantee, tc.msg) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} diff --git a/x/foundation/keeper/internal/exec.go b/x/foundation/keeper/internal/exec.go new file mode 100644 index 0000000000..92262fa013 --- /dev/null +++ b/x/foundation/keeper/internal/exec.go @@ -0,0 +1,109 @@ +package internal + +import ( + "fmt" + + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +// ensureMsgAuthz checks that if a message requires signers that all of them are equal to the given account address of the authority. +func ensureMsgAuthz(msgs []sdk.Msg, authority sdk.AccAddress) error { + for _, msg := range msgs { + // In practice, GetSigners() should return a non-empty array without + // duplicates, so the code below is equivalent to: + // `msgs[i].GetSigners()[0] == authority` + // but we prefer to loop through all GetSigners just to be sure. + for _, signer := range msg.GetSigners() { + if !authority.Equals(signer) { + return sdkerrors.ErrUnauthorized.Wrapf("bad signer; expected %s, got %s", authority, signer) + } + } + } + return nil +} + +func (k Keeper) Exec(ctx sdk.Context, proposalID uint64) error { + proposal, err := k.GetProposal(ctx, proposalID) + if err != nil { + return err + } + + if proposal.Status != foundation.PROPOSAL_STATUS_SUBMITTED && + proposal.Status != foundation.PROPOSAL_STATUS_ACCEPTED { + return sdkerrors.ErrInvalidRequest.Wrapf("not possible with proposal status: %s", proposal.Status) + } + + if proposal.Status == foundation.PROPOSAL_STATUS_SUBMITTED { + if err := k.doTallyAndUpdate(ctx, proposal); err != nil { + return err + } + } + + // Execute proposal payload. + var logs string + if proposal.Status == foundation.PROPOSAL_STATUS_ACCEPTED && + proposal.ExecutorResult != foundation.PROPOSAL_EXECUTOR_RESULT_SUCCESS { + logger := ctx.Logger().With("module", fmt.Sprintf("x/%s", foundation.ModuleName)) + // Caching context so that we don't update the store in case of failure. + cacheCtx, flush := ctx.CacheContext() + + if results, err := k.doExecuteMsgs(cacheCtx, *proposal); err != nil { + proposal.ExecutorResult = foundation.PROPOSAL_EXECUTOR_RESULT_FAILURE + logs = fmt.Sprintf("proposal execution failed on proposal %d, because of error %s", proposalID, err.Error()) + logger.Info("proposal execution failed", "cause", err, "proposalID", proposal.Id) + } else { + proposal.ExecutorResult = foundation.PROPOSAL_EXECUTOR_RESULT_SUCCESS + flush() + + for _, res := range results { + // NOTE: The sdk msg handler creates a new EventManager, so events must be correctly propagated back to the current context + ctx.EventManager().EmitEvents(res.GetEvents()) + } + } + } + + // If proposal has successfully run, delete it from state. + if proposal.ExecutorResult == foundation.PROPOSAL_EXECUTOR_RESULT_SUCCESS { + k.pruneProposal(ctx, *proposal) + } else { + k.setProposal(ctx, *proposal) + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventExec{ + ProposalId: proposal.Id, + Logs: logs, + Result: proposal.ExecutorResult, + }); err != nil { + panic(err) + } + + return nil +} + +// doExecuteMsgs routes the messages to the registered handlers. +func (k Keeper) doExecuteMsgs(ctx sdk.Context, proposal foundation.Proposal) ([]sdk.Result, error) { + msgs := proposal.GetMsgs() + results := make([]sdk.Result, len(msgs)) + + authority := sdk.MustAccAddressFromBech32(k.GetAuthority()) + if err := ensureMsgAuthz(msgs, authority); err != nil { + return nil, err + } + + for i, msg := range msgs { + handler := k.router.Handler(msg) + if handler == nil { + return nil, sdkerrors.ErrUnknownRequest.Wrapf("no message handler found for %q", sdk.MsgTypeURL(msg)) + } + r, err := handler(ctx, msg) + if err != nil { + return nil, sdkerrors.Wrapf(err, "message %q at position %d", msg, i) + } + if r != nil { + results[i] = *r + } + } + return results, nil +} diff --git a/x/foundation/keeper/internal/exec_test.go b/x/foundation/keeper/internal/exec_test.go new file mode 100644 index 0000000000..b51e86372f --- /dev/null +++ b/x/foundation/keeper/internal/exec_test.go @@ -0,0 +1,44 @@ +package internal_test + +func (s *KeeperTestSuite) TestExec() { + testCases := map[string]struct { + proposalID uint64 + valid bool + }{ + "valid exec": { + proposalID: s.votedProposal, + valid: true, + }, + "not enough votes": { + proposalID: s.activeProposal, + valid: true, + }, + "invalid msg in proposal": { + proposalID: s.invalidProposal, + valid: true, + }, + "no handler msg in proposal": { + proposalID: s.noHandlerProposal, + valid: true, + }, + "no such proposal": { + proposalID: s.nextProposal, + }, + "withdrawn proposal": { + proposalID: s.withdrawnProposal, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + err := s.impl.Exec(ctx, tc.proposalID) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} diff --git a/x/foundation/keeper/internal/genesis.go b/x/foundation/keeper/internal/genesis.go new file mode 100644 index 0000000000..a88d6fa6a6 --- /dev/null +++ b/x/foundation/keeper/internal/genesis.go @@ -0,0 +1,100 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (k Keeper) InitGenesis(ctx sdk.Context, data *foundation.GenesisState) error { + k.SetParams(ctx, data.Params) + + k.SetFoundationInfo(ctx, data.Foundation) + + k.setPreviousProposalID(ctx, data.PreviousProposalId) + + for _, member := range data.Members { + if err := validateMetadata(member.Metadata, k.config); err != nil { + return err + } + + k.SetMember(ctx, member) + } + + for _, proposal := range data.Proposals { + if err := validateMetadata(proposal.Metadata, k.config); err != nil { + return err + } + + k.setProposal(ctx, proposal) + k.addProposalToVPEndQueue(ctx, proposal) + } + + for _, vote := range data.Votes { + if err := validateMetadata(vote.Metadata, k.config); err != nil { + return err + } + + k.setVote(ctx, vote) + } + + for _, censorship := range data.Censorships { + k.SetCensorship(ctx, censorship) + } + + for _, ga := range data.Authorizations { + grantee := sdk.MustAccAddressFromBech32(ga.Grantee) + k.setAuthorization(ctx, grantee, ga.GetAuthorization()) + } + + k.SetPool(ctx, data.Pool) + + return nil +} + +func (k Keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState { + info := k.GetFoundationInfo(ctx) + proposals := k.GetProposals(ctx) + + var votes []foundation.Vote + for _, proposal := range proposals { + votes = append(votes, k.GetVotes(ctx, proposal.Id)...) + } + + return &foundation.GenesisState{ + Params: k.GetParams(ctx), + Foundation: info, + Members: k.GetMembers(ctx), + PreviousProposalId: k.getPreviousProposalID(ctx), + Proposals: proposals, + Votes: votes, + Censorships: k.GetCensorships(ctx), + Authorizations: k.GetGrants(ctx), + Pool: k.GetPool(ctx), + } +} + +func (k Keeper) GetCensorships(ctx sdk.Context) []foundation.Censorship { + var censorships []foundation.Censorship + k.iterateCensorships(ctx, func(censorship foundation.Censorship) (stop bool) { + censorships = append(censorships, censorship) + + return false + }) + return censorships +} + +func (k Keeper) GetGrants(ctx sdk.Context) []foundation.GrantAuthorization { + var grantAuthorizations []foundation.GrantAuthorization + k.iterateAuthorizations(ctx, func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool) { + grantAuthorization := foundation.GrantAuthorization{ + Grantee: grantee.String(), + } + if err := grantAuthorization.SetAuthorization(authorization); err != nil { + panic(err) + } + grantAuthorizations = append(grantAuthorizations, grantAuthorization) + + return false + }) + return grantAuthorizations +} diff --git a/x/foundation/keeper/internal/genesis_test.go b/x/foundation/keeper/internal/genesis_test.go new file mode 100644 index 0000000000..81d34636f3 --- /dev/null +++ b/x/foundation/keeper/internal/genesis_test.go @@ -0,0 +1,287 @@ +package internal_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" + "github.com/Finschia/finschia-sdk/simapp" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func workingPolicy() foundation.DecisionPolicy { + return &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: 7 * 24 * time.Hour, // one week + }, + } +} + +func TestImportExportGenesis(t *testing.T) { + checkTx := false + app := simapp.Setup(checkTx) + testdata.RegisterInterfaces(app.InterfaceRegistry()) + + ctx := app.BaseApp.NewContext(checkTx, tmproto.Header{}) + keeper := app.FoundationKeeper + + createAddress := func() sdk.AccAddress { + return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + authority := foundation.DefaultAuthority() + existingAccount := createAddress() + app.AccountKeeper.SetAccount(ctx, app.AccountKeeper.NewAccountWithAddress(ctx, existingAccount)) + + member := createAddress() + stranger := createAddress() + + testCases := map[string]struct { + init *foundation.GenesisState + valid bool + export *foundation.GenesisState + }{ + "minimal": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + }, + valid: true, + export: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + }, + }, + "members": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + }, + }, + }, + valid: true, + export: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + }, + }, + }, + }, + "proposals": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{member.String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg(authority)}), + }, + Votes: []foundation.Vote{ + { + ProposalId: 1, + Voter: member.String(), + Option: foundation.VOTE_OPTION_YES, + }, + }, + }, + valid: true, + export: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{member.String()}, + FoundationVersion: 1, + FinalTallyResult: foundation.TallyResult{ + YesCount: sdk.ZeroDec(), + NoCount: sdk.ZeroDec(), + AbstainCount: sdk.ZeroDec(), + NoWithVetoCount: sdk.ZeroDec(), + }, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg(authority)}), + }, + Votes: []foundation.Vote{ + { + ProposalId: 1, + Voter: member.String(), + Option: foundation.VOTE_OPTION_YES, + }, + }, + }, + }, + "authorizations": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + Authorizations: []foundation.GrantAuthorization{ + *foundation.GrantAuthorization{ + Grantee: stranger.String(), + }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), + }, + }, + valid: true, + export: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Censorships: []foundation.Censorship{ + { + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + Authorizations: []foundation.GrantAuthorization{ + *foundation.GrantAuthorization{ + Grantee: stranger.String(), + }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), + }, + }, + }, + "pool": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Pool: foundation.Pool{ + Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, sdk.OneInt())), + }, + }, + valid: true, + export: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: foundation.DefaultFoundation(), + Pool: foundation.Pool{ + Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, sdk.OneInt())), + }, + }, + }, + "member of long metadata": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + Metadata: string(make([]rune, 256)), + }, + }, + }, + }, + "proposal of long metadata": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Metadata: string(make([]rune, 256)), + Proposers: []string{member.String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + }, + }, + "vote of long metadata": { + init: &foundation.GenesisState{ + Params: foundation.DefaultParams(), + Foundation: *foundation.FoundationInfo{ + Version: 1, + TotalWeight: sdk.OneDec(), + }.WithDecisionPolicy(workingPolicy()), + Members: []foundation.Member{ + { + Address: member.String(), + }, + }, + PreviousProposalId: 1, + Proposals: []foundation.Proposal{ + *foundation.Proposal{ + Id: 1, + Proposers: []string{member.String()}, + FoundationVersion: 1, + }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), + }, + Votes: []foundation.Vote{ + { + ProposalId: 1, + Voter: member.String(), + Option: foundation.VOTE_OPTION_YES, + Metadata: string(make([]rune, 256)), + }, + }, + }, + }, + } + + for name, tc := range testCases { + ctx, _ := ctx.CacheContext() + + err := foundation.ValidateGenesis(*tc.init) + require.NoError(t, err, name) + + err = keeper.InitGenesis(ctx, tc.init) + if !tc.valid { + require.Error(t, err, name) + continue + } + require.NoError(t, err, name) + + actual := keeper.ExportGenesis(ctx) + require.Equal(t, tc.export, actual, name) + } +} diff --git a/x/foundation/keeper/internal/grpc_query.go b/x/foundation/keeper/internal/grpc_query.go new file mode 100644 index 0000000000..3b8b876bfe --- /dev/null +++ b/x/foundation/keeper/internal/grpc_query.go @@ -0,0 +1,290 @@ +package internal + +import ( + "context" + + "github.com/gogo/protobuf/proto" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + codectypes "github.com/Finschia/finschia-sdk/codec/types" + "github.com/Finschia/finschia-sdk/store/prefix" + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/types/query" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +type queryServer struct { + keeper Keeper +} + +func NewQueryServer(keeper Keeper) foundation.QueryServer { + return &queryServer{ + keeper: keeper, + } +} + +var _ foundation.QueryServer = (*queryServer)(nil) + +func (s queryServer) Params(c context.Context, req *foundation.QueryParamsRequest) (*foundation.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + + return &foundation.QueryParamsResponse{Params: s.keeper.GetParams(ctx)}, nil +} + +func (s queryServer) Treasury(c context.Context, req *foundation.QueryTreasuryRequest) (*foundation.QueryTreasuryResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + amount := s.keeper.GetTreasury(ctx) + + return &foundation.QueryTreasuryResponse{Amount: amount}, nil +} + +func (s queryServer) FoundationInfo(c context.Context, req *foundation.QueryFoundationInfoRequest) (*foundation.QueryFoundationInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + info := s.keeper.GetFoundationInfo(ctx) + + return &foundation.QueryFoundationInfoResponse{Info: info}, nil +} + +func (s queryServer) Member(c context.Context, req *foundation.QueryMemberRequest) (*foundation.QueryMemberResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + addr, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err + } + member, err := s.keeper.GetMember(ctx, addr) + if err != nil { + return nil, err + } + + return &foundation.QueryMemberResponse{Member: member}, nil +} + +func (s queryServer) Members(c context.Context, req *foundation.QueryMembersRequest) (*foundation.QueryMembersResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var members []foundation.Member + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(s.keeper.storeKey) + memberStore := prefix.NewStore(store, memberKeyPrefix) + pageRes, err := query.Paginate(memberStore, req.Pagination, func(key, value []byte) error { + var member foundation.Member + s.keeper.cdc.MustUnmarshal(value, &member) + members = append(members, member) + return nil + }) + if err != nil { + return nil, err + } + + return &foundation.QueryMembersResponse{Members: members, Pagination: pageRes}, nil +} + +func (s queryServer) Proposal(c context.Context, req *foundation.QueryProposalRequest) (*foundation.QueryProposalResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + proposal, err := s.keeper.GetProposal(ctx, req.ProposalId) + if err != nil { + return nil, err + } + + return &foundation.QueryProposalResponse{Proposal: proposal}, nil +} + +func (s queryServer) Proposals(c context.Context, req *foundation.QueryProposalsRequest) (*foundation.QueryProposalsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var proposals []foundation.Proposal + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(s.keeper.storeKey) + proposalStore := prefix.NewStore(store, proposalKeyPrefix) + pageRes, err := query.Paginate(proposalStore, req.Pagination, func(key, value []byte) error { + var proposal foundation.Proposal + s.keeper.cdc.MustUnmarshal(value, &proposal) + proposals = append(proposals, proposal) + return nil + }) + if err != nil { + return nil, err + } + + return &foundation.QueryProposalsResponse{Proposals: proposals, Pagination: pageRes}, nil +} + +func (s queryServer) Vote(c context.Context, req *foundation.QueryVoteRequest) (*foundation.QueryVoteResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + voter, err := sdk.AccAddressFromBech32(req.Voter) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid voter address") + } + vote, err := s.keeper.GetVote(ctx, req.ProposalId, voter) + if err != nil { + return nil, err + } + + return &foundation.QueryVoteResponse{Vote: vote}, nil +} + +func (s queryServer) Votes(c context.Context, req *foundation.QueryVotesRequest) (*foundation.QueryVotesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var votes []foundation.Vote + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(s.keeper.storeKey) + voteStore := prefix.NewStore(store, append(voteKeyPrefix, Uint64ToBytes(req.ProposalId)...)) + pageRes, err := query.Paginate(voteStore, req.Pagination, func(key, value []byte) error { + var vote foundation.Vote + s.keeper.cdc.MustUnmarshal(value, &vote) + votes = append(votes, vote) + return nil + }) + if err != nil { + return nil, err + } + + return &foundation.QueryVotesResponse{Votes: votes, Pagination: pageRes}, nil +} + +func (s queryServer) TallyResult(c context.Context, req *foundation.QueryTallyResultRequest) (*foundation.QueryTallyResultResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + proposal, err := s.keeper.GetProposal(ctx, req.ProposalId) + if err != nil { + return nil, err + } + + tally, err := s.keeper.tally(ctx, *proposal) + if err != nil { + return nil, err + } + + return &foundation.QueryTallyResultResponse{Tally: tally}, nil +} + +func (s queryServer) Censorships(c context.Context, req *foundation.QueryCensorshipsRequest) (*foundation.QueryCensorshipsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var censorships []foundation.Censorship + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(s.keeper.storeKey) + censorshipStore := prefix.NewStore(store, censorshipKeyPrefix) + pageRes, err := query.Paginate(censorshipStore, req.Pagination, func(key, value []byte) error { + var censorship foundation.Censorship + s.keeper.cdc.MustUnmarshal(value, &censorship) + censorships = append(censorships, censorship) + return nil + }) + if err != nil { + return nil, err + } + + return &foundation.QueryCensorshipsResponse{Censorships: censorships, Pagination: pageRes}, nil +} + +func (s queryServer) Grants(c context.Context, req *foundation.QueryGrantsRequest) (*foundation.QueryGrantsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + grantee, err := sdk.AccAddressFromBech32(req.Grantee) + if err != nil { + return nil, err + } + + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(s.keeper.storeKey) + + if req.MsgTypeUrl != "" { + keyPrefix := grantKey(grantee, req.MsgTypeUrl) + grantStore := prefix.NewStore(store, keyPrefix) + + var authorizations []*codectypes.Any + _, err = query.Paginate(grantStore, req.Pagination, func(key, value []byte) error { + var authorization foundation.Authorization + if err := s.keeper.cdc.UnmarshalInterface(value, &authorization); err != nil { + panic(err) + } + + msg, ok := authorization.(proto.Message) + if !ok { + panic(sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg)) + } + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + panic(err) + } + authorizations = append(authorizations, any) + + return nil + }) + if err != nil { + return nil, err + } + + return &foundation.QueryGrantsResponse{Authorizations: authorizations}, nil + + } + + keyPrefix := grantKeyPrefixByGrantee(grantee) + grantStore := prefix.NewStore(store, keyPrefix) + + var authorizations []*codectypes.Any + pageRes, err := query.Paginate(grantStore, req.Pagination, func(key, value []byte) error { + var authorization foundation.Authorization + if err := s.keeper.cdc.UnmarshalInterface(value, &authorization); err != nil { + panic(err) + } + + msg, ok := authorization.(proto.Message) + if !ok { + panic(sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg)) + } + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + panic(err) + } + authorizations = append(authorizations, any) + + return nil + }) + if err != nil { + return nil, err + } + + return &foundation.QueryGrantsResponse{Authorizations: authorizations, Pagination: pageRes}, nil +} diff --git a/x/foundation/keeper/internal/grpc_query_test.go b/x/foundation/keeper/internal/grpc_query_test.go new file mode 100644 index 0000000000..6ec785604c --- /dev/null +++ b/x/foundation/keeper/internal/grpc_query_test.go @@ -0,0 +1,98 @@ +package internal_test + +import ( + gocontext "context" + "fmt" + "testing" + + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/Finschia/finschia-sdk/baseapp" + "github.com/Finschia/finschia-sdk/simapp" + sdk "github.com/Finschia/finschia-sdk/types" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/keeper" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" +) + +type FoundationTestSuite struct { + suite.Suite + + app *simapp.SimApp + ctx sdk.Context + queryClient foundation.QueryClient + + impl internal.Keeper +} + +func (s *FoundationTestSuite) SetupTest() { + s.app = simapp.Setup(false) + s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) + + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.app.InterfaceRegistry()) + foundation.RegisterQueryServer(queryHelper, keeper.NewQueryServer(s.app.FoundationKeeper)) + s.queryClient = foundation.NewQueryClient(queryHelper) + + s.impl = internal.NewKeeper( + s.app.AppCodec(), + s.app.GetKey(foundation.ModuleName), + s.app.MsgServiceRouter(), + s.app.AccountKeeper, + s.app.BankKeeper, + authtypes.FeeCollectorName, + foundation.DefaultConfig(), + foundation.DefaultAuthority().String(), + s.app.GetSubspace(foundation.ModuleName), + ) +} + +func (s *FoundationTestSuite) TestQueryParams() { + var ( + req *foundation.QueryParamsRequest + expResponse foundation.QueryParamsResponse + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "with foundation tax", + func() { + params := foundation.Params{ + FoundationTax: sdk.OneDec(), + } + s.impl.SetParams(s.ctx, params) + + req = &foundation.QueryParamsRequest{} + expResponse = foundation.QueryParamsResponse{Params: params} + }, + true, + }, + } + + for _, tc := range testCases { + s.Run(fmt.Sprintf("Case %s", tc.msg), func() { + s.SetupTest() // reset + + tc.malleate() + + res, err := s.queryClient.Params(gocontext.Background(), req) + + if tc.expPass { + s.Require().NoError(err) + s.Require().NotNil(res) + s.Require().Equal(&expResponse, res) + } else { + s.Require().Error(err) + } + }) + } +} + +func TestFoundationTestSuite(t *testing.T) { + suite.Run(t, new(FoundationTestSuite)) +} diff --git a/x/foundation/keeper/internal/invariants.go b/x/foundation/keeper/internal/invariants.go new file mode 100644 index 0000000000..b2abf2e0ea --- /dev/null +++ b/x/foundation/keeper/internal/invariants.go @@ -0,0 +1,72 @@ +package internal + +import ( + "fmt" + + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +const ( + moduleAccountInvariant = "module-accounts" + totalWeightInvariant = "total-weight" + proposalInvariant = "proposals" +) + +func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { + for name, invariant := range map[string]func(k Keeper) sdk.Invariant{ + moduleAccountInvariant: ModuleAccountInvariant, + totalWeightInvariant: TotalWeightInvariant, + proposalInvariant: ProposalInvariant, + } { + ir.RegisterRoute(foundation.ModuleName, name, invariant(k)) + } +} + +func ModuleAccountInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + treasuryAcc := k.authKeeper.GetModuleAccount(ctx, foundation.TreasuryName) + balance := k.bankKeeper.GetAllBalances(ctx, treasuryAcc.GetAddress()) + + treasury := k.GetTreasury(ctx) + msg := fmt.Sprintf("coins in the treasury; expected %s, got %s\n", treasury, balance) + broken := !treasury.IsEqual(sdk.NewDecCoinsFromCoins(balance...)) + + return sdk.FormatInvariant(foundation.ModuleName, moduleAccountInvariant, msg), broken + } +} + +func TotalWeightInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + expected := k.GetFoundationInfo(ctx).TotalWeight + actual := sdk.NewDec(int64(len(k.GetMembers(ctx)))) + + msg := fmt.Sprintf("total weight of foundation; expected %s, got %s\n", expected, actual) + broken := !actual.Equal(expected) + + return sdk.FormatInvariant(foundation.ModuleName, totalWeightInvariant, msg), broken + } +} + +func ProposalInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + version := k.GetFoundationInfo(ctx).Version + msg := fmt.Sprintf("current foundation version; %d\n", version) + broken := false + + k.iterateProposals(ctx, func(proposal foundation.Proposal) (stop bool) { + if proposal.FoundationVersion == version { + return true + } + + if proposal.Status == foundation.PROPOSAL_STATUS_SUBMITTED { + msg += fmt.Sprintf("active old proposal %d found; version %d\n", proposal.Id, proposal.FoundationVersion) + broken = true + } + + return false + }) + + return sdk.FormatInvariant(foundation.ModuleName, proposalInvariant, msg), broken + } +} diff --git a/x/foundation/keeper/internal/invariants_test.go b/x/foundation/keeper/internal/invariants_test.go new file mode 100644 index 0000000000..9ffb9df7f4 --- /dev/null +++ b/x/foundation/keeper/internal/invariants_test.go @@ -0,0 +1,102 @@ +package internal_test + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" +) + +func (s *KeeperTestSuite) TestModuleAccountInvariant() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + valid bool + }{ + "invariant not broken": { + valid: true, + }, + "treasury differs from the balance": { + malleate: func(ctx sdk.Context) { + balance := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance.Add(sdk.OneInt()))) + s.impl.SetPool(ctx, foundation.Pool{ + Treasury: sdk.NewDecCoinsFromCoins(balance...), + }) + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + invariant := internal.ModuleAccountInvariant(s.impl) + _, broken := invariant(ctx) + s.Require().Equal(!tc.valid, broken) + }) + } +} + +func (s *KeeperTestSuite) TestTotalWeightInvariant() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + valid bool + }{ + "invariant not broken": { + valid: true, + }, + "total weight differs from the number of foundation members": { + malleate: func(ctx sdk.Context) { + info := s.impl.GetFoundationInfo(ctx) + numMembers := len(s.impl.GetMembers(ctx)) + info.TotalWeight = sdk.NewDec(int64(numMembers)).Add(sdk.OneDec()) + s.impl.SetFoundationInfo(ctx, info) + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + invariant := internal.TotalWeightInvariant(s.impl) + _, broken := invariant(ctx) + s.Require().Equal(!tc.valid, broken) + }) + } +} + +func (s *KeeperTestSuite) TestProposalInvariant() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + valid bool + }{ + "invariant not broken": { + valid: true, + }, + "active old proposal exists": { + malleate: func(ctx sdk.Context) { + info := s.impl.GetFoundationInfo(ctx) + info.Version-- + s.impl.SetFoundationInfo(ctx, info) + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + invariant := internal.ProposalInvariant(s.impl) + _, broken := invariant(ctx) + s.Require().Equal(!tc.valid, broken) + }) + } +} diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go new file mode 100644 index 0000000000..0b824d21ae --- /dev/null +++ b/x/foundation/keeper/internal/keeper.go @@ -0,0 +1,89 @@ +package internal + +import ( + "github.com/tendermint/tendermint/libs/log" + + "github.com/Finschia/finschia-sdk/baseapp" + "github.com/Finschia/finschia-sdk/codec" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + paramtypes "github.com/Finschia/finschia-sdk/x/params/types" +) + +// Keeper defines the foundation module Keeper +type Keeper struct { + // The codec for binary encoding/decoding. + cdc codec.Codec + + // The (unexposed) keys used to access the stores from the Context. + storeKey sdk.StoreKey + + router *baseapp.MsgServiceRouter + + // keepers + authKeeper foundation.AuthKeeper + bankKeeper foundation.BankKeeper + + feeCollectorName string + + config foundation.Config + + // The address capable of executing privileged messages, including: + // - MsgUpdateParams + // - MsgUpdateDecisionPolicy + // - MsgUpdateMembers + // - MsgWithdrawFromTreasury + // + // Typically, this should be the x/foundation module account. + authority string + + paramSpace paramtypes.Subspace +} + +func NewKeeper( + cdc codec.Codec, + key sdk.StoreKey, + router *baseapp.MsgServiceRouter, + authKeeper foundation.AuthKeeper, + bankKeeper foundation.BankKeeper, + feeCollectorName string, + config foundation.Config, + authority string, + paramSpace paramtypes.Subspace, +) Keeper { + if _, err := sdk.AccAddressFromBech32(authority); err != nil { + panic("authority is not a valid acc address") + } + + // authority is x/foundation module account for now. + if authority != foundation.DefaultAuthority().String() { + panic("x/foundation authority must be the module account") + } + + // set KeyTable if it has not already been set + if !paramSpace.HasKeyTable() { + paramSpace = paramSpace.WithKeyTable(foundation.ParamKeyTable()) + } + + return Keeper{ + cdc: cdc, + storeKey: key, + router: router, + authKeeper: authKeeper, + bankKeeper: bankKeeper, + feeCollectorName: feeCollectorName, + config: config, + authority: authority, + paramSpace: paramSpace, + } +} + +// GetAuthority returns the x/foundation module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", "x/"+foundation.ModuleName) +} diff --git a/x/foundation/keeper/internal/keeper_test.go b/x/foundation/keeper/internal/keeper_test.go new file mode 100644 index 0000000000..1b81a82a20 --- /dev/null +++ b/x/foundation/keeper/internal/keeper_test.go @@ -0,0 +1,298 @@ +package internal_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" + "github.com/Finschia/finschia-sdk/simapp" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" + keeper "github.com/Finschia/finschia-sdk/x/foundation/keeper" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" + minttypes "github.com/Finschia/finschia-sdk/x/mint/types" +) + +type KeeperTestSuite struct { + suite.Suite + + deterministic bool + + ctx sdk.Context + + bankKeeper foundation.BankKeeper + keeper keeper.Keeper + impl internal.Keeper + + queryServer foundation.QueryServer + msgServer foundation.MsgServer + proposalHandler govtypes.Handler + + authority sdk.AccAddress + members []sdk.AccAddress + stranger sdk.AccAddress + + activeProposal uint64 + votedProposal uint64 + withdrawnProposal uint64 + invalidProposal uint64 + noHandlerProposal uint64 + nextProposal uint64 + + balance sdk.Int +} + +func newMsgCreateDog(name string) sdk.Msg { + return &testdata.MsgCreateDog{ + Dog: &testdata.Dog{ + Name: name, + }, + } +} + +func (s *KeeperTestSuite) createAddresses(accNum int) []sdk.AccAddress { + if s.deterministic { + addresses := make([]sdk.AccAddress, accNum) + for i := range addresses { + addresses[i] = sdk.AccAddress(fmt.Sprintf("address%d", i)) + } + return addresses + } else { + seenAddresses := make(map[string]bool, accNum) + addresses := make([]sdk.AccAddress, accNum) + for i := range addresses { + var address sdk.AccAddress + for { + pk := secp256k1.GenPrivKey().PubKey() + address = sdk.AccAddress(pk.Address()) + if !seenAddresses[address.String()] { + seenAddresses[address.String()] = true + break + } + } + addresses[i] = address + } + return addresses + } +} + +func (s *KeeperTestSuite) SetupTest() { + checkTx := false + app := simapp.Setup(checkTx) + testdata.RegisterInterfaces(app.InterfaceRegistry()) + testdata.RegisterMsgServer(app.MsgServiceRouter(), testdata.MsgServerImpl{}) + + s.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{}) + s.bankKeeper = app.BankKeeper + s.keeper = app.FoundationKeeper + s.impl = internal.NewKeeper( + app.AppCodec(), + app.GetKey(foundation.ModuleName), + app.MsgServiceRouter(), + app.AccountKeeper, + app.BankKeeper, + authtypes.FeeCollectorName, + foundation.DefaultConfig(), + foundation.DefaultAuthority().String(), + app.GetSubspace(foundation.ModuleName), + ) + + s.queryServer = keeper.NewQueryServer(s.keeper) + s.msgServer = keeper.NewMsgServer(s.keeper) + + s.proposalHandler = keeper.NewFoundationProposalsHandler(s.keeper) + + s.impl.SetParams(s.ctx, foundation.Params{ + FoundationTax: sdk.OneDec(), + }) + + s.impl.SetCensorship(s.ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }) + + s.authority = sdk.MustAccAddressFromBech32(s.impl.GetAuthority()) + + numMembers := 10 + addresses := s.createAddresses(numMembers + 1) + s.members = addresses[:numMembers] + for i := range s.members { + member := foundation.Member{ + Address: s.members[i].String(), + } + s.impl.SetMember(s.ctx, member) + } + s.stranger = addresses[len(addresses)-1] + + info := foundation.DefaultFoundation() + info.TotalWeight = sdk.NewDec(int64(len(s.members))) + err := info.SetDecisionPolicy(workingPolicy()) + s.Require().NoError(err) + s.impl.SetFoundationInfo(s.ctx, info) + + s.balance = sdk.NewInt(987654321) + s.impl.SetPool(s.ctx, foundation.Pool{ + Treasury: sdk.NewDecCoinsFromCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)), + }) + holders := []sdk.AccAddress{ + s.stranger, + app.AccountKeeper.GetModuleAccount(s.ctx, foundation.TreasuryName).GetAddress(), + app.AccountKeeper.GetModuleAccount(s.ctx, authtypes.FeeCollectorName).GetAddress(), + } + for _, holder := range holders { + amount := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)) + + // using minttypes here introduces dependency on x/mint + // the work around would be registering a new module account on this suite + // because x/bank already has dependency on x/mint, and we must have dependency + // on x/bank, it's OK to use x/mint here. + minterName := minttypes.ModuleName + err := app.BankKeeper.MintCoins(s.ctx, minterName, amount) + s.Require().NoError(err) + + minter := app.AccountKeeper.GetModuleAccount(s.ctx, minterName).GetAddress() + err = app.BankKeeper.SendCoins(s.ctx, minter, holder, amount) + s.Require().NoError(err) + } + + // create an active proposal, voted yes by all members except the first member + activeProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{ + &foundation.MsgWithdrawFromTreasury{ + Authority: s.authority.String(), + To: s.stranger.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)), + }, + }) + s.Require().NoError(err) + s.activeProposal = *activeProposal + + for _, member := range s.members[1:] { + err := s.impl.Vote(s.ctx, foundation.Vote{ + ProposalId: s.activeProposal, + Voter: member.String(), + Option: foundation.VOTE_OPTION_YES, + }) + s.Require().NoError(err) + } + + // create a proposal voted no by all members + votedProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{newMsgCreateDog("shiba1")}) + s.Require().NoError(err) + s.votedProposal = *votedProposal + + for _, member := range s.members { + err := s.impl.Vote(s.ctx, foundation.Vote{ + ProposalId: s.votedProposal, + Voter: member.String(), + Option: foundation.VOTE_OPTION_NO, + }) + s.Require().NoError(err) + } + + // create an withdrawn proposal + withdrawnProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{newMsgCreateDog("shiba2")}) + s.Require().NoError(err) + s.withdrawnProposal = *withdrawnProposal + + err = s.impl.WithdrawProposal(s.ctx, s.withdrawnProposal) + s.Require().NoError(err) + + // create an invalid proposal which contains invalid message + invalidProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{ + &foundation.MsgWithdrawFromTreasury{ + Authority: s.authority.String(), + To: s.stranger.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance.Add(sdk.OneInt()))), + }, + }) + s.Require().NoError(err) + s.invalidProposal = *invalidProposal + + for _, member := range s.members { + err := s.impl.Vote(s.ctx, foundation.Vote{ + ProposalId: s.invalidProposal, + Voter: member.String(), + Option: foundation.VOTE_OPTION_YES, + }) + s.Require().NoError(err) + } + + // create an invalid proposal which contains invalid message + noHandlerProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{testdata.NewTestMsg(s.authority)}) + s.Require().NoError(err) + s.noHandlerProposal = *noHandlerProposal + + for _, member := range s.members { + err := s.impl.Vote(s.ctx, foundation.Vote{ + ProposalId: s.noHandlerProposal, + Voter: member.String(), + Option: foundation.VOTE_OPTION_YES, + }) + s.Require().NoError(err) + } + + // next proposal is the proposal id for the upcoming proposal + s.nextProposal = s.noHandlerProposal + 1 + + // grant stranger to receive foundation treasury + err = s.impl.Grant(s.ctx, s.stranger, &foundation.ReceiveFromTreasuryAuthorization{}) + s.Require().NoError(err) +} + +func TestKeeperTestSuite(t *testing.T) { + for _, deterministic := range []bool{ + false, + true, + } { + suite.Run(t, &KeeperTestSuite{deterministic: deterministic}) + } +} + +func TestNewKeeper(t *testing.T) { + createAddress := func() sdk.AccAddress { + return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + authority := foundation.DefaultAuthority() + + testCases := map[string]struct { + authority sdk.AccAddress + panics bool + }{ + "default authority": { + authority: authority, + }, + "invalid account": { + panics: true, + }, + "not the default authority": { + authority: createAddress(), + panics: true, + }, + } + + for name, tc := range testCases { + tc := tc + t.Run(name, func(t *testing.T) { + newKeeper := func() keeper.Keeper { + app := simapp.Setup(false) + return keeper.NewKeeper(app.AppCodec(), sdk.NewKVStoreKey(foundation.StoreKey), app.MsgServiceRouter(), app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, foundation.DefaultConfig(), tc.authority.String(), app.GetSubspace(foundation.ModuleName)) + } + + if tc.panics { + require.Panics(t, func() { newKeeper() }) + return + } + require.NotPanics(t, func() { newKeeper() }) + + k := newKeeper() + require.Equal(t, authority.String(), k.GetAuthority()) + }) + } +} diff --git a/x/foundation/keeper/internal/keys.go b/x/foundation/keeper/internal/keys.go new file mode 100644 index 0000000000..c7e098a0e1 --- /dev/null +++ b/x/foundation/keeper/internal/keys.go @@ -0,0 +1,169 @@ +package internal + +import ( + "encoding/binary" + "time" + + sdk "github.com/Finschia/finschia-sdk/types" +) + +// Keys for foundation store +// Items are stored with the following key: values +var ( + // reserved for the future usage (cosmos-sdk v0.47) + // paramsKey = []byte{0x00} + foundationInfoKey = []byte{0x01} + + memberKeyPrefix = []byte{0x10} + previousProposalIDKey = []byte{0x11} + proposalKeyPrefix = []byte{0x12} + proposalByVPEndKeyPrefix = []byte{0x13} + voteKeyPrefix = []byte{0x14} + + censorshipKeyPrefix = []byte{0x20} + grantKeyPrefix = []byte{0x21} + + poolKey = []byte{0x30} + + // deprecatedGovMintKey Deprecated. Don't use it again. + deprecatedGovMintKey = []byte{0x40} + _ = deprecatedGovMintKey +) + +// must be constant +var lenTime = len(sdk.FormatTimeBytes(time.Now())) + +// Uint64FromBytes converts a byte array to uint64 +func Uint64FromBytes(bz []byte) uint64 { + return binary.BigEndian.Uint64(bz) +} + +// Uint64ToBytes converts a number in uint64 to a byte array +func Uint64ToBytes(number uint64) []byte { + bz := make([]byte, 8) + binary.BigEndian.PutUint64(bz, number) + return bz +} + +// memberKey key for a specific member from the store +func memberKey(address sdk.AccAddress) []byte { + prefix := memberKeyPrefix + key := make([]byte, len(prefix)+len(address)) + + copy(key, prefix) + copy(key[len(prefix):], address) + + return key +} + +// proposalKey key for a specific proposal from the store +func proposalKey(id uint64) []byte { + prefix := proposalKeyPrefix + idBz := Uint64ToBytes(id) + key := make([]byte, len(prefix)+len(idBz)) + + copy(key, prefix) + copy(key[len(prefix):], idBz) + + return key +} + +func voteKey(proposalID uint64, voter sdk.AccAddress) []byte { + prefix := voteKeyPrefix + idBz := Uint64ToBytes(proposalID) + key := make([]byte, len(prefix)+len(idBz)+len(voter)) + + begin := 0 + copy(key[begin:], prefix) + + begin += len(prefix) + copy(key[begin:], idBz) + + begin += len(idBz) + copy(key[begin:], voter) + + return key +} + +func proposalByVPEndKey(vpEnd time.Time, id uint64) []byte { + prefix := proposalByVPEndKeyPrefix + vpEndBz := sdk.FormatTimeBytes(vpEnd) + idBz := Uint64ToBytes(id) + key := make([]byte, len(prefix)+lenTime+len(idBz)) + + begin := 0 + copy(key[begin:], prefix) + + begin += len(prefix) + copy(key[begin:], vpEndBz) + + begin += len(vpEndBz) + copy(key[begin:], idBz) + + return key +} + +func splitProposalByVPEndKey(key []byte) (vpEnd time.Time, id uint64) { + prefix := proposalByVPEndKeyPrefix + begin := len(prefix) + end := begin + lenTime + vpEnd, err := sdk.ParseTimeBytes(key[begin:end]) + if err != nil { + panic(err) + } + + begin = end + id = Uint64FromBytes(key[begin:]) + + return +} + +// memberKey key for a specific member from the store +func censorshipKey(url string) []byte { + prefix := censorshipKeyPrefix + key := make([]byte, len(prefix)+len(url)) + + copy(key, prefix) + copy(key[len(prefix):], url) + + return key +} + +func grantKey(grantee sdk.AccAddress, url string) []byte { + prefix := grantKeyPrefixByGrantee(grantee) + key := make([]byte, len(prefix)+len(url)) + + copy(key, prefix) + copy(key[len(prefix):], url) + + return key +} + +func grantKeyPrefixByGrantee(grantee sdk.AccAddress) []byte { + prefix := grantKeyPrefix + key := make([]byte, len(prefix)+1+len(grantee)) + + begin := 0 + copy(key[begin:], prefix) + + begin += len(prefix) + key[begin] = byte(len(grantee)) + + begin++ + copy(key[begin:], grantee) + + return key +} + +func splitGrantKey(key []byte) (grantee sdk.AccAddress, url string) { + prefix := grantKeyPrefix + + begin := len(prefix) + 1 + end := begin + int(key[begin-1]) + grantee = key[begin:end] + + begin = end + url = string(key[begin:]) + + return +} diff --git a/x/foundation/keeper/internal/member.go b/x/foundation/keeper/internal/member.go new file mode 100644 index 0000000000..726e5dc5e7 --- /dev/null +++ b/x/foundation/keeper/internal/member.go @@ -0,0 +1,191 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" +) + +func validateMetadata(metadata string, config foundation.Config) error { + if len(metadata) > int(config.MaxMetadataLen) { + return sdkerrors.ErrInvalidRequest.Wrap("metadata is too large") + } + + return nil +} + +func (k Keeper) UpdateDecisionPolicy(ctx sdk.Context, policy foundation.DecisionPolicy) error { + info := k.GetFoundationInfo(ctx) + if err := info.SetDecisionPolicy(policy); err != nil { + return err + } + info.Version++ + k.SetFoundationInfo(ctx, info) + + if err := policy.Validate(info, k.config); err != nil { + return err + } + + // invalidate active proposals + k.abortOldProposals(ctx) + + return nil +} + +func (k Keeper) GetFoundationInfo(ctx sdk.Context) foundation.FoundationInfo { + store := ctx.KVStore(k.storeKey) + bz := store.Get(foundationInfoKey) + if len(bz) == 0 { + panic("the foundation info must have been registered") + } + + var info foundation.FoundationInfo + k.cdc.MustUnmarshal(bz, &info) + return info +} + +func (k Keeper) SetFoundationInfo(ctx sdk.Context, info foundation.FoundationInfo) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&info) + store.Set(foundationInfoKey, bz) +} + +func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberRequest) error { + weightUpdate := sdk.ZeroDec() + for _, request := range members { + new := foundation.Member{ + Address: request.Address, + Metadata: request.Metadata, + AddedAt: ctx.BlockTime(), + } + if err := new.ValidateBasic(); err != nil { + panic(err) + } + if err := validateMetadata(new.Metadata, k.config); err != nil { + return err + } + + addr := sdk.MustAccAddressFromBech32(new.Address) + old, err := k.GetMember(ctx, addr) + if err != nil && request.Remove { // the member must exist + return err + } + if err == nil { // overwrite + weightUpdate = weightUpdate.Sub(sdk.OneDec()) + new.AddedAt = old.AddedAt + } + + if request.Remove { + k.deleteMember(ctx, addr) + } else { + weightUpdate = weightUpdate.Add(sdk.OneDec()) + k.SetMember(ctx, new) + } + } + + info := k.GetFoundationInfo(ctx) + info.TotalWeight = info.TotalWeight.Add(weightUpdate) + info.Version++ + k.SetFoundationInfo(ctx, info) + + if err := info.GetDecisionPolicy().Validate(info, k.config); err != nil { + return err + } + + // invalidate active proposals + k.abortOldProposals(ctx) + + return nil +} + +func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress) (*foundation.Member, error) { + store := ctx.KVStore(k.storeKey) + key := memberKey(address) + bz := store.Get(key) + if len(bz) == 0 { + return nil, sdkerrors.ErrNotFound.Wrapf("No such member: %s", address) + } + + var member foundation.Member + k.cdc.MustUnmarshal(bz, &member) + + return &member, nil +} + +func (k Keeper) SetMember(ctx sdk.Context, member foundation.Member) { + store := ctx.KVStore(k.storeKey) + addr := sdk.MustAccAddressFromBech32(member.Address) + key := memberKey(addr) + + bz := k.cdc.MustMarshal(&member) + store.Set(key, bz) +} + +func (k Keeper) deleteMember(ctx sdk.Context, address sdk.AccAddress) { + store := ctx.KVStore(k.storeKey) + key := memberKey(address) + store.Delete(key) +} + +func (k Keeper) iterateMembers(ctx sdk.Context, fn func(member foundation.Member) (stop bool)) { + store := ctx.KVStore(k.storeKey) + prefix := memberKeyPrefix + iterator := sdk.KVStorePrefixIterator(store, prefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var member foundation.Member + k.cdc.MustUnmarshal(iterator.Value(), &member) + if stop := fn(member); stop { + break + } + } +} + +func (k Keeper) GetMembers(ctx sdk.Context) []foundation.Member { + var members []foundation.Member + k.iterateMembers(ctx, func(member foundation.Member) (stop bool) { + members = append(members, member) + return false + }) + + return members +} + +func (k Keeper) validateAuthority(authority string) error { + if authority != k.authority { + return sdkerrors.ErrUnauthorized.Wrapf("invalid authority; expected %s, got %s", k.authority, authority) + } + + return nil +} + +func (k Keeper) validateCensorshipAuthority(ctx sdk.Context, msgTypeURL, authority string) error { + censorship, err := k.GetCensorship(ctx, msgTypeURL) + if err != nil { + return err + } + + authorityAddrs := map[foundation.CensorshipAuthority]string{ + foundation.CensorshipAuthorityGovernance: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + foundation.CensorshipAuthorityFoundation: k.authority, + } + if expected := authorityAddrs[censorship.Authority]; authority != expected { + return sdkerrors.ErrUnauthorized.Wrapf("invalid authority; expected %s, got %s", expected, authority) + } + + return nil +} + +func (k Keeper) validateMembers(ctx sdk.Context, members []string) error { + for _, member := range members { + addr := sdk.MustAccAddressFromBech32(member) + if _, err := k.GetMember(ctx, addr); err != nil { + return sdkerrors.ErrUnauthorized.Wrapf("%s is not a member", member) + } + } + + return nil +} diff --git a/x/foundation/keeper/internal/member_test.go b/x/foundation/keeper/internal/member_test.go new file mode 100644 index 0000000000..26b7596f82 --- /dev/null +++ b/x/foundation/keeper/internal/member_test.go @@ -0,0 +1,102 @@ +package internal_test + +import ( + "time" + + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (s *KeeperTestSuite) TestUpdateDecisionPolicy() { + config := foundation.DefaultConfig() + testCases := map[string]struct { + policy foundation.DecisionPolicy + valid bool + }{ + "valid policy": { + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + valid: true, + }, + "invalid policy (invalid min execution period)": { + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + MinExecutionPeriod: time.Hour + config.MaxExecutionPeriod, + }, + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + err := s.impl.UpdateDecisionPolicy(ctx, tc.policy) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} + +func (s *KeeperTestSuite) TestUpdateMembers() { + testCases := map[string]struct { + updates []foundation.MemberRequest + valid bool + }{ + "add a new member": { + updates: []foundation.MemberRequest{ + { + Address: s.stranger.String(), + }, + }, + valid: true, + }, + "remove a member": { + updates: []foundation.MemberRequest{ + { + Address: s.members[0].String(), + Remove: true, + }, + }, + valid: true, + }, + "remove a non-member": { + updates: []foundation.MemberRequest{ + { + Address: s.stranger.String(), + Remove: true, + }, + }, + }, + "long metadata": { + updates: []foundation.MemberRequest{ + { + Address: s.stranger.String(), + Metadata: string(make([]rune, 256)), + }, + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + err := s.impl.UpdateMembers(ctx, tc.updates) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} diff --git a/x/foundation/keeper/internal/migrations.go b/x/foundation/keeper/internal/migrations.go new file mode 100644 index 0000000000..ae5a9fc138 --- /dev/null +++ b/x/foundation/keeper/internal/migrations.go @@ -0,0 +1,32 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/types/module" + "github.com/Finschia/finschia-sdk/x/foundation" + v2 "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal/migrations/v2" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper Keeper +} + +// NewMigrator returns a new Migrator. +func NewMigrator(keeper Keeper) Migrator { + return Migrator{keeper: keeper} +} + +func (m Migrator) Register(register func(moduleName string, fromVersion uint64, handler module.MigrationHandler) error) error { + for fromVersion, handler := range map[uint64]module.MigrationHandler{ + 1: func(ctx sdk.Context) error { + return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc, m.keeper.paramSpace) + }, + } { + if err := register(foundation.ModuleName, fromVersion, handler); err != nil { + return err + } + } + + return nil +} diff --git a/x/foundation/keeper/internal/migrations/v2/expected.go b/x/foundation/keeper/internal/migrations/v2/expected.go new file mode 100644 index 0000000000..c6af950fa0 --- /dev/null +++ b/x/foundation/keeper/internal/migrations/v2/expected.go @@ -0,0 +1,14 @@ +package v2 + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + paramtypes "github.com/Finschia/finschia-sdk/x/params/types" +) + +type ( + ParamSet = paramtypes.ParamSet + + Subspace interface { + SetParamSet(ctx sdk.Context, ps ParamSet) + } +) diff --git a/x/foundation/keeper/internal/migrations/v2/keys.go b/x/foundation/keeper/internal/migrations/v2/keys.go new file mode 100644 index 0000000000..0fa7f4b0c5 --- /dev/null +++ b/x/foundation/keeper/internal/migrations/v2/keys.go @@ -0,0 +1,3 @@ +package v2 + +var ParamsKey = []byte{0x00} diff --git a/x/foundation/keeper/internal/migrations/v2/store.go b/x/foundation/keeper/internal/migrations/v2/store.go new file mode 100644 index 0000000000..25edbba7eb --- /dev/null +++ b/x/foundation/keeper/internal/migrations/v2/store.go @@ -0,0 +1,39 @@ +package v2 + +import ( + "fmt" + + "github.com/Finschia/finschia-sdk/codec" + storetypes "github.com/Finschia/finschia-sdk/store/types" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +// MigrateStore performs in-place store migrations from v1 to v2. +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, subspace Subspace) error { + store := ctx.KVStore(storeKey) + + // migrate params + if err := migrateParams(ctx, store, cdc, subspace); err != nil { + return err + } + + return nil +} + +func migrateParams(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, subspace Subspace) error { + bz := store.Get(ParamsKey) + if bz == nil { + return fmt.Errorf("params not found") + } + store.Delete(ParamsKey) + + var params foundation.Params + if err := cdc.Unmarshal(bz, ¶ms); err != nil { + return err + } + + subspace.SetParamSet(ctx, ¶ms) + + return nil +} diff --git a/x/foundation/keeper/internal/migrations/v2/store_test.go b/x/foundation/keeper/internal/migrations/v2/store_test.go new file mode 100644 index 0000000000..562d20e5e2 --- /dev/null +++ b/x/foundation/keeper/internal/migrations/v2/store_test.go @@ -0,0 +1,86 @@ +package v2_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + simappparams "github.com/Finschia/finschia-sdk/simapp/params" + "github.com/Finschia/finschia-sdk/testutil" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal/migrations/v2" +) + +type mockSubspace struct { + params foundation.Params +} + +func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps v2.ParamSet) { + *ps.(*foundation.Params) = ms.params +} + +func (ms *mockSubspace) SetParamSet(ctx sdk.Context, ps v2.ParamSet) { + ms.params = *ps.(*foundation.Params) +} + +func TestMigrateStore(t *testing.T) { + foundationKey := sdk.NewKVStoreKey(foundation.StoreKey) + newKey := sdk.NewTransientStoreKey("transient_test") + encCfg := simappparams.MakeTestEncodingConfig() + ctx := testutil.DefaultContext(foundationKey, newKey) + + for name, tc := range map[string]struct { + malleate func(ctx sdk.Context) + valid bool + tax sdk.Dec + }{ + "valid": { + malleate: func(ctx sdk.Context) { + // set old keys + bz := encCfg.Marshaler.MustMarshal(&foundation.Params{ + FoundationTax: sdk.MustNewDecFromStr("0.123456789"), + }) + store := ctx.KVStore(foundationKey) + store.Set(v2.ParamsKey, bz) + }, + valid: true, + tax: sdk.MustNewDecFromStr("0.123456789"), + }, + "no params found": {}, + "unmarshal fails": { + malleate: func(ctx sdk.Context) { + // invalid contents + bz := encCfg.Marshaler.MustMarshal(&foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }) + store := ctx.KVStore(foundationKey) + store.Set(v2.ParamsKey, bz) + }, + }, + } { + t.Run(name, func(t *testing.T) { + ctx, _ := ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + // migrate + subspace := &mockSubspace{} + err := v2.MigrateStore(ctx, foundationKey, encCfg.Marshaler, subspace) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + store := ctx.KVStore(foundationKey) + require.Nil(t, store.Get(v2.ParamsKey)) + + var params foundation.Params + subspace.GetParamSet(ctx, ¶ms) + require.EqualValues(t, tc.tax, params.FoundationTax) + }) + } +} diff --git a/x/foundation/keeper/internal/msg_server.go b/x/foundation/keeper/internal/msg_server.go new file mode 100644 index 0000000000..c6b7e0c878 --- /dev/null +++ b/x/foundation/keeper/internal/msg_server.go @@ -0,0 +1,311 @@ +package internal + +import ( + "context" + + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +const gasCostPerIteration = uint64(20) + +type msgServer struct { + keeper Keeper +} + +// NewMsgServer returns an implementation of the token MsgServer interface +// for the provided Keeper. +func NewMsgServer(keeper Keeper) foundation.MsgServer { + return &msgServer{ + keeper: keeper, + } +} + +var _ foundation.MsgServer = msgServer{} + +// FundTreasury defines a method to fund the treasury. +func (s msgServer) FundTreasury(c context.Context, req *foundation.MsgFundTreasury) (*foundation.MsgFundTreasuryResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + from := sdk.MustAccAddressFromBech32(req.From) + if err := s.keeper.FundTreasury(ctx, from, req.Amount); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventFundTreasury{ + From: req.From, + Amount: req.Amount, + }); err != nil { + panic(err) + } + + return &foundation.MsgFundTreasuryResponse{}, nil +} + +// WithdrawFromTreasury defines a method to withdraw coins from the treasury. +func (s msgServer) WithdrawFromTreasury(c context.Context, req *foundation.MsgWithdrawFromTreasury) (*foundation.MsgWithdrawFromTreasuryResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateAuthority(req.Authority); err != nil { + return nil, err + } + + to := sdk.MustAccAddressFromBech32(req.To) + if err := s.keeper.Accept(ctx, to, req); err != nil { + return nil, err + } + + if err := s.keeper.WithdrawFromTreasury(ctx, to, req.Amount); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventWithdrawFromTreasury{ + To: req.To, + Amount: req.Amount, + }); err != nil { + panic(err) + } + + return &foundation.MsgWithdrawFromTreasuryResponse{}, nil +} + +func (s msgServer) UpdateMembers(c context.Context, req *foundation.MsgUpdateMembers) (*foundation.MsgUpdateMembersResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateAuthority(req.Authority); err != nil { + return nil, err + } + + if err := s.keeper.UpdateMembers(ctx, req.MemberUpdates); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventUpdateMembers{ + MemberUpdates: req.MemberUpdates, + }); err != nil { + panic(err) + } + + return &foundation.MsgUpdateMembersResponse{}, nil +} + +func (s msgServer) UpdateDecisionPolicy(c context.Context, req *foundation.MsgUpdateDecisionPolicy) (*foundation.MsgUpdateDecisionPolicyResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateAuthority(req.Authority); err != nil { + return nil, err + } + + policy := req.GetDecisionPolicy() + if err := s.keeper.UpdateDecisionPolicy(ctx, policy); err != nil { + return nil, err + } + + event := &foundation.EventUpdateDecisionPolicy{} + if err := event.SetDecisionPolicy(policy); err != nil { + return nil, err + } + if err := ctx.EventManager().EmitTypedEvent(event); err != nil { + panic(err) + } + + return &foundation.MsgUpdateDecisionPolicyResponse{}, nil +} + +func (s msgServer) SubmitProposal(c context.Context, req *foundation.MsgSubmitProposal) (*foundation.MsgSubmitProposalResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateMembers(ctx, req.Proposers); err != nil { + return nil, err + } + + id, err := s.keeper.SubmitProposal(ctx, req.Proposers, req.Metadata, req.GetMsgs()) + if err != nil { + return nil, err + } + + proposal, err := s.keeper.GetProposal(ctx, *id) + if err != nil { + panic(err) + } + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventSubmitProposal{ + Proposal: *proposal, + }); err != nil { + panic(err) + } + + // Try to execute proposal immediately + if req.Exec == foundation.Exec_EXEC_TRY { + // Consider proposers as Yes votes + for _, proposer := range req.Proposers { + ctx.GasMeter().ConsumeGas(gasCostPerIteration, "vote on proposal") + + vote := foundation.Vote{ + ProposalId: *id, + Voter: proposer, + Option: foundation.VOTE_OPTION_YES, + } + err = s.keeper.Vote(ctx, vote) + if err != nil { + return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, sdkerrors.Wrap(err, "The proposal was created but failed on vote") + } + } + + // Then try to execute the proposal + if err = s.keeper.Exec(ctx, *id); err != nil { + return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, sdkerrors.Wrap(err, "The proposal was created but failed on exec") + } + } + + return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, nil +} + +func (s msgServer) WithdrawProposal(c context.Context, req *foundation.MsgWithdrawProposal) (*foundation.MsgWithdrawProposalResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + id := req.ProposalId + + proposal, err := s.keeper.GetProposal(ctx, id) + if err != nil { + return nil, err + } + + // authority may withdraw any proposal. + if err := s.keeper.validateAuthority(req.Address); err != nil { + // check whether the address is in proposers list. + if err := validateActorForProposal(req.Address, *proposal); err != nil { + return nil, err + } + } + + if err := s.keeper.WithdrawProposal(ctx, id); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventWithdrawProposal{ + ProposalId: id, + }); err != nil { + panic(err) + } + + return &foundation.MsgWithdrawProposalResponse{}, nil +} + +func (s msgServer) Vote(c context.Context, req *foundation.MsgVote) (*foundation.MsgVoteResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateMembers(ctx, []string{req.Voter}); err != nil { + return nil, err + } + + vote := foundation.Vote{ + ProposalId: req.ProposalId, + Voter: req.Voter, + Option: req.Option, + Metadata: req.Metadata, + } + if err := s.keeper.Vote(ctx, vote); err != nil { + return nil, err + } + + // Try to execute proposal immediately + if req.Exec == foundation.Exec_EXEC_TRY { + if err := s.keeper.Exec(ctx, req.ProposalId); err != nil { + return nil, err + } + } + + return &foundation.MsgVoteResponse{}, nil +} + +func (s msgServer) Exec(c context.Context, req *foundation.MsgExec) (*foundation.MsgExecResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateMembers(ctx, []string{req.Signer}); err != nil { + return nil, err + } + + if err := s.keeper.Exec(ctx, req.ProposalId); err != nil { + return nil, err + } + + return &foundation.MsgExecResponse{}, nil +} + +func (s msgServer) LeaveFoundation(c context.Context, req *foundation.MsgLeaveFoundation) (*foundation.MsgLeaveFoundationResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + if err := s.keeper.validateMembers(ctx, []string{req.Address}); err != nil { + return nil, err + } + + update := foundation.MemberRequest{ + Address: req.Address, + Remove: true, + } + if err := s.keeper.UpdateMembers(ctx, []foundation.MemberRequest{update}); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventLeaveFoundation{ + Address: req.Address, + }); err != nil { + panic(err) + } + + return &foundation.MsgLeaveFoundationResponse{}, nil +} + +func (s msgServer) UpdateCensorship(c context.Context, req *foundation.MsgUpdateCensorship) (*foundation.MsgUpdateCensorshipResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + url := req.Censorship.MsgTypeUrl + if err := s.keeper.validateCensorshipAuthority(ctx, url, req.Authority); err != nil { + return nil, err + } + + if err := s.keeper.UpdateCensorship(ctx, req.Censorship); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventUpdateCensorship{ + Censorship: req.Censorship, + }); err != nil { + panic(err) + } + + return &foundation.MsgUpdateCensorshipResponse{}, nil +} + +func (s msgServer) Grant(c context.Context, req *foundation.MsgGrant) (*foundation.MsgGrantResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + authorization := req.GetAuthorization() + + url := authorization.MsgTypeURL() + if err := s.keeper.validateCensorshipAuthority(ctx, url, req.Authority); err != nil { + return nil, err + } + + grantee := sdk.MustAccAddressFromBech32(req.Grantee) + if err := s.keeper.Grant(ctx, grantee, authorization); err != nil { + return nil, err + } + + return &foundation.MsgGrantResponse{}, nil +} + +func (s msgServer) Revoke(c context.Context, req *foundation.MsgRevoke) (*foundation.MsgRevokeResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + url := req.MsgTypeUrl + if err := s.keeper.validateCensorshipAuthority(ctx, url, req.Authority); err != nil { + return nil, err + } + + grantee := sdk.MustAccAddressFromBech32(req.Grantee) + if err := s.keeper.Revoke(ctx, grantee, req.MsgTypeUrl); err != nil { + return nil, err + } + + return &foundation.MsgRevokeResponse{}, nil +} diff --git a/x/foundation/keeper/internal/msg_server_test.go b/x/foundation/keeper/internal/msg_server_test.go new file mode 100644 index 0000000000..3f04aecb49 --- /dev/null +++ b/x/foundation/keeper/internal/msg_server_test.go @@ -0,0 +1,738 @@ +package internal_test + +import ( + "time" + + abci "github.com/tendermint/tendermint/abci/types" + + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (s *KeeperTestSuite) TestMsgFundTreasury() { + testCases := map[string]struct { + amount sdk.Int + valid bool + events sdk.Events + }{ + "valid request": { + amount: s.balance, + valid: true, + events: sdk.Events{{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventFundTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x66, 0x72, 0x6f, 0x6d}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}}, + }, + "insufficient funds": { + amount: s.balance.Add(sdk.OneInt()), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgFundTreasury{ + From: s.stranger.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), + } + res, err := s.msgServer.FundTreasury(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgWithdrawFromTreasury() { + testCases := map[string]struct { + authority sdk.AccAddress + to sdk.AccAddress + amount sdk.Int + valid bool + events sdk.Events + }{ + "valid request": { + authority: s.authority, + to: s.stranger, + amount: s.balance, + valid: true, + events: sdk.Events{{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x74, 0x6f}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}}, + }, + "authority not authorized": { + authority: s.stranger, + to: s.stranger, + amount: s.balance, + }, + "receiver not authorized": { + authority: s.authority, + to: s.members[0], + amount: s.balance, + }, + "insufficient funds": { + authority: s.authority, + to: s.stranger, + amount: s.balance.Add(sdk.OneInt()), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgWithdrawFromTreasury{ + Authority: tc.authority.String(), + To: tc.to.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), + } + res, err := s.msgServer.WithdrawFromTreasury(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgUpdateDecisionPolicy() { + testCases := map[string]struct { + authority sdk.AccAddress + policy foundation.DecisionPolicy + valid bool + events sdk.Events + }{ + "valid request": { + authority: s.authority, + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{}, + }, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes: []abci.EventAttribute{{Key: []uint8{0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79}, Value: []uint8{0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d}, Index: false}}}}, + }, + "not authorized": { + authority: s.stranger, + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{}, + }, + }, + "invalid policy": { + authority: s.authority, + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + MinExecutionPeriod: foundation.DefaultConfig().MaxExecutionPeriod + time.Hour, + }, + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgUpdateDecisionPolicy{ + Authority: tc.authority.String(), + } + err := req.SetDecisionPolicy(tc.policy) + s.Require().NoError(err) + + res, err := s.msgServer.UpdateDecisionPolicy(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgUpdateMembers() { + testCases := map[string]struct { + authority sdk.AccAddress + member foundation.MemberRequest + valid bool + events sdk.Events + }{ + "valid request": { + authority: s.authority, + member: foundation.MemberRequest{ + Address: s.members[0].String(), + }, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateMembers", Attributes: []abci.EventAttribute{{Key: []uint8{0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73}, Value: []uint8{0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x7d, 0x5d}, Index: false}}}}, + }, + "not authorized": { + authority: s.stranger, + member: foundation.MemberRequest{ + Address: s.members[0].String(), + }, + }, + "remove a non-member": { + authority: s.authority, + member: foundation.MemberRequest{ + Address: s.stranger.String(), + Remove: true, + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgUpdateMembers{ + Authority: tc.authority.String(), + MemberUpdates: []foundation.MemberRequest{tc.member}, + } + res, err := s.msgServer.UpdateMembers(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgSubmitProposal() { + members := make([]string, len(s.members)) + for i, member := range s.members { + members[i] = member.String() + } + + testCases := map[string]struct { + malleate func(ctx sdk.Context) + proposers []string + metadata string + msg sdk.Msg + exec foundation.Exec + valid bool + events sdk.Events + }{ + "valid request (submit)": { + proposers: members, + msg: testdata.NewTestMsg(s.authority), + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c}, Value: []uint8{0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x77, 0x30, 0x38, 0x70, 0x36, 0x74, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x79, 0x6a, 0x71, 0x79, 0x79, 0x78, 0x75, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x78, 0x70, 0x39, 0x39, 0x38, 0x34, 0x33, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x67, 0x72, 0x37, 0x7a, 0x77, 0x68, 0x6d, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x32, 0x73, 0x6d, 0x72, 0x64, 0x79, 0x6b, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x76, 0x76, 0x35, 0x71, 0x67, 0x63, 0x70, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x77, 0x6c, 0x33, 0x70, 0x74, 0x74, 0x76, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x73, 0x67, 0x74, 0x77, 0x36, 0x75, 0x34, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x6a, 0x6d, 0x77, 0x30, 0x65, 0x30, 0x63, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x38, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x39, 0x30, 0x76, 0x74, 0x30, 0x76, 0x78, 0x63, 0x38, 0x63, 0x38, 0x76, 0x6a, 0x32, 0x34, 0x61, 0x37, 0x6d, 0x6d, 0x33, 0x66, 0x6a, 0x73, 0x65, 0x6e, 0x66, 0x75, 0x38, 0x66, 0x35, 0x79, 0x78, 0x78, 0x6a, 0x37, 0x36, 0x63, 0x70, 0x22, 0x5d, 0x7d, 0x5d, 0x7d}, Index: false}}}}, + }, + "valid request (submit & execute)": { + proposers: members, + msg: testdata.NewTestMsg(s.authority), + exec: foundation.Exec_EXEC_TRY, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c}, Value: []uint8{0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x77, 0x30, 0x38, 0x70, 0x36, 0x74, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x79, 0x6a, 0x71, 0x79, 0x79, 0x78, 0x75, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x78, 0x70, 0x39, 0x39, 0x38, 0x34, 0x33, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x67, 0x72, 0x37, 0x7a, 0x77, 0x68, 0x6d, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x32, 0x73, 0x6d, 0x72, 0x64, 0x79, 0x6b, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x76, 0x76, 0x35, 0x71, 0x67, 0x63, 0x70, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x77, 0x6c, 0x33, 0x70, 0x74, 0x74, 0x76, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x73, 0x67, 0x74, 0x77, 0x36, 0x75, 0x34, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x6a, 0x6d, 0x77, 0x30, 0x65, 0x30, 0x63, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x38, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x39, 0x30, 0x76, 0x74, 0x30, 0x76, 0x78, 0x63, 0x38, 0x63, 0x38, 0x76, 0x6a, 0x32, 0x34, 0x61, 0x37, 0x6d, 0x6d, 0x33, 0x66, 0x6a, 0x73, 0x65, 0x6e, 0x66, 0x75, 0x38, 0x66, 0x35, 0x79, 0x78, 0x78, 0x6a, 0x37, 0x36, 0x63, 0x70, 0x22, 0x5d, 0x7d, 0x5d, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x77, 0x30, 0x38, 0x70, 0x36, 0x74, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x79, 0x6a, 0x71, 0x79, 0x79, 0x78, 0x75, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x78, 0x70, 0x39, 0x39, 0x38, 0x34, 0x33, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x67, 0x72, 0x37, 0x7a, 0x77, 0x68, 0x6d, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x32, 0x73, 0x6d, 0x72, 0x64, 0x79, 0x6b, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x76, 0x76, 0x35, 0x71, 0x67, 0x63, 0x70, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x77, 0x6c, 0x33, 0x70, 0x74, 0x74, 0x76, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x73, 0x67, 0x74, 0x77, 0x36, 0x75, 0x34, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x6a, 0x6d, 0x77, 0x30, 0x65, 0x30, 0x63, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x36, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x5c, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x5c, 0x22, 0x3a, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x36, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x22}, Index: false}}}}, + }, + "valid request (submit & unable to reach quorum)": { + proposers: []string{members[0]}, + msg: testdata.NewTestMsg(s.authority), + exec: foundation.Exec_EXEC_TRY, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c}, Value: []uint8{0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x38, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x39, 0x30, 0x76, 0x74, 0x30, 0x76, 0x78, 0x63, 0x38, 0x63, 0x38, 0x76, 0x6a, 0x32, 0x34, 0x61, 0x37, 0x6d, 0x6d, 0x33, 0x66, 0x6a, 0x73, 0x65, 0x6e, 0x66, 0x75, 0x38, 0x66, 0x35, 0x79, 0x78, 0x78, 0x6a, 0x37, 0x36, 0x63, 0x70, 0x22, 0x5d, 0x7d, 0x5d, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x36, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x5c, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x5c, 0x22, 0x3a, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x36, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x22}, Index: false}}}}, + }, + "not a member": { + proposers: []string{s.stranger.String()}, + msg: testdata.NewTestMsg(s.authority), + }, + "unauthorized msg": { + proposers: []string{members[0]}, + msg: testdata.NewTestMsg(s.stranger), + }, + "exec fails": { + malleate: func(ctx sdk.Context) { + // try exec will fail because of a non-zero MinExecutionPeriod. + err := s.impl.UpdateDecisionPolicy(ctx, &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + MinExecutionPeriod: time.Second, + }, + }) + s.Require().NoError(err) + }, + proposers: members, + msg: testdata.NewTestMsg(s.authority), + exec: foundation.Exec_EXEC_TRY, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + req := &foundation.MsgSubmitProposal{ + Proposers: tc.proposers, + Metadata: tc.metadata, + Exec: tc.exec, + } + err := req.SetMsgs([]sdk.Msg{tc.msg}) + s.Require().NoError(err) + + res, err := s.msgServer.SubmitProposal(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgWithdrawProposal() { + testCases := map[string]struct { + proposalID uint64 + address sdk.AccAddress + valid bool + events sdk.Events + }{ + "valid request (proposer)": { + proposalID: s.activeProposal, + address: s.members[0], + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}}}}, + }, + "valid request (authority)": { + proposalID: s.activeProposal, + address: s.authority, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}}}}, + }, + "not authorized": { + proposalID: s.activeProposal, + address: s.stranger, + }, + "inactive proposal": { + proposalID: s.withdrawnProposal, + address: s.members[0], + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgWithdrawProposal{ + ProposalId: tc.proposalID, + Address: tc.address.String(), + } + res, err := s.msgServer.WithdrawProposal(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgVote() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + proposalID uint64 + voter sdk.AccAddress + msg sdk.Msg + exec foundation.Exec + valid bool + events sdk.Events + }{ + "valid request (vote)": { + proposalID: s.activeProposal, + voter: s.members[0], + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}}, + }, + "valid request (vote & execute)": { + proposalID: s.activeProposal, + voter: s.members[0], + exec: foundation.Exec_EXEC_TRY, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x74, 0x6f}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x22}, Index: false}}}}, + }, + "not authorized": { + proposalID: s.activeProposal, + voter: s.stranger, + }, + "already voted": { + proposalID: s.votedProposal, + voter: s.members[0], + }, + "exec fails": { + malleate: func(ctx sdk.Context) { + // try exec will fail because of a non-zero MinExecutionPeriod. + err := s.impl.UpdateDecisionPolicy(ctx, &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + MinExecutionPeriod: time.Second, + }, + }) + s.Require().NoError(err) + + // submit a proposal + proposers := make([]string, len(s.members)) + for i, member := range s.members { + proposers[i] = member.String() + } + req := &foundation.MsgSubmitProposal{ + Proposers: proposers, + } + err = req.SetMsgs([]sdk.Msg{testdata.NewTestMsg(s.authority)}) + s.Require().NoError(err) + + res, err := s.msgServer.SubmitProposal(sdk.WrapSDKContext(ctx), req) + s.Require().NoError(err) + s.Require().NotNil(res) + + s.Require().Equal(s.nextProposal, res.ProposalId) + }, + proposalID: s.nextProposal, + voter: s.members[0], + exec: foundation.Exec_EXEC_TRY, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + req := &foundation.MsgVote{ + ProposalId: tc.proposalID, + Voter: tc.voter.String(), + Option: foundation.VOTE_OPTION_YES, + Exec: tc.exec, + } + res, err := s.msgServer.Vote(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgExec() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + proposalID uint64 + signer sdk.AccAddress + valid bool + events sdk.Events + }{ + "valid request (execute)": { + proposalID: s.activeProposal, + signer: s.members[0], + valid: true, + events: sdk.Events{{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x74, 0x6f}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x22}, Index: false}}}}, + }, + "valid request (not finalized)": { + proposalID: s.votedProposal, + signer: s.members[0], + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x32, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22}, Index: false}}}}, + }, + "not authorized": { + proposalID: s.votedProposal, + signer: s.stranger, + }, + "no such a proposal": { + proposalID: s.nextProposal, + signer: s.members[0], + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgExec{ + ProposalId: tc.proposalID, + Signer: tc.signer.String(), + } + res, err := s.msgServer.Exec(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgLeaveFoundation() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + address sdk.AccAddress + valid bool + events sdk.Events + }{ + "valid request": { + address: s.members[0], + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventLeaveFoundation", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22}, Index: false}}}}, + }, + "not authorized": { + address: s.stranger, + }, + "policy violation": { + malleate: func(ctx sdk.Context) { + // remove all members but the first one + // preset policy is a threshold policy with its threshold 1 + requests := make([]foundation.MemberRequest, len(s.members)-1) + for i, member := range s.members[1:] { + requests[i] = foundation.MemberRequest{ + Address: member.String(), + Remove: true, + } + } + err := s.impl.UpdateMembers(ctx, requests) + s.Require().NoError(err) + }, + address: s.members[0], + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + req := &foundation.MsgLeaveFoundation{ + Address: tc.address.String(), + } + res, err := s.msgServer.LeaveFoundation(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgUpdateCensorship() { + testCases := map[string]struct { + authority sdk.AccAddress + censorship foundation.Censorship + valid bool + events sdk.Events + }{ + "valid request": { + authority: s.authority, + censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateCensorship", Attributes: []abci.EventAttribute{{Key: []uint8{0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70}, Value: []uint8{0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x22, 0x7d}, Index: false}}}}, + }, + "invalid authority": { + authority: s.stranger, + censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }, + }, + "enabling feature": { + authority: s.authority, + censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*testdata.TestMsg)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgUpdateCensorship{ + Authority: tc.authority.String(), + Censorship: tc.censorship, + } + res, err := s.msgServer.UpdateCensorship(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgGrant() { + testCases := map[string]struct { + authority sdk.AccAddress + grantee sdk.AccAddress + authorization foundation.Authorization + valid bool + events sdk.Events + }{ + "valid request": { + authority: s.authority, + grantee: s.members[0], + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventGrant", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e}, Value: []uint8{0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d}, Index: false}, {Key: []uint8{0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22}, Index: false}}}}, + }, + "not authorized": { + authority: s.stranger, + grantee: s.members[0], + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + "already granted": { + authority: s.authority, + grantee: s.stranger, + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgGrant{ + Authority: tc.authority.String(), + Grantee: tc.grantee.String(), + } + err := req.SetAuthorization(tc.authorization) + s.Require().NoError(err) + + res, err := s.msgServer.Grant(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} + +func (s *KeeperTestSuite) TestMsgRevoke() { + testCases := map[string]struct { + authority sdk.AccAddress + grantee sdk.AccAddress + msgTypeURL string + valid bool + events sdk.Events + }{ + "valid request": { + authority: s.authority, + grantee: s.stranger, + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + valid: true, + events: sdk.Events{{Type: "lbm.foundation.v1.EventRevoke", Attributes: []abci.EventAttribute{{Key: []uint8{0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}, {Key: []uint8{0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c}, Value: []uint8{0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22}, Index: false}}}}, + }, + "not authorized": { + authority: s.stranger, + grantee: s.stranger, + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + "no grant": { + authority: s.authority, + grantee: s.members[0], + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + req := &foundation.MsgRevoke{ + Authority: tc.authority.String(), + Grantee: tc.grantee.String(), + MsgTypeUrl: tc.msgTypeURL, + } + res, err := s.msgServer.Revoke(sdk.WrapSDKContext(ctx), req) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + s.Require().NotNil(res) + + if s.deterministic { + s.Require().Equal(tc.events, ctx.EventManager().Events()) + } + }) + } +} diff --git a/x/foundation/keeper/internal/params.go b/x/foundation/keeper/internal/params.go new file mode 100644 index 0000000000..f9b1b3c211 --- /dev/null +++ b/x/foundation/keeper/internal/params.go @@ -0,0 +1,29 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (k Keeper) GetParams(ctx sdk.Context) foundation.Params { + var params foundation.Params + k.paramSpace.GetParamSet(ctx, ¶ms) + + return params +} + +func (k Keeper) SetParams(ctx sdk.Context, params foundation.Params) { + k.paramSpace.SetParamSet(ctx, ¶ms) +} + +// aliases +func (k Keeper) GetFoundationTax(ctx sdk.Context) sdk.Dec { + params := k.GetParams(ctx) + + return params.FoundationTax +} + +func (k Keeper) IsCensoredMessage(ctx sdk.Context, msgTypeURL string) bool { + _, err := k.GetCensorship(ctx, msgTypeURL) + return err == nil +} diff --git a/x/foundation/keeper/internal/proposal.go b/x/foundation/keeper/internal/proposal.go new file mode 100644 index 0000000000..2003e83f07 --- /dev/null +++ b/x/foundation/keeper/internal/proposal.go @@ -0,0 +1,245 @@ +package internal + +import ( + "time" + + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (k Keeper) newProposalID(ctx sdk.Context) uint64 { + id := k.getPreviousProposalID(ctx) + 1 + k.setPreviousProposalID(ctx, id) + + return id +} + +func (k Keeper) getPreviousProposalID(ctx sdk.Context) uint64 { + store := ctx.KVStore(k.storeKey) + bz := store.Get(previousProposalIDKey) + if len(bz) == 0 { + panic("previous proposal ID hasn't been set") + } + return Uint64FromBytes(bz) +} + +func (k Keeper) setPreviousProposalID(ctx sdk.Context, id uint64) { + store := ctx.KVStore(k.storeKey) + store.Set(previousProposalIDKey, Uint64ToBytes(id)) +} + +func (k Keeper) SubmitProposal(ctx sdk.Context, proposers []string, metadata string, msgs []sdk.Msg) (*uint64, error) { + if err := validateMetadata(metadata, k.config); err != nil { + return nil, err + } + + foundationInfo := k.GetFoundationInfo(ctx) + authority := sdk.MustAccAddressFromBech32(k.GetAuthority()) + if err := ensureMsgAuthz(msgs, authority); err != nil { + return nil, err + } + + // Prevent proposal that can not succeed. + policy := foundationInfo.GetDecisionPolicy() + if err := policy.Validate(foundationInfo, k.config); err != nil { + return nil, err + } + + id := k.newProposalID(ctx) + proposal := foundation.Proposal{ + Id: id, + Metadata: metadata, + Proposers: proposers, + SubmitTime: ctx.BlockTime(), + FoundationVersion: foundationInfo.Version, + Status: foundation.PROPOSAL_STATUS_SUBMITTED, + ExecutorResult: foundation.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + VotingPeriodEnd: ctx.BlockTime().Add(policy.GetVotingPeriod()), + FinalTallyResult: foundation.DefaultTallyResult(), + } + if err := proposal.SetMsgs(msgs); err != nil { + return nil, err + } + + k.setProposal(ctx, proposal) + k.addProposalToVPEndQueue(ctx, proposal) + + return &id, nil +} + +func (k Keeper) WithdrawProposal(ctx sdk.Context, proposalID uint64) error { + proposal, err := k.GetProposal(ctx, proposalID) + if err != nil { + return err + } + + // Ensure the proposal can be withdrawn. + if proposal.Status != foundation.PROPOSAL_STATUS_SUBMITTED { + return sdkerrors.ErrInvalidRequest.Wrapf("cannot withdraw a proposal with the status of %s", proposal.Status) + } + + proposal.Status = foundation.PROPOSAL_STATUS_WITHDRAWN + k.setProposal(ctx, *proposal) + + return nil +} + +// pruneProposal deletes a proposal from state. +func (k Keeper) pruneProposal(ctx sdk.Context, proposal foundation.Proposal) { + k.pruneVotes(ctx, proposal.Id) + k.removeProposalFromVPEndQueue(ctx, proposal) + k.deleteProposal(ctx, proposal.Id) +} + +// PruneExpiredProposals prunes all proposals which are expired, +// i.e. whose `submit_time + voting_period + max_execution_period` is smaller than (or equal to) now. +func (k Keeper) PruneExpiredProposals(ctx sdk.Context) { + votingPeriodEnd := ctx.BlockTime().Add(-k.config.MaxExecutionPeriod).Add(time.Nanosecond) + + var proposals []foundation.Proposal + k.iterateProposalsByVPEnd(ctx, votingPeriodEnd, func(proposal foundation.Proposal) (stop bool) { + proposals = append(proposals, proposal) + return false + }) + + for _, proposal := range proposals { + k.pruneProposal(ctx, proposal) + } +} + +// abortOldProposals aborts all proposals which have lower version than the current foundation's +func (k Keeper) abortOldProposals(ctx sdk.Context) { + latestVersion := k.GetFoundationInfo(ctx).Version + + k.iterateProposals(ctx, func(proposal foundation.Proposal) (stop bool) { + if proposal.FoundationVersion == latestVersion { + return true + } + + if proposal.Status == foundation.PROPOSAL_STATUS_SUBMITTED { + k.pruneVotes(ctx, proposal.Id) + + proposal.Status = foundation.PROPOSAL_STATUS_ABORTED + k.setProposal(ctx, proposal) + } + + return false + }) +} + +func (k Keeper) GetProposals(ctx sdk.Context) []foundation.Proposal { + var proposals []foundation.Proposal + k.iterateProposals(ctx, func(proposal foundation.Proposal) (stop bool) { + proposals = append(proposals, proposal) + return false + }) + + return proposals +} + +func (k Keeper) iterateProposals(ctx sdk.Context, fn func(proposal foundation.Proposal) (stop bool)) { + store := ctx.KVStore(k.storeKey) + prefix := proposalKeyPrefix + iterator := sdk.KVStorePrefixIterator(store, prefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var proposal foundation.Proposal + k.cdc.MustUnmarshal(iterator.Value(), &proposal) + if stop := fn(proposal); stop { + break + } + } +} + +func (k Keeper) iterateProposalsByVPEnd(ctx sdk.Context, endTime time.Time, fn func(proposal foundation.Proposal) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iter := store.Iterator(proposalByVPEndKeyPrefix, sdk.PrefixEndBytes(append(proposalByVPEndKeyPrefix, sdk.FormatTimeBytes(endTime)...))) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + _, id := splitProposalByVPEndKey(iter.Key()) + + proposal, err := k.GetProposal(ctx, id) + if err != nil { + panic(err) + } + + if fn(*proposal) { + break + } + } +} + +func (k Keeper) UpdateTallyOfVPEndProposals(ctx sdk.Context) { + var proposals []foundation.Proposal + k.iterateProposalsByVPEnd(ctx, ctx.BlockTime(), func(proposal foundation.Proposal) (stop bool) { + proposals = append(proposals, proposal) + return false + }) + + for _, proposal := range proposals { + proposal := proposal + + if proposal.Status == foundation.PROPOSAL_STATUS_ABORTED || proposal.Status == foundation.PROPOSAL_STATUS_WITHDRAWN { + k.pruneProposal(ctx, proposal) + continue + } + + if err := k.doTallyAndUpdate(ctx, &proposal); err != nil { + panic(err) + } + k.setProposal(ctx, proposal) + } +} + +func (k Keeper) GetProposal(ctx sdk.Context, id uint64) (*foundation.Proposal, error) { + store := ctx.KVStore(k.storeKey) + key := proposalKey(id) + bz := store.Get(key) + if len(bz) == 0 { + return nil, sdkerrors.ErrNotFound.Wrapf("No proposal for id: %d", id) + } + + var proposal foundation.Proposal + k.cdc.MustUnmarshal(bz, &proposal) + + return &proposal, nil +} + +func (k Keeper) setProposal(ctx sdk.Context, proposal foundation.Proposal) { + store := ctx.KVStore(k.storeKey) + key := proposalKey(proposal.Id) + + bz := k.cdc.MustMarshal(&proposal) + store.Set(key, bz) +} + +func (k Keeper) deleteProposal(ctx sdk.Context, proposalID uint64) { + store := ctx.KVStore(k.storeKey) + key := proposalKey(proposalID) + store.Delete(key) +} + +func (k Keeper) addProposalToVPEndQueue(ctx sdk.Context, proposal foundation.Proposal) { + store := ctx.KVStore(k.storeKey) + key := proposalByVPEndKey(proposal.VotingPeriodEnd, proposal.Id) + store.Set(key, []byte{}) +} + +func (k Keeper) removeProposalFromVPEndQueue(ctx sdk.Context, proposal foundation.Proposal) { + store := ctx.KVStore(k.storeKey) + key := proposalByVPEndKey(proposal.VotingPeriodEnd, proposal.Id) + store.Delete(key) +} + +func validateActorForProposal(address string, proposal foundation.Proposal) error { + for _, proposer := range proposal.Proposers { + if address == proposer { + return nil + } + } + + return sdkerrors.ErrUnauthorized.Wrapf("not a proposer: %s", address) +} diff --git a/x/foundation/keeper/internal/proposal_handler.go b/x/foundation/keeper/internal/proposal_handler.go new file mode 100644 index 0000000000..0db76438ac --- /dev/null +++ b/x/foundation/keeper/internal/proposal_handler.go @@ -0,0 +1,56 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" +) + +// NewFoundationProposalsHandler creates a handler for the gov proposals. +func NewFoundationProposalsHandler(k Keeper) govtypes.Handler { + return func(ctx sdk.Context, content govtypes.Content) error { + switch c := content.(type) { + case *foundation.FoundationExecProposal: + return handleFoundationExecProposal(ctx, k, *c) + + default: + return sdkerrors.ErrUnknownRequest.Wrapf("unrecognized param proposal content type: %T", c) + } + } +} + +func handleFoundationExecProposal(ctx sdk.Context, k Keeper, proposal foundation.FoundationExecProposal) error { + msgs := foundation.GetMessagesFromFoundationExecProposal(proposal) + + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if err := ensureMsgAuthz(msgs, authority); err != nil { + return err + } + + // allow the following messages + allowedUrls := map[string]bool{ + sdk.MsgTypeURL((*foundation.MsgUpdateCensorship)(nil)): true, + sdk.MsgTypeURL((*foundation.MsgGrant)(nil)): true, + sdk.MsgTypeURL((*foundation.MsgRevoke)(nil)): true, + } + + for i, msg := range msgs { + url := sdk.MsgTypeURL(msg) + if !allowedUrls[url] { + return sdkerrors.ErrInvalidRequest.Wrapf("%s not allowed", url) + } + + handler := k.router.Handler(msg) + if handler == nil { + return sdkerrors.ErrUnknownRequest.Wrapf("no message handler found for %q", url) + } + _, err := handler(ctx, msg) + if err != nil { + return sdkerrors.Wrapf(err, "message %q at position %d", msg, i) + } + } + + return nil +} diff --git a/x/foundation/keeper/internal/proposal_handler_test.go b/x/foundation/keeper/internal/proposal_handler_test.go new file mode 100644 index 0000000000..e353c23abf --- /dev/null +++ b/x/foundation/keeper/internal/proposal_handler_test.go @@ -0,0 +1,116 @@ +package internal_test + +import ( + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" +) + +func (s *KeeperTestSuite) TestProposalHandler() { + testCases := map[string]struct { + malleate func(ctx sdk.Context) + msg sdk.Msg + valid bool + require func(ctx sdk.Context) + }{ + "valid": { + malleate: func(ctx sdk.Context) { + s.impl.SetCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }) + }, + msg: &foundation.MsgUpdateCensorship{ + Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityUnspecified, + }, + }, + valid: true, + require: func(ctx sdk.Context) { + s.Require().False(s.impl.IsCensoredMessage(ctx, sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)))) + }, + }, + "bad signer": { + malleate: func(ctx sdk.Context) { + s.impl.SetCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }) + }, + msg: &foundation.MsgUpdateCensorship{ + Authority: s.impl.GetAuthority(), + Censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityUnspecified, + }, + }, + }, + "message type not allowed": { + malleate: func(ctx sdk.Context) { + s.impl.SetCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }) + }, + msg: newMsgCreateDog("doge"), + }, + "no handler found": { + malleate: func(ctx sdk.Context) { + s.impl.SetCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }) + }, + msg: testdata.NewTestMsg(authtypes.NewModuleAddress(govtypes.ModuleName)), + }, + "message execution failed": { + malleate: func(ctx sdk.Context) { + s.impl.SetCensorship(ctx, foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }) + }, + msg: &foundation.MsgUpdateCensorship{ + Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }, + }, + }, + "authority is not x/gov yet": { + msg: &foundation.MsgUpdateCensorship{ + Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityUnspecified, + }, + }, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + if tc.malleate != nil { + tc.malleate(ctx) + } + + proposal := &foundation.FoundationExecProposal{} + proposal.SetMessages([]sdk.Msg{tc.msg}) + + err := s.proposalHandler(ctx, proposal) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + tc.require(ctx) + }) + } +} diff --git a/x/foundation/keeper/internal/proposal_test.go b/x/foundation/keeper/internal/proposal_test.go new file mode 100644 index 0000000000..045bb58105 --- /dev/null +++ b/x/foundation/keeper/internal/proposal_test.go @@ -0,0 +1,140 @@ +package internal_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" + "github.com/Finschia/finschia-sdk/simapp" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" +) + +func (s *KeeperTestSuite) TestSubmitProposal() { + testCases := map[string]struct { + proposers []string + metadata string + msg sdk.Msg + valid bool + }{ + "valid proposal": { + proposers: []string{s.members[0].String()}, + msg: testdata.NewTestMsg(s.authority), + valid: true, + }, + "long metadata": { + proposers: []string{s.members[0].String()}, + metadata: string(make([]rune, 256)), + msg: testdata.NewTestMsg(s.authority), + }, + "unauthorized msg": { + proposers: []string{s.members[0].String()}, + msg: testdata.NewTestMsg(s.stranger), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + _, err := s.impl.SubmitProposal(ctx, tc.proposers, tc.metadata, []sdk.Msg{tc.msg}) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} + +func (s *KeeperTestSuite) TestWithdrawProposal() { + testCases := map[string]struct { + id uint64 + valid bool + }{ + "valid proposal": { + id: s.activeProposal, + valid: true, + }, + "no such a proposal": { + id: s.nextProposal, + }, + "not active": { + id: s.withdrawnProposal, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + err := s.impl.WithdrawProposal(ctx, tc.id) + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } + }) + } +} + +func TestAbortProposal(t *testing.T) { + checkTx := false + app := simapp.Setup(checkTx) + testdata.RegisterInterfaces(app.InterfaceRegistry()) + + ctx := app.BaseApp.NewContext(checkTx, tmproto.Header{}) + impl := internal.NewKeeper( + app.AppCodec(), + app.GetKey(foundation.ModuleName), + app.MsgServiceRouter(), + app.AccountKeeper, + app.BankKeeper, + authtypes.FeeCollectorName, + foundation.DefaultConfig(), + foundation.DefaultAuthority().String(), + app.GetSubspace(foundation.ModuleName), + ) + + createAddress := func() sdk.AccAddress { + return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + authority := sdk.MustAccAddressFromBech32(impl.GetAuthority()) + + members := make([]sdk.AccAddress, 10) + for i := range members { + members[i] = createAddress() + } + impl.SetMember(ctx, foundation.Member{ + Address: members[0].String(), + }) + + info := foundation.DefaultFoundation() + info.TotalWeight = sdk.NewDec(int64(len(members))) + err := info.SetDecisionPolicy(workingPolicy()) + require.NoError(t, err) + impl.SetFoundationInfo(ctx, info) + + // create proposals of different versions and abort them + for _, newMember := range members[1:] { + _, err := impl.SubmitProposal(ctx, []string{members[0].String()}, "", []sdk.Msg{testdata.NewTestMsg(authority)}) + require.NoError(t, err) + + err = impl.UpdateMembers(ctx, []foundation.MemberRequest{ + { + Address: newMember.String(), + }, + }) + require.NoError(t, err) + } + + for _, proposal := range impl.GetProposals(ctx) { + require.Equal(t, foundation.PROPOSAL_STATUS_ABORTED, proposal.Status) + } +} diff --git a/x/foundation/keeper/internal/tally.go b/x/foundation/keeper/internal/tally.go new file mode 100644 index 0000000000..87849c9e49 --- /dev/null +++ b/x/foundation/keeper/internal/tally.go @@ -0,0 +1,82 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +// doTallyAndUpdate performs a tally, and, if the tally result is final, then: +// - updates the proposal's `Status` and `FinalTallyResult` fields, +// - prune all the votes. +func (k Keeper) doTallyAndUpdate(ctx sdk.Context, p *foundation.Proposal) error { + tallyResult, err := k.tally(ctx, *p) + if err != nil { + return err + } + + info := k.GetFoundationInfo(ctx) + policy := info.GetDecisionPolicy() + sinceSubmission := ctx.BlockTime().Sub(p.SubmitTime) // duration passed since proposal submission. + result, err := policy.Allow(tallyResult, info.TotalWeight, sinceSubmission) + if err != nil { + return err + } + + // If the result was final (i.e. enough votes to pass) or if the voting + // period ended, then we consider the proposal as final. + if isFinal := result.Final || ctx.BlockTime().After(p.VotingPeriodEnd); isFinal { + k.pruneVotes(ctx, p.Id) + p.FinalTallyResult = tallyResult + if result.Allow { + p.Status = foundation.PROPOSAL_STATUS_ACCEPTED + } else { + p.Status = foundation.PROPOSAL_STATUS_REJECTED + } + } + + return nil +} + +// tally is a function that tallies a proposal by iterating through its votes, +// and returns the tally result without modifying the proposal or any state. +func (k Keeper) tally(ctx sdk.Context, p foundation.Proposal) (foundation.TallyResult, error) { + // If proposal has already been tallied and updated, then its status is + // accepted/rejected, in which case we just return the previously stored result. + // + // In all other cases (including withdrawn, aborted...) we do the tally + // again. + if p.Status == foundation.PROPOSAL_STATUS_ACCEPTED || p.Status == foundation.PROPOSAL_STATUS_REJECTED { + return p.FinalTallyResult, nil + } + + tallyResult := foundation.DefaultTallyResult() + var errIter error + k.iterateVotes(ctx, p.Id, func(vote foundation.Vote) (stop bool) { + voter := sdk.MustAccAddressFromBech32(vote.Voter) + + _, err := k.GetMember(ctx, voter) + switch { + case sdkerrors.ErrNotFound.Is(err): + // If the member left the foundation after voting, then we simply skip the + // vote. + return false + case err != nil: + // For any other errors, we stop and return the error. + errIter = err + return true + } + + if err := tallyResult.Add(vote.Option); err != nil { + panic(err) + } + + return false + }) + + if errIter != nil { + return tallyResult, errIter + } + + return tallyResult, nil +} diff --git a/x/foundation/keeper/internal/treasury.go b/x/foundation/keeper/internal/treasury.go new file mode 100644 index 0000000000..43f8c20cff --- /dev/null +++ b/x/foundation/keeper/internal/treasury.go @@ -0,0 +1,73 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (k Keeper) CollectFoundationTax(ctx sdk.Context) error { + feeCollector := k.authKeeper.GetModuleAccount(ctx, k.feeCollectorName).GetAddress() + feesCollectedInt := k.bankKeeper.GetAllBalances(ctx, feeCollector) + if feesCollectedInt.Empty() { + return nil + } + feesCollected := sdk.NewDecCoinsFromCoins(feesCollectedInt...) + + // calculate the tax + taxRatio := k.GetFoundationTax(ctx) + tax, _ := feesCollected.MulDecTruncate(taxRatio).TruncateDecimal() + if tax.Empty() { + return nil + } + + // collect the tax + if err := k.FundTreasury(ctx, feeCollector, tax); err != nil { + return err + } + + return nil +} + +func (k Keeper) GetTreasury(ctx sdk.Context) sdk.DecCoins { + return k.GetPool(ctx).Treasury +} + +func (k Keeper) FundTreasury(ctx sdk.Context, from sdk.AccAddress, amt sdk.Coins) error { + pool := k.GetPool(ctx) + pool.Treasury = pool.Treasury.Add(sdk.NewDecCoinsFromCoins(amt...)...) + k.SetPool(ctx, pool) + + return k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, foundation.TreasuryName, amt) +} + +func (k Keeper) WithdrawFromTreasury(ctx sdk.Context, to sdk.AccAddress, amt sdk.Coins) error { + pool := k.GetPool(ctx) + remains, hasNeg := pool.Treasury.SafeSub(sdk.NewDecCoinsFromCoins(amt...)) + if hasNeg { + return sdkerrors.ErrInsufficientFunds.Wrapf("not enough coins in treasury, %s", pool.Treasury) + } + pool.Treasury = remains + k.SetPool(ctx, pool) + + return k.bankKeeper.SendCoinsFromModuleToAccount(ctx, foundation.TreasuryName, to, amt) +} + +func (k Keeper) GetPool(ctx sdk.Context) foundation.Pool { + store := ctx.KVStore(k.storeKey) + key := poolKey + bz := store.Get(key) + + var pool foundation.Pool + k.cdc.MustUnmarshal(bz, &pool) + + return pool +} + +func (k Keeper) SetPool(ctx sdk.Context, pool foundation.Pool) { + bz := k.cdc.MustMarshal(&pool) + + store := ctx.KVStore(k.storeKey) + key := poolKey + store.Set(key, bz) +} diff --git a/x/foundation/keeper/internal/treasury_test.go b/x/foundation/keeper/internal/treasury_test.go new file mode 100644 index 0000000000..e2bd7d94d8 --- /dev/null +++ b/x/foundation/keeper/internal/treasury_test.go @@ -0,0 +1,152 @@ +package internal_test + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (s *KeeperTestSuite) TestCollectFoundationTax() { + ctx, _ := s.ctx.CacheContext() + + // empty fee collector first + // send the fee to the stranger + // and get it back later if the test case requires + collector := authtypes.NewModuleAddress(authtypes.FeeCollectorName) + fees := s.bankKeeper.GetAllBalances(ctx, collector) + err := s.bankKeeper.SendCoinsFromModuleToAccount(ctx, authtypes.FeeCollectorName, s.stranger, fees) + s.Require().NoError(err) + + for name, tc := range map[string]struct { + fee sdk.Int + taxRatio sdk.Dec + tax sdk.Int + valid bool + }{ + "common": { + fee: fees[0].Amount, + taxRatio: sdk.MustNewDecFromStr("0.123456789"), + tax: sdk.NewInt(121932631), + valid: true, + }, + "zero fee": { + fee: sdk.ZeroInt(), + taxRatio: sdk.MustNewDecFromStr("0.123456789"), + tax: sdk.ZeroInt(), + valid: true, + }, + "zero ratio": { + fee: fees[0].Amount, + taxRatio: sdk.ZeroDec(), + tax: sdk.ZeroInt(), + valid: true, + }, + } { + s.Run(name, func() { + ctx, _ := ctx.CacheContext() + + // set fee + err := s.bankKeeper.SendCoinsFromAccountToModule(ctx, s.stranger, authtypes.FeeCollectorName, sdk.NewCoins(sdk.NewCoin(fees[0].Denom, tc.fee))) + s.Require().NoError(err) + + // set tax ratio + s.impl.SetParams(ctx, foundation.Params{ + FoundationTax: tc.taxRatio, + }) + + before := s.impl.GetTreasury(ctx) + s.Require().Equal(1, len(before)) + s.Require().Equal(sdk.NewDecFromInt(s.balance), before[0].Amount) + + tax := sdk.NewDecFromInt(tc.fee).MulTruncate(tc.taxRatio).TruncateInt() + // ensure the behavior does not change + s.Require().Equal(tc.tax, tax) + + err = s.impl.CollectFoundationTax(ctx) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + expectedAfter := s.balance.Add(tax) + after := s.impl.GetTreasury(ctx) + s.Require().Equal(1, len(after)) + s.Require().Equal(sdk.NewDecFromInt(expectedAfter), after[0].Amount) + }) + } +} + +func (s *KeeperTestSuite) TestFundTreasury() { + testCases := map[string]struct { + amount sdk.Int + valid bool + }{ + "valid amount": { + amount: s.balance, + valid: true, + }, + "insufficient coins": { + amount: s.balance.Add(sdk.OneInt()), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + before := s.impl.GetTreasury(ctx) + + amount := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)) + err := s.impl.FundTreasury(ctx, s.stranger, amount) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + expectedAfter := before.Add(sdk.NewDecCoinsFromCoins(amount...)...) + poolAfter := s.impl.GetTreasury(ctx) + s.Require().Equal(sdk.NewDecCoins(expectedAfter...), sdk.NewDecCoins(poolAfter...)) + balanceAfter := sdk.NewDecCoinsFromCoins(s.bankKeeper.GetAllBalances(ctx, authtypes.NewModuleAddress(foundation.TreasuryName))...) + s.Require().Equal(sdk.NewDecCoins(expectedAfter...), sdk.NewDecCoins(balanceAfter...)) + }) + } +} + +func (s *KeeperTestSuite) TestWithdrawFromTreasury() { + testCases := map[string]struct { + amount sdk.Int + valid bool + }{ + "valid amount": { + amount: s.balance, + valid: true, + }, + "insufficient coins": { + amount: s.balance.Add(sdk.OneInt()), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + + before := s.impl.GetTreasury(ctx) + + amount := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)) + err := s.impl.WithdrawFromTreasury(ctx, s.stranger, amount) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + expectedAfter := before.Sub(sdk.NewDecCoinsFromCoins(amount...)) + poolAfter := s.impl.GetTreasury(ctx) + s.Require().Equal(sdk.NewDecCoins(expectedAfter...), sdk.NewDecCoins(poolAfter...)) + balanceAfter := sdk.NewDecCoinsFromCoins(s.bankKeeper.GetAllBalances(ctx, authtypes.NewModuleAddress(foundation.TreasuryName))...) + s.Require().Equal(sdk.NewDecCoins(expectedAfter...), sdk.NewDecCoins(balanceAfter...)) + }) + } +} diff --git a/x/foundation/keeper/internal/vote.go b/x/foundation/keeper/internal/vote.go new file mode 100644 index 0000000000..5f9e0c8567 --- /dev/null +++ b/x/foundation/keeper/internal/vote.go @@ -0,0 +1,111 @@ +package internal + +import ( + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (k Keeper) Vote(ctx sdk.Context, vote foundation.Vote) error { + if err := validateMetadata(vote.Metadata, k.config); err != nil { + return err + } + + // Make sure that a voter hasn't already voted. + voter := sdk.MustAccAddressFromBech32(vote.Voter) + if k.hasVote(ctx, vote.ProposalId, voter) { + return sdkerrors.ErrInvalidRequest.Wrapf("Already voted: %s", vote.Voter) + } + + proposal, err := k.GetProposal(ctx, vote.ProposalId) + if err != nil { + return err + } + + // Ensure that we can still accept votes for this proposal. + if proposal.Status != foundation.PROPOSAL_STATUS_SUBMITTED { + return sdkerrors.ErrInvalidRequest.Wrapf("not possible with proposal status: %s", proposal.Status) + } + if !ctx.BlockTime().Before(proposal.VotingPeriodEnd) { + return sdkerrors.ErrInvalidRequest.Wrap("voting period has ended already") + } + + vote.SubmitTime = ctx.BlockTime() + k.setVote(ctx, vote) + + if err := ctx.EventManager().EmitTypedEvent(&foundation.EventVote{ + Vote: vote, + }); err != nil { + panic(err) + } + + return nil +} + +func (k Keeper) hasVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) bool { + store := ctx.KVStore(k.storeKey) + key := voteKey(proposalID, voter) + return store.Has(key) +} + +func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) (*foundation.Vote, error) { + store := ctx.KVStore(k.storeKey) + key := voteKey(proposalID, voter) + bz := store.Get(key) + if len(bz) == 0 { + return nil, sdkerrors.ErrNotFound.Wrapf("No vote for proposal %d: %s", proposalID, voter) + } + + var vote foundation.Vote + k.cdc.MustUnmarshal(bz, &vote) + + return &vote, nil +} + +func (k Keeper) setVote(ctx sdk.Context, vote foundation.Vote) { + store := ctx.KVStore(k.storeKey) + voter := sdk.MustAccAddressFromBech32(vote.Voter) + key := voteKey(vote.ProposalId, voter) + bz := k.cdc.MustMarshal(&vote) + store.Set(key, bz) +} + +func (k Keeper) iterateVotes(ctx sdk.Context, proposalID uint64, fn func(vote foundation.Vote) (stop bool)) { + store := ctx.KVStore(k.storeKey) + prefix := append(voteKeyPrefix, Uint64ToBytes(proposalID)...) + iterator := sdk.KVStorePrefixIterator(store, prefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var vote foundation.Vote + k.cdc.MustUnmarshal(iterator.Value(), &vote) + if stop := fn(vote); stop { + break + } + } +} + +func (k Keeper) GetVotes(ctx sdk.Context, proposalID uint64) []foundation.Vote { + var votes []foundation.Vote + k.iterateVotes(ctx, proposalID, func(vote foundation.Vote) (stop bool) { + votes = append(votes, vote) + return false + }) + + return votes +} + +// pruneVotes prunes all votes for a proposal from state. +func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) { + keys := [][]byte{} + k.iterateVotes(ctx, proposalID, func(vote foundation.Vote) (stop bool) { + voter := sdk.MustAccAddressFromBech32(vote.Voter) + keys = append(keys, voteKey(proposalID, voter)) + return false + }) + + store := ctx.KVStore(k.storeKey) + for _, key := range keys { + store.Delete(key) + } +} diff --git a/x/foundation/keeper/internal/vote_test.go b/x/foundation/keeper/internal/vote_test.go new file mode 100644 index 0000000000..7b6a20a8eb --- /dev/null +++ b/x/foundation/keeper/internal/vote_test.go @@ -0,0 +1,86 @@ +package internal_test + +import ( + "time" + + sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func (s *KeeperTestSuite) TestVote() { + // no such a vote + _, err := s.impl.GetVote(s.ctx, s.nextProposal, s.members[0]) + s.Require().Error(err) + + testCases := map[string]struct { + proposalID uint64 + voter sdk.AccAddress + option foundation.VoteOption + metadata string + after time.Duration + valid bool + }{ + "vote yes": { + proposalID: s.activeProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + valid: true, + }, + "vote no": { + proposalID: s.activeProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_NO, + valid: true, + }, + "already voted": { + proposalID: s.votedProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + }, + "no such a proposal": { + proposalID: s.nextProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + }, + "inactive proposal": { + proposalID: s.withdrawnProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + }, + "long metadata": { + proposalID: s.activeProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + metadata: string(make([]rune, 256)), + }, + "voting too late": { + proposalID: s.activeProposal, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + after: s.impl.GetFoundationInfo(s.ctx).GetDecisionPolicy().GetVotingPeriod(), + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctx, _ := s.ctx.CacheContext() + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(tc.after)) + + vote := foundation.Vote{ + ProposalId: tc.proposalID, + Voter: tc.voter.String(), + Option: tc.option, + Metadata: tc.metadata, + } + err := s.impl.Vote(ctx, vote) + if !tc.valid { + s.Require().Error(err) + return + } + s.Require().NoError(err) + + _, err = s.impl.GetVote(ctx, vote.ProposalId, sdk.MustAccAddressFromBech32(vote.Voter)) + s.Require().NoError(err) + }) + } +} diff --git a/x/foundation/keys.go b/x/foundation/keys.go new file mode 100644 index 0000000000..65c1e4ee9d --- /dev/null +++ b/x/foundation/keys.go @@ -0,0 +1,19 @@ +package foundation + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "foundation" + + // StoreKey defines the primary module store key + StoreKey = ModuleName + + // RouterKey defines the module's message routing key + RouterKey = ModuleName + + TreasuryName = "treasury" +) + +// params +const ( + ParamKeyFoundationTax = "FoundationTax" +) diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go new file mode 100644 index 0000000000..5f506b7c34 --- /dev/null +++ b/x/foundation/module/module.go @@ -0,0 +1,187 @@ +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" + + "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/foundation" + "github.com/Finschia/finschia-sdk/x/foundation/client/cli" + "github.com/Finschia/finschia-sdk/x/foundation/keeper" +) + +const ( + consensusVersion uint64 = 2 +) + +var ( + _ module.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ module.BeginBlockAppModule = AppModule{} + _ module.EndBlockAppModule = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the foundation module. +type AppModuleBasic struct{} + +// Name returns the ModuleName +func (AppModuleBasic) Name() string { + return foundation.ModuleName +} + +// RegisterLegacyAminoCodec registers the foundation types on the LegacyAmino codec +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} + +// DefaultGenesis returns default genesis state as raw bytes for the foundation +// module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(foundation.DefaultGenesisState()) +} + +// ValidateGenesis performs genesis state validation for the foundation module. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var data foundation.GenesisState + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", foundation.ModuleName, err) + } + + return foundation.ValidateGenesis(data) +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the foundation module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + if err := foundation.RegisterQueryHandlerClient(context.Background(), mux, foundation.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) { + foundation.RegisterInterfaces(registry) +} + +// ____________________________________________________________________________ + +// AppModule implements an application module for the foundation 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, + } +} + +// RegisterInvariants does nothing, there are no invariants to enforce +func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { + keeper.RegisterInvariants(ir, am.keeper) +} + +// Route is empty, as we do not handle Messages (just proposals) +func (AppModule) Route() sdk.Route { return sdk.Route{} } + +// QuerierRoute returns the route we respond to for abci queries +func (AppModule) QuerierRoute() string { return "" } + +// LegacyQuerierHandler registers a query handler to respond to the module-specific queries +func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { + return nil +} + +// RegisterServices registers a GRPC query service to respond to the +// module-specific GRPC queries. +func (am AppModule) RegisterServices(cfg module.Configurator) { + foundation.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServer(am.keeper)) + foundation.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) + err := keeper.NewMigrator(am.keeper).Register(cfg.RegisterMigration) + if err != nil { + panic(err) + } +} + +// InitGenesis performs genesis initialization for the foundation module. It returns +// no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { + var genesisState foundation.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 foundation +// 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 } + +// BeginBlock performs a no-op. +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { + keeper.BeginBlocker(ctx, am.keeper) +} + +// EndBlock performs a no-op. +func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + keeper.EndBlocker(ctx, am.keeper) + return []abci.ValidatorUpdate{} +} + +// ____________________________________________________________________________ + +// AppModuleSimulation functions + +// // GenerateGenesisState creates a randomized GenState of the foundation module. +// func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +// simulation.RandomizedGenState(simState) +// } + +// // ProposalContents returns all the foundation content functions used to +// // simulate foundation proposals. +// func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +// return simulation.ProposalContents() +// } + +// // RandomizedParams creates randomized foundation param changes for the simulator. +// func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +// return simulation.ParamChanges(r) +// } + +// // RegisterStoreDecoder registers a decoder for foundation module's types +// func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +// sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +// } + +// // WeightedOperations returns the all the foundation module operations with their respective weights. +// func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +// return simulation.WeightedOperations( +// simState.AppParams, simState.Cdc, +// am.stakingKeeper, am.slashingKeeper, am.keeper, simState.Contents, +// ) +// } diff --git a/x/foundation/msgs.go b/x/foundation/msgs.go new file mode 100644 index 0000000000..8a31e5ec0a --- /dev/null +++ b/x/foundation/msgs.go @@ -0,0 +1,585 @@ +package foundation + +import ( + "github.com/gogo/protobuf/proto" + + codectypes "github.com/Finschia/finschia-sdk/codec/types" + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation/codec" +) + +var _ sdk.Msg = (*MsgUpdateParams)(nil) + +// ValidateBasic implements Msg. +func (m MsgUpdateParams) ValidateBasic() error { + return sdkerrors.ErrUnknownRequest.Wrapf("unrecognized message route: %s", m.Route()) +} + +// GetSigners implements Msg. +func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgUpdateParams) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgUpdateParams) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgFundTreasury)(nil) + +// ValidateBasic implements Msg. +func (m MsgFundTreasury) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.From); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid from address: %s", m.From) + } + + if !m.Amount.IsValid() || !m.Amount.IsAllPositive() { + return sdkerrors.ErrInvalidCoins.Wrap(m.Amount.String()) + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgFundTreasury) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.From) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgFundTreasury) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgFundTreasury) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgFundTreasury) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgWithdrawFromTreasury)(nil) + +// ValidateBasic implements Msg. +func (m MsgWithdrawFromTreasury) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) + } + + if _, err := sdk.AccAddressFromBech32(m.To); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid to address: %s", m.To) + } + + if !m.Amount.IsValid() || !m.Amount.IsAllPositive() { + return sdkerrors.ErrInvalidCoins.Wrap(m.Amount.String()) + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgWithdrawFromTreasury) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgWithdrawFromTreasury) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgWithdrawFromTreasury) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgWithdrawFromTreasury) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgUpdateMembers)(nil) + +// ValidateBasic implements Msg. +func (m MsgUpdateMembers) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) + } + + if len(m.MemberUpdates) == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("empty updates") + } + members := MemberRequests{Members: m.MemberUpdates} + if err := members.ValidateBasic(); err != nil { + return err + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgUpdateMembers) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgUpdateMembers) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgUpdateMembers) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgUpdateMembers) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgUpdateDecisionPolicy)(nil) + +// ValidateBasic implements Msg. +func (m MsgUpdateDecisionPolicy) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) + } + + if m.GetDecisionPolicy() == nil { + return sdkerrors.ErrInvalidRequest.Wrap("nil decision policy") + } + if err := m.GetDecisionPolicy().ValidateBasic(); err != nil { + return err + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgUpdateDecisionPolicy) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgUpdateDecisionPolicy) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgUpdateDecisionPolicy) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgUpdateDecisionPolicy) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +func (m MsgUpdateDecisionPolicy) GetDecisionPolicy() DecisionPolicy { + if m.DecisionPolicy == nil { + return nil + } + + policy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return policy +} + +func (m *MsgUpdateDecisionPolicy) SetDecisionPolicy(policy DecisionPolicy) error { + msg, ok := policy.(proto.Message) + if !ok { + return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) + } + + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return err + } + m.DecisionPolicy = any + + return nil +} + +func (m MsgUpdateDecisionPolicy) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var policy DecisionPolicy + return unpacker.UnpackAny(m.DecisionPolicy, &policy) +} + +var _ sdk.Msg = (*MsgSubmitProposal)(nil) + +// ValidateBasic implements Msg. +func (m MsgSubmitProposal) ValidateBasic() error { + if err := validateProposers(m.Proposers); err != nil { + return err + } + + if err := validateMsgs(m.GetMsgs()); err != nil { + return err + } + + if _, ok := Exec_name[int32(m.Exec)]; !ok { + return sdkerrors.ErrInvalidRequest.Wrap("invalid exec option") + } + + return nil +} + +func (m MsgSubmitProposal) GetMsgs() []sdk.Msg { + msgs, err := GetMsgs(m.Messages, "proposal") + if err != nil { + panic(err) + } + return msgs +} + +func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { + anys, err := SetMsgs(msgs) + if err != nil { + return err + } + m.Messages = anys + return nil +} + +func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return UnpackInterfaces(unpacker, m.Messages) +} + +// GetSigners implements Msg. +func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { + signers := make([]sdk.AccAddress, len(m.Proposers)) + for i, p := range m.Proposers { + proposer := sdk.MustAccAddressFromBech32(p) + signers[i] = proposer + } + return signers +} + +// Type implements the LegacyMsg.Type method. +func (m MsgSubmitProposal) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgSubmitProposal) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgSubmitProposal) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgWithdrawProposal)(nil) + +// ValidateBasic implements Msg. +func (m MsgWithdrawProposal) ValidateBasic() error { + if m.ProposalId == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") + } + + if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid withdrawer address: %s", m.Address) + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgWithdrawProposal) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Address) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgWithdrawProposal) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgWithdrawProposal) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgWithdrawProposal) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgVote)(nil) + +// ValidateBasic implements Msg. +func (m MsgVote) ValidateBasic() error { + if m.ProposalId == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") + } + + if _, err := sdk.AccAddressFromBech32(m.Voter); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", m.Voter) + } + + if err := validateVoteOption(m.Option); err != nil { + return err + } + + if _, ok := Exec_name[int32(m.Exec)]; !ok { + return sdkerrors.ErrInvalidRequest.Wrap("invalid exec option") + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgVote) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Voter) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgVote) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgVote) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgVote) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgExec)(nil) + +// ValidateBasic implements Msg. +func (m MsgExec) ValidateBasic() error { + if m.ProposalId == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") + } + + if _, err := sdk.AccAddressFromBech32(m.Signer); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid signer address: %s", m.Signer) + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgExec) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Signer) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgExec) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgExec) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgExec) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgLeaveFoundation)(nil) + +// ValidateBasic implements Msg. +func (m MsgLeaveFoundation) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", m.Address) + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgLeaveFoundation) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Address) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgLeaveFoundation) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgLeaveFoundation) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgLeaveFoundation) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgUpdateCensorship)(nil) + +// ValidateBasic implements Msg. +func (m MsgUpdateCensorship) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) + } + + if err := m.Censorship.ValidateBasic(); err != nil { + return err + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgUpdateCensorship) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgUpdateCensorship) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgUpdateCensorship) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgUpdateCensorship) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgGrant)(nil) + +// ValidateBasic implements Msg. +func (m MsgGrant) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) + } + + if _, err := sdk.AccAddressFromBech32(m.Grantee); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", m.Grantee) + } + + if a := m.GetAuthorization(); a != nil { + if err := a.ValidateBasic(); err != nil { + return err + } + } else { + return sdkerrors.ErrInvalidType.Wrap("invalid authorization") + } + + return nil +} + +func (m MsgGrant) GetAuthorization() Authorization { + if m.Authorization == nil { + return nil + } + + a, err := GetAuthorization(m.Authorization, "grant") + if err != nil { + return nil + } + return a +} + +func (m *MsgGrant) SetAuthorization(a Authorization) error { + any, err := SetAuthorization(a) + if err != nil { + return err + } + m.Authorization = any + + return nil +} + +func (m MsgGrant) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var authorization Authorization + return unpacker.UnpackAny(m.Authorization, &authorization) +} + +// GetSigners implements Msg. +func (m MsgGrant) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgGrant) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgGrant) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgGrant) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} + +var _ sdk.Msg = (*MsgRevoke)(nil) + +// ValidateBasic implements Msg. +func (m MsgRevoke) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) + } + + if _, err := sdk.AccAddressFromBech32(m.Grantee); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", m.Grantee) + } + + if len(m.MsgTypeUrl) == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("empty url") + } + + return nil +} + +// GetSigners implements Msg. +func (m MsgRevoke) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(m.Authority) + return []sdk.AccAddress{signer} +} + +// Type implements the LegacyMsg.Type method. +func (m MsgRevoke) Type() string { + return sdk.MsgTypeURL(&m) +} + +// Route implements the LegacyMsg.Route method. +func (m MsgRevoke) Route() string { + return sdk.MsgTypeURL(&m) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (m MsgRevoke) GetSignBytes() []byte { + return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) +} diff --git a/x/foundation/msgs_test.go b/x/foundation/msgs_test.go new file mode 100644 index 0000000000..ff79d17620 --- /dev/null +++ b/x/foundation/msgs_test.go @@ -0,0 +1,894 @@ +package foundation_test + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" + "github.com/Finschia/finschia-sdk/testutil/testdata" + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/auth/legacy/legacytx" + "github.com/Finschia/finschia-sdk/x/foundation" +) + +func TestMsgUpdateParams(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + authority sdk.AccAddress + params foundation.Params + valid bool + }{ + "handler for MsgUpdateParams removed, ValidateBasic should throw error always": { + authority: addrs[0], + params: foundation.Params{ + FoundationTax: sdk.ZeroDec(), + }, + valid: false, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgUpdateParams{ + Authority: tc.authority.String(), + Params: tc.params, + } + + err := msg.ValidateBasic() + require.Error(t, err) + require.ErrorIs(t, err, sdkerrors.ErrUnknownRequest) + }) + msg := foundation.MsgUpdateParams{ + addrs[0].String(), + foundation.Params{}, + } + // Note: Dummy test for coverage of deprecated message + _ = msg.GetSigners() + _ = msg.String() + _, _ = msg.Descriptor() + _ = msg.GetSignBytes() + _, _ = msg.Marshal() + msg.ProtoMessage() + msg.Reset() + _ = msg.Route() + _ = msg.Size() + _ = msg.Type() + _ = msg.XXX_Size() + } +} + +func TestMsgFundTreasury(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + from sdk.AccAddress + amount sdk.Int + valid bool + }{ + "valid msg": { + from: addrs[0], + amount: sdk.OneInt(), + valid: true, + }, + "empty from": { + amount: sdk.OneInt(), + }, + "zero amount": { + from: addrs[0], + amount: sdk.ZeroInt(), + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgFundTreasury{ + From: tc.from.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.from}, msg.GetSigners()) + }) + } +} + +func TestMsgWithdrawFromTreasury(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + authority sdk.AccAddress + to sdk.AccAddress + amount sdk.Int + valid bool + }{ + "valid msg": { + authority: addrs[0], + to: addrs[1], + amount: sdk.OneInt(), + valid: true, + }, + "empty authority": { + to: addrs[1], + amount: sdk.OneInt(), + }, + "empty to": { + authority: addrs[0], + amount: sdk.OneInt(), + }, + "zero amount": { + authority: addrs[0], + to: addrs[1], + amount: sdk.ZeroInt(), + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgWithdrawFromTreasury{ + Authority: tc.authority.String(), + To: tc.to.String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) + }) + } +} + +func TestMsgUpdateMembers(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + authority sdk.AccAddress + members []foundation.MemberRequest + valid bool + }{ + "valid msg": { + authority: addrs[0], + members: []foundation.MemberRequest{{ + Address: addrs[1].String(), + }}, + valid: true, + }, + "empty authority": { + members: []foundation.MemberRequest{{ + Address: addrs[1].String(), + }}, + }, + "empty requests": { + authority: addrs[0], + }, + "invalid requests": { + authority: addrs[0], + members: []foundation.MemberRequest{{}}, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgUpdateMembers{ + Authority: tc.authority.String(), + MemberUpdates: tc.members, + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) + }) + } +} + +func TestMsgUpdateDecisionPolicy(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + authority sdk.AccAddress + policy foundation.DecisionPolicy + valid bool + }{ + "valid threshold policy": { + authority: addrs[0], + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + valid: true, + }, + "valid percentage policy": { + authority: addrs[0], + policy: &foundation.PercentageDecisionPolicy{ + Percentage: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + valid: true, + }, + "empty authority": { + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + }, + "empty policy": { + authority: addrs[0], + }, + "zero threshold": { + authority: addrs[0], + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.ZeroDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + }, + "zero voting period": { + authority: addrs[0], + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{}, + }, + }, + "invalid percentage": { + authority: addrs[0], + policy: &foundation.PercentageDecisionPolicy{ + Percentage: sdk.NewDec(2), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgUpdateDecisionPolicy{ + Authority: tc.authority.String(), + } + if tc.policy != nil { + err := msg.SetDecisionPolicy(tc.policy) + require.NoError(t, err) + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) + }) + } +} + +func TestMsgSubmitProposal(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + proposers []sdk.AccAddress + msgs []sdk.Msg + exec foundation.Exec + valid bool + }{ + "valid msg": { + proposers: []sdk.AccAddress{addrs[0]}, + msgs: []sdk.Msg{testdata.NewTestMsg()}, + valid: true, + }, + "empty proposers": { + msgs: []sdk.Msg{testdata.NewTestMsg()}, + }, + "invalid proposer": { + proposers: []sdk.AccAddress{nil}, + msgs: []sdk.Msg{testdata.NewTestMsg()}, + }, + "duplicate proposers": { + proposers: []sdk.AccAddress{addrs[0], addrs[0]}, + msgs: []sdk.Msg{testdata.NewTestMsg()}, + }, + "empty msgs": { + proposers: []sdk.AccAddress{addrs[0]}, + }, + "invalid msg": { + proposers: []sdk.AccAddress{addrs[0]}, + msgs: []sdk.Msg{&foundation.MsgWithdrawFromTreasury{}}, + }, + "invalid exec": { + proposers: []sdk.AccAddress{addrs[0]}, + msgs: []sdk.Msg{testdata.NewTestMsg()}, + exec: -1, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + var proposers []string + for _, proposer := range tc.proposers { + proposers = append(proposers, proposer.String()) + } + + msg := foundation.MsgSubmitProposal{ + Proposers: proposers, + Exec: tc.exec, + } + err := msg.SetMsgs(tc.msgs) + require.NoError(t, err) + + err = msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.proposers, msg.GetSigners()) + }) + } +} + +func TestMsgWithdrawProposal(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + id uint64 + address sdk.AccAddress + valid bool + }{ + "valid msg": { + id: 1, + address: addrs[0], + valid: true, + }, + "empty proposal id": { + address: addrs[0], + }, + "empty address": { + id: 1, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgWithdrawProposal{ + ProposalId: tc.id, + Address: tc.address.String(), + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) + }) + } +} + +func TestMsgVote(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + id uint64 + voter sdk.AccAddress + option foundation.VoteOption + exec foundation.Exec + valid bool + }{ + "valid msg": { + id: 1, + voter: addrs[0], + option: foundation.VOTE_OPTION_YES, + valid: true, + }, + "empty proposal id": { + voter: addrs[0], + option: foundation.VOTE_OPTION_YES, + }, + "empty voter": { + id: 1, + option: foundation.VOTE_OPTION_YES, + }, + "empty option": { + id: 1, + voter: addrs[0], + }, + "invalid option": { + id: 1, + voter: addrs[0], + option: -1, + }, + "invalid exec": { + id: 1, + voter: addrs[0], + option: foundation.VOTE_OPTION_YES, + exec: -1, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgVote{ + ProposalId: tc.id, + Voter: tc.voter.String(), + Option: tc.option, + Exec: tc.exec, + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.voter}, msg.GetSigners()) + }) + } +} + +func TestMsgExec(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + id uint64 + signer sdk.AccAddress + valid bool + }{ + "valid msg": { + id: 1, + signer: addrs[0], + valid: true, + }, + "empty proposal id": { + signer: addrs[0], + }, + "empty signer": { + id: 1, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgExec{ + ProposalId: tc.id, + Signer: tc.signer.String(), + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.signer}, msg.GetSigners()) + }) + } +} + +func TestMsgLeaveFoundation(t *testing.T) { + addrs := make([]sdk.AccAddress, 1) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + address sdk.AccAddress + valid bool + }{ + "valid msg": { + address: addrs[0], + valid: true, + }, + "empty address": {}, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgLeaveFoundation{ + Address: tc.address.String(), + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) + }) + } +} + +func TestMsgGrant(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + authority sdk.AccAddress + grantee sdk.AccAddress + authorization foundation.Authorization + valid bool + }{ + "valid msg": { + authority: addrs[0], + grantee: addrs[1], + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + valid: true, + }, + "empty authority": { + grantee: addrs[1], + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + "empty grantee": { + authority: addrs[0], + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + "empty authorization": { + authority: addrs[0], + grantee: addrs[1], + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgGrant{ + Authority: tc.authority.String(), + Grantee: tc.grantee.String(), + } + if tc.authorization != nil { + err := msg.SetAuthorization(tc.authorization) + require.NoError(t, err) + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) + }) + } +} + +func TestMsgRevoke(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + authority sdk.AccAddress + grantee sdk.AccAddress + msgTypeURL string + valid bool + }{ + "valid msg": { + authority: addrs[0], + grantee: addrs[1], + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + valid: true, + }, + "empty authority": { + grantee: addrs[1], + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + "empty grantee": { + authority: addrs[0], + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + "empty url": { + authority: addrs[0], + grantee: addrs[1], + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + msg := foundation.MsgRevoke{ + Authority: tc.authority.String(), + Grantee: tc.grantee.String(), + MsgTypeUrl: tc.msgTypeURL, + } + + err := msg.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) + }) + } +} + +func TestAminoJSON(t *testing.T) { + addrs := make([]sdk.AccAddress, 3) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + testCases := map[string]struct { + msg legacytx.LegacyMsg + expected string + }{ + "MsgFundTreasury": { + &foundation.MsgFundTreasury{ + From: addrs[0].String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgFundTreasury\",\"value\":{\"amount\":[{\"amount\":\"1\",\"denom\":\"stake\"}],\"from\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + }, + "MsgVote": { + &foundation.MsgVote{ + ProposalId: 1, + Voter: addrs[0].String(), + Option: foundation.VOTE_OPTION_YES, + Metadata: "I'm YES", + Exec: foundation.Exec_EXEC_UNSPECIFIED, + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgVote\",\"value\":{\"metadata\":\"I'm YES\",\"option\":1,\"proposal_id\":\"1\",\"voter\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + }, + "MsgExec": { + &foundation.MsgExec{ + ProposalId: 1, + Signer: addrs[0].String(), + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgExec\",\"value\":{\"proposal_id\":\"1\",\"signer\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + }, + "MsgLeaveFoundation": { + &foundation.MsgLeaveFoundation{Address: addrs[0].String()}, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgLeaveFoundation\",\"value\":{\"address\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + }, + "MsgWithdrawProposal": { + &foundation.MsgWithdrawProposal{ + ProposalId: 1, + Address: addrs[0].String(), + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgWithdrawProposal\",\"value\":{\"address\":\"%s\",\"proposal_id\":\"1\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + }, + } + + for name, tc := range testCases { + tc := tc + + t.Run(name, func(t *testing.T) { + require.Equal(t, tc.expected, string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{tc.msg}, "memo"))) + }) + } +} + +func TestMsgSubmitProposalAminoJSON(t *testing.T) { + addrs := make([]sdk.AccAddress, 2) + for i := range addrs { + addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + } + + proposer := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + + testCases := map[string]struct { + msg sdk.Msg + expected string + }{ + "MsgUpdateParams": { + &foundation.MsgUpdateParams{ + Authority: addrs[0].String(), + Params: foundation.Params{FoundationTax: sdk.ZeroDec()}, + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateParams\",\"value\":{\"authority\":\"%s\",\"params\":{\"foundation_tax\":\"0.000000000000000000\"}}}],\"metadata\":\"MsgUpdateParams\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), proposer.String()), + }, + "MsgWithdrawFromTreasury": { + &foundation.MsgWithdrawFromTreasury{ + Authority: addrs[0].String(), + To: addrs[1].String(), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1000000))), + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgWithdrawFromTreasury\",\"value\":{\"amount\":[{\"amount\":\"1000000\",\"denom\":\"stake\"}],\"authority\":\"%s\",\"to\":\"%s\"}}],\"metadata\":\"MsgWithdrawFromTreasury\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()), + }, + "MsgUpdateMembers": { + &foundation.MsgUpdateMembers{ + Authority: addrs[0].String(), + MemberUpdates: []foundation.MemberRequest{{ + Address: addrs[1].String(), + }}, + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateMembers\",\"value\":{\"authority\":\"%s\",\"member_updates\":[{\"address\":\"%s\"}]}}],\"metadata\":\"MsgUpdateMembers\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()), + }, + "MsgUpdateCensorship": { + &foundation.MsgUpdateCensorship{ + Authority: addrs[0].String(), + Censorship: foundation.Censorship{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityGovernance, + }, + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateCensorship\",\"value\":{\"authority\":\"%s\",\"censorship\":{\"authority\":1,\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}}],\"metadata\":\"MsgUpdateCensorship\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), proposer.String()), + }, + "MsgRevoke": { + &foundation.MsgRevoke{ + Authority: addrs[0].String(), + Grantee: addrs[1].String(), + MsgTypeUrl: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgRevoke\",\"value\":{\"authority\":\"%s\",\"grantee\":\"%s\",\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}],\"metadata\":\"MsgRevoke\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()), + }, + } + + for name, tc := range testCases { + tc := tc + + t.Run(name, func(t *testing.T) { + proposalMsg := &foundation.MsgSubmitProposal{ + Proposers: []string{proposer.String()}, + Metadata: name, + Exec: foundation.Exec_EXEC_TRY, + } + err := proposalMsg.SetMsgs([]sdk.Msg{tc.msg}) + require.NoError(t, err) + require.Equal(t, tc.expected, string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{proposalMsg}, "memo"))) + }) + } +} + +func TestMsgUpdateDecisionPolicyAminoJson(t *testing.T) { + var ( + authority = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + proposer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + ) + + testCases := map[string]struct { + policy foundation.DecisionPolicy + expected string + }{ + "ThresholdDecisionPolicy": { + &foundation.ThresholdDecisionPolicy{ + Threshold: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateDecisionPolicy\",\"value\":{\"authority\":\"%s\",\"decision_policy\":{\"type\":\"lbm-sdk/ThresholdDecisionPolicy\",\"value\":{\"threshold\":\"1.000000000000000000\",\"windows\":{\"min_execution_period\":\"0\",\"voting_period\":\"3600000000000\"}}}}}],\"metadata\":\"ThresholdDecisionPolicy\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", authority, proposer), + }, + "PercentageDecisionPolicy": { + &foundation.PercentageDecisionPolicy{ + Percentage: sdk.OneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateDecisionPolicy\",\"value\":{\"authority\":\"%s\",\"decision_policy\":{\"type\":\"lbm-sdk/PercentageDecisionPolicy\",\"value\":{\"percentage\":\"1.000000000000000000\",\"windows\":{\"min_execution_period\":\"0\",\"voting_period\":\"3600000000000\"}}}}}],\"metadata\":\"PercentageDecisionPolicy\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", authority, proposer), + }, + } + + for name, tc := range testCases { + tc := tc + + t.Run(name, func(t *testing.T) { + policyMsg := &foundation.MsgUpdateDecisionPolicy{ + Authority: authority.String(), + } + err := policyMsg.SetDecisionPolicy(tc.policy) + require.NoError(t, err) + + err = policyMsg.ValidateBasic() + require.NoError(t, err) + + proposalMsg := &foundation.MsgSubmitProposal{ + Proposers: []string{proposer.String()}, + Metadata: name, + Exec: foundation.Exec_EXEC_TRY, + } + err = proposalMsg.SetMsgs([]sdk.Msg{policyMsg}) + require.NoError(t, err) + + require.Equal(t, tc.expected, string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{proposalMsg}, "memo"))) + }) + } +} + +func TestMsgGrantAminoJson(t *testing.T) { + var ( + operator = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + grantee = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + proposer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + ) + + testCases := map[string]struct { + authorization foundation.Authorization + expected string + }{ + "ReceiveFromTreasuryAuthorization": { + &foundation.ReceiveFromTreasuryAuthorization{}, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgGrant\",\"value\":{\"authority\":\"%s\",\"authorization\":{\"type\":\"lbm-sdk/ReceiveFromTreasuryAuthorization\",\"value\":{}},\"grantee\":\"%s\"}}],\"metadata\":\"ReceiveFromTreasuryAuthorization\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", operator.String(), grantee.String(), proposer.String()), + }, + } + + for name, tc := range testCases { + tc := tc + + t.Run(name, func(t *testing.T) { + grantMsg := &foundation.MsgGrant{ + Authority: operator.String(), + Grantee: grantee.String(), + } + err := grantMsg.SetAuthorization(tc.authorization) + require.NoError(t, err) + + err = grantMsg.ValidateBasic() + require.NoError(t, err) + + proposalMsg := &foundation.MsgSubmitProposal{ + Proposers: []string{proposer.String()}, + Metadata: name, + Exec: foundation.Exec_EXEC_TRY, + } + err = proposalMsg.SetMsgs([]sdk.Msg{grantMsg}) + require.NoError(t, err) + + require.Equal(t, tc.expected, string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{proposalMsg}, "memo"))) + }) + } +} diff --git a/x/foundation/proposal.go b/x/foundation/proposal.go new file mode 100644 index 0000000000..a2b3727aef --- /dev/null +++ b/x/foundation/proposal.go @@ -0,0 +1,70 @@ +package foundation + +import ( + codectypes "github.com/Finschia/finschia-sdk/codec/types" + sdk "github.com/Finschia/finschia-sdk/types" + sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + govtypes "github.com/Finschia/finschia-sdk/x/gov/types" +) + +const ( + ProposalTypeFoundationExec string = "FoundationExec" +) + +func NewFoundationExecProposal(title, description string, msgs []sdk.Msg) govtypes.Content { + proposal := &FoundationExecProposal{ + Title: title, + Description: description, + } + proposal.SetMessages(msgs) + + return proposal +} + +// Implements Proposal Interface +var _ govtypes.Content = &FoundationExecProposal{} + +func (p FoundationExecProposal) ProposalRoute() string { return RouterKey } +func (p FoundationExecProposal) ProposalType() string { return ProposalTypeFoundationExec } +func (p FoundationExecProposal) ValidateBasic() error { + msgs := GetMessagesFromFoundationExecProposal(p) + for idx, msg := range msgs { + if err := msg.ValidateBasic(); err != nil { + return sdkerrors.Wrapf(err, "msg: %d", idx) + } + } + + return govtypes.ValidateAbstract(&p) +} + +func GetMessagesFromFoundationExecProposal(p FoundationExecProposal) []sdk.Msg { + anys := p.Messages + res := make([]sdk.Msg, len(anys)) + for i, any := range anys { + cached := any.GetCachedValue() + if cached == nil { + panic("Any cached value is nil") + } + res[i] = cached.(sdk.Msg) + } + return res +} + +func (p *FoundationExecProposal) SetMessages(msgs []sdk.Msg) { + p.Messages = make([]*codectypes.Any, len(msgs)) + for i, msg := range msgs { + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + panic(err) + } + p.Messages[i] = any + } +} + +func (p FoundationExecProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return UnpackInterfaces(unpacker, p.Messages) +} + +func init() { + govtypes.RegisterProposalType(ProposalTypeFoundationExec) +} diff --git a/x/foundation/query.pb.go b/x/foundation/query.pb.go new file mode 100644 index 0000000000..a61d806020 --- /dev/null +++ b/x/foundation/query.pb.go @@ -0,0 +1,5289 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/foundation/v1/query.proto + +package foundation + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/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 + +// QueryParamsRequest is the request type for the Query/Params RPC method. +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_15a18e20c0e403af, []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 + +// QueryParamsResponse is the response type for the Query/Params RPC method. +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_15a18e20c0e403af, []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{} +} + +// QueryTreasuryRequest is the request type for the +// Query/Treasury RPC method. +type QueryTreasuryRequest struct { +} + +func (m *QueryTreasuryRequest) Reset() { *m = QueryTreasuryRequest{} } +func (m *QueryTreasuryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTreasuryRequest) ProtoMessage() {} +func (*QueryTreasuryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{2} +} +func (m *QueryTreasuryRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTreasuryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTreasuryRequest.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 *QueryTreasuryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTreasuryRequest.Merge(m, src) +} +func (m *QueryTreasuryRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTreasuryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTreasuryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTreasuryRequest proto.InternalMessageInfo + +// QueryTreasuryResponse is the response type for the +// Query/Treasury RPC method. +type QueryTreasuryResponse struct { + Amount github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"amount"` +} + +func (m *QueryTreasuryResponse) Reset() { *m = QueryTreasuryResponse{} } +func (m *QueryTreasuryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTreasuryResponse) ProtoMessage() {} +func (*QueryTreasuryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{3} +} +func (m *QueryTreasuryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTreasuryResponse.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 *QueryTreasuryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTreasuryResponse.Merge(m, src) +} +func (m *QueryTreasuryResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTreasuryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTreasuryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTreasuryResponse proto.InternalMessageInfo + +func (m *QueryTreasuryResponse) GetAmount() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Amount + } + return nil +} + +// QueryFoundationInfoRequest is the Query/FoundationInfo request type. +type QueryFoundationInfoRequest struct { +} + +func (m *QueryFoundationInfoRequest) Reset() { *m = QueryFoundationInfoRequest{} } +func (m *QueryFoundationInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFoundationInfoRequest) ProtoMessage() {} +func (*QueryFoundationInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{4} +} +func (m *QueryFoundationInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFoundationInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFoundationInfoRequest.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 *QueryFoundationInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFoundationInfoRequest.Merge(m, src) +} +func (m *QueryFoundationInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFoundationInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFoundationInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFoundationInfoRequest proto.InternalMessageInfo + +// QueryFoundationInfoResponse is the Query/FoundationInfo response type. +type QueryFoundationInfoResponse struct { + // info is the FoundationInfo for the foundation. + Info FoundationInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` +} + +func (m *QueryFoundationInfoResponse) Reset() { *m = QueryFoundationInfoResponse{} } +func (m *QueryFoundationInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFoundationInfoResponse) ProtoMessage() {} +func (*QueryFoundationInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{5} +} +func (m *QueryFoundationInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFoundationInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFoundationInfoResponse.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 *QueryFoundationInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFoundationInfoResponse.Merge(m, src) +} +func (m *QueryFoundationInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFoundationInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFoundationInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFoundationInfoResponse proto.InternalMessageInfo + +func (m *QueryFoundationInfoResponse) GetInfo() FoundationInfo { + if m != nil { + return m.Info + } + return FoundationInfo{} +} + +// QueryMemberRequest is the Query/Member request type. +type QueryMemberRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryMemberRequest) Reset() { *m = QueryMemberRequest{} } +func (m *QueryMemberRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMemberRequest) ProtoMessage() {} +func (*QueryMemberRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{6} +} +func (m *QueryMemberRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMemberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMemberRequest.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 *QueryMemberRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMemberRequest.Merge(m, src) +} +func (m *QueryMemberRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMemberRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMemberRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMemberRequest proto.InternalMessageInfo + +func (m *QueryMemberRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryMemberResponse is the Query/MemberResponse response type. +type QueryMemberResponse struct { + // member is the members of the foundation. + Member *Member `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` +} + +func (m *QueryMemberResponse) Reset() { *m = QueryMemberResponse{} } +func (m *QueryMemberResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMemberResponse) ProtoMessage() {} +func (*QueryMemberResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{7} +} +func (m *QueryMemberResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMemberResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMemberResponse.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 *QueryMemberResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMemberResponse.Merge(m, src) +} +func (m *QueryMemberResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMemberResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMemberResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMemberResponse proto.InternalMessageInfo + +func (m *QueryMemberResponse) GetMember() *Member { + if m != nil { + return m.Member + } + return nil +} + +// QueryMembersRequest is the Query/Members request type. +type QueryMembersRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryMembersRequest) Reset() { *m = QueryMembersRequest{} } +func (m *QueryMembersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMembersRequest) ProtoMessage() {} +func (*QueryMembersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{8} +} +func (m *QueryMembersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMembersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMembersRequest.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 *QueryMembersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMembersRequest.Merge(m, src) +} +func (m *QueryMembersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMembersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMembersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMembersRequest proto.InternalMessageInfo + +func (m *QueryMembersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryMembersResponse is the Query/MembersResponse response type. +type QueryMembersResponse struct { + // members are the members of the foundation. + Members []Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryMembersResponse) Reset() { *m = QueryMembersResponse{} } +func (m *QueryMembersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMembersResponse) ProtoMessage() {} +func (*QueryMembersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{9} +} +func (m *QueryMembersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMembersResponse.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 *QueryMembersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMembersResponse.Merge(m, src) +} +func (m *QueryMembersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMembersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMembersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMembersResponse proto.InternalMessageInfo + +func (m *QueryMembersResponse) GetMembers() []Member { + if m != nil { + return m.Members + } + return nil +} + +func (m *QueryMembersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProposalRequest is the Query/Proposal request type. +type QueryProposalRequest struct { + // proposal_id is the unique ID of a proposal. + ProposalId uint64 `protobuf:"varint,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_15a18e20c0e403af, []int{10} +} +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() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +// QueryProposalResponse is the Query/Proposal response type. +type QueryProposalResponse struct { + // proposal is the proposal info. + Proposal *Proposal `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_15a18e20c0e403af, []int{11} +} +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() *Proposal { + if m != nil { + return m.Proposal + } + return nil +} + +// QueryProposals is the Query/Proposals request type. +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_15a18e20c0e403af, []int{12} +} +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 +} + +// QueryProposalsResponse is the Query/Proposals response type. +type QueryProposalsResponse struct { + // proposals are the proposals of the foundation. + Proposals []Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,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_15a18e20c0e403af, []int{13} +} +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() []Proposal { + if m != nil { + return m.Proposals + } + return nil +} + +func (m *QueryProposalsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVote is the Query/Vote request type. +type QueryVoteRequest struct { + // proposal_id is the unique ID of a proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // voter is a proposal voter account address. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` +} + +func (m *QueryVoteRequest) Reset() { *m = QueryVoteRequest{} } +func (m *QueryVoteRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVoteRequest) ProtoMessage() {} +func (*QueryVoteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{14} +} +func (m *QueryVoteRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVoteRequest.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 *QueryVoteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteRequest.Merge(m, src) +} +func (m *QueryVoteRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryVoteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVoteRequest proto.InternalMessageInfo + +func (m *QueryVoteRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *QueryVoteRequest) GetVoter() string { + if m != nil { + return m.Voter + } + return "" +} + +// QueryVoteResponse is the Query/Vote response type. +type QueryVoteResponse struct { + // vote is the vote with given proposal_id and voter. + Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` +} + +func (m *QueryVoteResponse) Reset() { *m = QueryVoteResponse{} } +func (m *QueryVoteResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVoteResponse) ProtoMessage() {} +func (*QueryVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{15} +} +func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVoteResponse.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 *QueryVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteResponse.Merge(m, src) +} +func (m *QueryVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVoteResponse proto.InternalMessageInfo + +func (m *QueryVoteResponse) GetVote() *Vote { + if m != nil { + return m.Vote + } + return nil +} + +// QueryVotes is the Query/Votes request type. +type QueryVotesRequest struct { + // proposal_id is the unique ID of a proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesRequest) Reset() { *m = QueryVotesRequest{} } +func (m *QueryVotesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVotesRequest) ProtoMessage() {} +func (*QueryVotesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{16} +} +func (m *QueryVotesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesRequest.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 *QueryVotesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesRequest.Merge(m, src) +} +func (m *QueryVotesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryVotesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesRequest proto.InternalMessageInfo + +func (m *QueryVotesRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *QueryVotesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVotesResponse is the Query/Votes response type. +type QueryVotesResponse struct { + // votes are the list of votes for given proposal_id. + Votes []Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesResponse) Reset() { *m = QueryVotesResponse{} } +func (m *QueryVotesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVotesResponse) ProtoMessage() {} +func (*QueryVotesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{17} +} +func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesResponse.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 *QueryVotesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesResponse.Merge(m, src) +} +func (m *QueryVotesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryVotesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesResponse proto.InternalMessageInfo + +func (m *QueryVotesResponse) GetVotes() []Vote { + if m != nil { + return m.Votes + } + return nil +} + +func (m *QueryVotesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTallyResultRequest is the Query/TallyResult request type. +type QueryTallyResultRequest struct { + // proposal_id is the unique id of a proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *QueryTallyResultRequest) Reset() { *m = QueryTallyResultRequest{} } +func (m *QueryTallyResultRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTallyResultRequest) ProtoMessage() {} +func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{18} +} +func (m *QueryTallyResultRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTallyResultRequest.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 *QueryTallyResultRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTallyResultRequest.Merge(m, src) +} +func (m *QueryTallyResultRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTallyResultRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTallyResultRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTallyResultRequest proto.InternalMessageInfo + +func (m *QueryTallyResultRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +// QueryTallyResultResponse is the Query/TallyResult response type. +type QueryTallyResultResponse struct { + // tally defines the requested tally. + Tally TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally"` +} + +func (m *QueryTallyResultResponse) Reset() { *m = QueryTallyResultResponse{} } +func (m *QueryTallyResultResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTallyResultResponse) ProtoMessage() {} +func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{19} +} +func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTallyResultResponse.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 *QueryTallyResultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTallyResultResponse.Merge(m, src) +} +func (m *QueryTallyResultResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTallyResultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTallyResultResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTallyResultResponse proto.InternalMessageInfo + +func (m *QueryTallyResultResponse) GetTally() TallyResult { + if m != nil { + return m.Tally + } + return TallyResult{} +} + +// QueryCensorshipsRequest is the request type for the Query/Censorships RPC method. +type QueryCensorshipsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCensorshipsRequest) Reset() { *m = QueryCensorshipsRequest{} } +func (m *QueryCensorshipsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCensorshipsRequest) ProtoMessage() {} +func (*QueryCensorshipsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{20} +} +func (m *QueryCensorshipsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCensorshipsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCensorshipsRequest.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 *QueryCensorshipsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCensorshipsRequest.Merge(m, src) +} +func (m *QueryCensorshipsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCensorshipsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCensorshipsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCensorshipsRequest proto.InternalMessageInfo + +func (m *QueryCensorshipsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryCensorshipsResponse is the response type for the Query/Censorships RPC method. +type QueryCensorshipsResponse struct { + // authorizations is a list of grants granted for grantee. + Censorships []Censorship `protobuf:"bytes,1,rep,name=censorships,proto3" json:"censorships"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCensorshipsResponse) Reset() { *m = QueryCensorshipsResponse{} } +func (m *QueryCensorshipsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCensorshipsResponse) ProtoMessage() {} +func (*QueryCensorshipsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{21} +} +func (m *QueryCensorshipsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCensorshipsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCensorshipsResponse.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 *QueryCensorshipsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCensorshipsResponse.Merge(m, src) +} +func (m *QueryCensorshipsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCensorshipsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCensorshipsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCensorshipsResponse proto.InternalMessageInfo + +func (m *QueryCensorshipsResponse) GetCensorships() []Censorship { + if m != nil { + return m.Censorships + } + return nil +} + +func (m *QueryCensorshipsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGrantsRequest is the request type for the Query/Grants RPC method. +type QueryGrantsRequest struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + // Optional, msg_type_url, when set, will query only grants matching given msg type. + MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGrantsRequest) Reset() { *m = QueryGrantsRequest{} } +func (m *QueryGrantsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGrantsRequest) ProtoMessage() {} +func (*QueryGrantsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{22} +} +func (m *QueryGrantsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGrantsRequest.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 *QueryGrantsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGrantsRequest.Merge(m, src) +} +func (m *QueryGrantsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGrantsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGrantsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGrantsRequest proto.InternalMessageInfo + +func (m *QueryGrantsRequest) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *QueryGrantsRequest) GetMsgTypeUrl() string { + if m != nil { + return m.MsgTypeUrl + } + return "" +} + +func (m *QueryGrantsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGrantsResponse is the response type for the Query/Grants RPC method. +type QueryGrantsResponse struct { + // authorizations is a list of grants granted for grantee. + Authorizations []*types1.Any `protobuf:"bytes,1,rep,name=authorizations,proto3" json:"authorizations,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGrantsResponse) Reset() { *m = QueryGrantsResponse{} } +func (m *QueryGrantsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGrantsResponse) ProtoMessage() {} +func (*QueryGrantsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15a18e20c0e403af, []int{23} +} +func (m *QueryGrantsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGrantsResponse.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 *QueryGrantsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGrantsResponse.Merge(m, src) +} +func (m *QueryGrantsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGrantsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGrantsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGrantsResponse proto.InternalMessageInfo + +func (m *QueryGrantsResponse) GetAuthorizations() []*types1.Any { + if m != nil { + return m.Authorizations + } + return nil +} + +func (m *QueryGrantsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "lbm.foundation.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "lbm.foundation.v1.QueryParamsResponse") + proto.RegisterType((*QueryTreasuryRequest)(nil), "lbm.foundation.v1.QueryTreasuryRequest") + proto.RegisterType((*QueryTreasuryResponse)(nil), "lbm.foundation.v1.QueryTreasuryResponse") + proto.RegisterType((*QueryFoundationInfoRequest)(nil), "lbm.foundation.v1.QueryFoundationInfoRequest") + proto.RegisterType((*QueryFoundationInfoResponse)(nil), "lbm.foundation.v1.QueryFoundationInfoResponse") + proto.RegisterType((*QueryMemberRequest)(nil), "lbm.foundation.v1.QueryMemberRequest") + proto.RegisterType((*QueryMemberResponse)(nil), "lbm.foundation.v1.QueryMemberResponse") + proto.RegisterType((*QueryMembersRequest)(nil), "lbm.foundation.v1.QueryMembersRequest") + proto.RegisterType((*QueryMembersResponse)(nil), "lbm.foundation.v1.QueryMembersResponse") + proto.RegisterType((*QueryProposalRequest)(nil), "lbm.foundation.v1.QueryProposalRequest") + proto.RegisterType((*QueryProposalResponse)(nil), "lbm.foundation.v1.QueryProposalResponse") + proto.RegisterType((*QueryProposalsRequest)(nil), "lbm.foundation.v1.QueryProposalsRequest") + proto.RegisterType((*QueryProposalsResponse)(nil), "lbm.foundation.v1.QueryProposalsResponse") + proto.RegisterType((*QueryVoteRequest)(nil), "lbm.foundation.v1.QueryVoteRequest") + proto.RegisterType((*QueryVoteResponse)(nil), "lbm.foundation.v1.QueryVoteResponse") + proto.RegisterType((*QueryVotesRequest)(nil), "lbm.foundation.v1.QueryVotesRequest") + proto.RegisterType((*QueryVotesResponse)(nil), "lbm.foundation.v1.QueryVotesResponse") + proto.RegisterType((*QueryTallyResultRequest)(nil), "lbm.foundation.v1.QueryTallyResultRequest") + proto.RegisterType((*QueryTallyResultResponse)(nil), "lbm.foundation.v1.QueryTallyResultResponse") + proto.RegisterType((*QueryCensorshipsRequest)(nil), "lbm.foundation.v1.QueryCensorshipsRequest") + proto.RegisterType((*QueryCensorshipsResponse)(nil), "lbm.foundation.v1.QueryCensorshipsResponse") + proto.RegisterType((*QueryGrantsRequest)(nil), "lbm.foundation.v1.QueryGrantsRequest") + proto.RegisterType((*QueryGrantsResponse)(nil), "lbm.foundation.v1.QueryGrantsResponse") +} + +func init() { proto.RegisterFile("lbm/foundation/v1/query.proto", fileDescriptor_15a18e20c0e403af) } + +var fileDescriptor_15a18e20c0e403af = []byte{ + // 1267 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xb4, 0x89, 0xdb, 0x8c, 0xbf, 0xdf, 0x8a, 0x0e, 0xa1, 0x4d, 0x9c, 0xc4, 0x49, 0xb7, + 0xf9, 0x45, 0x82, 0x77, 0xb0, 0x83, 0x94, 0x92, 0x1e, 0xda, 0xa4, 0x90, 0xb4, 0x07, 0x50, 0x30, + 0xa5, 0x87, 0x4a, 0xc8, 0x5a, 0xdb, 0x9b, 0xcd, 0x0a, 0x7b, 0xc7, 0xdd, 0x59, 0x47, 0xb8, 0xc1, + 0x97, 0x1c, 0x90, 0xb8, 0xa0, 0x42, 0x6e, 0x70, 0x41, 0x1c, 0x7b, 0x44, 0xfd, 0x23, 0x2a, 0x4e, + 0x15, 0xbd, 0x70, 0xe1, 0x87, 0x12, 0xfe, 0x10, 0xb4, 0x33, 0x6f, 0xec, 0x5d, 0x7b, 0xd7, 0x76, + 0x8b, 0x4f, 0x89, 0x67, 0xde, 0x9b, 0xcf, 0xe7, 0x7d, 0xde, 0xcc, 0xbe, 0x0f, 0x9e, 0xad, 0x14, + 0xab, 0x74, 0x9f, 0xd5, 0x9d, 0xb2, 0xe1, 0xd9, 0xcc, 0xa1, 0x87, 0x59, 0xfa, 0xa8, 0x6e, 0xba, + 0x0d, 0xbd, 0xe6, 0x32, 0x8f, 0x91, 0xcb, 0x95, 0x62, 0x55, 0x6f, 0x6f, 0xeb, 0x87, 0xd9, 0xd4, + 0x6a, 0x89, 0xf1, 0x2a, 0xe3, 0xb4, 0x68, 0x70, 0x53, 0xc6, 0xd2, 0xc3, 0x6c, 0xd1, 0xf4, 0x8c, + 0x2c, 0xad, 0x19, 0x96, 0xed, 0xc8, 0x40, 0x91, 0x9e, 0x9a, 0xb1, 0x18, 0xb3, 0x2a, 0x26, 0x35, + 0x6a, 0x36, 0x35, 0x1c, 0x87, 0x79, 0x62, 0x93, 0xc3, 0xae, 0xd6, 0x8d, 0x1d, 0x80, 0x92, 0x31, + 0xe9, 0x20, 0x9a, 0xc2, 0x29, 0x31, 0x5b, 0xed, 0x4f, 0x01, 0x82, 0xf8, 0x55, 0xac, 0xef, 0x53, + 0xc3, 0x69, 0xa8, 0x2d, 0x99, 0x5a, 0x10, 0xbf, 0xa8, 0xfc, 0x01, 0x5b, 0x13, 0x16, 0xb3, 0x98, + 0x5c, 0xf7, 0xff, 0x93, 0xab, 0xda, 0x04, 0x26, 0x9f, 0xf8, 0xf5, 0xec, 0x19, 0xae, 0x51, 0xe5, + 0x79, 0xf3, 0x51, 0xdd, 0xe4, 0x9e, 0xf6, 0x31, 0x7e, 0x33, 0xb4, 0xca, 0x6b, 0xcc, 0xe1, 0x26, + 0xd9, 0xc0, 0x89, 0x9a, 0x58, 0x99, 0x44, 0xf3, 0x68, 0x25, 0x99, 0x9b, 0xd2, 0xbb, 0xa4, 0xd2, + 0x65, 0xca, 0xf6, 0xe8, 0xf3, 0x3f, 0xe7, 0x46, 0xf2, 0x10, 0xae, 0x5d, 0xc1, 0x13, 0xe2, 0xbc, + 0xfb, 0xae, 0x69, 0xf0, 0xba, 0xdb, 0x50, 0x38, 0xc7, 0x08, 0xbf, 0xd5, 0xb1, 0x01, 0x50, 0x36, + 0x4e, 0x18, 0x55, 0x56, 0x77, 0xbc, 0x49, 0x34, 0x7f, 0x7e, 0x25, 0x99, 0x9b, 0xd1, 0xa1, 0x18, + 0x5f, 0x14, 0x1d, 0x44, 0xd1, 0x3f, 0x30, 0x4b, 0x77, 0x98, 0xed, 0x6c, 0xaf, 0xfb, 0x68, 0x4f, + 0xff, 0x9a, 0x5b, 0xb3, 0x6c, 0xef, 0xa0, 0x5e, 0xd4, 0x4b, 0xac, 0x0a, 0xc5, 0xc3, 0x9f, 0x0c, + 0x2f, 0x7f, 0x41, 0xbd, 0x46, 0xcd, 0xe4, 0x2a, 0x87, 0xe7, 0x01, 0x40, 0x9b, 0xc1, 0x29, 0xc1, + 0x61, 0xa7, 0x55, 0xc7, 0x3d, 0x67, 0x9f, 0x29, 0x8a, 0x0f, 0xf1, 0x74, 0xe4, 0x2e, 0xf0, 0xbc, + 0x89, 0x47, 0x6d, 0x67, 0x9f, 0x81, 0x20, 0xd7, 0x22, 0x04, 0x09, 0x27, 0x82, 0x30, 0x22, 0x49, + 0xbb, 0x0b, 0xe2, 0x7f, 0x64, 0x56, 0x8b, 0xa6, 0x0b, 0x88, 0x24, 0x87, 0x2f, 0x18, 0xe5, 0xb2, + 0x6b, 0x72, 0x29, 0xf3, 0xf8, 0xf6, 0xe4, 0x6f, 0xcf, 0x32, 0x13, 0x50, 0xfe, 0x96, 0xdc, 0xf9, + 0xd4, 0x73, 0x6d, 0xc7, 0xca, 0xab, 0x40, 0xed, 0x2e, 0x34, 0x4c, 0x9d, 0x04, 0xec, 0xb2, 0x38, + 0x51, 0x15, 0x2b, 0x3d, 0x1a, 0x06, 0x29, 0x10, 0xa8, 0x7d, 0x1e, 0x3a, 0x49, 0xdd, 0x08, 0xb2, + 0x83, 0x71, 0xfb, 0xa6, 0xc3, 0x69, 0x4b, 0xa1, 0x9e, 0xc8, 0x27, 0xa4, 0x3a, 0xb3, 0x67, 0x58, + 0x26, 0xe4, 0xe6, 0x03, 0x99, 0xda, 0x0f, 0x08, 0xae, 0x42, 0xeb, 0x7c, 0xa0, 0xfa, 0x3e, 0xbe, + 0x20, 0x19, 0x70, 0xe8, 0x78, 0x3c, 0x57, 0xd0, 0x50, 0xc5, 0x93, 0xdd, 0x10, 0xb7, 0x73, 0x82, + 0xdb, 0x72, 0x5f, 0x6e, 0x12, 0x37, 0x44, 0x6e, 0x03, 0xb8, 0xed, 0xb9, 0xac, 0xc6, 0xb8, 0x51, + 0x51, 0xc5, 0xcf, 0xe1, 0x64, 0x0d, 0x96, 0x0a, 0x76, 0x59, 0x54, 0x3f, 0x9a, 0xc7, 0x6a, 0xe9, + 0x5e, 0x59, 0xdb, 0x83, 0x6b, 0xdc, 0x4e, 0x6c, 0xbd, 0x98, 0x8b, 0x2a, 0x0c, 0x44, 0x9b, 0x8e, + 0x7a, 0x33, 0x2a, 0xad, 0x15, 0xac, 0x15, 0x3a, 0x4e, 0x1c, 0x7a, 0x23, 0x7e, 0x46, 0xf8, 0x4a, + 0x27, 0x02, 0x90, 0xbe, 0x85, 0xc7, 0x15, 0x0f, 0xd5, 0x8c, 0x5e, 0xac, 0xa1, 0x1d, 0xed, 0x9c, + 0xe1, 0x35, 0xa4, 0x84, 0xdf, 0x10, 0x1c, 0x1f, 0x30, 0xcf, 0x1c, 0xb4, 0x19, 0x44, 0xc7, 0x63, + 0x87, 0xcc, 0x33, 0x5d, 0x01, 0xdc, 0xeb, 0xf5, 0xc8, 0x30, 0xed, 0x36, 0xbe, 0x1c, 0x00, 0x01, + 0x0d, 0xd6, 0xf0, 0xa8, 0xbf, 0x0b, 0x02, 0x5f, 0x8d, 0x28, 0x5f, 0x84, 0x8b, 0x20, 0xed, 0xab, + 0xc0, 0x09, 0x7c, 0x60, 0x9e, 0x3b, 0x11, 0x2a, 0xbd, 0x4e, 0x27, 0xbf, 0x47, 0xf0, 0x19, 0x01, + 0x78, 0xa8, 0x60, 0x5d, 0xca, 0xa0, 0x3a, 0x18, 0x57, 0x02, 0x74, 0x4f, 0xc6, 0x0e, 0xaf, 0x73, + 0x9b, 0xf8, 0xaa, 0xfc, 0xb0, 0x1b, 0x95, 0x8a, 0xff, 0x55, 0xaf, 0x57, 0xbc, 0x81, 0x5f, 0xd3, + 0x03, 0x3c, 0xd9, 0x9d, 0x0b, 0x55, 0x6d, 0xe2, 0x31, 0xcf, 0x5f, 0x86, 0xc6, 0xa4, 0x23, 0xaa, + 0x0a, 0xa4, 0xa9, 0xe2, 0x44, 0x8a, 0x66, 0x00, 0xa7, 0x3b, 0xa6, 0xc3, 0x99, 0xcb, 0x0f, 0xec, + 0xda, 0xd0, 0x5f, 0xd5, 0x53, 0x04, 0xdc, 0x43, 0x18, 0xc0, 0xfd, 0x43, 0x9c, 0x2c, 0xb5, 0x97, + 0xa1, 0x2f, 0xb3, 0x11, 0x15, 0xb4, 0x93, 0xa1, 0x80, 0x60, 0xde, 0xf0, 0x7a, 0xf4, 0x8b, 0xba, + 0x38, 0xbb, 0xae, 0xe1, 0x78, 0x3c, 0x30, 0x7f, 0x2c, 0x7f, 0xc1, 0x34, 0xfb, 0xcf, 0x1f, 0x08, + 0x24, 0xf3, 0xf8, 0x7f, 0x55, 0x6e, 0x15, 0xfc, 0x09, 0x5b, 0xa8, 0xbb, 0x15, 0xf9, 0xf4, 0xf2, + 0xb8, 0xca, 0xad, 0xfb, 0x8d, 0x9a, 0xf9, 0x99, 0x5b, 0xe9, 0x50, 0xf8, 0xfc, 0x6b, 0x2b, 0xfc, + 0x07, 0x82, 0x01, 0xa5, 0x48, 0x83, 0xb8, 0x4d, 0x7c, 0xc9, 0xa8, 0x7b, 0x07, 0xcc, 0xb5, 0x1f, + 0x4b, 0xc3, 0x05, 0xfa, 0x4e, 0xe8, 0xd2, 0x2d, 0xe9, 0xca, 0x2d, 0xe9, 0x5b, 0x4e, 0x63, 0xfb, + 0xd6, 0xaf, 0xcf, 0x32, 0x37, 0x03, 0x66, 0x61, 0xc7, 0x76, 0x78, 0xe9, 0xc0, 0x36, 0xe8, 0x3e, + 0xfc, 0x23, 0x0c, 0xc3, 0x97, 0x41, 0x6f, 0xb6, 0x15, 0x3c, 0x3d, 0xdf, 0x01, 0x36, 0xb4, 0xa6, + 0xe4, 0x5e, 0xfe, 0x1f, 0x8f, 0x89, 0xfa, 0xc8, 0x63, 0x9c, 0x90, 0x66, 0x8a, 0x2c, 0x46, 0xdc, + 0x91, 0x6e, 0xd7, 0x96, 0x5a, 0xea, 0x17, 0x26, 0xe1, 0xb4, 0x6b, 0xc7, 0x2f, 0xff, 0x39, 0x39, + 0x37, 0x4d, 0xa6, 0x68, 0xb7, 0x19, 0x95, 0x86, 0x8d, 0x1c, 0x23, 0x7c, 0x51, 0x79, 0x32, 0xb2, + 0x1c, 0x77, 0x6e, 0x87, 0x9d, 0x4b, 0xad, 0xf4, 0x0f, 0x04, 0x0a, 0xd7, 0x05, 0x85, 0x59, 0x32, + 0x1d, 0x41, 0xc1, 0x53, 0xb8, 0x3f, 0x22, 0x7c, 0x29, 0xec, 0x9e, 0x48, 0x26, 0x0e, 0x21, 0xd2, + 0xbc, 0xa5, 0xf4, 0x41, 0xc3, 0x81, 0xd6, 0xaa, 0xa0, 0xb5, 0x40, 0x34, 0xda, 0xcb, 0xa6, 0x17, + 0x7c, 0xf3, 0x46, 0x9e, 0x20, 0x9c, 0x90, 0x7e, 0x24, 0xbe, 0x3f, 0x21, 0x63, 0x17, 0xdf, 0x9f, + 0xb0, 0x6b, 0xd3, 0x36, 0x04, 0x8b, 0x2c, 0xa1, 0xbd, 0x59, 0x80, 0xfd, 0xa1, 0x47, 0x60, 0x02, + 0x9b, 0xe4, 0x1b, 0x84, 0x2f, 0x80, 0xaf, 0x22, 0x7d, 0xc0, 0x5a, 0x97, 0x66, 0xb9, 0x6f, 0x1c, + 0xb0, 0xca, 0x08, 0x56, 0xcb, 0x64, 0x71, 0x20, 0x56, 0xe4, 0x3b, 0x84, 0x2f, 0x2a, 0x87, 0x10, + 0x7f, 0x83, 0x3a, 0x9c, 0x56, 0xfc, 0x0d, 0xea, 0x74, 0x56, 0x5a, 0x4e, 0xd0, 0x79, 0x87, 0xac, + 0x46, 0x5d, 0x62, 0xe5, 0x44, 0xe8, 0x51, 0x60, 0xd2, 0x34, 0xc9, 0xd7, 0x08, 0x8f, 0xb7, 0xec, + 0x0e, 0xe9, 0x8b, 0xd5, 0xd2, 0xe8, 0xed, 0x01, 0x22, 0x81, 0xd6, 0x82, 0xa0, 0x95, 0x26, 0x33, + 0xbd, 0x68, 0x91, 0x13, 0x84, 0x47, 0xfd, 0xe1, 0x4b, 0xae, 0xc7, 0x9d, 0x1c, 0x70, 0x3c, 0xa9, + 0x85, 0xde, 0x41, 0x80, 0x7c, 0x5b, 0x20, 0x6f, 0x92, 0x1b, 0x83, 0x0b, 0x42, 0xc5, 0xd0, 0xa7, + 0x47, 0xc2, 0x07, 0x35, 0xc9, 0xb7, 0x08, 0x8f, 0x09, 0x0f, 0x41, 0x7a, 0x22, 0xb6, 0x64, 0x59, + 0xec, 0x13, 0x05, 0xc4, 0x6e, 0x08, 0x62, 0x39, 0xf2, 0xee, 0xab, 0x12, 0x23, 0x3f, 0x21, 0x9c, + 0x0c, 0x4c, 0x73, 0xb2, 0x1a, 0xfb, 0x7d, 0xe9, 0x72, 0x19, 0xa9, 0xb5, 0x81, 0x62, 0xff, 0x03, + 0x45, 0xe1, 0x29, 0x7c, 0xcd, 0x92, 0x81, 0x59, 0x1f, 0x4f, 0xb1, 0xdb, 0x74, 0xc4, 0x53, 0x8c, + 0x30, 0x0f, 0xda, 0x92, 0xa0, 0x38, 0x4f, 0xd2, 0x11, 0x14, 0x83, 0xee, 0xe0, 0x04, 0xe1, 0x84, + 0x1c, 0x8d, 0xf1, 0x9f, 0xa5, 0xd0, 0xbc, 0x8f, 0xff, 0x2c, 0x85, 0x27, 0xac, 0xb6, 0x29, 0x18, + 0xbc, 0x47, 0x72, 0x11, 0x0c, 0x84, 0x0f, 0xe0, 0xf4, 0x08, 0xfc, 0x40, 0x93, 0x1e, 0x05, 0xed, + 0x40, 0x73, 0x7b, 0xf7, 0xf9, 0x69, 0x1a, 0xbd, 0x38, 0x4d, 0xa3, 0xbf, 0x4f, 0xd3, 0xe8, 0xc9, + 0x59, 0x7a, 0xe4, 0xc5, 0x59, 0x7a, 0xe4, 0xf7, 0xb3, 0xf4, 0xc8, 0xc3, 0xcc, 0x2b, 0x4d, 0xe1, + 0x62, 0x42, 0x8c, 0xf1, 0xf5, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x3f, 0xcb, 0xcf, 0xc4, + 0x11, 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 module params. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Treasury queries the foundation treasury. + Treasury(ctx context.Context, in *QueryTreasuryRequest, opts ...grpc.CallOption) (*QueryTreasuryResponse, error) + // FoundationInfo queries foundation info. + FoundationInfo(ctx context.Context, in *QueryFoundationInfoRequest, opts ...grpc.CallOption) (*QueryFoundationInfoResponse, error) + // Member queries a member of the foundation + Member(ctx context.Context, in *QueryMemberRequest, opts ...grpc.CallOption) (*QueryMemberResponse, error) + // Members queries members of the foundation + Members(ctx context.Context, in *QueryMembersRequest, opts ...grpc.CallOption) (*QueryMembersResponse, error) + // Proposal queries a proposal based on proposal id. + Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) + // Proposals queries all proposals. + Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) + // Vote queries a vote by proposal id and voter. + Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) + // Votes queries a vote by proposal. + Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) + // TallyResult queries the tally of a proposal votes. + TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) + // Censorships queries the censorship informations. + Censorships(ctx context.Context, in *QueryCensorshipsRequest, opts ...grpc.CallOption) (*QueryCensorshipsResponse, error) + // Returns list of authorizations, granted to the grantee. + Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, 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.foundation.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Treasury(ctx context.Context, in *QueryTreasuryRequest, opts ...grpc.CallOption) (*QueryTreasuryResponse, error) { + out := new(QueryTreasuryResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Treasury", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FoundationInfo(ctx context.Context, in *QueryFoundationInfoRequest, opts ...grpc.CallOption) (*QueryFoundationInfoResponse, error) { + out := new(QueryFoundationInfoResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/FoundationInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Member(ctx context.Context, in *QueryMemberRequest, opts ...grpc.CallOption) (*QueryMemberResponse, error) { + out := new(QueryMemberResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Member", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Members(ctx context.Context, in *QueryMembersRequest, opts ...grpc.CallOption) (*QueryMembersResponse, error) { + out := new(QueryMembersResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Members", 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.foundation.v1.Query/Proposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) { + out := new(QueryProposalsResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Proposals", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) { + out := new(QueryVoteResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Vote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) { + out := new(QueryVotesResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Votes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) { + out := new(QueryTallyResultResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/TallyResult", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Censorships(ctx context.Context, in *QueryCensorshipsRequest, opts ...grpc.CallOption) (*QueryCensorshipsResponse, error) { + out := new(QueryCensorshipsResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Censorships", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) { + out := new(QueryGrantsResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Query/Grants", 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 module params. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Treasury queries the foundation treasury. + Treasury(context.Context, *QueryTreasuryRequest) (*QueryTreasuryResponse, error) + // FoundationInfo queries foundation info. + FoundationInfo(context.Context, *QueryFoundationInfoRequest) (*QueryFoundationInfoResponse, error) + // Member queries a member of the foundation + Member(context.Context, *QueryMemberRequest) (*QueryMemberResponse, error) + // Members queries members of the foundation + Members(context.Context, *QueryMembersRequest) (*QueryMembersResponse, error) + // Proposal queries a proposal based on proposal id. + Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) + // Proposals queries all proposals. + Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error) + // Vote queries a vote by proposal id and voter. + Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) + // Votes queries a vote by proposal. + Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) + // TallyResult queries the tally of a proposal votes. + TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) + // Censorships queries the censorship informations. + Censorships(context.Context, *QueryCensorshipsRequest) (*QueryCensorshipsResponse, error) + // Returns list of authorizations, granted to the grantee. + Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, 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) Treasury(ctx context.Context, req *QueryTreasuryRequest) (*QueryTreasuryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Treasury not implemented") +} +func (*UnimplementedQueryServer) FoundationInfo(ctx context.Context, req *QueryFoundationInfoRequest) (*QueryFoundationInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FoundationInfo not implemented") +} +func (*UnimplementedQueryServer) Member(ctx context.Context, req *QueryMemberRequest) (*QueryMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Member not implemented") +} +func (*UnimplementedQueryServer) Members(ctx context.Context, req *QueryMembersRequest) (*QueryMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Members not implemented") +} +func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") +} +func (*UnimplementedQueryServer) Proposals(ctx context.Context, req *QueryProposalsRequest) (*QueryProposalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proposals not implemented") +} +func (*UnimplementedQueryServer) Vote(ctx context.Context, req *QueryVoteRequest) (*QueryVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") +} +func (*UnimplementedQueryServer) Votes(ctx context.Context, req *QueryVotesRequest) (*QueryVotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Votes not implemented") +} +func (*UnimplementedQueryServer) TallyResult(ctx context.Context, req *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") +} +func (*UnimplementedQueryServer) Censorships(ctx context.Context, req *QueryCensorshipsRequest) (*QueryCensorshipsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Censorships not implemented") +} +func (*UnimplementedQueryServer) Grants(ctx context.Context, req *QueryGrantsRequest) (*QueryGrantsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Grants 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.foundation.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_Treasury_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTreasuryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Treasury(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Treasury", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Treasury(ctx, req.(*QueryTreasuryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FoundationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFoundationInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FoundationInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/FoundationInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FoundationInfo(ctx, req.(*QueryFoundationInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Member_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Member(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Member", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Member(ctx, req.(*QueryMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Members_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Members(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Members", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Members(ctx, req.(*QueryMembersRequest)) + } + 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.foundation.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) +} + +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.foundation.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_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVoteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Vote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Vote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Vote(ctx, req.(*QueryVoteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Votes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVotesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Votes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Votes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Votes(ctx, req.(*QueryVotesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTallyResultRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TallyResult(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/TallyResult", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TallyResult(ctx, req.(*QueryTallyResultRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Censorships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCensorshipsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Censorships(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Censorships", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Censorships(ctx, req.(*QueryCensorshipsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Grants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGrantsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Grants(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Query/Grants", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Grants(ctx, req.(*QueryGrantsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lbm.foundation.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Treasury", + Handler: _Query_Treasury_Handler, + }, + { + MethodName: "FoundationInfo", + Handler: _Query_FoundationInfo_Handler, + }, + { + MethodName: "Member", + Handler: _Query_Member_Handler, + }, + { + MethodName: "Members", + Handler: _Query_Members_Handler, + }, + { + MethodName: "Proposal", + Handler: _Query_Proposal_Handler, + }, + { + MethodName: "Proposals", + Handler: _Query_Proposals_Handler, + }, + { + MethodName: "Vote", + Handler: _Query_Vote_Handler, + }, + { + MethodName: "Votes", + Handler: _Query_Votes_Handler, + }, + { + MethodName: "TallyResult", + Handler: _Query_TallyResult_Handler, + }, + { + MethodName: "Censorships", + Handler: _Query_Censorships_Handler, + }, + { + MethodName: "Grants", + Handler: _Query_Grants_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lbm/foundation/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 *QueryTreasuryRequest) 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 *QueryTreasuryRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTreasuryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTreasuryResponse) 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 *QueryTreasuryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[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 *QueryFoundationInfoRequest) 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 *QueryFoundationInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFoundationInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryFoundationInfoResponse) 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 *QueryFoundationInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFoundationInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.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 *QueryMemberRequest) 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 *QueryMemberRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMemberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMemberResponse) 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 *QueryMemberResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMemberResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Member != nil { + { + size, err := m.Member.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 *QueryMembersRequest) 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 *QueryMembersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMembersRequest) 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 *QueryMembersResponse) 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 *QueryMembersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMembersResponse) 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] = 0x12 + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[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 m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + 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 (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 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] = 0x12 + } + 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 *QueryVoteRequest) 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 *QueryVoteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryVoteResponse) 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 *QueryVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Vote != nil { + { + size, err := m.Vote.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 *QueryVotesRequest) 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 *QueryVotesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesRequest) 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] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryVotesResponse) 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 *QueryVotesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesResponse) 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] = 0x12 + } + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[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 *QueryTallyResultRequest) 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 *QueryTallyResultRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTallyResultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTallyResultResponse) 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 *QueryTallyResultResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTallyResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Tally.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 *QueryCensorshipsRequest) 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 *QueryCensorshipsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCensorshipsRequest) 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 *QueryCensorshipsResponse) 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 *QueryCensorshipsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCensorshipsResponse) 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] = 0x12 + } + if len(m.Censorships) > 0 { + for iNdEx := len(m.Censorships) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Censorships[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 *QueryGrantsRequest) 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 *QueryGrantsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGrantsRequest) 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] = 0x1a + } + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MsgTypeUrl))) + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGrantsResponse) 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 *QueryGrantsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGrantsResponse) 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] = 0x12 + } + if len(m.Authorizations) > 0 { + for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Authorizations[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 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 *QueryTreasuryRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTreasuryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFoundationInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryFoundationInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryMemberRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMemberResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Member != nil { + l = m.Member.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMembersRequest) 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 *QueryMembersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProposalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + 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 (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)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVoteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Vote != nil { + l = m.Vote.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVotesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVotesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTallyResultRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + return n +} + +func (m *QueryTallyResultResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tally.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryCensorshipsRequest) 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 *QueryCensorshipsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Censorships) > 0 { + for _, e := range m.Censorships { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.MsgTypeUrl) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Authorizations) > 0 { + for _, e := range m.Authorizations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTreasuryRequest) 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: QueryTreasuryRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTreasuryRequest: 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 *QueryTreasuryResponse) 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: QueryTreasuryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTreasuryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = append(m.Amount, types.DecCoin{}) + if err := m.Amount[len(m.Amount)-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 *QueryFoundationInfoRequest) 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: QueryFoundationInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFoundationInfoRequest: 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 *QueryFoundationInfoResponse) 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: QueryFoundationInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFoundationInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info.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 *QueryMemberRequest) 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: QueryMemberRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMemberRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMemberResponse) 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: QueryMemberResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMemberResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Member", 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.Member == nil { + m.Member = &Member{} + } + if err := m.Member.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 *QueryMembersRequest) 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: QueryMembersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMembersRequest: 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 *QueryMembersResponse) 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: QueryMembersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMembersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", 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.Members = append(m.Members, Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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.PageResponse{} + } + 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 *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 != 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= 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 *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 = &Proposal{} + } + 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 (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, Proposal{}) + if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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.PageResponse{} + } + 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 *QueryVoteRequest) 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: QueryVoteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", 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.Voter = 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 *QueryVoteResponse) 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: QueryVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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.Vote == nil { + m.Vote = &Vote{} + } + if err := m.Vote.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 *QueryVotesRequest) 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: QueryVotesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + 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 *QueryVotesResponse) 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: QueryVotesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", 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.Votes = append(m.Votes, Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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.PageResponse{} + } + 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 *QueryTallyResultRequest) 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: QueryTallyResultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTallyResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= 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 *QueryTallyResultResponse) 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: QueryTallyResultResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTallyResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tally", 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.Tally.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 *QueryCensorshipsRequest) 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: QueryCensorshipsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCensorshipsRequest: 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 *QueryCensorshipsResponse) 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: QueryCensorshipsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCensorshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Censorships", 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.Censorships = append(m.Censorships, Censorship{}) + if err := m.Censorships[len(m.Censorships)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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.PageResponse{} + } + 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 *QueryGrantsRequest) 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: QueryGrantsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 *QueryGrantsResponse) 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: QueryGrantsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", 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.Authorizations = append(m.Authorizations, &types1.Any{}) + if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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.PageResponse{} + } + 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 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/foundation/query.pb.gw.go b/x/foundation/query.pb.gw.go new file mode 100644 index 0000000000..bfb41514fb --- /dev/null +++ b/x/foundation/query.pb.gw.go @@ -0,0 +1,1218 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: lbm/foundation/v1/query.proto + +/* +Package foundation is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package foundation + +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/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +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_Treasury_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTreasuryRequest + var metadata runtime.ServerMetadata + + msg, err := client.Treasury(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Treasury_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTreasuryRequest + var metadata runtime.ServerMetadata + + msg, err := server.Treasury(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_FoundationInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFoundationInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.FoundationInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_FoundationInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFoundationInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.FoundationInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Member_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMemberRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Member(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Member_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMemberRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Member(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Members_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Members_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMembersRequest + 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_Members_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Members(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Members_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMembersRequest + 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_Members_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Members(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.Uint64(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.Uint64(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 + +} + +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_Vote_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVoteRequest + 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.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + val, ok = pathParams["voter"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter") + } + + protoReq.Voter, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) + } + + msg, err := client.Vote(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVoteRequest + 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.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + val, ok = pathParams["voter"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter") + } + + protoReq.Voter, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) + } + + msg, err := server.Vote(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Votes_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVotesRequest + 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.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", 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_Votes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Votes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVotesRequest + 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.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", 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_Votes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Votes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTallyResultRequest + 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.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + msg, err := client.TallyResult(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTallyResultRequest + 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.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) + } + + msg, err := server.TallyResult(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Censorships_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Censorships_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCensorshipsRequest + 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_Censorships_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Censorships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Censorships_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCensorshipsRequest + 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_Censorships_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Censorships(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Grants_0 = &utilities.DoubleArray{Encoding: map[string]int{"grantee": 0, "msg_type_url": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_Query_Grants_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGrantsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["grantee"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") + } + + protoReq.Grantee, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) + } + + val, ok = pathParams["msg_type_url"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "msg_type_url") + } + + protoReq.MsgTypeUrl, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "msg_type_url", 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_Grants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Grants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Grants_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGrantsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["grantee"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") + } + + protoReq.Grantee, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) + } + + val, ok = pathParams["msg_type_url"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "msg_type_url") + } + + protoReq.MsgTypeUrl, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "msg_type_url", 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_Grants_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Grants(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 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() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + 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_Treasury_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Treasury_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Treasury_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_FoundationInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_FoundationInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FoundationInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Member_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Member_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Member_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Members_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Members_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Members_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() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + 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()...) + + }) + + 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() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + 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_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Vote_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Votes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Votes_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Votes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TallyResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_TallyResult_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TallyResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Censorships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Censorships_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Censorships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Grants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Grants_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Grants_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_Treasury_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_Treasury_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_Treasury_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_FoundationInfo_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_FoundationInfo_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_FoundationInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Member_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_Member_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_Member_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Members_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_Members_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_Members_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()...) + + }) + + 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_Vote_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_Vote_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_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Votes_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_Votes_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_Votes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TallyResult_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_TallyResult_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_TallyResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Censorships_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_Censorships_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_Censorships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Grants_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_Grants_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_Grants_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", "foundation", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Treasury_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "foundation", "v1", "treasury"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_FoundationInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "foundation", "v1", "foundation_info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Member_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"lbm", "foundation", "v1", "foundation_members", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Members_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "foundation", "v1", "foundation_members"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Proposal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"lbm", "foundation", "v1", "proposals", "proposal_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Proposals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "foundation", "v1", "proposals"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Vote_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", "foundation", "v1", "proposals", "proposal_id", "votes", "voter"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Votes_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", "foundation", "v1", "proposals", "proposal_id", "votes"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TallyResult_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", "foundation", "v1", "proposals", "proposal_id", "tally"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Censorships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "foundation", "v1", "censorships"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Grants_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", "foundation", "v1", "grants", "grantee", "msg_type_url"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Treasury_0 = runtime.ForwardResponseMessage + + forward_Query_FoundationInfo_0 = runtime.ForwardResponseMessage + + forward_Query_Member_0 = runtime.ForwardResponseMessage + + forward_Query_Members_0 = runtime.ForwardResponseMessage + + forward_Query_Proposal_0 = runtime.ForwardResponseMessage + + forward_Query_Proposals_0 = runtime.ForwardResponseMessage + + forward_Query_Vote_0 = runtime.ForwardResponseMessage + + forward_Query_Votes_0 = runtime.ForwardResponseMessage + + forward_Query_TallyResult_0 = runtime.ForwardResponseMessage + + forward_Query_Censorships_0 = runtime.ForwardResponseMessage + + forward_Query_Grants_0 = runtime.ForwardResponseMessage +) diff --git a/x/foundation/tx.pb.go b/x/foundation/tx.pb.go new file mode 100644 index 0000000000..fe30633e37 --- /dev/null +++ b/x/foundation/tx.pb.go @@ -0,0 +1,5381 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: lbm/foundation/v1/tx.proto + +package foundation + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/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 + +// Exec defines modes of execution of a proposal on creation or on new vote. +type Exec int32 + +const ( + // An empty value means that there should be a separate + // MsgExec request for the proposal to execute. + Exec_EXEC_UNSPECIFIED Exec = 0 + // Try to execute the proposal immediately. + // If the proposal is not allowed per the DecisionPolicy, + // the proposal will still be open and could + // be executed at a later point. + Exec_EXEC_TRY Exec = 1 +) + +var Exec_name = map[int32]string{ + 0: "EXEC_UNSPECIFIED", + 1: "EXEC_TRY", +} + +var Exec_value = map[string]int32{ + "EXEC_UNSPECIFIED": 0, + "EXEC_TRY": 1, +} + +func (x Exec) String() string { + return proto.EnumName(Exec_name, int32(x)) +} + +func (Exec) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{0} +} + +// MsgFundTreasury is the Msg/FundTreasury request type. +type MsgFundTreasury struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgFundTreasury) Reset() { *m = MsgFundTreasury{} } +func (m *MsgFundTreasury) String() string { return proto.CompactTextString(m) } +func (*MsgFundTreasury) ProtoMessage() {} +func (*MsgFundTreasury) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{0} +} +func (m *MsgFundTreasury) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFundTreasury) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFundTreasury.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 *MsgFundTreasury) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFundTreasury.Merge(m, src) +} +func (m *MsgFundTreasury) XXX_Size() int { + return m.Size() +} +func (m *MsgFundTreasury) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFundTreasury.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFundTreasury proto.InternalMessageInfo + +// MsgFundTreasuryResponse is the Msg/FundTreasury response type. +type MsgFundTreasuryResponse struct { +} + +func (m *MsgFundTreasuryResponse) Reset() { *m = MsgFundTreasuryResponse{} } +func (m *MsgFundTreasuryResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFundTreasuryResponse) ProtoMessage() {} +func (*MsgFundTreasuryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{1} +} +func (m *MsgFundTreasuryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFundTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFundTreasuryResponse.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 *MsgFundTreasuryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFundTreasuryResponse.Merge(m, src) +} +func (m *MsgFundTreasuryResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgFundTreasuryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFundTreasuryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFundTreasuryResponse proto.InternalMessageInfo + +// MsgWithdrawFromTreasury is the Msg/WithdrawFromTreasury request type. +type MsgWithdrawFromTreasury struct { + // authority is the address of the privileged account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgWithdrawFromTreasury) Reset() { *m = MsgWithdrawFromTreasury{} } +func (m *MsgWithdrawFromTreasury) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawFromTreasury) ProtoMessage() {} +func (*MsgWithdrawFromTreasury) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{2} +} +func (m *MsgWithdrawFromTreasury) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawFromTreasury) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawFromTreasury.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 *MsgWithdrawFromTreasury) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawFromTreasury.Merge(m, src) +} +func (m *MsgWithdrawFromTreasury) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawFromTreasury) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawFromTreasury.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawFromTreasury proto.InternalMessageInfo + +// MsgWithdrawFromTreasuryResponse is the Msg/WithdrawFromTreasury response type. +type MsgWithdrawFromTreasuryResponse struct { +} + +func (m *MsgWithdrawFromTreasuryResponse) Reset() { *m = MsgWithdrawFromTreasuryResponse{} } +func (m *MsgWithdrawFromTreasuryResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawFromTreasuryResponse) ProtoMessage() {} +func (*MsgWithdrawFromTreasuryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{3} +} +func (m *MsgWithdrawFromTreasuryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawFromTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawFromTreasuryResponse.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 *MsgWithdrawFromTreasuryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawFromTreasuryResponse.Merge(m, src) +} +func (m *MsgWithdrawFromTreasuryResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawFromTreasuryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawFromTreasuryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawFromTreasuryResponse proto.InternalMessageInfo + +// MsgUpdateParams is the Msg/UpdateParams request type. +// NOTE: This is not for tx +type MsgUpdateParams struct { + // authority is the address of the privileged account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/foundation parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{4} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +// MsgUpdateParamsResponse is the Msg/UpdateParams response type. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{5} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgUpdateMembers is the Msg/UpdateMembers request type. +// NOTE: This is not for tx +type MsgUpdateMembers struct { + // authority is the address of the privileged account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // member_updates is the list of members to update, + // set remove to true to remove a member. + MemberUpdates []MemberRequest `protobuf:"bytes,2,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"` +} + +func (m *MsgUpdateMembers) Reset() { *m = MsgUpdateMembers{} } +func (m *MsgUpdateMembers) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateMembers) ProtoMessage() {} +func (*MsgUpdateMembers) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{6} +} +func (m *MsgUpdateMembers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateMembers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateMembers.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 *MsgUpdateMembers) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateMembers.Merge(m, src) +} +func (m *MsgUpdateMembers) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateMembers) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateMembers.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateMembers proto.InternalMessageInfo + +// MsgUpdateMembersResponse is the Msg/UpdateMembers response type. +type MsgUpdateMembersResponse struct { +} + +func (m *MsgUpdateMembersResponse) Reset() { *m = MsgUpdateMembersResponse{} } +func (m *MsgUpdateMembersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateMembersResponse) ProtoMessage() {} +func (*MsgUpdateMembersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{7} +} +func (m *MsgUpdateMembersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateMembersResponse.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 *MsgUpdateMembersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateMembersResponse.Merge(m, src) +} +func (m *MsgUpdateMembersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateMembersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateMembersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateMembersResponse proto.InternalMessageInfo + +// MsgUpdateDecisionPolicy is the Msg/UpdateDecisionPolicy request type. +type MsgUpdateDecisionPolicy struct { + // authority is the address of the privileged account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // decision_policy is the updated decision policy. + DecisionPolicy *types1.Any `protobuf:"bytes,2,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *MsgUpdateDecisionPolicy) Reset() { *m = MsgUpdateDecisionPolicy{} } +func (m *MsgUpdateDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDecisionPolicy) ProtoMessage() {} +func (*MsgUpdateDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{8} +} +func (m *MsgUpdateDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDecisionPolicy.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 *MsgUpdateDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDecisionPolicy.Merge(m, src) +} +func (m *MsgUpdateDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDecisionPolicy proto.InternalMessageInfo + +// MsgUpdateDecisionPolicyResponse is the Msg/UpdateDecisionPolicy response type. +type MsgUpdateDecisionPolicyResponse struct { +} + +func (m *MsgUpdateDecisionPolicyResponse) Reset() { *m = MsgUpdateDecisionPolicyResponse{} } +func (m *MsgUpdateDecisionPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDecisionPolicyResponse) ProtoMessage() {} +func (*MsgUpdateDecisionPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{9} +} +func (m *MsgUpdateDecisionPolicyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDecisionPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDecisionPolicyResponse.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 *MsgUpdateDecisionPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDecisionPolicyResponse.Merge(m, src) +} +func (m *MsgUpdateDecisionPolicyResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDecisionPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDecisionPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDecisionPolicyResponse proto.InternalMessageInfo + +// MsgSubmitProposal is the Msg/SubmitProposal request type. +type MsgSubmitProposal struct { + // proposers are the account addresses of the proposers. + // Proposers signatures will be counted as yes votes. + Proposers []string `protobuf:"bytes,1,rep,name=proposers,proto3" json:"proposers,omitempty"` + // metadata is any arbitrary metadata to attached to the proposal. + Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + Messages []*types1.Any `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + // exec defines the mode of execution of the proposal, + // whether it should be executed immediately on creation or not. + // If so, proposers signatures are considered as Yes votes. + Exec Exec `protobuf:"varint,4,opt,name=exec,proto3,enum=lbm.foundation.v1.Exec" json:"exec,omitempty"` +} + +func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } +func (m *MsgSubmitProposal) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitProposal) ProtoMessage() {} +func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{10} +} +func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitProposal.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 *MsgSubmitProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitProposal.Merge(m, src) +} +func (m *MsgSubmitProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitProposal proto.InternalMessageInfo + +// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. +type MsgSubmitProposalResponse struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *MsgSubmitProposalResponse) Reset() { *m = MsgSubmitProposalResponse{} } +func (m *MsgSubmitProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitProposalResponse) ProtoMessage() {} +func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{11} +} +func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitProposalResponse.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 *MsgSubmitProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitProposalResponse.Merge(m, src) +} +func (m *MsgSubmitProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitProposalResponse proto.InternalMessageInfo + +// MsgWithdrawProposal is the Msg/WithdrawProposal request type. +type MsgWithdrawProposal struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // address of one of the proposer of the proposal. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgWithdrawProposal) Reset() { *m = MsgWithdrawProposal{} } +func (m *MsgWithdrawProposal) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawProposal) ProtoMessage() {} +func (*MsgWithdrawProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{12} +} +func (m *MsgWithdrawProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawProposal.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 *MsgWithdrawProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawProposal.Merge(m, src) +} +func (m *MsgWithdrawProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawProposal proto.InternalMessageInfo + +// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. +type MsgWithdrawProposalResponse struct { +} + +func (m *MsgWithdrawProposalResponse) Reset() { *m = MsgWithdrawProposalResponse{} } +func (m *MsgWithdrawProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawProposalResponse) ProtoMessage() {} +func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{13} +} +func (m *MsgWithdrawProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawProposalResponse.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 *MsgWithdrawProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawProposalResponse.Merge(m, src) +} +func (m *MsgWithdrawProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawProposalResponse proto.InternalMessageInfo + +// MsgVote is the Msg/Vote request type. +type MsgVote struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // voter is the voter account address. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + // option is the voter's choice on the proposal. + Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=lbm.foundation.v1.VoteOption" json:"option,omitempty"` + // metadata is any arbitrary metadata to attached to the vote. + Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + // exec defines whether the proposal should be executed + // immediately after voting or not. + Exec Exec `protobuf:"varint,5,opt,name=exec,proto3,enum=lbm.foundation.v1.Exec" json:"exec,omitempty"` +} + +func (m *MsgVote) Reset() { *m = MsgVote{} } +func (m *MsgVote) String() string { return proto.CompactTextString(m) } +func (*MsgVote) ProtoMessage() {} +func (*MsgVote) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{14} +} +func (m *MsgVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVote.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 *MsgVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVote.Merge(m, src) +} +func (m *MsgVote) XXX_Size() int { + return m.Size() +} +func (m *MsgVote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVote.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVote proto.InternalMessageInfo + +// MsgVoteResponse is the Msg/Vote response type. +type MsgVoteResponse struct { +} + +func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } +func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteResponse) ProtoMessage() {} +func (*MsgVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{15} +} +func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteResponse.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 *MsgVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteResponse.Merge(m, src) +} +func (m *MsgVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo + +// MsgExec is the Msg/Exec request type. +type MsgExec struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // signer is the account address used to execute the proposal. + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgExec) Reset() { *m = MsgExec{} } +func (m *MsgExec) String() string { return proto.CompactTextString(m) } +func (*MsgExec) ProtoMessage() {} +func (*MsgExec) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{16} +} +func (m *MsgExec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExec.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 *MsgExec) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExec.Merge(m, src) +} +func (m *MsgExec) XXX_Size() int { + return m.Size() +} +func (m *MsgExec) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExec.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExec proto.InternalMessageInfo + +// MsgExecResponse is the Msg/Exec request type. +type MsgExecResponse struct { +} + +func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } +func (m *MsgExecResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecResponse) ProtoMessage() {} +func (*MsgExecResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{17} +} +func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecResponse.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 *MsgExecResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecResponse.Merge(m, src) +} +func (m *MsgExecResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo + +// MsgLeaveFoundation is the Msg/LeaveFoundation request type. +type MsgLeaveFoundation struct { + // address is the account address of the foundation member. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgLeaveFoundation) Reset() { *m = MsgLeaveFoundation{} } +func (m *MsgLeaveFoundation) String() string { return proto.CompactTextString(m) } +func (*MsgLeaveFoundation) ProtoMessage() {} +func (*MsgLeaveFoundation) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{18} +} +func (m *MsgLeaveFoundation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLeaveFoundation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLeaveFoundation.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 *MsgLeaveFoundation) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLeaveFoundation.Merge(m, src) +} +func (m *MsgLeaveFoundation) XXX_Size() int { + return m.Size() +} +func (m *MsgLeaveFoundation) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLeaveFoundation.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLeaveFoundation proto.InternalMessageInfo + +// MsgLeaveFoundationResponse is the Msg/LeaveFoundation response type. +type MsgLeaveFoundationResponse struct { +} + +func (m *MsgLeaveFoundationResponse) Reset() { *m = MsgLeaveFoundationResponse{} } +func (m *MsgLeaveFoundationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLeaveFoundationResponse) ProtoMessage() {} +func (*MsgLeaveFoundationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{19} +} +func (m *MsgLeaveFoundationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLeaveFoundationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLeaveFoundationResponse.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 *MsgLeaveFoundationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLeaveFoundationResponse.Merge(m, src) +} +func (m *MsgLeaveFoundationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgLeaveFoundationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLeaveFoundationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLeaveFoundationResponse proto.InternalMessageInfo + +// MsgUpdateCensorship is the Msg/UpdateCensorship request type. +type MsgUpdateCensorship struct { + // authority over the target censorship. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // new censorship information + Censorship Censorship `protobuf:"bytes,2,opt,name=censorship,proto3" json:"censorship"` +} + +func (m *MsgUpdateCensorship) Reset() { *m = MsgUpdateCensorship{} } +func (m *MsgUpdateCensorship) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateCensorship) ProtoMessage() {} +func (*MsgUpdateCensorship) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{20} +} +func (m *MsgUpdateCensorship) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateCensorship) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateCensorship.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 *MsgUpdateCensorship) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateCensorship.Merge(m, src) +} +func (m *MsgUpdateCensorship) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateCensorship) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateCensorship.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateCensorship proto.InternalMessageInfo + +// MsgUpdateCensorshipResponse is the Msg/UpdateCensorship response type. +type MsgUpdateCensorshipResponse struct { +} + +func (m *MsgUpdateCensorshipResponse) Reset() { *m = MsgUpdateCensorshipResponse{} } +func (m *MsgUpdateCensorshipResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateCensorshipResponse) ProtoMessage() {} +func (*MsgUpdateCensorshipResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{21} +} +func (m *MsgUpdateCensorshipResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateCensorshipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateCensorshipResponse.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 *MsgUpdateCensorshipResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateCensorshipResponse.Merge(m, src) +} +func (m *MsgUpdateCensorshipResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateCensorshipResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateCensorshipResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateCensorshipResponse proto.InternalMessageInfo + +// MsgGrant is the Msg/Grant request type. +// on behalf of the foundation. +type MsgGrant struct { + // authority is the address of the privileged account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + Authorization *types1.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"` +} + +func (m *MsgGrant) Reset() { *m = MsgGrant{} } +func (m *MsgGrant) String() string { return proto.CompactTextString(m) } +func (*MsgGrant) ProtoMessage() {} +func (*MsgGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{22} +} +func (m *MsgGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGrant.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 *MsgGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGrant.Merge(m, src) +} +func (m *MsgGrant) XXX_Size() int { + return m.Size() +} +func (m *MsgGrant) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGrant proto.InternalMessageInfo + +// MsgGrantResponse is the Msg/MsgGrant response type. +type MsgGrantResponse struct { +} + +func (m *MsgGrantResponse) Reset() { *m = MsgGrantResponse{} } +func (m *MsgGrantResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGrantResponse) ProtoMessage() {} +func (*MsgGrantResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{23} +} +func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGrantResponse.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 *MsgGrantResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGrantResponse.Merge(m, src) +} +func (m *MsgGrantResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGrantResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGrantResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGrantResponse proto.InternalMessageInfo + +// MsgRevoke is the Msg/Revoke request type. +type MsgRevoke struct { + // authority is the address of the privileged account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` +} + +func (m *MsgRevoke) Reset() { *m = MsgRevoke{} } +func (m *MsgRevoke) String() string { return proto.CompactTextString(m) } +func (*MsgRevoke) ProtoMessage() {} +func (*MsgRevoke) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{24} +} +func (m *MsgRevoke) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevoke.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 *MsgRevoke) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevoke.Merge(m, src) +} +func (m *MsgRevoke) XXX_Size() int { + return m.Size() +} +func (m *MsgRevoke) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevoke.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevoke proto.InternalMessageInfo + +// MsgRevokeResponse is the Msg/MsgRevokeResponse response type. +type MsgRevokeResponse struct { +} + +func (m *MsgRevokeResponse) Reset() { *m = MsgRevokeResponse{} } +func (m *MsgRevokeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeResponse) ProtoMessage() {} +func (*MsgRevokeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ec2105611cae3ff, []int{25} +} +func (m *MsgRevokeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeResponse.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 *MsgRevokeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeResponse.Merge(m, src) +} +func (m *MsgRevokeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("lbm.foundation.v1.Exec", Exec_name, Exec_value) + proto.RegisterType((*MsgFundTreasury)(nil), "lbm.foundation.v1.MsgFundTreasury") + proto.RegisterType((*MsgFundTreasuryResponse)(nil), "lbm.foundation.v1.MsgFundTreasuryResponse") + proto.RegisterType((*MsgWithdrawFromTreasury)(nil), "lbm.foundation.v1.MsgWithdrawFromTreasury") + proto.RegisterType((*MsgWithdrawFromTreasuryResponse)(nil), "lbm.foundation.v1.MsgWithdrawFromTreasuryResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "lbm.foundation.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "lbm.foundation.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateMembers)(nil), "lbm.foundation.v1.MsgUpdateMembers") + proto.RegisterType((*MsgUpdateMembersResponse)(nil), "lbm.foundation.v1.MsgUpdateMembersResponse") + proto.RegisterType((*MsgUpdateDecisionPolicy)(nil), "lbm.foundation.v1.MsgUpdateDecisionPolicy") + proto.RegisterType((*MsgUpdateDecisionPolicyResponse)(nil), "lbm.foundation.v1.MsgUpdateDecisionPolicyResponse") + proto.RegisterType((*MsgSubmitProposal)(nil), "lbm.foundation.v1.MsgSubmitProposal") + proto.RegisterType((*MsgSubmitProposalResponse)(nil), "lbm.foundation.v1.MsgSubmitProposalResponse") + proto.RegisterType((*MsgWithdrawProposal)(nil), "lbm.foundation.v1.MsgWithdrawProposal") + proto.RegisterType((*MsgWithdrawProposalResponse)(nil), "lbm.foundation.v1.MsgWithdrawProposalResponse") + proto.RegisterType((*MsgVote)(nil), "lbm.foundation.v1.MsgVote") + proto.RegisterType((*MsgVoteResponse)(nil), "lbm.foundation.v1.MsgVoteResponse") + proto.RegisterType((*MsgExec)(nil), "lbm.foundation.v1.MsgExec") + proto.RegisterType((*MsgExecResponse)(nil), "lbm.foundation.v1.MsgExecResponse") + proto.RegisterType((*MsgLeaveFoundation)(nil), "lbm.foundation.v1.MsgLeaveFoundation") + proto.RegisterType((*MsgLeaveFoundationResponse)(nil), "lbm.foundation.v1.MsgLeaveFoundationResponse") + proto.RegisterType((*MsgUpdateCensorship)(nil), "lbm.foundation.v1.MsgUpdateCensorship") + proto.RegisterType((*MsgUpdateCensorshipResponse)(nil), "lbm.foundation.v1.MsgUpdateCensorshipResponse") + proto.RegisterType((*MsgGrant)(nil), "lbm.foundation.v1.MsgGrant") + proto.RegisterType((*MsgGrantResponse)(nil), "lbm.foundation.v1.MsgGrantResponse") + proto.RegisterType((*MsgRevoke)(nil), "lbm.foundation.v1.MsgRevoke") + proto.RegisterType((*MsgRevokeResponse)(nil), "lbm.foundation.v1.MsgRevokeResponse") +} + +func init() { proto.RegisterFile("lbm/foundation/v1/tx.proto", fileDescriptor_5ec2105611cae3ff) } + +var fileDescriptor_5ec2105611cae3ff = []byte{ + // 1369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6f, 0xdc, 0xc4, + 0x1b, 0x5e, 0x27, 0x9b, 0xb4, 0x79, 0xdb, 0xe6, 0xc3, 0x8d, 0x94, 0x8d, 0xd3, 0x6e, 0xf2, 0x73, + 0x3f, 0x14, 0x6d, 0x1a, 0xbb, 0xd9, 0x9f, 0x00, 0x69, 0x41, 0x42, 0x4d, 0x9a, 0xa0, 0x48, 0x5d, + 0x1a, 0xdc, 0x96, 0xaf, 0x03, 0x2b, 0xef, 0x7a, 0xe2, 0x98, 0xae, 0x3d, 0xc6, 0x63, 0x2f, 0x09, + 0x08, 0x09, 0x71, 0xe4, 0x02, 0x07, 0x0e, 0xfd, 0x13, 0x10, 0x07, 0xd4, 0x43, 0xef, 0x48, 0x1c, + 0x50, 0x55, 0x2e, 0x15, 0xa7, 0x9e, 0xf8, 0x48, 0x0f, 0xfd, 0x07, 0x38, 0x71, 0x42, 0x33, 0x9e, + 0x9d, 0xf5, 0xae, 0xbd, 0x1f, 0x44, 0x82, 0x4b, 0xe2, 0x99, 0xf7, 0x99, 0xf7, 0x7d, 0x9f, 0x67, + 0xde, 0x79, 0x67, 0x16, 0x94, 0x66, 0xdd, 0xd5, 0xf7, 0x71, 0xe4, 0x59, 0x66, 0xe8, 0x60, 0x4f, + 0x6f, 0x6d, 0xe8, 0xe1, 0xa1, 0xe6, 0x07, 0x38, 0xc4, 0xf2, 0x5c, 0xb3, 0xee, 0x6a, 0x1d, 0x9b, + 0xd6, 0xda, 0x50, 0xe6, 0x6d, 0x6c, 0x63, 0x66, 0xd5, 0xe9, 0x57, 0x0c, 0x54, 0xd4, 0xb4, 0x93, + 0xc4, 0xb2, 0x18, 0xb3, 0xd0, 0xc0, 0xc4, 0xc5, 0x44, 0x77, 0x89, 0x4d, 0xed, 0x2e, 0xb1, 0xb9, + 0xa1, 0xc8, 0x0d, 0x75, 0x93, 0x20, 0xbd, 0xb5, 0x51, 0x47, 0xa1, 0xb9, 0xa1, 0x37, 0xb0, 0xd3, + 0x5e, 0xb8, 0x68, 0x63, 0x6c, 0x37, 0x91, 0xce, 0x46, 0xf5, 0x68, 0x5f, 0x37, 0xbd, 0xa3, 0xb6, + 0x29, 0x5e, 0x5a, 0x8b, 0x13, 0x8a, 0x07, 0xdc, 0x34, 0x67, 0xba, 0x8e, 0x87, 0x75, 0xf6, 0x37, + 0x9e, 0x52, 0x7f, 0x96, 0x60, 0xa6, 0x4a, 0xec, 0x9d, 0xc8, 0xb3, 0xee, 0x06, 0xc8, 0x24, 0x51, + 0x70, 0x24, 0x5f, 0x83, 0xfc, 0x7e, 0x80, 0xdd, 0x82, 0xb4, 0x22, 0xad, 0x4e, 0x6d, 0x16, 0x7e, + 0x79, 0xb4, 0x3e, 0xcf, 0xdd, 0xdc, 0xb0, 0xac, 0x00, 0x11, 0x72, 0x27, 0x0c, 0x1c, 0xcf, 0x36, + 0x18, 0x4a, 0x6e, 0xc0, 0xa4, 0xe9, 0xe2, 0xc8, 0x0b, 0x0b, 0x63, 0x2b, 0xe3, 0xab, 0x67, 0xca, + 0x8b, 0x1a, 0x07, 0xd3, 0xdc, 0x35, 0x9e, 0xbb, 0xb6, 0x85, 0x1d, 0x6f, 0xf3, 0xfa, 0xe3, 0x5f, + 0x97, 0x73, 0xdf, 0xfd, 0xb6, 0xbc, 0x6a, 0x3b, 0xe1, 0x41, 0x54, 0xd7, 0x1a, 0xd8, 0xe5, 0x09, + 0xf2, 0x7f, 0xeb, 0xc4, 0xba, 0xaf, 0x87, 0x47, 0x3e, 0x22, 0x6c, 0x01, 0x31, 0xb8, 0xeb, 0xca, + 0x95, 0x2f, 0x5e, 0x3c, 0x2c, 0xb1, 0x78, 0x5f, 0xbe, 0x78, 0x58, 0x5a, 0x68, 0xd6, 0x5d, 0x06, + 0xed, 0xc9, 0x5c, 0x5d, 0x84, 0x85, 0x9e, 0x29, 0x03, 0x11, 0x1f, 0x7b, 0x04, 0xa9, 0xdf, 0x8c, + 0x31, 0xdb, 0x3b, 0x4e, 0x78, 0x60, 0x05, 0xe6, 0xc7, 0x3b, 0x01, 0x76, 0x05, 0xe1, 0x97, 0x61, + 0xca, 0x8c, 0xc2, 0x03, 0x1c, 0x38, 0xe1, 0xd1, 0x50, 0xd6, 0x1d, 0xa8, 0xbc, 0x0a, 0x63, 0x21, + 0x2e, 0x8c, 0x0d, 0x59, 0x30, 0x16, 0xe2, 0x84, 0x48, 0xe3, 0xff, 0x9e, 0x48, 0x65, 0x2a, 0x52, + 0x27, 0x3d, 0xaa, 0xd4, 0x72, 0x42, 0xa9, 0x2c, 0xea, 0xea, 0xff, 0x60, 0xb9, 0x8f, 0x49, 0x28, + 0xf7, 0x7d, 0x5c, 0x22, 0xf7, 0x7c, 0xcb, 0x0c, 0xd1, 0x9e, 0x19, 0x98, 0x2e, 0x39, 0xb1, 0x62, + 0xaf, 0xc0, 0xa4, 0xcf, 0x3c, 0x30, 0xd5, 0xa8, 0x0e, 0xa9, 0xe3, 0xa4, 0xc5, 0x21, 0x36, 0xf3, + 0x54, 0x07, 0x83, 0xc3, 0x2b, 0xa5, 0x34, 0xb7, 0x64, 0x15, 0x24, 0x93, 0xe3, 0x55, 0x90, 0x9c, + 0x12, 0x5c, 0x7e, 0x92, 0x60, 0x56, 0xd8, 0xaa, 0xc8, 0xad, 0xa3, 0xe0, 0xe4, 0x64, 0xaa, 0x30, + 0xed, 0x32, 0x17, 0xb5, 0x88, 0xf9, 0x23, 0xfc, 0x04, 0xac, 0x64, 0x90, 0x8a, 0x63, 0x19, 0xe8, + 0xa3, 0x08, 0x91, 0x90, 0x73, 0x3b, 0x17, 0xaf, 0x8e, 0x93, 0x21, 0x95, 0xb5, 0x34, 0xc5, 0x42, + 0x8a, 0x22, 0xcf, 0x59, 0x55, 0xa0, 0xd0, 0x3b, 0x27, 0x48, 0x3e, 0x93, 0x12, 0x02, 0xdc, 0x44, + 0x0d, 0x87, 0x38, 0xd8, 0xdb, 0xc3, 0x4d, 0xa7, 0x71, 0xf2, 0x52, 0x7f, 0x0b, 0x66, 0x2c, 0xee, + 0xa9, 0xe6, 0x33, 0x57, 0x7c, 0x07, 0xe7, 0xb5, 0xb8, 0x15, 0x69, 0xed, 0x56, 0xa4, 0xdd, 0xf0, + 0x8e, 0x36, 0xe5, 0x27, 0x8f, 0xd6, 0xa7, 0xbb, 0x43, 0x1b, 0xd3, 0x56, 0xd7, 0x78, 0x58, 0xb9, + 0x66, 0xa5, 0xcf, 0xcb, 0x35, 0xcb, 0x24, 0xd8, 0xff, 0x29, 0xc1, 0x5c, 0x95, 0xd8, 0x77, 0xa2, + 0xba, 0xeb, 0x84, 0x7b, 0x01, 0xf6, 0x31, 0x31, 0x9b, 0x94, 0xb7, 0xcf, 0xbe, 0x51, 0x40, 0x0a, + 0xd2, 0xca, 0xf8, 0x60, 0xde, 0x02, 0x2a, 0x2b, 0x70, 0xda, 0x45, 0xa1, 0x69, 0x99, 0xa1, 0x19, + 0x1f, 0x74, 0x43, 0x8c, 0xe5, 0xeb, 0xd4, 0x46, 0x88, 0x69, 0x23, 0xc2, 0x8f, 0x75, 0xa6, 0x18, + 0x86, 0x40, 0xc9, 0x6b, 0x90, 0x47, 0x87, 0xa8, 0x51, 0xc8, 0xaf, 0x48, 0xab, 0xd3, 0xe5, 0x85, + 0x8c, 0x3a, 0xd9, 0x3e, 0x44, 0x0d, 0x83, 0x81, 0x2a, 0xd7, 0x98, 0x3e, 0x22, 0x15, 0xaa, 0xcf, + 0x62, 0x42, 0x9f, 0x6e, 0x82, 0xea, 0x6b, 0xb0, 0x98, 0x9a, 0x6c, 0x6b, 0x22, 0x2f, 0xc3, 0x19, + 0x9f, 0xcf, 0xd5, 0x1c, 0x8b, 0xed, 0x7b, 0xde, 0x80, 0xf6, 0xd4, 0xae, 0xa5, 0x3e, 0x90, 0xe0, + 0x7c, 0xa2, 0x0f, 0x08, 0xd9, 0x86, 0x2d, 0x94, 0xcb, 0x70, 0xca, 0x8c, 0xb5, 0x1b, 0xda, 0x07, + 0xdb, 0xc0, 0x98, 0x58, 0x7b, 0x44, 0x69, 0x2d, 0x65, 0x74, 0x29, 0x41, 0xec, 0x22, 0x2c, 0x65, + 0x4c, 0x8b, 0xed, 0xfe, 0x4b, 0x82, 0x53, 0x55, 0x62, 0xbf, 0x8d, 0xc3, 0xe1, 0x34, 0x65, 0x0d, + 0x26, 0x5a, 0x38, 0x44, 0xc1, 0xd0, 0x5c, 0x63, 0x98, 0xfc, 0x12, 0x4c, 0x62, 0x9f, 0x6e, 0x4d, + 0x61, 0x9c, 0xed, 0xd8, 0xc5, 0x8c, 0x1d, 0xa3, 0x91, 0x6f, 0x33, 0x90, 0xc1, 0xc1, 0x5d, 0x45, + 0x93, 0xef, 0x29, 0x9a, 0x76, 0x09, 0x4c, 0x8c, 0x52, 0x02, 0x45, 0xaa, 0x54, 0x9c, 0x0b, 0xd5, + 0x69, 0x26, 0xa1, 0x13, 0x0d, 0xab, 0xce, 0xb1, 0xce, 0x4c, 0x3f, 0x85, 0x1e, 0x9f, 0x31, 0x39, + 0xa8, 0x8f, 0xe1, 0x72, 0x5c, 0x87, 0x49, 0xe2, 0xd8, 0xde, 0x08, 0x7a, 0x70, 0x5c, 0x65, 0x99, + 0x26, 0xc4, 0x07, 0xbd, 0x19, 0xd1, 0x98, 0x3c, 0x23, 0x46, 0xa1, 0x9d, 0x51, 0x04, 0x72, 0x95, + 0xd8, 0xb7, 0x90, 0xd9, 0x42, 0x3b, 0x82, 0x68, 0xb2, 0x70, 0xa4, 0x51, 0x0b, 0x67, 0xad, 0xb7, + 0x70, 0x94, 0x44, 0xf8, 0x9e, 0x00, 0xea, 0x05, 0x50, 0xd2, 0xb3, 0x22, 0xa9, 0x1f, 0xe3, 0x82, + 0x8f, 0x3b, 0xc9, 0x16, 0xf2, 0x08, 0x0e, 0xc8, 0x81, 0xe3, 0x9f, 0xb8, 0x3f, 0x6e, 0x01, 0x34, + 0x84, 0x17, 0xde, 0x1a, 0xb3, 0xaa, 0xa5, 0x13, 0x8a, 0x5f, 0x02, 0x89, 0x65, 0x15, 0x2d, 0xdd, + 0x11, 0x97, 0x52, 0x1d, 0xb1, 0xe3, 0x81, 0x1f, 0x8d, 0xde, 0x69, 0xc1, 0xf1, 0xc1, 0x18, 0x9c, + 0xae, 0x12, 0xfb, 0x8d, 0xc0, 0xf4, 0xc2, 0x13, 0x13, 0x2b, 0xc3, 0x29, 0x9b, 0x3a, 0x40, 0x68, + 0xf8, 0x01, 0xe7, 0x40, 0xf9, 0x53, 0x38, 0xc7, 0x1d, 0x7c, 0x62, 0x8a, 0xd3, 0xd3, 0xef, 0xaa, + 0x78, 0xfd, 0xc9, 0xa3, 0xf5, 0x57, 0x13, 0x6f, 0x9d, 0x1d, 0xc7, 0x23, 0x8d, 0x03, 0xc7, 0xd4, + 0xf7, 0xf9, 0x07, 0xa3, 0x7f, 0x98, 0x7c, 0x3c, 0xdf, 0x48, 0x3a, 0x37, 0xba, 0x63, 0x55, 0x2e, + 0xa5, 0x45, 0x9c, 0x4d, 0x88, 0xc8, 0xd4, 0x50, 0x65, 0xf6, 0x0c, 0x60, 0xdf, 0x42, 0xae, 0x1f, + 0x24, 0x98, 0xaa, 0x12, 0xdb, 0x40, 0x2d, 0x7c, 0x1f, 0xfd, 0xa7, 0x7a, 0xad, 0xc0, 0x59, 0x97, + 0xd8, 0x35, 0xfa, 0xa6, 0xab, 0x45, 0x41, 0x93, 0xc9, 0x35, 0x65, 0x80, 0x4b, 0xec, 0xbb, 0x47, + 0x3e, 0xba, 0x17, 0x34, 0x2b, 0x97, 0xd3, 0xa4, 0xe6, 0x12, 0xa4, 0xe2, 0x9c, 0xd5, 0xf3, 0xec, + 0xe6, 0x8b, 0x07, 0x6d, 0x5a, 0xa5, 0x12, 0xe4, 0x59, 0x37, 0x98, 0x87, 0xd9, 0xed, 0x77, 0xb7, + 0xb7, 0x6a, 0xf7, 0xde, 0xbc, 0xb3, 0xb7, 0xbd, 0xb5, 0xbb, 0xb3, 0xbb, 0x7d, 0x73, 0x36, 0x27, + 0x9f, 0x85, 0xd3, 0x6c, 0xf6, 0xae, 0xf1, 0xde, 0xac, 0x54, 0xfe, 0x6a, 0x0a, 0xc6, 0xab, 0xc4, + 0x96, 0x3f, 0x80, 0xb3, 0x5d, 0xbf, 0x08, 0xd4, 0xac, 0x17, 0x4d, 0xf7, 0x43, 0x5b, 0x29, 0x0d, + 0xc7, 0x88, 0xfb, 0xa8, 0x05, 0xf3, 0x99, 0x0f, 0xf1, 0x3e, 0x3e, 0xb2, 0xb0, 0x4a, 0x79, 0x74, + 0xac, 0x88, 0x6b, 0xc2, 0xb9, 0xee, 0xa7, 0xdf, 0xa5, 0x6c, 0x27, 0x5d, 0x20, 0x65, 0x6d, 0x04, + 0x50, 0x92, 0x5a, 0xe6, 0xc3, 0xab, 0x34, 0xc8, 0x49, 0x37, 0xb6, 0x1f, 0xb5, 0x41, 0xcf, 0x1e, + 0xd9, 0x82, 0xe9, 0x9e, 0x27, 0xcf, 0xe5, 0x6c, 0x2f, 0xdd, 0x28, 0xe5, 0xda, 0x28, 0x28, 0x11, + 0xe5, 0x43, 0x98, 0x4d, 0xbd, 0x11, 0xae, 0x0e, 0xde, 0x08, 0x11, 0x49, 0x1b, 0x0d, 0x27, 0x62, + 0xed, 0x40, 0x9e, 0xdd, 0xea, 0x4a, 0xf6, 0x3a, 0x6a, 0x53, 0xd4, 0xfe, 0xb6, 0xa4, 0x1f, 0x76, + 0x00, 0xfa, 0xf8, 0xa1, 0xb6, 0x7e, 0x7e, 0x92, 0xf7, 0x98, 0x6c, 0xc3, 0x4c, 0xef, 0x25, 0x76, + 0x25, 0x7b, 0x59, 0x0f, 0x4c, 0x59, 0x1f, 0x09, 0x96, 0x14, 0x39, 0x75, 0x2f, 0x5d, 0x1d, 0x54, + 0x12, 0x1d, 0x5c, 0x3f, 0x91, 0xfb, 0xdd, 0x11, 0xf2, 0x2e, 0x4c, 0xc4, 0xf7, 0xc3, 0x52, 0xf6, + 0x42, 0x66, 0x54, 0x2e, 0x0d, 0x30, 0x0a, 0x57, 0xb7, 0x60, 0x92, 0xf7, 0xce, 0x0b, 0xd9, 0xf0, + 0xd8, 0xaa, 0x5c, 0x1e, 0x64, 0x6d, 0x7b, 0x53, 0x26, 0x3e, 0x7f, 0xf1, 0xb0, 0x24, 0x6d, 0xde, + 0x7e, 0xfc, 0x47, 0x31, 0xf7, 0xed, 0x71, 0x31, 0xf7, 0xf8, 0xb8, 0x28, 0x3d, 0x3d, 0x2e, 0x4a, + 0xbf, 0x1f, 0x17, 0xa5, 0xaf, 0x9f, 0x17, 0x73, 0x4f, 0x9f, 0x17, 0x73, 0xcf, 0x9e, 0x17, 0x73, + 0xef, 0xaf, 0xff, 0xa3, 0xbb, 0xa3, 0x3e, 0xc9, 0x2e, 0x9f, 0xff, 0xff, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0xa5, 0xdd, 0x70, 0x57, 0xe4, 0x11, 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 { + // FundTreasury defines a method to fund the treasury. + FundTreasury(ctx context.Context, in *MsgFundTreasury, opts ...grpc.CallOption) (*MsgFundTreasuryResponse, error) + // WithdrawFromTreasury defines a method to withdraw coins from the treasury. + WithdrawFromTreasury(ctx context.Context, in *MsgWithdrawFromTreasury, opts ...grpc.CallOption) (*MsgWithdrawFromTreasuryResponse, error) + // UpdateMembers updates the foundation members. + UpdateMembers(ctx context.Context, in *MsgUpdateMembers, opts ...grpc.CallOption) (*MsgUpdateMembersResponse, error) + // UpdateDecisionPolicy allows a group policy's decision policy to be updated. + UpdateDecisionPolicy(ctx context.Context, in *MsgUpdateDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateDecisionPolicyResponse, error) + // SubmitProposal submits a new proposal. + SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) + // WithdrawProposal aborts a proposal. + WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) + // Vote allows a voter to vote on a proposal. + Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) + // Exec executes a proposal. + Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) + // LeaveFoundation allows a member to leave the foundation. + LeaveFoundation(ctx context.Context, in *MsgLeaveFoundation, opts ...grpc.CallOption) (*MsgLeaveFoundationResponse, error) + // UpdateCensorship updates censorship information. + UpdateCensorship(ctx context.Context, in *MsgUpdateCensorship, opts ...grpc.CallOption) (*MsgUpdateCensorshipResponse, error) + // Grant grants the provided authorization to the grantee with authority of + // the foundation. If there is already a grant for the given + // (grantee, Authorization) tuple, then the grant will be overwritten. + Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) + // Revoke revokes any authorization corresponding to the provided method name + // that has been granted to the grantee. + Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) FundTreasury(ctx context.Context, in *MsgFundTreasury, opts ...grpc.CallOption) (*MsgFundTreasuryResponse, error) { + out := new(MsgFundTreasuryResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/FundTreasury", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawFromTreasury(ctx context.Context, in *MsgWithdrawFromTreasury, opts ...grpc.CallOption) (*MsgWithdrawFromTreasuryResponse, error) { + out := new(MsgWithdrawFromTreasuryResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/WithdrawFromTreasury", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateMembers(ctx context.Context, in *MsgUpdateMembers, opts ...grpc.CallOption) (*MsgUpdateMembersResponse, error) { + out := new(MsgUpdateMembersResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/UpdateMembers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateDecisionPolicy(ctx context.Context, in *MsgUpdateDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateDecisionPolicyResponse, error) { + out := new(MsgUpdateDecisionPolicyResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/UpdateDecisionPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) { + out := new(MsgSubmitProposalResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/SubmitProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) { + out := new(MsgWithdrawProposalResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/WithdrawProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { + out := new(MsgVoteResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/Vote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) { + out := new(MsgExecResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/Exec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LeaveFoundation(ctx context.Context, in *MsgLeaveFoundation, opts ...grpc.CallOption) (*MsgLeaveFoundationResponse, error) { + out := new(MsgLeaveFoundationResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/LeaveFoundation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateCensorship(ctx context.Context, in *MsgUpdateCensorship, opts ...grpc.CallOption) (*MsgUpdateCensorshipResponse, error) { + out := new(MsgUpdateCensorshipResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/UpdateCensorship", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) { + out := new(MsgGrantResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/Grant", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) { + out := new(MsgRevokeResponse) + err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/Revoke", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // FundTreasury defines a method to fund the treasury. + FundTreasury(context.Context, *MsgFundTreasury) (*MsgFundTreasuryResponse, error) + // WithdrawFromTreasury defines a method to withdraw coins from the treasury. + WithdrawFromTreasury(context.Context, *MsgWithdrawFromTreasury) (*MsgWithdrawFromTreasuryResponse, error) + // UpdateMembers updates the foundation members. + UpdateMembers(context.Context, *MsgUpdateMembers) (*MsgUpdateMembersResponse, error) + // UpdateDecisionPolicy allows a group policy's decision policy to be updated. + UpdateDecisionPolicy(context.Context, *MsgUpdateDecisionPolicy) (*MsgUpdateDecisionPolicyResponse, error) + // SubmitProposal submits a new proposal. + SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) + // WithdrawProposal aborts a proposal. + WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) + // Vote allows a voter to vote on a proposal. + Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) + // Exec executes a proposal. + Exec(context.Context, *MsgExec) (*MsgExecResponse, error) + // LeaveFoundation allows a member to leave the foundation. + LeaveFoundation(context.Context, *MsgLeaveFoundation) (*MsgLeaveFoundationResponse, error) + // UpdateCensorship updates censorship information. + UpdateCensorship(context.Context, *MsgUpdateCensorship) (*MsgUpdateCensorshipResponse, error) + // Grant grants the provided authorization to the grantee with authority of + // the foundation. If there is already a grant for the given + // (grantee, Authorization) tuple, then the grant will be overwritten. + Grant(context.Context, *MsgGrant) (*MsgGrantResponse, error) + // Revoke revokes any authorization corresponding to the provided method name + // that has been granted to the grantee. + Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) FundTreasury(ctx context.Context, req *MsgFundTreasury) (*MsgFundTreasuryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FundTreasury not implemented") +} +func (*UnimplementedMsgServer) WithdrawFromTreasury(ctx context.Context, req *MsgWithdrawFromTreasury) (*MsgWithdrawFromTreasuryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawFromTreasury not implemented") +} +func (*UnimplementedMsgServer) UpdateMembers(ctx context.Context, req *MsgUpdateMembers) (*MsgUpdateMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateMembers not implemented") +} +func (*UnimplementedMsgServer) UpdateDecisionPolicy(ctx context.Context, req *MsgUpdateDecisionPolicy) (*MsgUpdateDecisionPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDecisionPolicy not implemented") +} +func (*UnimplementedMsgServer) SubmitProposal(ctx context.Context, req *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") +} +func (*UnimplementedMsgServer) WithdrawProposal(ctx context.Context, req *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawProposal not implemented") +} +func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") +} +func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExec) (*MsgExecResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") +} +func (*UnimplementedMsgServer) LeaveFoundation(ctx context.Context, req *MsgLeaveFoundation) (*MsgLeaveFoundationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LeaveFoundation not implemented") +} +func (*UnimplementedMsgServer) UpdateCensorship(ctx context.Context, req *MsgUpdateCensorship) (*MsgUpdateCensorshipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCensorship not implemented") +} +func (*UnimplementedMsgServer) Grant(ctx context.Context, req *MsgGrant) (*MsgGrantResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Grant not implemented") +} +func (*UnimplementedMsgServer) Revoke(ctx context.Context, req *MsgRevoke) (*MsgRevokeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_FundTreasury_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFundTreasury) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FundTreasury(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/FundTreasury", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FundTreasury(ctx, req.(*MsgFundTreasury)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawFromTreasury_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawFromTreasury) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawFromTreasury(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/WithdrawFromTreasury", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawFromTreasury(ctx, req.(*MsgWithdrawFromTreasury)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateMembers) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/UpdateMembers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateMembers(ctx, req.(*MsgUpdateMembers)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateDecisionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDecisionPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDecisionPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/UpdateDecisionPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDecisionPolicy(ctx, req.(*MsgUpdateDecisionPolicy)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/SubmitProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitProposal(ctx, req.(*MsgSubmitProposal)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/WithdrawProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawProposal(ctx, req.(*MsgWithdrawProposal)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Vote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/Vote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExec) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Exec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/Exec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Exec(ctx, req.(*MsgExec)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LeaveFoundation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLeaveFoundation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LeaveFoundation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/LeaveFoundation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LeaveFoundation(ctx, req.(*MsgLeaveFoundation)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateCensorship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateCensorship) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateCensorship(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/UpdateCensorship", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateCensorship(ctx, req.(*MsgUpdateCensorship)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Grant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGrant) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Grant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/Grant", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Grant(ctx, req.(*MsgGrant)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRevoke) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Revoke(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.foundation.v1.Msg/Revoke", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Revoke(ctx, req.(*MsgRevoke)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lbm.foundation.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FundTreasury", + Handler: _Msg_FundTreasury_Handler, + }, + { + MethodName: "WithdrawFromTreasury", + Handler: _Msg_WithdrawFromTreasury_Handler, + }, + { + MethodName: "UpdateMembers", + Handler: _Msg_UpdateMembers_Handler, + }, + { + MethodName: "UpdateDecisionPolicy", + Handler: _Msg_UpdateDecisionPolicy_Handler, + }, + { + MethodName: "SubmitProposal", + Handler: _Msg_SubmitProposal_Handler, + }, + { + MethodName: "WithdrawProposal", + Handler: _Msg_WithdrawProposal_Handler, + }, + { + MethodName: "Vote", + Handler: _Msg_Vote_Handler, + }, + { + MethodName: "Exec", + Handler: _Msg_Exec_Handler, + }, + { + MethodName: "LeaveFoundation", + Handler: _Msg_LeaveFoundation_Handler, + }, + { + MethodName: "UpdateCensorship", + Handler: _Msg_UpdateCensorship_Handler, + }, + { + MethodName: "Grant", + Handler: _Msg_Grant_Handler, + }, + { + MethodName: "Revoke", + Handler: _Msg_Revoke_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lbm/foundation/v1/tx.proto", +} + +func (m *MsgFundTreasury) 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 *MsgFundTreasury) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFundTreasury) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFundTreasuryResponse) 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 *MsgFundTreasuryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFundTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawFromTreasury) 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 *MsgWithdrawFromTreasury) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawFromTreasury) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawFromTreasuryResponse) 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 *MsgWithdrawFromTreasuryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawFromTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) 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 = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateMembers) 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 *MsgUpdateMembers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateMembers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MemberUpdates) > 0 { + for iNdEx := len(m.MemberUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MemberUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateMembersResponse) 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 *MsgUpdateMembersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateMembersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDecisionPolicy) 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 *MsgUpdateDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDecisionPolicyResponse) 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 *MsgUpdateDecisionPolicyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDecisionPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSubmitProposal) 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 *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exec != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Exec)) + i-- + dAtA[i] = 0x20 + } + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x12 + } + if len(m.Proposers) > 0 { + for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Proposers[iNdEx]) + copy(dAtA[i:], m.Proposers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Proposers[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitProposalResponse) 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 *MsgSubmitProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawProposal) 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 *MsgWithdrawProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawProposalResponse) 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 *MsgWithdrawProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgVote) 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 *MsgVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exec != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Exec)) + i-- + dAtA[i] = 0x28 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 + } + if m.Option != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Option)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteResponse) 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 *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExec) 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 *MsgExec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgExecResponse) 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 *MsgExecResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgLeaveFoundation) 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 *MsgLeaveFoundation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLeaveFoundation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgLeaveFoundationResponse) 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 *MsgLeaveFoundationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLeaveFoundationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateCensorship) 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 *MsgUpdateCensorship) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateCensorship) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Censorship.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateCensorshipResponse) 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 *MsgUpdateCensorshipResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateCensorshipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGrant) 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 *MsgGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Authorization != nil { + { + size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGrantResponse) 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 *MsgGrantResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRevoke) 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 *MsgRevoke) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintTx(dAtA, i, uint64(len(m.MsgTypeUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRevokeResponse) 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 *MsgRevokeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeResponse) 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 *MsgFundTreasury) 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 len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgFundTreasuryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawFromTreasury) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgWithdrawFromTreasuryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateMembers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.MemberUpdates) > 0 { + for _, e := range m.MemberUpdates { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateMembersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateDecisionPolicyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSubmitProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Proposers) > 0 { + for _, s := range m.Proposers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Messages) > 0 { + for _, e := range m.Messages { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Exec != 0 { + n += 1 + sovTx(uint64(m.Exec)) + } + return n +} + +func (m *MsgSubmitProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + return n +} + +func (m *MsgWithdrawProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgWithdrawProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Option != 0 { + n += 1 + sovTx(uint64(m.Option)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Exec != 0 { + n += 1 + sovTx(uint64(m.Exec)) + } + return n +} + +func (m *MsgVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgExec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgExecResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgLeaveFoundation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgLeaveFoundationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateCensorship) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Censorship.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateCensorshipResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Authorization != nil { + l = m.Authorization.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgGrantResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRevoke) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MsgTypeUrl) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRevokeResponse) 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 *MsgFundTreasury) 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: MsgFundTreasury: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFundTreasury: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].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 *MsgFundTreasuryResponse) 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: MsgFundTreasuryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFundTreasuryResponse: 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 *MsgWithdrawFromTreasury) 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: MsgWithdrawFromTreasury: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawFromTreasury: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", 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.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].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 *MsgWithdrawFromTreasuryResponse) 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: MsgWithdrawFromTreasuryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawFromTreasuryResponse: 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 *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + 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 := 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 *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: 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 *MsgUpdateMembers) 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: MsgUpdateMembers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateMembers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemberUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MemberUpdates = append(m.MemberUpdates, MemberRequest{}) + if err := m.MemberUpdates[len(m.MemberUpdates)-1].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 *MsgUpdateMembersResponse) 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: MsgUpdateMembersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateMembersResponse: 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 *MsgUpdateDecisionPolicy) 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: MsgUpdateDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types1.Any{} + } + if err := m.DecisionPolicy.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 *MsgUpdateDecisionPolicyResponse) 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: MsgUpdateDecisionPolicyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDecisionPolicyResponse: 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 *MsgSubmitProposal) 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: MsgSubmitProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposers", 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.Proposers = append(m.Proposers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Messages = append(m.Messages, &types1.Any{}) + if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) + } + m.Exec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exec |= Exec(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 *MsgSubmitProposalResponse) 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: MsgSubmitProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 + } + } + 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 *MsgWithdrawProposal) 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: MsgWithdrawProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Address = 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 *MsgWithdrawProposalResponse) 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: MsgWithdrawProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawProposalResponse: 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 *MsgVote) 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: MsgVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", 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.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) + } + m.Option = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Option |= VoteOption(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) + } + m.Exec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exec |= Exec(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 *MsgVoteResponse) 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: MsgVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteResponse: 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 *MsgExec) 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: MsgExec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = 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 *MsgExecResponse) 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: MsgExecResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecResponse: 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 *MsgLeaveFoundation) 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: MsgLeaveFoundation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLeaveFoundation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Address = 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 *MsgLeaveFoundationResponse) 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: MsgLeaveFoundationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLeaveFoundationResponse: 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 *MsgUpdateCensorship) 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: MsgUpdateCensorship: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateCensorship: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Censorship", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Censorship.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 *MsgUpdateCensorshipResponse) 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: MsgUpdateCensorshipResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateCensorshipResponse: 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 *MsgGrant) 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: MsgGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Authorization == nil { + m.Authorization = &types1.Any{} + } + if err := m.Authorization.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 *MsgGrantResponse) 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: MsgGrantResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGrantResponse: 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 *MsgRevoke) 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: MsgRevoke: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevoke: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = 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 *MsgRevokeResponse) 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: MsgRevokeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeResponse: 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 07abbfff7302719938be8e729a4020ff79e89380 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 27 Dec 2023 04:05:43 +0000 Subject: [PATCH 02/26] Update imports --- go.mod | 76 +- go.sum | 739 +++++++++++++++++- x/foundation/authz.go | 4 +- x/foundation/authz_test.go | 3 +- x/foundation/client/cli/query.go | 7 +- x/foundation/client/cli/tx.go | 15 +- x/foundation/client/proposal_handler.go | 3 +- x/foundation/client/testutil/cli_test.go | 2 +- x/foundation/client/testutil/grpc.go | 7 +- x/foundation/client/testutil/query.go | 33 +- x/foundation/client/testutil/suite.go | 17 +- x/foundation/client/testutil/tx.go | 11 +- x/foundation/codec.go | 17 +- x/foundation/codec/cdc.go | 6 +- x/foundation/events.go | 4 +- x/foundation/expected_keepers.go | 4 +- x/foundation/foundation.go | 10 +- x/foundation/foundation_test.go | 7 +- x/foundation/genesis.go | 8 +- x/foundation/genesis_test.go | 9 +- x/foundation/keeper/exported.go | 11 +- x/foundation/keeper/internal/abci.go | 5 +- x/foundation/keeper/internal/abci_test.go | 5 +- x/foundation/keeper/internal/censorship.go | 5 +- .../keeper/internal/censorship_test.go | 3 +- x/foundation/keeper/internal/exec.go | 5 +- x/foundation/keeper/internal/genesis.go | 3 +- x/foundation/keeper/internal/genesis_test.go | 12 +- x/foundation/keeper/internal/grpc_query.go | 12 +- .../keeper/internal/grpc_query_test.go | 12 +- x/foundation/keeper/internal/invariants.go | 3 +- .../keeper/internal/invariants_test.go | 3 +- x/foundation/keeper/internal/keeper.go | 11 +- x/foundation/keeper/internal/keeper_test.go | 18 +- x/foundation/keeper/internal/keys.go | 2 +- x/foundation/keeper/internal/member.go | 9 +- x/foundation/keeper/internal/member_test.go | 3 +- x/foundation/keeper/internal/migrations.go | 5 +- .../keeper/internal/migrations/v2/expected.go | 4 +- .../keeper/internal/migrations/v2/store.go | 8 +- .../internal/migrations/v2/store_test.go | 6 +- x/foundation/keeper/internal/msg_server.go | 5 +- .../keeper/internal/msg_server_test.go | 7 +- x/foundation/keeper/internal/params.go | 3 +- x/foundation/keeper/internal/proposal.go | 5 +- .../keeper/internal/proposal_handler.go | 9 +- .../keeper/internal/proposal_handler_test.go | 9 +- x/foundation/keeper/internal/proposal_test.go | 14 +- x/foundation/keeper/internal/tally.go | 5 +- x/foundation/keeper/internal/treasury.go | 5 +- x/foundation/keeper/internal/treasury_test.go | 5 +- x/foundation/keeper/internal/vote.go | 5 +- x/foundation/keeper/internal/vote_test.go | 3 +- x/foundation/module/module.go | 13 +- x/foundation/msgs.go | 7 +- x/foundation/msgs_test.go | 11 +- x/foundation/proposal.go | 8 +- 57 files changed, 1036 insertions(+), 205 deletions(-) diff --git a/go.mod b/go.mod index d8ca3ef686..3928594e6c 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,21 @@ module github.com/Finschia/finschia-sdk require ( cosmossdk.io/math v1.2.0 + cosmossdk.io/store v1.0.1 + github.com/cometbft/cometbft v0.38.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.50.2 github.com/cosmos/go-bip39 v1.0.0 + github.com/cosmos/gogoproto v1.4.11 + github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.5.3 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 github.com/tendermint/go-amino v0.16.0 + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 ) require ( @@ -19,60 +30,92 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/log v1.2.1 // indirect - cosmossdk.io/store v1.0.1 // indirect cosmossdk.io/x/tx v0.12.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.2 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v1.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/emicklei/dot v1.6.0 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/getsentry/sentry-go v0.25.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/glog v1.2.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect - github.com/onsi/gomega v1.26.0 // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -80,27 +123,36 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.31.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.16.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.19.0 // indirect + golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index c7889db28f..10bf957011 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,40 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -18,11 +53,15 @@ cosmossdk.io/store v1.0.1 h1:XBDhCqlL+2MUgE8CHWwndKVJ4beX+TyaPIjB5SV62dM= cosmossdk.io/store v1.0.1/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/tx v0.12.0 h1:Ry2btjQdrfrje9qZ3iZeZSmDArjgxUJMMcLMrX4wj5U= cosmossdk.io/x/tx v0.12.0/go.mod h1:qTth2coAGkwCwOCjqQ8EAQg+9udXNRzcnSbMgGKGEI0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -31,29 +70,61 @@ github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d h1:7x3LqhrO4lXTt github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 h1:lm4mGuo+arhc/GrVm8hjGE3CCcfSQEvxI+uZODfEhQY= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -62,10 +133,33 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= @@ -78,12 +172,17 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= @@ -94,6 +193,7 @@ github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= @@ -105,7 +205,9 @@ github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStK github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -126,57 +228,120 @@ github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkz github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -184,47 +349,93 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -232,42 +443,83 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -276,63 +528,126 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -340,45 +655,77 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -388,24 +735,40 @@ github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -416,120 +779,465 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -537,39 +1245,68 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/foundation/authz.go b/x/foundation/authz.go index cb1399071a..cf29bbabdb 100644 --- a/x/foundation/authz.go +++ b/x/foundation/authz.go @@ -3,8 +3,8 @@ package foundation import ( "github.com/gogo/protobuf/proto" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // Authorization represents the interface of various Authorization types implemented diff --git a/x/foundation/authz_test.go b/x/foundation/authz_test.go index 19f1d605ad..8ec53ca1eb 100644 --- a/x/foundation/authz_test.go +++ b/x/foundation/authz_test.go @@ -5,7 +5,8 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/client/cli/query.go b/x/foundation/client/cli/query.go index 8d0ad01e05..e7990626a9 100644 --- a/x/foundation/client/cli/query.go +++ b/x/foundation/client/cli/query.go @@ -6,9 +6,10 @@ import ( "github.com/spf13/cobra" - "github.com/Finschia/finschia-sdk/client" - "github.com/Finschia/finschia-sdk/client/flags" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/client/cli/tx.go b/x/foundation/client/cli/tx.go index c52fd7b7ad..70aa08d742 100644 --- a/x/foundation/client/cli/tx.go +++ b/x/foundation/client/cli/tx.go @@ -8,14 +8,15 @@ import ( "github.com/spf13/cobra" - "github.com/Finschia/finschia-sdk/client" - "github.com/Finschia/finschia-sdk/client/flags" - "github.com/Finschia/finschia-sdk/client/tx" - "github.com/Finschia/finschia-sdk/codec" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/Finschia/finschia-sdk/x/foundation" - govcli "github.com/Finschia/finschia-sdk/x/gov/client/cli" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" ) // Proposal flags diff --git a/x/foundation/client/proposal_handler.go b/x/foundation/client/proposal_handler.go index 954f9a3aab..8a449bb285 100644 --- a/x/foundation/client/proposal_handler.go +++ b/x/foundation/client/proposal_handler.go @@ -1,8 +1,9 @@ package client import ( + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" + "github.com/Finschia/finschia-sdk/x/foundation/client/cli" - govclient "github.com/Finschia/finschia-sdk/x/gov/client" ) // ProposalHandler is the param change proposal handler. diff --git a/x/foundation/client/testutil/cli_test.go b/x/foundation/client/testutil/cli_test.go index 15c377bbb9..5b3ef61c5a 100644 --- a/x/foundation/client/testutil/cli_test.go +++ b/x/foundation/client/testutil/cli_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/Finschia/finschia-sdk/testutil/network" + "github.com/cosmos/cosmos-sdk/testutil/network" ) func TestIntegrationTestSuite(t *testing.T) { diff --git a/x/foundation/client/testutil/grpc.go b/x/foundation/client/testutil/grpc.go index 7f16e5675f..33a5ae36a0 100644 --- a/x/foundation/client/testutil/grpc.go +++ b/x/foundation/client/testutil/grpc.go @@ -5,8 +5,9 @@ import ( "github.com/gogo/protobuf/proto" - "github.com/Finschia/finschia-sdk/testutil/rest" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -36,7 +37,7 @@ func (s *IntegrationTestSuite) TestGRPCParams() { for _, tc := range testCases { tc := tc s.Run(tc.name, func() { - resp, err := rest.GetRequest(tc.url) + resp, err := testutil.GetRequest(tc.url) s.Require().NoError(err) err = s.cfg.Codec.UnmarshalJSON(resp, tc.respType) diff --git a/x/foundation/client/testutil/query.go b/x/foundation/client/testutil/query.go index a7d16e38d2..59427e620e 100644 --- a/x/foundation/client/testutil/query.go +++ b/x/foundation/client/testutil/query.go @@ -4,11 +4,12 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - tmcli "github.com/tendermint/tendermint/libs/cli" + cmtcli "github.com/cometbft/cometbft/libs/cli" + + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Finschia/finschia-sdk/client/flags" - clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" ) @@ -17,7 +18,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdParams() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -66,7 +67,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTreasury() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -107,7 +108,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdFoundationInfo() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -148,7 +149,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdMember() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -206,7 +207,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdMembers() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -247,7 +248,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdProposal() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -297,7 +298,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdProposals() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -338,7 +339,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdVote() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -398,7 +399,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdVotes() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -448,7 +449,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTallyResult() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -498,7 +499,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdCensorships() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { @@ -543,7 +544,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdGrants() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), } testCases := map[string]struct { diff --git a/x/foundation/client/testutil/suite.go b/x/foundation/client/testutil/suite.go index 2e1e9746a9..a6c66a8673 100644 --- a/x/foundation/client/testutil/suite.go +++ b/x/foundation/client/testutil/suite.go @@ -7,14 +7,15 @@ import ( "github.com/stretchr/testify/suite" - "github.com/Finschia/finschia-sdk/client/flags" - "github.com/Finschia/finschia-sdk/crypto/hd" - "github.com/Finschia/finschia-sdk/crypto/keyring" - clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" - "github.com/Finschia/finschia-sdk/testutil/network" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" - bankcli "github.com/Finschia/finschia-sdk/x/bank/client/cli" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" + "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" ) diff --git a/x/foundation/client/testutil/tx.go b/x/foundation/client/testutil/tx.go index ccc283cb8c..32148222a8 100644 --- a/x/foundation/client/testutil/tx.go +++ b/x/foundation/client/testutil/tx.go @@ -4,11 +4,12 @@ import ( "fmt" "time" - "github.com/Finschia/finschia-sdk/client/flags" - clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" - txtypes "github.com/Finschia/finschia-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" ) diff --git a/x/foundation/codec.go b/x/foundation/codec.go index 2a0b02964c..8f98051310 100644 --- a/x/foundation/codec.go +++ b/x/foundation/codec.go @@ -1,15 +1,16 @@ package foundation import ( - "github.com/Finschia/finschia-sdk/codec" - "github.com/Finschia/finschia-sdk/codec/legacy" - "github.com/Finschia/finschia-sdk/codec/types" - sdk "github.com/Finschia/finschia-sdk/types" - "github.com/Finschia/finschia-sdk/types/msgservice" - authzcodec "github.com/Finschia/finschia-sdk/x/authz/codec" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" + govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + fdncodec "github.com/Finschia/finschia-sdk/x/foundation/codec" - govcodec "github.com/Finschia/finschia-sdk/x/gov/codec" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" ) // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec diff --git a/x/foundation/codec/cdc.go b/x/foundation/codec/cdc.go index 7cbd4f6a69..520e435afd 100644 --- a/x/foundation/codec/cdc.go +++ b/x/foundation/codec/cdc.go @@ -1,9 +1,9 @@ package codec import ( - "github.com/Finschia/finschia-sdk/codec" - cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/codec" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" ) var ( diff --git a/x/foundation/events.go b/x/foundation/events.go index 88ab67fd65..42032f1af0 100644 --- a/x/foundation/events.go +++ b/x/foundation/events.go @@ -3,8 +3,8 @@ package foundation import ( "github.com/gogo/protobuf/proto" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (m EventUpdateDecisionPolicy) GetDecisionPolicy() DecisionPolicy { diff --git a/x/foundation/expected_keepers.go b/x/foundation/expected_keepers.go index baab36376b..b9ae9b459d 100644 --- a/x/foundation/expected_keepers.go +++ b/x/foundation/expected_keepers.go @@ -1,8 +1,8 @@ package foundation import ( - sdk "github.com/Finschia/finschia-sdk/types" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type ( diff --git a/x/foundation/foundation.go b/x/foundation/foundation.go index 4eb6013152..d8d2318181 100644 --- a/x/foundation/foundation.go +++ b/x/foundation/foundation.go @@ -6,11 +6,11 @@ import ( "github.com/gogo/protobuf/proto" - "github.com/Finschia/finschia-sdk/codec" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - paramtypes "github.com/Finschia/finschia-sdk/x/params/types" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) func validateProposers(proposers []string) error { diff --git a/x/foundation/foundation_test.go b/x/foundation/foundation_test.go index 903b877c21..657936206c 100644 --- a/x/foundation/foundation_test.go +++ b/x/foundation/foundation_test.go @@ -6,9 +6,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/genesis.go b/x/foundation/genesis.go index 2fb323f393..abdcbc2d17 100644 --- a/x/foundation/genesis.go +++ b/x/foundation/genesis.go @@ -3,10 +3,10 @@ package foundation import ( "github.com/gogo/protobuf/proto" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // DefaultGenesisState creates a default GenesisState object diff --git a/x/foundation/genesis_test.go b/x/foundation/genesis_test.go index ba0807f6b6..a5303c5ba3 100644 --- a/x/foundation/genesis_test.go +++ b/x/foundation/genesis_test.go @@ -7,10 +7,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/Finschia/finschia-sdk/codec" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go index 9d7f64bc8b..3be18e5e9c 100644 --- a/x/foundation/keeper/exported.go +++ b/x/foundation/keeper/exported.go @@ -1,13 +1,14 @@ package keeper import ( - "github.com/Finschia/finschia-sdk/baseapp" - "github.com/Finschia/finschia-sdk/codec" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" - paramtypes "github.com/Finschia/finschia-sdk/x/params/types" ) type Keeper interface { diff --git a/x/foundation/keeper/internal/abci.go b/x/foundation/keeper/internal/abci.go index efc9f9da38..25c91c10af 100644 --- a/x/foundation/keeper/internal/abci.go +++ b/x/foundation/keeper/internal/abci.go @@ -3,8 +3,9 @@ package internal import ( "time" - "github.com/Finschia/finschia-sdk/telemetry" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/abci_test.go b/x/foundation/keeper/internal/abci_test.go index dea3cf35fc..5017dc0db2 100644 --- a/x/foundation/keeper/internal/abci_test.go +++ b/x/foundation/keeper/internal/abci_test.go @@ -1,9 +1,10 @@ package internal_test import ( - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" + + sdk "github.com/cosmos/cosmos-sdk/types" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" ) diff --git a/x/foundation/keeper/internal/censorship.go b/x/foundation/keeper/internal/censorship.go index c08420ab6a..bba05750b0 100644 --- a/x/foundation/keeper/internal/censorship.go +++ b/x/foundation/keeper/internal/censorship.go @@ -1,8 +1,9 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/censorship_test.go b/x/foundation/keeper/internal/censorship_test.go index 42ec6990f4..3b54c6609c 100644 --- a/x/foundation/keeper/internal/censorship_test.go +++ b/x/foundation/keeper/internal/censorship_test.go @@ -1,7 +1,8 @@ package internal_test import ( - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/exec.go b/x/foundation/keeper/internal/exec.go index 92262fa013..e8703ec30b 100644 --- a/x/foundation/keeper/internal/exec.go +++ b/x/foundation/keeper/internal/exec.go @@ -3,8 +3,9 @@ package internal import ( "fmt" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/genesis.go b/x/foundation/keeper/internal/genesis.go index a88d6fa6a6..8333d26cf1 100644 --- a/x/foundation/keeper/internal/genesis.go +++ b/x/foundation/keeper/internal/genesis.go @@ -1,7 +1,8 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/genesis_test.go b/x/foundation/keeper/internal/genesis_test.go index 81d34636f3..fc5912202d 100644 --- a/x/foundation/keeper/internal/genesis_test.go +++ b/x/foundation/keeper/internal/genesis_test.go @@ -5,12 +5,12 @@ import ( "time" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" - "github.com/Finschia/finschia-sdk/simapp" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -28,7 +28,7 @@ func TestImportExportGenesis(t *testing.T) { app := simapp.Setup(checkTx) testdata.RegisterInterfaces(app.InterfaceRegistry()) - ctx := app.BaseApp.NewContext(checkTx, tmproto.Header{}) + ctx := app.BaseApp.NewContext(checkTx, cmtproto.Header{}) keeper := app.FoundationKeeper createAddress := func() sdk.AccAddress { diff --git a/x/foundation/keeper/internal/grpc_query.go b/x/foundation/keeper/internal/grpc_query.go index 3b8b876bfe..9bd63a5318 100644 --- a/x/foundation/keeper/internal/grpc_query.go +++ b/x/foundation/keeper/internal/grpc_query.go @@ -7,11 +7,13 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - "github.com/Finschia/finschia-sdk/store/prefix" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - "github.com/Finschia/finschia-sdk/types/query" + "cosmossdk.io/store/prefix" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/grpc_query_test.go b/x/foundation/keeper/internal/grpc_query_test.go index 6ec785604c..e0167ea071 100644 --- a/x/foundation/keeper/internal/grpc_query_test.go +++ b/x/foundation/keeper/internal/grpc_query_test.go @@ -6,12 +6,12 @@ import ( "testing" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/Finschia/finschia-sdk/baseapp" - "github.com/Finschia/finschia-sdk/simapp" - sdk "github.com/Finschia/finschia-sdk/types" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" @@ -29,7 +29,7 @@ type FoundationTestSuite struct { func (s *FoundationTestSuite) SetupTest() { s.app = simapp.Setup(false) - s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) + s.ctx = s.app.BaseApp.NewContext(false, cmtproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.app.InterfaceRegistry()) foundation.RegisterQueryServer(queryHelper, keeper.NewQueryServer(s.app.FoundationKeeper)) diff --git a/x/foundation/keeper/internal/invariants.go b/x/foundation/keeper/internal/invariants.go index b2abf2e0ea..f8566e67db 100644 --- a/x/foundation/keeper/internal/invariants.go +++ b/x/foundation/keeper/internal/invariants.go @@ -3,7 +3,8 @@ package internal import ( "fmt" - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/invariants_test.go b/x/foundation/keeper/internal/invariants_test.go index 9ffb9df7f4..195819240c 100644 --- a/x/foundation/keeper/internal/invariants_test.go +++ b/x/foundation/keeper/internal/invariants_test.go @@ -1,7 +1,8 @@ package internal_test import ( - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" ) diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index 0b824d21ae..340e715a19 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -1,13 +1,14 @@ package internal import ( - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/Finschia/finschia-sdk/baseapp" - "github.com/Finschia/finschia-sdk/codec" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" - paramtypes "github.com/Finschia/finschia-sdk/x/params/types" ) // Keeper defines the foundation module Keeper diff --git a/x/foundation/keeper/internal/keeper_test.go b/x/foundation/keeper/internal/keeper_test.go index 1b81a82a20..f2479ce6aa 100644 --- a/x/foundation/keeper/internal/keeper_test.go +++ b/x/foundation/keeper/internal/keeper_test.go @@ -6,18 +6,18 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" - "github.com/Finschia/finschia-sdk/simapp" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" "github.com/Finschia/finschia-sdk/x/foundation" keeper "github.com/Finschia/finschia-sdk/x/foundation/keeper" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" - minttypes "github.com/Finschia/finschia-sdk/x/mint/types" ) type KeeperTestSuite struct { @@ -89,7 +89,7 @@ func (s *KeeperTestSuite) SetupTest() { testdata.RegisterInterfaces(app.InterfaceRegistry()) testdata.RegisterMsgServer(app.MsgServiceRouter(), testdata.MsgServerImpl{}) - s.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{}) + s.ctx = app.BaseApp.NewContext(checkTx, cmtproto.Header{}) s.bankKeeper = app.BankKeeper s.keeper = app.FoundationKeeper s.impl = internal.NewKeeper( diff --git a/x/foundation/keeper/internal/keys.go b/x/foundation/keeper/internal/keys.go index c7e098a0e1..4e6cde5263 100644 --- a/x/foundation/keeper/internal/keys.go +++ b/x/foundation/keeper/internal/keys.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "time" - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) // Keys for foundation store diff --git a/x/foundation/keeper/internal/member.go b/x/foundation/keeper/internal/member.go index 726e5dc5e7..c8af2f18d3 100644 --- a/x/foundation/keeper/internal/member.go +++ b/x/foundation/keeper/internal/member.go @@ -1,11 +1,12 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/Finschia/finschia-sdk/x/foundation" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" ) func validateMetadata(metadata string, config foundation.Config) error { diff --git a/x/foundation/keeper/internal/member_test.go b/x/foundation/keeper/internal/member_test.go index 26b7596f82..c44d84b5c2 100644 --- a/x/foundation/keeper/internal/member_test.go +++ b/x/foundation/keeper/internal/member_test.go @@ -3,7 +3,8 @@ package internal_test import ( "time" - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/migrations.go b/x/foundation/keeper/internal/migrations.go index ae5a9fc138..c52fc4d552 100644 --- a/x/foundation/keeper/internal/migrations.go +++ b/x/foundation/keeper/internal/migrations.go @@ -1,8 +1,9 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - "github.com/Finschia/finschia-sdk/types/module" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/Finschia/finschia-sdk/x/foundation" v2 "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal/migrations/v2" ) diff --git a/x/foundation/keeper/internal/migrations/v2/expected.go b/x/foundation/keeper/internal/migrations/v2/expected.go index c6af950fa0..56f3ca39c8 100644 --- a/x/foundation/keeper/internal/migrations/v2/expected.go +++ b/x/foundation/keeper/internal/migrations/v2/expected.go @@ -1,8 +1,8 @@ package v2 import ( - sdk "github.com/Finschia/finschia-sdk/types" - paramtypes "github.com/Finschia/finschia-sdk/x/params/types" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) type ( diff --git a/x/foundation/keeper/internal/migrations/v2/store.go b/x/foundation/keeper/internal/migrations/v2/store.go index 25edbba7eb..683caf4e20 100644 --- a/x/foundation/keeper/internal/migrations/v2/store.go +++ b/x/foundation/keeper/internal/migrations/v2/store.go @@ -3,9 +3,11 @@ package v2 import ( "fmt" - "github.com/Finschia/finschia-sdk/codec" - storetypes "github.com/Finschia/finschia-sdk/store/types" - sdk "github.com/Finschia/finschia-sdk/types" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/migrations/v2/store_test.go b/x/foundation/keeper/internal/migrations/v2/store_test.go index 562d20e5e2..68fe0fda30 100644 --- a/x/foundation/keeper/internal/migrations/v2/store_test.go +++ b/x/foundation/keeper/internal/migrations/v2/store_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/require" - simappparams "github.com/Finschia/finschia-sdk/simapp/params" - "github.com/Finschia/finschia-sdk/testutil" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal/migrations/v2" ) diff --git a/x/foundation/keeper/internal/msg_server.go b/x/foundation/keeper/internal/msg_server.go index c6b7e0c878..15b7f10e5b 100644 --- a/x/foundation/keeper/internal/msg_server.go +++ b/x/foundation/keeper/internal/msg_server.go @@ -3,8 +3,9 @@ package internal import ( "context" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/msg_server_test.go b/x/foundation/keeper/internal/msg_server_test.go index 3f04aecb49..847ee91a0b 100644 --- a/x/foundation/keeper/internal/msg_server_test.go +++ b/x/foundation/keeper/internal/msg_server_test.go @@ -3,10 +3,11 @@ package internal_test import ( "time" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/params.go b/x/foundation/keeper/internal/params.go index f9b1b3c211..3c35210606 100644 --- a/x/foundation/keeper/internal/params.go +++ b/x/foundation/keeper/internal/params.go @@ -1,7 +1,8 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/proposal.go b/x/foundation/keeper/internal/proposal.go index 2003e83f07..d39ddf7ea8 100644 --- a/x/foundation/keeper/internal/proposal.go +++ b/x/foundation/keeper/internal/proposal.go @@ -3,8 +3,9 @@ package internal import ( "time" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/proposal_handler.go b/x/foundation/keeper/internal/proposal_handler.go index 0db76438ac..39d7fa712c 100644 --- a/x/foundation/keeper/internal/proposal_handler.go +++ b/x/foundation/keeper/internal/proposal_handler.go @@ -1,11 +1,12 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/Finschia/finschia-sdk/x/foundation" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" ) // NewFoundationProposalsHandler creates a handler for the gov proposals. diff --git a/x/foundation/keeper/internal/proposal_handler_test.go b/x/foundation/keeper/internal/proposal_handler_test.go index e353c23abf..6eed75e9c1 100644 --- a/x/foundation/keeper/internal/proposal_handler_test.go +++ b/x/foundation/keeper/internal/proposal_handler_test.go @@ -1,11 +1,12 @@ package internal_test import ( - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/Finschia/finschia-sdk/x/foundation" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" ) func (s *KeeperTestSuite) TestProposalHandler() { diff --git a/x/foundation/keeper/internal/proposal_test.go b/x/foundation/keeper/internal/proposal_test.go index 045bb58105..85841d783f 100644 --- a/x/foundation/keeper/internal/proposal_test.go +++ b/x/foundation/keeper/internal/proposal_test.go @@ -4,13 +4,13 @@ import ( "testing" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" - "github.com/Finschia/finschia-sdk/simapp" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" ) @@ -88,7 +88,7 @@ func TestAbortProposal(t *testing.T) { app := simapp.Setup(checkTx) testdata.RegisterInterfaces(app.InterfaceRegistry()) - ctx := app.BaseApp.NewContext(checkTx, tmproto.Header{}) + ctx := app.BaseApp.NewContext(checkTx, cmtproto.Header{}) impl := internal.NewKeeper( app.AppCodec(), app.GetKey(foundation.ModuleName), diff --git a/x/foundation/keeper/internal/tally.go b/x/foundation/keeper/internal/tally.go index 87849c9e49..ca9944b2a0 100644 --- a/x/foundation/keeper/internal/tally.go +++ b/x/foundation/keeper/internal/tally.go @@ -1,8 +1,9 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/treasury.go b/x/foundation/keeper/internal/treasury.go index 43f8c20cff..45e197dfe5 100644 --- a/x/foundation/keeper/internal/treasury.go +++ b/x/foundation/keeper/internal/treasury.go @@ -1,8 +1,9 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/treasury_test.go b/x/foundation/keeper/internal/treasury_test.go index e2bd7d94d8..6760a8b3a3 100644 --- a/x/foundation/keeper/internal/treasury_test.go +++ b/x/foundation/keeper/internal/treasury_test.go @@ -1,8 +1,9 @@ package internal_test import ( - sdk "github.com/Finschia/finschia-sdk/types" - authtypes "github.com/Finschia/finschia-sdk/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/vote.go b/x/foundation/keeper/internal/vote.go index 5f9e0c8567..9b13096488 100644 --- a/x/foundation/keeper/internal/vote.go +++ b/x/foundation/keeper/internal/vote.go @@ -1,8 +1,9 @@ package internal import ( - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/vote_test.go b/x/foundation/keeper/internal/vote_test.go index 7b6a20a8eb..849f5d469c 100644 --- a/x/foundation/keeper/internal/vote_test.go +++ b/x/foundation/keeper/internal/vote_test.go @@ -3,7 +3,8 @@ package internal_test import ( "time" - sdk "github.com/Finschia/finschia-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index 5f506b7c34..bac6c8c55c 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -7,13 +7,14 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" - "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/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" "github.com/Finschia/finschia-sdk/x/foundation/keeper" diff --git a/x/foundation/msgs.go b/x/foundation/msgs.go index 8a31e5ec0a..396a986cdb 100644 --- a/x/foundation/msgs.go +++ b/x/foundation/msgs.go @@ -3,9 +3,10 @@ package foundation import ( "github.com/gogo/protobuf/proto" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/Finschia/finschia-sdk/x/foundation/codec" ) diff --git a/x/foundation/msgs_test.go b/x/foundation/msgs_test.go index ff79d17620..924598b38e 100644 --- a/x/foundation/msgs_test.go +++ b/x/foundation/msgs_test.go @@ -7,11 +7,12 @@ import ( "github.com/stretchr/testify/require" - "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - "github.com/Finschia/finschia-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/proposal.go b/x/foundation/proposal.go index a2b3727aef..a5ae4691c3 100644 --- a/x/foundation/proposal.go +++ b/x/foundation/proposal.go @@ -1,10 +1,10 @@ package foundation import ( - codectypes "github.com/Finschia/finschia-sdk/codec/types" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - govtypes "github.com/Finschia/finschia-sdk/x/gov/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) const ( From 62c9184e9185d6f2b83eaa283bccb17cf87f953a Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 27 Dec 2023 05:09:36 +0000 Subject: [PATCH 03/26] Update logic --- go.mod | 76 +- go.sum | 739 +--------- x/foundation/client/cli/tx.go | 8 +- x/foundation/client/testutil/grpc.go | 5 +- x/foundation/client/testutil/query.go | 5 +- x/foundation/client/testutil/suite.go | 36 +- x/foundation/client/testutil/tx.go | 38 +- x/foundation/codec.go | 14 +- x/foundation/foundation.go | 40 +- x/foundation/genesis.go | 8 +- x/foundation/go.mod | 158 ++ x/foundation/go.sum | 1285 +++++++++++++++++ x/foundation/keeper/exported.go | 17 +- x/foundation/keeper/internal/abci.go | 15 +- x/foundation/keeper/internal/censorship.go | 33 +- x/foundation/keeper/internal/exec.go | 19 +- x/foundation/keeper/internal/grpc_query.go | 28 +- x/foundation/keeper/internal/invariants.go | 6 +- x/foundation/keeper/internal/keeper.go | 14 +- x/foundation/keeper/internal/member.go | 35 +- x/foundation/keeper/internal/migrations.go | 2 +- .../keeper/internal/migrations/v2/store.go | 13 +- x/foundation/keeper/internal/msg_server.go | 7 +- x/foundation/keeper/internal/params.go | 4 +- x/foundation/keeper/internal/proposal.go | 45 +- .../keeper/internal/proposal_handler.go | 11 +- x/foundation/keeper/internal/treasury.go | 9 +- x/foundation/keeper/internal/vote.go | 24 +- x/foundation/module/module.go | 33 +- x/foundation/proposal.go | 14 +- 30 files changed, 1751 insertions(+), 990 deletions(-) create mode 100644 x/foundation/go.mod create mode 100644 x/foundation/go.sum diff --git a/go.mod b/go.mod index 3928594e6c..d8ca3ef686 100644 --- a/go.mod +++ b/go.mod @@ -6,21 +6,10 @@ module github.com/Finschia/finschia-sdk require ( cosmossdk.io/math v1.2.0 - cosmossdk.io/store v1.0.1 - github.com/cometbft/cometbft v0.38.2 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.50.2 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.11 - github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.3 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 github.com/tendermint/go-amino v0.16.0 - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 ) require ( @@ -30,92 +19,60 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/log v1.2.1 // indirect + cosmossdk.io/store v1.0.1 // indirect cosmossdk.io/x/tx v0.12.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect - github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v0.38.2 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/gogoproto v1.4.11 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.6.0 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/getsentry/sentry-go v0.25.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect - github.com/golang/mock v1.6.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/orderedcode v0.0.1 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.1 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/huandu/skiplist v1.2.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect - github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.6 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/minio/highwayhash v1.0.2 // indirect - github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect - github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/onsi/gomega v1.26.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -123,36 +80,27 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.31.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tidwall/btree v1.7.0 // indirect - github.com/zondax/hid v0.9.2 // indirect - github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.19.0 // indirect - golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect + google.golang.org/grpc v1.59.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 10bf957011..c7889db28f 100644 --- a/go.sum +++ b/go.sum @@ -1,40 +1,5 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -53,15 +18,11 @@ cosmossdk.io/store v1.0.1 h1:XBDhCqlL+2MUgE8CHWwndKVJ4beX+TyaPIjB5SV62dM= cosmossdk.io/store v1.0.1/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/tx v0.12.0 h1:Ry2btjQdrfrje9qZ3iZeZSmDArjgxUJMMcLMrX4wj5U= cosmossdk.io/x/tx v0.12.0/go.mod h1:qTth2coAGkwCwOCjqQ8EAQg+9udXNRzcnSbMgGKGEI0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -70,61 +31,29 @@ github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d h1:7x3LqhrO4lXTt github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 h1:lm4mGuo+arhc/GrVm8hjGE3CCcfSQEvxI+uZODfEhQY= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= -github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= -github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -133,33 +62,10 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= -github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= -github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= -github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= @@ -172,17 +78,12 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= @@ -193,7 +94,6 @@ github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= -github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= @@ -205,9 +105,7 @@ github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStK github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -228,120 +126,57 @@ github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkz github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= -github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -349,93 +184,47 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -443,83 +232,42 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= -github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= -github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -528,126 +276,63 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= -github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= -github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= -github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -655,77 +340,45 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -735,40 +388,24 @@ github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -779,465 +416,120 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= -golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1245,68 +537,39 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/foundation/client/cli/tx.go b/x/foundation/client/cli/tx.go index 70aa08d742..8b1a98ab5a 100644 --- a/x/foundation/client/cli/tx.go +++ b/x/foundation/client/cli/tx.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -784,6 +784,9 @@ Example of the content of messages-json: } content := foundation.NewFoundationExecProposal(title, description, messages) + if err := content.ValidateBasic(); err != nil { + return err + } depositStr, err := cmd.Flags().GetString(govcli.FlagDeposit) if err != nil { @@ -798,9 +801,6 @@ Example of the content of messages-json: if err != nil { return err } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, diff --git a/x/foundation/client/testutil/grpc.go b/x/foundation/client/testutil/grpc.go index 33a5ae36a0..701ae708c9 100644 --- a/x/foundation/client/testutil/grpc.go +++ b/x/foundation/client/testutil/grpc.go @@ -5,8 +5,9 @@ import ( "github.com/gogo/protobuf/proto" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -28,7 +29,7 @@ func (s *IntegrationTestSuite) TestGRPCParams() { &foundation.QueryParamsResponse{}, &foundation.QueryParamsResponse{ Params: foundation.Params{ - FoundationTax: sdk.MustNewDecFromStr("0.2"), + FoundationTax: math.LegacyMustNewDecFromStr("0.2"), }, }, }, diff --git a/x/foundation/client/testutil/query.go b/x/foundation/client/testutil/query.go index 59427e620e..2af49a1869 100644 --- a/x/foundation/client/testutil/query.go +++ b/x/foundation/client/testutil/query.go @@ -6,9 +6,10 @@ import ( "github.com/gogo/protobuf/proto" cmtcli "github.com/cometbft/cometbft/libs/cli" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" @@ -31,7 +32,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdParams() { true, &foundation.QueryParamsResponse{ Params: foundation.Params{ - FoundationTax: sdk.MustNewDecFromStr("0.2"), + FoundationTax: math.LegacyMustNewDecFromStr("0.2"), }, }, }, diff --git a/x/foundation/client/testutil/suite.go b/x/foundation/client/testutil/suite.go index a6c66a8673..15c1a09a52 100644 --- a/x/foundation/client/testutil/suite.go +++ b/x/foundation/client/testutil/suite.go @@ -7,6 +7,10 @@ import ( "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + "cosmossdk.io/core/address" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -35,12 +39,14 @@ type IntegrationTestSuite struct { stranger sdk.AccAddress proposalID uint64 + + addressCodec address.Codec } var commonArgs = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100)))), } func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { @@ -51,6 +57,8 @@ func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") testdata.RegisterInterfaces(s.cfg.InterfaceRegistry) + s.addressCodec = addresscodec.NewBech32Codec("link") + genesisState := s.cfg.GenesisState var foundationData foundation.GenesisState @@ -58,7 +66,7 @@ func (s *IntegrationTestSuite) SetupSuite() { // enable foundation tax params := foundation.Params{ - FoundationTax: sdk.MustNewDecFromStr("0.2"), + FoundationTax: math.LegacyMustNewDecFromStr("0.2"), } foundationData.Params = params @@ -81,9 +89,9 @@ func (s *IntegrationTestSuite) SetupSuite() { } info := foundation.DefaultFoundation() - info.TotalWeight = sdk.NewDecFromInt(sdk.NewInt(int64(len(foundationData.Members)))) + info.TotalWeight = math.LegacyNewDecFromInt(math.NewInt(int64(len(foundationData.Members)))) err := info.SetDecisionPolicy(&foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: 7 * 24 * time.Hour, }, @@ -114,7 +122,8 @@ func (s *IntegrationTestSuite) SetupSuite() { genesisState[foundation.ModuleName] = foundationDataBz s.cfg.GenesisState = genesisState - s.network = network.New(s.T(), s.cfg) + s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg) + s.Require().NoError(err) _, err = s.network.WaitForHeight(1) s.Require().NoError(err) @@ -211,11 +220,14 @@ func (s *IntegrationTestSuite) msgToString(msg sdk.Msg) string { // creates an account func (s *IntegrationTestSuite) createMnemonic(uid string) (string, sdk.AccAddress) { - cstore := keyring.NewInMemory() + cstore := keyring.NewInMemory(s.cfg.Codec) info, mnemonic, err := cstore.NewMnemonic(uid, keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) s.Require().NoError(err) - return mnemonic, info.GetAddress() + addr, err := info.GetAddress() + s.Require().NoError(err) + + return mnemonic, addr } // creates an account and send some coins to it for the future transactions. @@ -224,15 +236,17 @@ func (s *IntegrationTestSuite) createAccount(uid, mnemonic string) { info, err := val.ClientCtx.Keyring.NewAccount(uid, mnemonic, keyring.DefaultBIP39Passphrase, sdk.FullFundraiserPath, hd.Secp256k1) s.Require().NoError(err) - addr := info.GetAddress() - fee := sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1000))) + addr, err := info.GetAddress() + s.Require().NoError(err) + + fee := sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1000))) args := append([]string{ val.Address.String(), addr.String(), fee.String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), }, commonArgs...) - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, bankcli.NewSendTxCmd(), args) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, bankcli.NewSendTxCmd(s.addressCodec), args) s.Require().NoError(err) var res sdk.TxResponse diff --git a/x/foundation/client/testutil/tx.go b/x/foundation/client/testutil/tx.go index 32148222a8..fe44e09dd0 100644 --- a/x/foundation/client/testutil/tx.go +++ b/x/foundation/client/testutil/tx.go @@ -4,6 +4,8 @@ import ( "fmt" "time" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -19,8 +21,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdFundTreasury() { commonArgs := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } testCases := map[string]struct { @@ -30,14 +32,14 @@ func (s *IntegrationTestSuite) TestNewTxCmdFundTreasury() { "valid transaction": { []string{ val.Address.String(), - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), }, true, }, "wrong number of args": { []string{ val.Address.String(), - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), "extra", }, false, @@ -77,7 +79,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdWithdrawFromTreasury() { []string{ s.authority.String(), s.stranger.String(), - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), }, true, }, @@ -85,7 +87,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdWithdrawFromTreasury() { []string{ s.authority.String(), s.stranger.String(), - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.OneInt())).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), "extra", }, false, @@ -175,7 +177,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { []string{ s.authority.String(), doMarshal(&foundation.ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(10), + Threshold: math.LegacyNewDec(10), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, @@ -187,7 +189,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { []string{ s.authority.String(), doMarshal(&foundation.ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(10), + Threshold: math.LegacyNewDec(10), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, @@ -221,8 +223,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdSubmitProposal() { commonArgs := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } proposers := `["%s"]` @@ -273,8 +275,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdWithdrawProposal() { commonArgs := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } id := s.submitProposal(testdata.NewTestMsg(s.authority), false) @@ -323,8 +325,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdVote() { commonArgs := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } id := s.submitProposal(testdata.NewTestMsg(s.authority), false) @@ -377,8 +379,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdExec() { commonArgs := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } testCases := map[string]struct { @@ -489,8 +491,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdLeaveFoundation() { commonArgs := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, s.leavingMember), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } testCases := map[string]struct { diff --git a/x/foundation/codec.go b/x/foundation/codec.go index 8f98051310..939ce1230c 100644 --- a/x/foundation/codec.go +++ b/x/foundation/codec.go @@ -6,11 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - fdncodec "github.com/Finschia/finschia-sdk/x/foundation/codec" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec @@ -77,11 +73,3 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &FoundationExecProposal{}, ) } - -func init() { - // 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/foundation/foundation.go b/x/foundation/foundation.go index d8d2318181..abb1bd31b9 100644 --- a/x/foundation/foundation.go +++ b/x/foundation/foundation.go @@ -6,6 +6,9 @@ import ( "github.com/gogo/protobuf/proto" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -39,8 +42,13 @@ func validateMsgs(msgs []sdk.Msg) error { } for i, msg := range msgs { - if err := msg.ValidateBasic(); err != nil { - return sdkerrors.Wrapf(err, "msg %d", i) + m, ok := msg.(sdk.HasValidateBasic) + if !ok { + continue + } + + if err := m.ValidateBasic(); err != nil { + return errorsmod.Wrapf(err, "msg %d", i) } } @@ -84,9 +92,9 @@ func (p Params) ValidateBasic() error { func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair([]byte(ParamKeyFoundationTax), &p.FoundationTax, func(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(math.LegacyDec) if !ok { - return sdkerrors.Wrap(sdkerrors.ErrInvalidType.Wrapf("%T", i), ParamKeyFoundationTax) + return errorsmod.Wrap(sdkerrors.ErrInvalidType.Wrapf("%T", i), ParamKeyFoundationTax) } return validateRatio(v, ParamKeyFoundationTax) @@ -129,7 +137,7 @@ type DecisionPolicy interface { // Allow defines policy-specific logic to allow a proposal to pass or not, // based on its tally result, the foundation's total power and the time since // the proposal was submitted. - Allow(tallyResult TallyResult, totalPower sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) + Allow(tallyResult TallyResult, totalPower math.LegacyDec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) ValidateBasic() error Validate(info FoundationInfo, config Config) error @@ -137,10 +145,10 @@ type DecisionPolicy interface { // DefaultTallyResult returns a TallyResult with all counts set to 0. func DefaultTallyResult() TallyResult { - return NewTallyResult(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) + return NewTallyResult(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()) } -func NewTallyResult(yes, abstain, no, veto sdk.Dec) TallyResult { +func NewTallyResult(yes, abstain, no, veto math.LegacyDec) TallyResult { return TallyResult{ YesCount: yes, AbstainCount: abstain, @@ -150,7 +158,7 @@ func NewTallyResult(yes, abstain, no, veto sdk.Dec) TallyResult { } func (t *TallyResult) Add(option VoteOption) error { - weight := sdk.OneDec() + weight := math.LegacyOneDec() switch option { case VOTE_OPTION_YES: @@ -169,8 +177,8 @@ func (t *TallyResult) Add(option VoteOption) error { } // TotalCounts is the sum of all weights. -func (t TallyResult) TotalCounts() sdk.Dec { - totalCounts := sdk.ZeroDec() +func (t TallyResult) TotalCounts() math.LegacyDec { + totalCounts := math.LegacyZeroDec() totalCounts = totalCounts.Add(t.YesCount) totalCounts = totalCounts.Add(t.NoCount) @@ -284,7 +292,7 @@ func validateDecisionPolicyWindowsBasic(windows *DecisionPolicyWindows) error { var _ DecisionPolicy = (*ThresholdDecisionPolicy)(nil) -func (p ThresholdDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { +func (p ThresholdDecisionPolicy) Allow(result TallyResult, totalWeight math.LegacyDec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { if sinceSubmission < p.Windows.MinExecutionPeriod { return nil, sdkerrors.ErrUnauthorized.Wrapf("must wait %s after submission before execution, currently at %s", p.Windows.MinExecutionPeriod, sinceSubmission) } @@ -294,7 +302,7 @@ func (p ThresholdDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, // and the threshold doesn't, we can end up with threshold > total_weight. // In this case, as long as everyone votes yes (in which case // `yesCount`==`realThreshold`), then the proposal still passes. - realThreshold := sdk.MinDec(p.Threshold, totalWeight) + realThreshold := math.LegacyMinDec(p.Threshold, totalWeight) if result.YesCount.GTE(realThreshold) { return &DecisionPolicyResult{Allow: true, Final: true}, nil } @@ -341,7 +349,7 @@ func (p ThresholdDecisionPolicy) Validate(info FoundationInfo, config Config) er var _ DecisionPolicy = (*PercentageDecisionPolicy)(nil) -func (p PercentageDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { +func (p PercentageDecisionPolicy) Allow(result TallyResult, totalWeight math.LegacyDec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { if sinceSubmission < p.Windows.MinExecutionPeriod { return nil, sdkerrors.ErrUnauthorized.Wrapf("must wait %s after submission before execution, currently at %s", p.Windows.MinExecutionPeriod, sinceSubmission) } @@ -398,12 +406,12 @@ func (p PercentageDecisionPolicy) Validate(info FoundationInfo, config Config) e return nil } -func validateRatio(ratio sdk.Dec, name string) error { +func validateRatio(ratio math.LegacyDec, name string) error { if ratio.IsNil() { return sdkerrors.ErrInvalidRequest.Wrapf("%s is nil", name) } - if ratio.GT(sdk.OneDec()) || ratio.IsNegative() { + if ratio.GT(math.LegacyOneDec()) || ratio.IsNegative() { return sdkerrors.ErrInvalidRequest.Wrapf("%s must be >= 0 and <= 1", name) } return nil @@ -411,7 +419,7 @@ func validateRatio(ratio sdk.Dec, name string) error { var _ DecisionPolicy = (*OutsourcingDecisionPolicy)(nil) -func (p OutsourcingDecisionPolicy) Allow(result TallyResult, totalWeight sdk.Dec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { +func (p OutsourcingDecisionPolicy) Allow(result TallyResult, totalWeight math.LegacyDec, sinceSubmission time.Duration) (*DecisionPolicyResult, error) { return nil, sdkerrors.ErrInvalidRequest.Wrap(p.Description) } diff --git a/x/foundation/genesis.go b/x/foundation/genesis.go index abdcbc2d17..4d699d2968 100644 --- a/x/foundation/genesis.go +++ b/x/foundation/genesis.go @@ -3,6 +3,8 @@ package foundation import ( "github.com/gogo/protobuf/proto" + "cosmossdk.io/math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -20,7 +22,7 @@ func DefaultGenesisState() *GenesisState { func DefaultFoundation() FoundationInfo { return *FoundationInfo{ Version: 1, - TotalWeight: sdk.ZeroDec(), + TotalWeight: math.LegacyZeroDec(), }.WithDecisionPolicy(DefaultDecisionPolicy()) } @@ -36,7 +38,7 @@ func DefaultAuthority() sdk.AccAddress { func DefaultParams() Params { return Params{ - FoundationTax: sdk.ZeroDec(), + FoundationTax: math.LegacyZeroDec(), } } @@ -104,7 +106,7 @@ func ValidateGenesis(data GenesisState) error { // Is x/foundation outsourcing the proposal feature isOutsourcing := info.TotalWeight.IsZero() - if realWeight := sdk.NewDec(int64(len(data.Members))); !info.TotalWeight.Equal(realWeight) { + if realWeight := math.LegacyNewDec(int64(len(data.Members))); !info.TotalWeight.Equal(realWeight) { return sdkerrors.ErrInvalidRequest.Wrapf("total weight not match, %s != %s", info.TotalWeight, realWeight) } members := Members{Members: data.Members} diff --git a/x/foundation/go.mod b/x/foundation/go.mod new file mode 100644 index 0000000000..77d1cb98a8 --- /dev/null +++ b/x/foundation/go.mod @@ -0,0 +1,158 @@ +module github.com/Finschia/finschia-sdk/x/foundation + +go 1.21 + +require ( + cosmossdk.io/core v0.11.0 + cosmossdk.io/errors v1.0.0 + cosmossdk.io/log v1.2.1 + cosmossdk.io/math v1.2.0 + cosmossdk.io/store v1.0.1 + github.com/cometbft/cometbft v0.38.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.3 + github.com/cosmos/cosmos-sdk v0.50.2 + github.com/cosmos/gogoproto v1.4.11 + github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.5.3 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/spf13/cobra v1.7.0 + github.com/stretchr/testify v1.8.4 + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 +) + +require ( + cosmossdk.io/api v0.7.2 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/x/tx v0.12.0 // indirect + filippo.io/edwards25519 v1.0.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-db v1.0.0 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/emicklei/dot v1.6.0 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/golang/glog v1.2.0 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.7 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.31.0 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.16.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.8 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.6 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) + +replace github.com/cosmos/cosmos-sdk => github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 diff --git a/x/foundation/go.sum b/x/foundation/go.sum new file mode 100644 index 0000000000..cee7e3e8d5 --- /dev/null +++ b/x/foundation/go.sum @@ -0,0 +1,1285 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= +cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/store v1.0.1 h1:XBDhCqlL+2MUgE8CHWwndKVJ4beX+TyaPIjB5SV62dM= +cosmossdk.io/store v1.0.1/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.12.0 h1:Ry2btjQdrfrje9qZ3iZeZSmDArjgxUJMMcLMrX4wj5U= +cosmossdk.io/x/tx v0.12.0/go.mod h1:qTth2coAGkwCwOCjqQ8EAQg+9udXNRzcnSbMgGKGEI0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 h1:lm4mGuo+arhc/GrVm8hjGE3CCcfSQEvxI+uZODfEhQY= +github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 h1:g+Y6IAf28JinY3zNdXwpw71SBGhLEb72kGQgiR5XKZM= +github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft v0.38.2 h1:io0JCh5EPxINKN5ZMI5hCdpW3QVZRy+o8qWe3mlJa/8= +github.com/cometbft/cometbft v0.38.2/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg= +github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= +github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= +github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= +github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= +github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= +github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= +github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= +github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= +github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= +github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go index 3be18e5e9c..37b274f244 100644 --- a/x/foundation/keeper/exported.go +++ b/x/foundation/keeper/exported.go @@ -1,10 +1,13 @@ package keeper import ( + addresscodec "cosmossdk.io/core/address" + "cosmossdk.io/core/store" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/Finschia/finschia-sdk/x/foundation" @@ -25,7 +28,8 @@ type keeper struct { func NewKeeper( cdc codec.Codec, - key sdk.StoreKey, + addressCodec addresscodec.Codec, + key store.KVStoreService, router *baseapp.MsgServiceRouter, authKeeper foundation.AuthKeeper, bankKeeper foundation.BankKeeper, @@ -37,6 +41,7 @@ func NewKeeper( return &keeper{ impl: internal.NewKeeper( cdc, + addressCodec, key, router, authKeeper, @@ -81,14 +86,14 @@ func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { internal.RegisterInvariants(ir, impl) } -func BeginBlocker(ctx sdk.Context, k Keeper) { +func BeginBlocker(ctx sdk.Context, k Keeper) error { impl := k.(*keeper).impl - internal.BeginBlocker(ctx, impl) + return internal.BeginBlocker(ctx, impl) } -func EndBlocker(ctx sdk.Context, k Keeper) { +func EndBlocker(ctx sdk.Context, k Keeper) error { impl := k.(*keeper).impl - internal.EndBlocker(ctx, impl) + return internal.EndBlocker(ctx, impl) } func NewFoundationProposalsHandler(k Keeper) govtypes.Handler { diff --git a/x/foundation/keeper/internal/abci.go b/x/foundation/keeper/internal/abci.go index 25c91c10af..465060a045 100644 --- a/x/foundation/keeper/internal/abci.go +++ b/x/foundation/keeper/internal/abci.go @@ -11,15 +11,22 @@ import ( // BeginBlocker withdraws rewards from fee-collector before the distribution // module's withdraw. -func BeginBlocker(ctx sdk.Context, k Keeper) { +func BeginBlocker(ctx sdk.Context, k Keeper) error { defer telemetry.ModuleMeasureSince(foundation.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) if err := k.CollectFoundationTax(ctx); err != nil { - panic(err) + return err } + + return nil } -func EndBlocker(ctx sdk.Context, k Keeper) { - k.UpdateTallyOfVPEndProposals(ctx) +func EndBlocker(ctx sdk.Context, k Keeper) error { + if err := k.UpdateTallyOfVPEndProposals(ctx); err != nil { + return err + } + k.PruneExpiredProposals(ctx) + + return nil } diff --git a/x/foundation/keeper/internal/censorship.go b/x/foundation/keeper/internal/censorship.go index bba05750b0..09d49a35b7 100644 --- a/x/foundation/keeper/internal/censorship.go +++ b/x/foundation/keeper/internal/censorship.go @@ -1,6 +1,9 @@ package internal import ( + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -8,9 +11,12 @@ import ( ) func (k Keeper) GetCensorship(ctx sdk.Context, msgTypeURL string) (*foundation.Censorship, error) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := censorshipKey(msgTypeURL) - bz := store.Get(key) + bz, err := store.Get(key) + if err != nil { + return nil, err + } if bz == nil { return nil, sdkerrors.ErrNotFound.Wrap("censorship not found") } @@ -46,7 +52,7 @@ func (k Keeper) UpdateCensorship(ctx sdk.Context, censorship foundation.Censorsh } func (k Keeper) SetCensorship(ctx sdk.Context, censorship foundation.Censorship) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := censorshipKey(censorship.MsgTypeUrl) if censorship.Authority == foundation.CensorshipAuthorityUnspecified { @@ -59,8 +65,9 @@ func (k Keeper) SetCensorship(ctx sdk.Context, censorship foundation.Censorship) } func (k Keeper) iterateCensorships(ctx sdk.Context, fn func(censorship foundation.Censorship) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, censorshipKeyPrefix) + store := k.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + iterator := storetypes.KVStorePrefixIterator(adapter, censorshipKeyPrefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -135,9 +142,12 @@ func (k Keeper) pruneAuthorizations(ctx sdk.Context, msgTypeURL string) { } func (k Keeper) GetAuthorization(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL string) (foundation.Authorization, error) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := grantKey(grantee, msgTypeURL) - bz := store.Get(key) + bz, err := store.Get(key) + if err != nil { + return nil, err + } if bz == nil { return nil, sdkerrors.ErrUnauthorized.Wrap("authorization not found") } @@ -151,7 +161,7 @@ func (k Keeper) GetAuthorization(ctx sdk.Context, grantee sdk.AccAddress, msgTyp } func (k Keeper) setAuthorization(ctx sdk.Context, grantee sdk.AccAddress, authorization foundation.Authorization) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := grantKey(grantee, authorization.MsgTypeURL()) bz, err := k.cdc.MarshalInterface(authorization) @@ -162,7 +172,7 @@ func (k Keeper) setAuthorization(ctx sdk.Context, grantee sdk.AccAddress, author } func (k Keeper) deleteAuthorization(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL string) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := grantKey(grantee, msgTypeURL) store.Delete(key) } @@ -203,8 +213,9 @@ func (k Keeper) iterateAuthorizations(ctx sdk.Context, fn func(grantee sdk.AccAd } func (k Keeper) iterateAuthorizationsImpl(ctx sdk.Context, prefix []byte, fn func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, prefix) + store := k.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + iterator := storetypes.KVStorePrefixIterator(adapter, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { diff --git a/x/foundation/keeper/internal/exec.go b/x/foundation/keeper/internal/exec.go index e8703ec30b..680e1c9bad 100644 --- a/x/foundation/keeper/internal/exec.go +++ b/x/foundation/keeper/internal/exec.go @@ -1,8 +1,12 @@ package internal import ( + "bytes" "fmt" + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -10,14 +14,19 @@ import ( ) // ensureMsgAuthz checks that if a message requires signers that all of them are equal to the given account address of the authority. -func ensureMsgAuthz(msgs []sdk.Msg, authority sdk.AccAddress) error { +func ensureMsgAuthz(msgs []sdk.Msg, authority sdk.AccAddress, cdc codec.Codec) error { for _, msg := range msgs { // In practice, GetSigners() should return a non-empty array without // duplicates, so the code below is equivalent to: // `msgs[i].GetSigners()[0] == authority` // but we prefer to loop through all GetSigners just to be sure. - for _, signer := range msg.GetSigners() { - if !authority.Equals(signer) { + signers, _, err := cdc.GetMsgV1Signers(msg) + if err != nil { + return err + } + + for _, signer := range signers { + if !bytes.Equal(signer, authority) { return sdkerrors.ErrUnauthorized.Wrapf("bad signer; expected %s, got %s", authority, signer) } } @@ -89,7 +98,7 @@ func (k Keeper) doExecuteMsgs(ctx sdk.Context, proposal foundation.Proposal) ([] results := make([]sdk.Result, len(msgs)) authority := sdk.MustAccAddressFromBech32(k.GetAuthority()) - if err := ensureMsgAuthz(msgs, authority); err != nil { + if err := ensureMsgAuthz(msgs, authority, k.cdc); err != nil { return nil, err } @@ -100,7 +109,7 @@ func (k Keeper) doExecuteMsgs(ctx sdk.Context, proposal foundation.Proposal) ([] } r, err := handler(ctx, msg) if err != nil { - return nil, sdkerrors.Wrapf(err, "message %q at position %d", msg, i) + return nil, errorsmod.Wrapf(err, "message %q at position %d", msg, i) } if r != nil { results[i] = *r diff --git a/x/foundation/keeper/internal/grpc_query.go b/x/foundation/keeper/internal/grpc_query.go index 9bd63a5318..bcfce8f808 100644 --- a/x/foundation/keeper/internal/grpc_query.go +++ b/x/foundation/keeper/internal/grpc_query.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/store/prefix" + "github.com/cosmos/cosmos-sdk/runtime" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -86,8 +87,9 @@ func (s queryServer) Members(c context.Context, req *foundation.QueryMembersRequ var members []foundation.Member ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(s.keeper.storeKey) - memberStore := prefix.NewStore(store, memberKeyPrefix) + store := s.keeper.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + memberStore := prefix.NewStore(adapter, memberKeyPrefix) pageRes, err := query.Paginate(memberStore, req.Pagination, func(key, value []byte) error { var member foundation.Member s.keeper.cdc.MustUnmarshal(value, &member) @@ -122,8 +124,9 @@ func (s queryServer) Proposals(c context.Context, req *foundation.QueryProposals var proposals []foundation.Proposal ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(s.keeper.storeKey) - proposalStore := prefix.NewStore(store, proposalKeyPrefix) + store := s.keeper.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + proposalStore := prefix.NewStore(adapter, proposalKeyPrefix) pageRes, err := query.Paginate(proposalStore, req.Pagination, func(key, value []byte) error { var proposal foundation.Proposal s.keeper.cdc.MustUnmarshal(value, &proposal) @@ -162,8 +165,9 @@ func (s queryServer) Votes(c context.Context, req *foundation.QueryVotesRequest) var votes []foundation.Vote ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(s.keeper.storeKey) - voteStore := prefix.NewStore(store, append(voteKeyPrefix, Uint64ToBytes(req.ProposalId)...)) + store := s.keeper.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + voteStore := prefix.NewStore(adapter, append(voteKeyPrefix, Uint64ToBytes(req.ProposalId)...)) pageRes, err := query.Paginate(voteStore, req.Pagination, func(key, value []byte) error { var vote foundation.Vote s.keeper.cdc.MustUnmarshal(value, &vote) @@ -203,8 +207,9 @@ func (s queryServer) Censorships(c context.Context, req *foundation.QueryCensors var censorships []foundation.Censorship ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(s.keeper.storeKey) - censorshipStore := prefix.NewStore(store, censorshipKeyPrefix) + store := s.keeper.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + censorshipStore := prefix.NewStore(adapter, censorshipKeyPrefix) pageRes, err := query.Paginate(censorshipStore, req.Pagination, func(key, value []byte) error { var censorship foundation.Censorship s.keeper.cdc.MustUnmarshal(value, &censorship) @@ -229,11 +234,12 @@ func (s queryServer) Grants(c context.Context, req *foundation.QueryGrantsReques } ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(s.keeper.storeKey) + store := s.keeper.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) if req.MsgTypeUrl != "" { keyPrefix := grantKey(grantee, req.MsgTypeUrl) - grantStore := prefix.NewStore(store, keyPrefix) + grantStore := prefix.NewStore(adapter, keyPrefix) var authorizations []*codectypes.Any _, err = query.Paginate(grantStore, req.Pagination, func(key, value []byte) error { @@ -263,7 +269,7 @@ func (s queryServer) Grants(c context.Context, req *foundation.QueryGrantsReques } keyPrefix := grantKeyPrefixByGrantee(grantee) - grantStore := prefix.NewStore(store, keyPrefix) + grantStore := prefix.NewStore(adapter, keyPrefix) var authorizations []*codectypes.Any pageRes, err := query.Paginate(grantStore, req.Pagination, func(key, value []byte) error { diff --git a/x/foundation/keeper/internal/invariants.go b/x/foundation/keeper/internal/invariants.go index f8566e67db..68d8c54467 100644 --- a/x/foundation/keeper/internal/invariants.go +++ b/x/foundation/keeper/internal/invariants.go @@ -3,6 +3,8 @@ package internal import ( "fmt" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" @@ -31,7 +33,7 @@ func ModuleAccountInvariant(k Keeper) sdk.Invariant { treasury := k.GetTreasury(ctx) msg := fmt.Sprintf("coins in the treasury; expected %s, got %s\n", treasury, balance) - broken := !treasury.IsEqual(sdk.NewDecCoinsFromCoins(balance...)) + broken := !treasury.Equal(sdk.NewDecCoinsFromCoins(balance...)) return sdk.FormatInvariant(foundation.ModuleName, moduleAccountInvariant, msg), broken } @@ -40,7 +42,7 @@ func ModuleAccountInvariant(k Keeper) sdk.Invariant { func TotalWeightInvariant(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { expected := k.GetFoundationInfo(ctx).TotalWeight - actual := sdk.NewDec(int64(len(k.GetMembers(ctx)))) + actual := math.LegacyNewDec(int64(len(k.GetMembers(ctx)))) msg := fmt.Sprintf("total weight of foundation; expected %s, got %s\n", expected, actual) broken := !actual.Equal(expected) diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index 340e715a19..1dad4fa8a1 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -1,7 +1,9 @@ package internal import ( - "github.com/cometbft/cometbft/libs/log" + addresscodec "cosmossdk.io/core/address" + "cosmossdk.io/core/store" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" @@ -15,9 +17,9 @@ import ( type Keeper struct { // The codec for binary encoding/decoding. cdc codec.Codec + addressCodec addresscodec.Codec - // The (unexposed) keys used to access the stores from the Context. - storeKey sdk.StoreKey + storeService store.KVStoreService router *baseapp.MsgServiceRouter @@ -43,7 +45,8 @@ type Keeper struct { func NewKeeper( cdc codec.Codec, - key sdk.StoreKey, + addressCodec addresscodec.Codec, + storeService store.KVStoreService, router *baseapp.MsgServiceRouter, authKeeper foundation.AuthKeeper, bankKeeper foundation.BankKeeper, @@ -68,7 +71,8 @@ func NewKeeper( return Keeper{ cdc: cdc, - storeKey: key, + addressCodec: addressCodec, + storeService: storeService, router: router, authKeeper: authKeeper, bankKeeper: bankKeeper, diff --git a/x/foundation/keeper/internal/member.go b/x/foundation/keeper/internal/member.go index c8af2f18d3..cf392be038 100644 --- a/x/foundation/keeper/internal/member.go +++ b/x/foundation/keeper/internal/member.go @@ -1,6 +1,10 @@ package internal import ( + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -36,8 +40,11 @@ func (k Keeper) UpdateDecisionPolicy(ctx sdk.Context, policy foundation.Decision } func (k Keeper) GetFoundationInfo(ctx sdk.Context) foundation.FoundationInfo { - store := ctx.KVStore(k.storeKey) - bz := store.Get(foundationInfoKey) + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(foundationInfoKey) + if err != nil { + panic(err) + } if len(bz) == 0 { panic("the foundation info must have been registered") } @@ -48,13 +55,13 @@ func (k Keeper) GetFoundationInfo(ctx sdk.Context) foundation.FoundationInfo { } func (k Keeper) SetFoundationInfo(ctx sdk.Context, info foundation.FoundationInfo) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) bz := k.cdc.MustMarshal(&info) store.Set(foundationInfoKey, bz) } func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberRequest) error { - weightUpdate := sdk.ZeroDec() + weightUpdate := math.LegacyZeroDec() for _, request := range members { new := foundation.Member{ Address: request.Address, @@ -74,14 +81,14 @@ func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberReques return err } if err == nil { // overwrite - weightUpdate = weightUpdate.Sub(sdk.OneDec()) + weightUpdate = weightUpdate.Sub(math.LegacyOneDec()) new.AddedAt = old.AddedAt } if request.Remove { k.deleteMember(ctx, addr) } else { - weightUpdate = weightUpdate.Add(sdk.OneDec()) + weightUpdate = weightUpdate.Add(math.LegacyOneDec()) k.SetMember(ctx, new) } } @@ -102,9 +109,12 @@ func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberReques } func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress) (*foundation.Member, error) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := memberKey(address) - bz := store.Get(key) + bz, err := store.Get(key) + if err != nil { + return nil, err + } if len(bz) == 0 { return nil, sdkerrors.ErrNotFound.Wrapf("No such member: %s", address) } @@ -116,7 +126,7 @@ func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress) (*foundation. } func (k Keeper) SetMember(ctx sdk.Context, member foundation.Member) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) addr := sdk.MustAccAddressFromBech32(member.Address) key := memberKey(addr) @@ -125,15 +135,16 @@ func (k Keeper) SetMember(ctx sdk.Context, member foundation.Member) { } func (k Keeper) deleteMember(ctx sdk.Context, address sdk.AccAddress) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := memberKey(address) store.Delete(key) } func (k Keeper) iterateMembers(ctx sdk.Context, fn func(member foundation.Member) (stop bool)) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) prefix := memberKeyPrefix - iterator := sdk.KVStorePrefixIterator(store, prefix) + adapter := runtime.KVStoreAdapter(store) + iterator := storetypes.KVStorePrefixIterator(adapter, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { diff --git a/x/foundation/keeper/internal/migrations.go b/x/foundation/keeper/internal/migrations.go index c52fc4d552..ea07324f7e 100644 --- a/x/foundation/keeper/internal/migrations.go +++ b/x/foundation/keeper/internal/migrations.go @@ -21,7 +21,7 @@ func NewMigrator(keeper Keeper) Migrator { func (m Migrator) Register(register func(moduleName string, fromVersion uint64, handler module.MigrationHandler) error) error { for fromVersion, handler := range map[uint64]module.MigrationHandler{ 1: func(ctx sdk.Context) error { - return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc, m.keeper.paramSpace) + return v2.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc, m.keeper.paramSpace) }, } { if err := register(foundation.ModuleName, fromVersion, handler); err != nil { diff --git a/x/foundation/keeper/internal/migrations/v2/store.go b/x/foundation/keeper/internal/migrations/v2/store.go index 683caf4e20..031e151f87 100644 --- a/x/foundation/keeper/internal/migrations/v2/store.go +++ b/x/foundation/keeper/internal/migrations/v2/store.go @@ -3,7 +3,7 @@ package v2 import ( "fmt" - storetypes "cosmossdk.io/store/types" + "cosmossdk.io/core/store" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,8 +12,8 @@ import ( ) // MigrateStore performs in-place store migrations from v1 to v2. -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, subspace Subspace) error { - store := ctx.KVStore(storeKey) +func MigrateStore(ctx sdk.Context, storeService store.KVStoreService, cdc codec.BinaryCodec, subspace Subspace) error { + store := storeService.OpenKVStore(ctx) // migrate params if err := migrateParams(ctx, store, cdc, subspace); err != nil { @@ -23,8 +23,11 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar return nil } -func migrateParams(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, subspace Subspace) error { - bz := store.Get(ParamsKey) +func migrateParams(ctx sdk.Context, store store.KVStore, cdc codec.BinaryCodec, subspace Subspace) error { + bz, err := store.Get(ParamsKey) + if err != nil { + return err + } if bz == nil { return fmt.Errorf("params not found") } diff --git a/x/foundation/keeper/internal/msg_server.go b/x/foundation/keeper/internal/msg_server.go index 15b7f10e5b..f66e40edf3 100644 --- a/x/foundation/keeper/internal/msg_server.go +++ b/x/foundation/keeper/internal/msg_server.go @@ -3,8 +3,9 @@ package internal import ( "context" + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -148,13 +149,13 @@ func (s msgServer) SubmitProposal(c context.Context, req *foundation.MsgSubmitPr } err = s.keeper.Vote(ctx, vote) if err != nil { - return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, sdkerrors.Wrap(err, "The proposal was created but failed on vote") + return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, errorsmod.Wrap(err, "The proposal was created but failed on vote") } } // Then try to execute the proposal if err = s.keeper.Exec(ctx, *id); err != nil { - return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, sdkerrors.Wrap(err, "The proposal was created but failed on exec") + return &foundation.MsgSubmitProposalResponse{ProposalId: *id}, errorsmod.Wrap(err, "The proposal was created but failed on exec") } } diff --git a/x/foundation/keeper/internal/params.go b/x/foundation/keeper/internal/params.go index 3c35210606..d2cdaa3d3f 100644 --- a/x/foundation/keeper/internal/params.go +++ b/x/foundation/keeper/internal/params.go @@ -1,6 +1,8 @@ package internal import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" @@ -18,7 +20,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params foundation.Params) { } // aliases -func (k Keeper) GetFoundationTax(ctx sdk.Context) sdk.Dec { +func (k Keeper) GetFoundationTax(ctx sdk.Context) math.LegacyDec { params := k.GetParams(ctx) return params.FoundationTax diff --git a/x/foundation/keeper/internal/proposal.go b/x/foundation/keeper/internal/proposal.go index d39ddf7ea8..1dc08bd7d8 100644 --- a/x/foundation/keeper/internal/proposal.go +++ b/x/foundation/keeper/internal/proposal.go @@ -3,6 +3,9 @@ package internal import ( "time" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -17,8 +20,11 @@ func (k Keeper) newProposalID(ctx sdk.Context) uint64 { } func (k Keeper) getPreviousProposalID(ctx sdk.Context) uint64 { - store := ctx.KVStore(k.storeKey) - bz := store.Get(previousProposalIDKey) + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(previousProposalIDKey) + if err != nil { + panic(err) + } if len(bz) == 0 { panic("previous proposal ID hasn't been set") } @@ -26,7 +32,7 @@ func (k Keeper) getPreviousProposalID(ctx sdk.Context) uint64 { } func (k Keeper) setPreviousProposalID(ctx sdk.Context, id uint64) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) store.Set(previousProposalIDKey, Uint64ToBytes(id)) } @@ -37,7 +43,7 @@ func (k Keeper) SubmitProposal(ctx sdk.Context, proposers []string, metadata str foundationInfo := k.GetFoundationInfo(ctx) authority := sdk.MustAccAddressFromBech32(k.GetAuthority()) - if err := ensureMsgAuthz(msgs, authority); err != nil { + if err := ensureMsgAuthz(msgs, authority, k.cdc); err != nil { return nil, err } @@ -140,9 +146,10 @@ func (k Keeper) GetProposals(ctx sdk.Context) []foundation.Proposal { } func (k Keeper) iterateProposals(ctx sdk.Context, fn func(proposal foundation.Proposal) (stop bool)) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) prefix := proposalKeyPrefix - iterator := sdk.KVStorePrefixIterator(store, prefix) + adapter := runtime.KVStoreAdapter(store) + iterator := storetypes.KVStorePrefixIterator(adapter, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -155,8 +162,9 @@ func (k Keeper) iterateProposals(ctx sdk.Context, fn func(proposal foundation.Pr } func (k Keeper) iterateProposalsByVPEnd(ctx sdk.Context, endTime time.Time, fn func(proposal foundation.Proposal) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iter := store.Iterator(proposalByVPEndKeyPrefix, sdk.PrefixEndBytes(append(proposalByVPEndKeyPrefix, sdk.FormatTimeBytes(endTime)...))) + store := k.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) + iter := adapter.Iterator(proposalByVPEndKeyPrefix, storetypes.PrefixEndBytes(append(proposalByVPEndKeyPrefix, sdk.FormatTimeBytes(endTime)...))) defer iter.Close() for ; iter.Valid(); iter.Next() { @@ -173,7 +181,7 @@ func (k Keeper) iterateProposalsByVPEnd(ctx sdk.Context, endTime time.Time, fn f } } -func (k Keeper) UpdateTallyOfVPEndProposals(ctx sdk.Context) { +func (k Keeper) UpdateTallyOfVPEndProposals(ctx sdk.Context) error { var proposals []foundation.Proposal k.iterateProposalsByVPEnd(ctx, ctx.BlockTime(), func(proposal foundation.Proposal) (stop bool) { proposals = append(proposals, proposal) @@ -189,16 +197,21 @@ func (k Keeper) UpdateTallyOfVPEndProposals(ctx sdk.Context) { } if err := k.doTallyAndUpdate(ctx, &proposal); err != nil { - panic(err) + return err } k.setProposal(ctx, proposal) } + + return nil } func (k Keeper) GetProposal(ctx sdk.Context, id uint64) (*foundation.Proposal, error) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := proposalKey(id) - bz := store.Get(key) + bz, err := store.Get(key) + if err != nil { + return nil, err + } if len(bz) == 0 { return nil, sdkerrors.ErrNotFound.Wrapf("No proposal for id: %d", id) } @@ -210,7 +223,7 @@ func (k Keeper) GetProposal(ctx sdk.Context, id uint64) (*foundation.Proposal, e } func (k Keeper) setProposal(ctx sdk.Context, proposal foundation.Proposal) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := proposalKey(proposal.Id) bz := k.cdc.MustMarshal(&proposal) @@ -218,19 +231,19 @@ func (k Keeper) setProposal(ctx sdk.Context, proposal foundation.Proposal) { } func (k Keeper) deleteProposal(ctx sdk.Context, proposalID uint64) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := proposalKey(proposalID) store.Delete(key) } func (k Keeper) addProposalToVPEndQueue(ctx sdk.Context, proposal foundation.Proposal) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := proposalByVPEndKey(proposal.VotingPeriodEnd, proposal.Id) store.Set(key, []byte{}) } func (k Keeper) removeProposalFromVPEndQueue(ctx sdk.Context, proposal foundation.Proposal) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := proposalByVPEndKey(proposal.VotingPeriodEnd, proposal.Id) store.Delete(key) } diff --git a/x/foundation/keeper/internal/proposal_handler.go b/x/foundation/keeper/internal/proposal_handler.go index 39d7fa712c..8319fdf012 100644 --- a/x/foundation/keeper/internal/proposal_handler.go +++ b/x/foundation/keeper/internal/proposal_handler.go @@ -1,17 +1,20 @@ package internal import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govv1beta1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/Finschia/finschia-sdk/x/foundation" ) // NewFoundationProposalsHandler creates a handler for the gov proposals. -func NewFoundationProposalsHandler(k Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { +func NewFoundationProposalsHandler(k Keeper) govv1beta1types.Handler { + return func(ctx sdk.Context, content govv1beta1types.Content) error { switch c := content.(type) { case *foundation.FoundationExecProposal: return handleFoundationExecProposal(ctx, k, *c) @@ -26,7 +29,7 @@ func handleFoundationExecProposal(ctx sdk.Context, k Keeper, proposal foundation msgs := foundation.GetMessagesFromFoundationExecProposal(proposal) authority := authtypes.NewModuleAddress(govtypes.ModuleName) - if err := ensureMsgAuthz(msgs, authority); err != nil { + if err := ensureMsgAuthz(msgs, authority, k.cdc); err != nil { return err } @@ -49,7 +52,7 @@ func handleFoundationExecProposal(ctx sdk.Context, k Keeper, proposal foundation } _, err := handler(ctx, msg) if err != nil { - return sdkerrors.Wrapf(err, "message %q at position %d", msg, i) + return errorsmod.Wrapf(err, "message %q at position %d", msg, i) } } diff --git a/x/foundation/keeper/internal/treasury.go b/x/foundation/keeper/internal/treasury.go index 45e197dfe5..4ab140d33b 100644 --- a/x/foundation/keeper/internal/treasury.go +++ b/x/foundation/keeper/internal/treasury.go @@ -55,9 +55,12 @@ func (k Keeper) WithdrawFromTreasury(ctx sdk.Context, to sdk.AccAddress, amt sdk } func (k Keeper) GetPool(ctx sdk.Context) foundation.Pool { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := poolKey - bz := store.Get(key) + bz, err := store.Get(key) + if err != nil { + panic(err) + } var pool foundation.Pool k.cdc.MustUnmarshal(bz, &pool) @@ -68,7 +71,7 @@ func (k Keeper) GetPool(ctx sdk.Context) foundation.Pool { func (k Keeper) SetPool(ctx sdk.Context, pool foundation.Pool) { bz := k.cdc.MustMarshal(&pool) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := poolKey store.Set(key, bz) } diff --git a/x/foundation/keeper/internal/vote.go b/x/foundation/keeper/internal/vote.go index 9b13096488..01399ff295 100644 --- a/x/foundation/keeper/internal/vote.go +++ b/x/foundation/keeper/internal/vote.go @@ -1,6 +1,9 @@ package internal import ( + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -44,15 +47,19 @@ func (k Keeper) Vote(ctx sdk.Context, vote foundation.Vote) error { } func (k Keeper) hasVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) bool { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := voteKey(proposalID, voter) - return store.Has(key) + has, err := store.Has(key) + return (err != nil) && has } func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) (*foundation.Vote, error) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) key := voteKey(proposalID, voter) - bz := store.Get(key) + bz, err := store.Get(key) + if err != nil { + return nil, err + } if len(bz) == 0 { return nil, sdkerrors.ErrNotFound.Wrapf("No vote for proposal %d: %s", proposalID, voter) } @@ -64,7 +71,7 @@ func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress } func (k Keeper) setVote(ctx sdk.Context, vote foundation.Vote) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) voter := sdk.MustAccAddressFromBech32(vote.Voter) key := voteKey(vote.ProposalId, voter) bz := k.cdc.MustMarshal(&vote) @@ -72,9 +79,10 @@ func (k Keeper) setVote(ctx sdk.Context, vote foundation.Vote) { } func (k Keeper) iterateVotes(ctx sdk.Context, proposalID uint64, fn func(vote foundation.Vote) (stop bool)) { - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) + adapter := runtime.KVStoreAdapter(store) prefix := append(voteKeyPrefix, Uint64ToBytes(proposalID)...) - iterator := sdk.KVStorePrefixIterator(store, prefix) + iterator := storetypes.KVStorePrefixIterator(adapter, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -105,7 +113,7 @@ func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) { return false }) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) for _, key := range keys { store.Delete(key) } diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index bac6c8c55c..8150ce2cf4 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -9,6 +9,8 @@ import ( "github.com/spf13/cobra" abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -27,8 +29,8 @@ const ( var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} - _ module.BeginBlockAppModule = AppModule{} - _ module.EndBlockAppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the foundation module. @@ -100,17 +102,6 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper) } -// Route is empty, as we do not handle Messages (just proposals) -func (AppModule) Route() sdk.Route { return sdk.Route{} } - -// QuerierRoute returns the route we respond to for abci queries -func (AppModule) QuerierRoute() string { return "" } - -// LegacyQuerierHandler registers a query handler to respond to the module-specific queries -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { @@ -144,14 +135,13 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return consensusVersion } // BeginBlock performs a no-op. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - keeper.BeginBlocker(ctx, am.keeper) +func (am AppModule) BeginBlock(ctx context.Context) error { + return keeper.BeginBlocker(sdk.UnwrapSDKContext(ctx), am.keeper) } // EndBlock performs a no-op. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - keeper.EndBlocker(ctx, am.keeper) - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(ctx context.Context) error { + return keeper.EndBlocker(sdk.UnwrapSDKContext(ctx), am.keeper) } // ____________________________________________________________________________ @@ -186,3 +176,10 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val // am.stakingKeeper, am.slashingKeeper, am.keeper, simState.Contents, // ) // } + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + diff --git a/x/foundation/proposal.go b/x/foundation/proposal.go index a5ae4691c3..d780f4ded1 100644 --- a/x/foundation/proposal.go +++ b/x/foundation/proposal.go @@ -1,10 +1,11 @@ package foundation import ( + errorsmod "cosmossdk.io/errors" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -29,8 +30,13 @@ func (p FoundationExecProposal) ProposalType() string { return ProposalTypeFoun func (p FoundationExecProposal) ValidateBasic() error { msgs := GetMessagesFromFoundationExecProposal(p) for idx, msg := range msgs { - if err := msg.ValidateBasic(); err != nil { - return sdkerrors.Wrapf(err, "msg: %d", idx) + m, ok := msg.(sdk.HasValidateBasic) + if !ok { + continue + } + + if err := m.ValidateBasic(); err != nil { + return errorsmod.Wrapf(err, "msg: %d", idx) } } From fcdc2b8336d2f9ad358f76134fe410891e656b17 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 27 Dec 2023 09:01:38 +0000 Subject: [PATCH 04/26] Add module proto --- api/lbm/foundation/module/v1/module.pulsar.go | 816 ++++++++++++++++++ proto/buf.gen.pulsar.yaml | 6 +- proto/lbm/foundation/module/v1/module.proto | 27 + 3 files changed, 846 insertions(+), 3 deletions(-) create mode 100644 api/lbm/foundation/module/v1/module.pulsar.go create mode 100644 proto/lbm/foundation/module/v1/module.proto diff --git a/api/lbm/foundation/module/v1/module.pulsar.go b/api/lbm/foundation/module/v1/module.pulsar.go new file mode 100644 index 0000000000..87aac21a62 --- /dev/null +++ b/api/lbm/foundation/module/v1/module.pulsar.go @@ -0,0 +1,816 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor + fd_Module_authority protoreflect.FieldDescriptor + fd_Module_fee_collector_name protoreflect.FieldDescriptor + fd_Module_max_execution_period protoreflect.FieldDescriptor + fd_Module_max_metadata_len protoreflect.FieldDescriptor +) + +func init() { + file_lbm_foundation_module_v1_module_proto_init() + md_Module = File_lbm_foundation_module_v1_module_proto.Messages().ByName("Module") + fd_Module_authority = md_Module.Fields().ByName("authority") + fd_Module_fee_collector_name = md_Module.Fields().ByName("fee_collector_name") + fd_Module_max_execution_period = md_Module.Fields().ByName("max_execution_period") + fd_Module_max_metadata_len = md_Module.Fields().ByName("max_metadata_len") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_lbm_foundation_module_v1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, value) { + return + } + } + if x.FeeCollectorName != "" { + value := protoreflect.ValueOfString(x.FeeCollectorName) + if !f(fd_Module_fee_collector_name, value) { + return + } + } + if x.MaxExecutionPeriod != nil { + value := protoreflect.ValueOfMessage(x.MaxExecutionPeriod.ProtoReflect()) + if !f(fd_Module_max_execution_period, value) { + return + } + } + if x.MaxMetadataLen != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaxMetadataLen) + if !f(fd_Module_max_metadata_len, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "lbm.foundation.module.v1.Module.authority": + return x.Authority != "" + case "lbm.foundation.module.v1.Module.fee_collector_name": + return x.FeeCollectorName != "" + case "lbm.foundation.module.v1.Module.max_execution_period": + return x.MaxExecutionPeriod != nil + case "lbm.foundation.module.v1.Module.max_metadata_len": + return x.MaxMetadataLen != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: lbm.foundation.module.v1.Module")) + } + panic(fmt.Errorf("message lbm.foundation.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "lbm.foundation.module.v1.Module.authority": + x.Authority = "" + case "lbm.foundation.module.v1.Module.fee_collector_name": + x.FeeCollectorName = "" + case "lbm.foundation.module.v1.Module.max_execution_period": + x.MaxExecutionPeriod = nil + case "lbm.foundation.module.v1.Module.max_metadata_len": + x.MaxMetadataLen = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: lbm.foundation.module.v1.Module")) + } + panic(fmt.Errorf("message lbm.foundation.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "lbm.foundation.module.v1.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "lbm.foundation.module.v1.Module.fee_collector_name": + value := x.FeeCollectorName + return protoreflect.ValueOfString(value) + case "lbm.foundation.module.v1.Module.max_execution_period": + value := x.MaxExecutionPeriod + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "lbm.foundation.module.v1.Module.max_metadata_len": + value := x.MaxMetadataLen + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: lbm.foundation.module.v1.Module")) + } + panic(fmt.Errorf("message lbm.foundation.module.v1.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "lbm.foundation.module.v1.Module.authority": + x.Authority = value.Interface().(string) + case "lbm.foundation.module.v1.Module.fee_collector_name": + x.FeeCollectorName = value.Interface().(string) + case "lbm.foundation.module.v1.Module.max_execution_period": + x.MaxExecutionPeriod = value.Message().Interface().(*durationpb.Duration) + case "lbm.foundation.module.v1.Module.max_metadata_len": + x.MaxMetadataLen = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: lbm.foundation.module.v1.Module")) + } + panic(fmt.Errorf("message lbm.foundation.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "lbm.foundation.module.v1.Module.max_execution_period": + if x.MaxExecutionPeriod == nil { + x.MaxExecutionPeriod = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.MaxExecutionPeriod.ProtoReflect()) + case "lbm.foundation.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message lbm.foundation.module.v1.Module is not mutable")) + case "lbm.foundation.module.v1.Module.fee_collector_name": + panic(fmt.Errorf("field fee_collector_name of message lbm.foundation.module.v1.Module is not mutable")) + case "lbm.foundation.module.v1.Module.max_metadata_len": + panic(fmt.Errorf("field max_metadata_len of message lbm.foundation.module.v1.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: lbm.foundation.module.v1.Module")) + } + panic(fmt.Errorf("message lbm.foundation.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "lbm.foundation.module.v1.Module.authority": + return protoreflect.ValueOfString("") + case "lbm.foundation.module.v1.Module.fee_collector_name": + return protoreflect.ValueOfString("") + case "lbm.foundation.module.v1.Module.max_execution_period": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "lbm.foundation.module.v1.Module.max_metadata_len": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: lbm.foundation.module.v1.Module")) + } + panic(fmt.Errorf("message lbm.foundation.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in lbm.foundation.module.v1.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.FeeCollectorName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.MaxExecutionPeriod != nil { + l = options.Size(x.MaxExecutionPeriod) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.MaxMetadataLen != 0 { + n += 1 + runtime.Sov(uint64(x.MaxMetadataLen)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.MaxMetadataLen != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxMetadataLen)) + i-- + dAtA[i] = 0x20 + } + if x.MaxExecutionPeriod != nil { + encoded, err := options.Marshal(x.MaxExecutionPeriod) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.FeeCollectorName) > 0 { + i -= len(x.FeeCollectorName) + copy(dAtA[i:], x.FeeCollectorName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeCollectorName))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeCollectorName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeeCollectorName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxExecutionPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.MaxExecutionPeriod == nil { + x.MaxExecutionPeriod = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxExecutionPeriod); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxMetadataLen", wireType) + } + x.MaxMetadataLen = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MaxMetadataLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: lbm/foundation/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the config object of the foundation module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority defines the custom module authority. If not set, defaults to the governance module. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + FeeCollectorName string `protobuf:"bytes,2,opt,name=fee_collector_name,json=feeCollectorName,proto3" json:"fee_collector_name,omitempty"` + // MaxExecutionPeriod defines the max duration after a proposal's voting period ends that members can send a MsgExec + // to execute the proposal. + MaxExecutionPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=max_execution_period,json=maxExecutionPeriod,proto3" json:"max_execution_period,omitempty"` + // MaxMetadataLen defines the max length of the metadata bytes field for various entities within the foundation + // module. Defaults to 255 if not explicitly set. + MaxMetadataLen uint64 `protobuf:"varint,4,opt,name=max_metadata_len,json=maxMetadataLen,proto3" json:"max_metadata_len,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_lbm_foundation_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_lbm_foundation_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *Module) GetFeeCollectorName() string { + if x != nil { + return x.FeeCollectorName + } + return "" +} + +func (x *Module) GetMaxExecutionPeriod() *durationpb.Duration { + if x != nil { + return x.MaxExecutionPeriod + } + return nil +} + +func (x *Module) GetMaxMetadataLen() uint64 { + if x != nil { + return x.MaxMetadataLen + } + return 0 +} + +var File_lbm_foundation_module_v1_module_proto protoreflect.FileDescriptor + +var file_lbm_foundation_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6c, 0x62, 0x6d, 0x2f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, + 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x66, 0x65, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x55, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, + 0xdf, 0x1f, 0x01, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, + 0x6e, 0x3a, 0x35, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2f, 0x0a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, 0x6e, 0x73, 0x63, 0x68, 0x69, 0x61, 0x2f, 0x66, + 0x69, 0x6e, 0x73, 0x63, 0x68, 0x69, 0x61, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x66, 0x6f, + 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xd5, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, + 0x2e, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x62, + 0x6d, 0x2f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x4c, 0x46, 0x4d, 0xaa, 0x02, 0x18, 0x4c, 0x62, 0x6d, 0x2e, 0x46, 0x6f, 0x75, 0x6e, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x18, 0x4c, 0x62, 0x6d, 0x5c, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x24, 0x4c, 0x62, + 0x6d, 0x5c, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x1b, 0x4c, 0x62, 0x6d, 0x3a, 0x3a, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_lbm_foundation_module_v1_module_proto_rawDescOnce sync.Once + file_lbm_foundation_module_v1_module_proto_rawDescData = file_lbm_foundation_module_v1_module_proto_rawDesc +) + +func file_lbm_foundation_module_v1_module_proto_rawDescGZIP() []byte { + file_lbm_foundation_module_v1_module_proto_rawDescOnce.Do(func() { + file_lbm_foundation_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_lbm_foundation_module_v1_module_proto_rawDescData) + }) + return file_lbm_foundation_module_v1_module_proto_rawDescData +} + +var file_lbm_foundation_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_lbm_foundation_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: lbm.foundation.module.v1.Module + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} +var file_lbm_foundation_module_v1_module_proto_depIdxs = []int32{ + 1, // 0: lbm.foundation.module.v1.Module.max_execution_period:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_lbm_foundation_module_v1_module_proto_init() } +func file_lbm_foundation_module_v1_module_proto_init() { + if File_lbm_foundation_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_lbm_foundation_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_lbm_foundation_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_lbm_foundation_module_v1_module_proto_goTypes, + DependencyIndexes: file_lbm_foundation_module_v1_module_proto_depIdxs, + MessageInfos: file_lbm_foundation_module_v1_module_proto_msgTypes, + }.Build() + File_lbm_foundation_module_v1_module_proto = out.File + file_lbm_foundation_module_v1_module_proto_rawDesc = nil + file_lbm_foundation_module_v1_module_proto_goTypes = nil + file_lbm_foundation_module_v1_module_proto_depIdxs = nil +} diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml index e5f3a32143..e6fa7d3eff 100644 --- a/proto/buf.gen.pulsar.yaml +++ b/proto/buf.gen.pulsar.yaml @@ -12,10 +12,10 @@ managed: plugins: - name: go-pulsar out: ../api - opt: paths=source_relative + opt: paths=source_relative,Mcosmos/app/v1alpha1/module.proto=cosmossdk.io/api/cosmos/app/v1alpha1 - name: go-grpc out: ../api - opt: paths=source_relative + opt: paths=source_relative,Mcosmos/app/v1alpha1/module.proto=cosmossdk.io/api/cosmos/app/v1alpha1 - name: go-cosmos-orm out: ../api - opt: paths=source_relative + opt: paths=source_relative,Mcosmos/app/v1alpha1/module.proto=cosmossdk.io/api/cosmos/app/v1alpha1 diff --git a/proto/lbm/foundation/module/v1/module.proto b/proto/lbm/foundation/module/v1/module.proto new file mode 100644 index 0000000000..a76548a861 --- /dev/null +++ b/proto/lbm/foundation/module/v1/module.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package lbm.foundation.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +// Module is the config object of the foundation module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/Finschia/finschia-sdk/x/foundation" + }; + + // authority defines the custom module authority. If not set, defaults to the governance module. + string authority = 1; + + string fee_collector_name = 2; + + // MaxExecutionPeriod defines the max duration after a proposal's voting period ends that members can send a MsgExec + // to execute the proposal. + google.protobuf.Duration max_execution_period = 3 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + // MaxMetadataLen defines the max length of the metadata bytes field for various entities within the foundation + // module. Defaults to 255 if not explicitly set. + uint64 max_metadata_len = 4; +} From b4d5d2c6e0b073c5bdaeed01de8c4cb2140aa973 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 27 Dec 2023 09:21:05 +0000 Subject: [PATCH 05/26] Wire x/foundation --- go.work.example | 1 + simapp/app_config.go | 19 ++++++ simapp/app_test.go | 3 + simapp/app_v2.go | 4 ++ x/foundation/expected_keepers.go | 11 ++-- x/foundation/go.mod | 1 + x/foundation/go.sum | 2 + x/foundation/keeper/exported.go | 12 ++-- x/foundation/keeper/internal/abci.go | 2 + x/foundation/keeper/internal/keeper.go | 17 +++--- x/foundation/keeper/internal/migrations.go | 2 +- x/foundation/keeper/internal/params.go | 4 +- x/foundation/module/module.go | 70 ++++++++++++++++++++++ 13 files changed, 126 insertions(+), 22 deletions(-) diff --git a/go.work.example b/go.work.example index ad69502db4..d326eab038 100644 --- a/go.work.example +++ b/go.work.example @@ -6,4 +6,5 @@ use ( . ./api ./simapp + ./x/foundation ) diff --git a/simapp/app_config.go b/simapp/app_config.go index e27ad82f3f..2d2edbb8cd 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -72,6 +72,10 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + foundationmodulev1 "github.com/Finschia/finschia-sdk/api/lbm/foundation/module/v1" + foundation "github.com/Finschia/finschia-sdk/x/foundation" + _ "github.com/Finschia/finschia-sdk/x/foundation/module" // import for side-effects ) var ( @@ -84,6 +88,8 @@ var ( {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, {Account: govtypes.ModuleName, Permissions: []string{authtypes.Burner}}, {Account: nft.ModuleName}, + {Account: foundation.ModuleName}, + {Account: foundation.TreasuryName}, } // blocked account addresses @@ -94,6 +100,8 @@ var ( stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, nft.ModuleName, + foundation.ModuleName, + foundation.TreasuryName, // We allow the following module accounts to receive funds: // govtypes.ModuleName } @@ -115,6 +123,7 @@ var ( // NOTE: staking module is required if HistoricalEntries param > 0 BeginBlockers: []string{ minttypes.ModuleName, + foundation.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, @@ -127,6 +136,7 @@ var ( stakingtypes.ModuleName, feegrant.ModuleName, group.ModuleName, + foundation.ModuleName, }, OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { @@ -145,6 +155,7 @@ var ( slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, + foundation.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, @@ -260,6 +271,14 @@ var ( Name: circuittypes.ModuleName, Config: appconfig.WrapAny(&circuitmodulev1.Module{}), }, + { + Name: foundation.ModuleName, + Config: appconfig.WrapAny(&foundationmodulev1.Module{ + Authority: foundation.ModuleName, + MaxExecutionPeriod: durationpb.New(time.Hour * 24 * 7 * 2), + MaxMetadataLen: 255, + }), + }, }, }), depinject.Supply( diff --git a/simapp/app_test.go b/simapp/app_test.go index d911ecd955..5ce2518466 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -45,6 +45,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/params" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/staking" + + foundationmodule "github.com/Finschia/finschia-sdk/x/foundation/module" ) func TestSimAppExportAndBlockedAddrs(t *testing.T) { @@ -214,6 +216,7 @@ func TestRunMigrations(t *testing.T) { "evidence": evidence.AppModule{}.ConsensusVersion(), "crisis": crisis.AppModule{}.ConsensusVersion(), "genutil": genutil.AppModule{}.ConsensusVersion(), + "foundation": foundationmodule.AppModule{}.ConsensusVersion(), }, ) if tc.expRunErr { diff --git a/simapp/app_v2.go b/simapp/app_v2.go index ec96a2cbd4..c695441e03 100644 --- a/simapp/app_v2.go +++ b/simapp/app_v2.go @@ -46,6 +46,8 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + foundationkeeper "github.com/Finschia/finschia-sdk/x/foundation/keeper" ) // DefaultNodeHome default home directories for the application daemon @@ -84,6 +86,7 @@ type SimApp struct { NFTKeeper nftkeeper.Keeper ConsensusParamsKeeper consensuskeeper.Keeper CircuitBreakerKeeper circuitkeeper.Keeper + FoundationKeeper foundationkeeper.Keeper // simulation manager sm *module.SimulationManager @@ -195,6 +198,7 @@ func NewSimApp( &app.NFTKeeper, &app.ConsensusParamsKeeper, &app.CircuitBreakerKeeper, + &app.FoundationKeeper, ); err != nil { panic(err) } diff --git a/x/foundation/expected_keepers.go b/x/foundation/expected_keepers.go index b9ae9b459d..b33df74372 100644 --- a/x/foundation/expected_keepers.go +++ b/x/foundation/expected_keepers.go @@ -1,23 +1,24 @@ package foundation import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type ( // AuthKeeper defines the auth module interface contract needed by the // foundation module. AuthKeeper interface { - GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI } // BankKeeper defines the bank module interface contract needed by the // foundation module. BankKeeper interface { - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error } ) diff --git a/x/foundation/go.mod b/x/foundation/go.mod index 77d1cb98a8..4bdfa039f4 100644 --- a/x/foundation/go.mod +++ b/x/foundation/go.mod @@ -32,6 +32,7 @@ require ( github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect diff --git a/x/foundation/go.sum b/x/foundation/go.sum index cee7e3e8d5..7269ccef15 100644 --- a/x/foundation/go.sum +++ b/x/foundation/go.sum @@ -70,6 +70,8 @@ github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 h1:lm4mGuo+arhc/GrVm8hjGE3CCcfSQEvxI+uZODfEhQY= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= +github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c h1:udPyEWzmxkmmXK2btB/rWeApcMsjcFZl2B59EYxOdss= +github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c/go.mod h1:rYRCm6V5xeW7sN5yLECAzIT7IF3pyBK6Rca9pEGEOAM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go index 37b274f244..4ba2f5ae0a 100644 --- a/x/foundation/keeper/exported.go +++ b/x/foundation/keeper/exported.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" @@ -29,27 +29,27 @@ type keeper struct { func NewKeeper( cdc codec.Codec, addressCodec addresscodec.Codec, - key store.KVStoreService, - router *baseapp.MsgServiceRouter, + storeService store.KVStoreService, + router baseapp.MessageRouter, authKeeper foundation.AuthKeeper, bankKeeper foundation.BankKeeper, feeCollectorName string, config foundation.Config, authority string, - paramspace paramtypes.Subspace, + subspace paramstypes.Subspace, ) Keeper { return &keeper{ impl: internal.NewKeeper( cdc, addressCodec, - key, + storeService, router, authKeeper, bankKeeper, feeCollectorName, config, authority, - paramspace, + subspace, ), } } diff --git a/x/foundation/keeper/internal/abci.go b/x/foundation/keeper/internal/abci.go index 465060a045..523ca8e361 100644 --- a/x/foundation/keeper/internal/abci.go +++ b/x/foundation/keeper/internal/abci.go @@ -22,6 +22,8 @@ func BeginBlocker(ctx sdk.Context, k Keeper) error { } func EndBlocker(ctx sdk.Context, k Keeper) error { + defer telemetry.ModuleMeasureSince(foundation.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) + if err := k.UpdateTallyOfVPEndProposals(ctx); err != nil { return err } diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index 1dad4fa8a1..7d490dd283 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -21,7 +21,7 @@ type Keeper struct { storeService store.KVStoreService - router *baseapp.MsgServiceRouter + router baseapp.MessageRouter // keepers authKeeper foundation.AuthKeeper @@ -40,20 +40,20 @@ type Keeper struct { // Typically, this should be the x/foundation module account. authority string - paramSpace paramtypes.Subspace + subspace paramstypes.Subspace } func NewKeeper( cdc codec.Codec, addressCodec addresscodec.Codec, storeService store.KVStoreService, - router *baseapp.MsgServiceRouter, + router baseapp.MessageRouter, authKeeper foundation.AuthKeeper, bankKeeper foundation.BankKeeper, feeCollectorName string, config foundation.Config, authority string, - paramSpace paramtypes.Subspace, + subspace paramstypes.Subspace, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic("authority is not a valid acc address") @@ -64,9 +64,10 @@ func NewKeeper( panic("x/foundation authority must be the module account") } + // TODO(@0Tech): remove x/params dependency // set KeyTable if it has not already been set - if !paramSpace.HasKeyTable() { - paramSpace = paramSpace.WithKeyTable(foundation.ParamKeyTable()) + if !subspace.HasKeyTable() { + subspace = subspace.WithKeyTable(foundation.ParamKeyTable()) } return Keeper{ @@ -79,7 +80,7 @@ func NewKeeper( feeCollectorName: feeCollectorName, config: config, authority: authority, - paramSpace: paramSpace, + subspace: subspace, } } diff --git a/x/foundation/keeper/internal/migrations.go b/x/foundation/keeper/internal/migrations.go index ea07324f7e..b7521bea5f 100644 --- a/x/foundation/keeper/internal/migrations.go +++ b/x/foundation/keeper/internal/migrations.go @@ -21,7 +21,7 @@ func NewMigrator(keeper Keeper) Migrator { func (m Migrator) Register(register func(moduleName string, fromVersion uint64, handler module.MigrationHandler) error) error { for fromVersion, handler := range map[uint64]module.MigrationHandler{ 1: func(ctx sdk.Context) error { - return v2.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc, m.keeper.paramSpace) + return v2.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc, m.keeper.subspace) }, } { if err := register(foundation.ModuleName, fromVersion, handler); err != nil { diff --git a/x/foundation/keeper/internal/params.go b/x/foundation/keeper/internal/params.go index d2cdaa3d3f..95f93c0a01 100644 --- a/x/foundation/keeper/internal/params.go +++ b/x/foundation/keeper/internal/params.go @@ -10,13 +10,13 @@ import ( func (k Keeper) GetParams(ctx sdk.Context) foundation.Params { var params foundation.Params - k.paramSpace.GetParamSet(ctx, ¶ms) + k.subspace.GetParamSet(ctx, ¶ms) return params } func (k Keeper) SetParams(ctx sdk.Context, params foundation.Params) { - k.paramSpace.SetParamSet(ctx, ¶ms) + k.subspace.SetParamSet(ctx, ¶ms) } // aliases diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index 8150ce2cf4..2ac126dfa5 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -10,16 +10,24 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/address" + "cosmossdk.io/depinject" + "cosmossdk.io/core/store" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" "github.com/Finschia/finschia-sdk/x/foundation/keeper" + modulev1 "github.com/Finschia/finschia-sdk/api/lbm/foundation/module/v1" ) const ( @@ -183,3 +191,65 @@ func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} +func init() { + appmodule.Register(&modulev1.Module{}, + appmodule.Provide(ProvideModule, ProvideKeyTable), + ) +} + +type FoundationInputs struct { + depinject.In + + StoreService store.KVStoreService + Cdc codec.Codec + Config *modulev1.Module + + AddressCodec address.Codec + + AuthKeeper foundation.AuthKeeper + BankKeeper foundation.BankKeeper + Subspace paramstypes.Subspace + MsgServiceRouter baseapp.MessageRouter +} + +type FoundationOutputs struct { + depinject.Out + + Keeper keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in FoundationInputs) FoundationOutputs { + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + + feeCollectorName := in.Config.FeeCollectorName + if feeCollectorName == "" { + feeCollectorName = authtypes.FeeCollectorName + } + + config := foundation.Config{ + MaxExecutionPeriod: in.Config.MaxExecutionPeriod.AsDuration(), + MaxMetadataLen: in.Config.MaxMetadataLen, + } + + authorityStr, err := in.AddressCodec.BytesToString(authority) + if err != nil { + panic(err) + } + + k := keeper.NewKeeper(in.Cdc, in.AddressCodec, in.StoreService, in.MsgServiceRouter, in.AuthKeeper, in.BankKeeper, feeCollectorName, config, authorityStr, in.Subspace) + m := NewAppModule(in.Cdc, k) + + return FoundationOutputs{ + Keeper: k, + Module: m, + } +} + +func ProvideKeyTable() paramstypes.KeyTable { + return foundation.ParamKeyTable() +} From ae650b41b14a23408324a19fb9a91f7d8c7c623e Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Thu, 28 Dec 2023 01:51:17 +0000 Subject: [PATCH 06/26] Update tests --- scripts/mockgen.sh | 28 +- x/foundation/client/cli/tx.go | 36 - x/foundation/foundation.go | 52 +- x/foundation/foundation_test.go | 181 ++-- x/foundation/genesis.go | 13 +- x/foundation/genesis_test.go | 105 ++- x/foundation/keeper/internal/abci_test.go | 10 +- x/foundation/keeper/internal/censorship.go | 26 +- .../keeper/internal/censorship_test.go | 20 +- x/foundation/keeper/internal/exec.go | 6 +- x/foundation/keeper/internal/genesis.go | 11 +- x/foundation/keeper/internal/genesis_test.go | 87 +- x/foundation/keeper/internal/grpc_query.go | 6 +- .../keeper/internal/grpc_query_test.go | 29 +- x/foundation/keeper/internal/invariants.go | 6 +- .../keeper/internal/invariants_test.go | 10 +- x/foundation/keeper/internal/keeper.go | 8 +- x/foundation/keeper/internal/keeper_test.go | 402 ++++++--- x/foundation/keeper/internal/member.go | 23 +- x/foundation/keeper/internal/member_test.go | 14 +- .../internal/migrations/v2/store_test.go | 27 +- x/foundation/keeper/internal/msg_server.go | 144 ++- .../keeper/internal/msg_server_test.go | 345 ++++++-- x/foundation/keeper/internal/proposal.go | 5 +- .../keeper/internal/proposal_handler_test.go | 9 +- x/foundation/keeper/internal/proposal_test.go | 62 +- x/foundation/keeper/internal/tally.go | 7 +- x/foundation/keeper/internal/treasury.go | 4 +- x/foundation/keeper/internal/treasury_test.go | 36 +- x/foundation/keeper/internal/vote.go | 20 +- x/foundation/keeper/internal/vote_test.go | 8 +- x/foundation/module/module.go | 15 +- x/foundation/msgs.go | 430 --------- x/foundation/msgs_test.go | 817 +++--------------- .../testutil/expected_keepers_mocks.go | 168 ++++ 35 files changed, 1433 insertions(+), 1737 deletions(-) create mode 100644 x/foundation/testutil/expected_keepers_mocks.go diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh index cda998093a..452c97319f 100755 --- a/scripts/mockgen.sh +++ b/scripts/mockgen.sh @@ -1,30 +1,4 @@ #!/usr/bin/env bash mockgen_cmd="mockgen" -$mockgen_cmd -source=baseapp/abci_utils.go -package mock -destination baseapp/testutil/mock/mocks.go -$mockgen_cmd -source=client/account_retriever.go -package mock -destination testutil/mock/account_retriever.go -$mockgen_cmd -package mock -destination store/mock/cosmos_cosmos_db_DB.go github.com/cosmos/cosmos-db DB -$mockgen_cmd -source=types/module/module.go -package mock -destination testutil/mock/types_module_module.go -$mockgen_cmd -source=types/module/mock_appmodule_test.go -package mock -destination testutil/mock/types_mock_appmodule.go -$mockgen_cmd -source=types/invariant.go -package mock -destination testutil/mock/types_invariant.go -$mockgen_cmd -package mock -destination testutil/mock/grpc_server.go github.com/cosmos/gogoproto/grpc Server -$mockgen_cmd -package mock -destination testutil/mock/logger.go cosmossdk.io/log Logger -$mockgen_cmd -source=orm/model/ormtable/hooks.go -package ormmocks -destination orm/testing/ormmocks/hooks.go -$mockgen_cmd -source=x/nft/expected_keepers.go -package testutil -destination x/nft/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/feegrant/expected_keepers.go -package testutil -destination x/feegrant/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/mint/types/expected_keepers.go -package testutil -destination x/mint/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/params/proposal_handler_test.go -package testutil -destination x/params/testutil/staking_keeper_mock.go -$mockgen_cmd -source=x/crisis/types/expected_keepers.go -package testutil -destination x/crisis/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/auth/tx/config/expected_keepers.go -package testutil -destination x/auth/tx/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/auth/types/expected_keepers.go -package testutil -destination x/auth/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/auth/ante/expected_keepers.go -package testutil -destination x/auth/ante/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/authz/expected_keepers.go -package testutil -destination x/authz/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/bank/types/expected_keepers.go -package testutil -destination x/bank/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/group/testutil/expected_keepers.go -package testutil -destination x/group/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/evidence/types/expected_keepers.go -package testutil -destination x/evidence/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/distribution/types/expected_keepers.go -package testutil -destination x/distribution/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/slashing/types/expected_keepers.go -package testutil -destination x/slashing/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/genutil/types/expected_keepers.go -package testutil -destination x/genutil/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/gov/testutil/expected_keepers.go -package testutil -destination x/gov/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/staking/types/expected_keepers.go -package testutil -destination x/staking/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=x/auth/vesting/types/expected_keepers.go -package testutil -destination x/auth/vesting/testutil/expected_keepers_mocks.go +$mockgen_cmd -source=x/foundation/expected_keepers.go -package testutil -destination x/foundation/testutil/expected_keepers_mocks.go diff --git a/x/foundation/client/cli/tx.go b/x/foundation/client/cli/tx.go index 8b1a98ab5a..64e55f2f7f 100644 --- a/x/foundation/client/cli/tx.go +++ b/x/foundation/client/cli/tx.go @@ -201,9 +201,6 @@ func NewTxCmdFundTreasury() *cobra.Command { From: from, Amount: amount, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -239,9 +236,6 @@ func NewTxCmdWithdrawFromTreasury() *cobra.Command { To: args[1], Amount: amount, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -293,9 +287,6 @@ Set a member's participating to false to delete it. Authority: args[0], MemberUpdates: updates, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -343,9 +334,6 @@ Example of the content of policy-json: return err } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -419,9 +407,6 @@ Example of the content of messages-json: if err := msg.SetMsgs(messages); err != nil { return err } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -463,9 +448,6 @@ Parameters: ProposalId: proposalID, Address: address, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -526,9 +508,6 @@ Parameters: Metadata: args[3], Exec: exec, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -564,9 +543,6 @@ func NewTxCmdExec() *cobra.Command { ProposalId: proposalID, Signer: signer, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -612,9 +588,6 @@ Parameters: Authority: newAuthority, }, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -642,9 +615,6 @@ func NewTxCmdLeaveFoundation() *cobra.Command { msg := foundation.MsgLeaveFoundation{ Address: address, } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -692,9 +662,6 @@ Example of the content of authorization-json: return err } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } @@ -725,9 +692,6 @@ func NewTxCmdRevoke() *cobra.Command { Grantee: args[1], MsgTypeUrl: args[2], } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, } diff --git a/x/foundation/foundation.go b/x/foundation/foundation.go index abb1bd31b9..454b0ebd55 100644 --- a/x/foundation/foundation.go +++ b/x/foundation/foundation.go @@ -8,6 +8,7 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" + "cosmossdk.io/core/address" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -16,7 +17,7 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -func validateProposers(proposers []string) error { +func ValidateProposers(proposers []string, addressCodec address.Codec) error { if len(proposers) == 0 { return sdkerrors.ErrInvalidRequest.Wrap("no proposers") } @@ -28,7 +29,7 @@ func validateProposers(proposers []string) error { } addrs[proposer] = true - if _, err := sdk.AccAddressFromBech32(proposer); err != nil { + if _, err := addressCodec.StringToBytes(proposer); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid proposer address: %s", proposer) } } @@ -36,26 +37,7 @@ func validateProposers(proposers []string) error { return nil } -func validateMsgs(msgs []sdk.Msg) error { - if len(msgs) == 0 { - return sdkerrors.ErrInvalidRequest.Wrap("no msgs") - } - - for i, msg := range msgs { - m, ok := msg.(sdk.HasValidateBasic) - if !ok { - continue - } - - if err := m.ValidateBasic(); err != nil { - return errorsmod.Wrapf(err, "msg %d", i) - } - } - - return nil -} - -func validateVoteOption(option VoteOption) error { +func ValidateVoteOption(option VoteOption) error { if option == VOTE_OPTION_UNSPECIFIED { return sdkerrors.ErrInvalidRequest.Wrap("empty vote option") } @@ -106,8 +88,8 @@ func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } -func (m Member) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { +func (m Member) ValidateBasic(addressCodec address.Codec) error { + if _, err := addressCodec.StringToBytes(m.Address); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", m.Address) } @@ -115,8 +97,8 @@ func (m Member) ValidateBasic() error { } // ValidateBasic performs stateless validation on a member. -func (m MemberRequest) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { +func (m MemberRequest) ValidateBasic(addressCodec address.Codec) error { + if _, err := addressCodec.StringToBytes(m.Address); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", m.Address) } @@ -190,19 +172,21 @@ func (t TallyResult) TotalCounts() math.LegacyDec { var _ codectypes.UnpackInterfacesMessage = (*Proposal)(nil) -func (p Proposal) ValidateBasic() error { +func (p Proposal) ValidateBasic(addressCodec address.Codec) error { if p.Id == 0 { return sdkerrors.ErrInvalidRequest.Wrap("id must be > 0") } if p.FoundationVersion == 0 { return sdkerrors.ErrInvalidVersion.Wrap("foundation version must be > 0") } - if err := validateProposers(p.Proposers); err != nil { + if err := ValidateProposers(p.Proposers, addressCodec); err != nil { return err } - if err := validateMsgs(p.GetMsgs()); err != nil { - return err + + if len(p.GetMsgs()) == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("no msgs") } + return nil } @@ -520,11 +504,11 @@ type Members struct { // ValidateBasic performs stateless validation on an array of members. On top // of validating each member individually, it also makes sure there are no // duplicate addresses. -func (ms Members) ValidateBasic() error { +func (ms Members) ValidateBasic(addressCodec address.Codec) error { index := make(map[string]struct{}, len(ms.Members)) for i := range ms.Members { member := ms.Members[i] - if err := member.ValidateBasic(); err != nil { + if err := member.ValidateBasic(addressCodec); err != nil { return err } addr := member.Address @@ -544,11 +528,11 @@ type MemberRequests struct { // ValidateBasic performs stateless validation on an array of members. On top // of validating each member individually, it also makes sure there are no // duplicate addresses. -func (ms MemberRequests) ValidateBasic() error { +func (ms MemberRequests) ValidateBasic(addressCodec address.Codec) error { index := make(map[string]struct{}, len(ms.Members)) for i := range ms.Members { member := ms.Members[i] - if err := member.ValidateBasic(); err != nil { + if err := member.ValidateBasic(addressCodec); err != nil { return err } addr := member.Address diff --git a/x/foundation/foundation_test.go b/x/foundation/foundation_test.go index 657936206c..5067c321f8 100644 --- a/x/foundation/foundation_test.go +++ b/x/foundation/foundation_test.go @@ -6,6 +6,9 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -21,64 +24,64 @@ func TestTallyResult(t *testing.T) { err = result.Add(foundation.VOTE_OPTION_YES) require.NoError(t, err) - require.Equal(t, sdk.OneDec(), result.YesCount) + require.Equal(t, math.LegacyOneDec(), result.YesCount) err = result.Add(foundation.VOTE_OPTION_ABSTAIN) require.NoError(t, err) - require.Equal(t, sdk.OneDec(), result.AbstainCount) + require.Equal(t, math.LegacyOneDec(), result.AbstainCount) err = result.Add(foundation.VOTE_OPTION_NO) require.NoError(t, err) - require.Equal(t, sdk.OneDec(), result.NoCount) + require.Equal(t, math.LegacyOneDec(), result.NoCount) err = result.Add(foundation.VOTE_OPTION_NO_WITH_VETO) require.NoError(t, err) - require.Equal(t, sdk.OneDec(), result.NoWithVetoCount) + require.Equal(t, math.LegacyOneDec(), result.NoWithVetoCount) - require.Equal(t, sdk.NewDec(4), result.TotalCounts()) + require.Equal(t, math.LegacyNewDec(4), result.TotalCounts()) } func TestThresholdDecisionPolicy(t *testing.T) { config := foundation.DefaultConfig() testCases := map[string]struct { - threshold sdk.Dec + threshold math.LegacyDec votingPeriod time.Duration minExecutionPeriod time.Duration - totalWeight sdk.Dec + totalWeight math.LegacyDec validBasic bool valid bool }{ "valid policy": { - threshold: sdk.OneDec(), + threshold: math.LegacyOneDec(), votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), validBasic: true, valid: true, }, "invalid threshold": { votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), }, "invalid voting period": { - threshold: sdk.OneDec(), + threshold: math.LegacyOneDec(), minExecutionPeriod: config.MaxExecutionPeriod - time.Nanosecond, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), }, "invalid min execution period": { - threshold: sdk.OneDec(), + threshold: math.LegacyOneDec(), votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), validBasic: true, }, "invalid total weight": { - threshold: sdk.OneDec(), + threshold: math.LegacyOneDec(), votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), validBasic: true, }, } @@ -117,7 +120,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { func TestThresholdDecisionPolicyAllow(t *testing.T) { config := foundation.DefaultConfig() policy := foundation.ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(10), + Threshold: math.LegacyNewDec(10), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, @@ -125,14 +128,14 @@ func TestThresholdDecisionPolicyAllow(t *testing.T) { require.NoError(t, policy.ValidateBasic()) info := foundation.FoundationInfo{ - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), } require.NoError(t, policy.Validate(info, config)) require.Equal(t, time.Hour, policy.GetVotingPeriod()) testCases := map[string]struct { sinceSubmission time.Duration - totalWeight sdk.Dec + totalWeight math.LegacyDec tally foundation.TallyResult valid bool final bool @@ -141,15 +144,15 @@ func TestThresholdDecisionPolicyAllow(t *testing.T) { "allow": { sinceSubmission: policy.Windows.MinExecutionPeriod, totalWeight: policy.Threshold, - tally: foundation.NewTallyResult(policy.Threshold, sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(policy.Threshold, math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), valid: true, final: true, allow: true, }, "allow (member size < threshold)": { sinceSubmission: policy.Windows.MinExecutionPeriod, - totalWeight: sdk.OneDec(), - tally: foundation.NewTallyResult(sdk.OneDec(), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + totalWeight: math.LegacyOneDec(), + tally: foundation.NewTallyResult(math.LegacyOneDec(), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), valid: true, final: true, allow: true, @@ -157,20 +160,20 @@ func TestThresholdDecisionPolicyAllow(t *testing.T) { "not final": { sinceSubmission: policy.Windows.MinExecutionPeriod, totalWeight: policy.Threshold, - tally: foundation.NewTallyResult(policy.Threshold.Sub(sdk.OneDec()), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(policy.Threshold.Sub(math.LegacyOneDec()), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), valid: true, }, "deny": { sinceSubmission: policy.Windows.MinExecutionPeriod, - totalWeight: policy.Threshold.Add(sdk.OneDec()), - tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.OneDec(), sdk.OneDec(), sdk.ZeroDec()), + totalWeight: policy.Threshold.Add(math.LegacyOneDec()), + tally: foundation.NewTallyResult(math.LegacyZeroDec(), math.LegacyOneDec(), math.LegacyOneDec(), math.LegacyZeroDec()), valid: true, final: true, }, "too early": { sinceSubmission: policy.Windows.MinExecutionPeriod - time.Nanosecond, totalWeight: policy.Threshold, - tally: foundation.NewTallyResult(policy.Threshold, sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(policy.Threshold, math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), }, } @@ -195,43 +198,43 @@ func TestPercentageDecisionPolicy(t *testing.T) { config := foundation.DefaultConfig() testCases := map[string]struct { - percentage sdk.Dec + percentage math.LegacyDec votingPeriod time.Duration minExecutionPeriod time.Duration - totalWeight sdk.Dec + totalWeight math.LegacyDec validBasic bool valid bool }{ "valid policy": { - percentage: sdk.OneDec(), + percentage: math.LegacyOneDec(), votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), validBasic: true, valid: true, }, "invalid percentage": { votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), }, "invalid voting period": { - percentage: sdk.OneDec(), + percentage: math.LegacyOneDec(), minExecutionPeriod: config.MaxExecutionPeriod - time.Nanosecond, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), }, "invalid min execution period": { - percentage: sdk.OneDec(), + percentage: math.LegacyOneDec(), votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), validBasic: true, }, "invalid total weight": { - percentage: sdk.OneDec(), + percentage: math.LegacyOneDec(), votingPeriod: time.Hour, minExecutionPeriod: config.MaxExecutionPeriod + time.Hour - time.Nanosecond, - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), validBasic: true, }, } @@ -270,7 +273,7 @@ func TestPercentageDecisionPolicy(t *testing.T) { func TestPercentageDecisionPolicyAllow(t *testing.T) { config := foundation.DefaultConfig() policy := foundation.PercentageDecisionPolicy{ - Percentage: sdk.MustNewDecFromStr("0.8"), + Percentage: math.LegacyMustNewDecFromStr("0.8"), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, @@ -278,12 +281,12 @@ func TestPercentageDecisionPolicyAllow(t *testing.T) { require.NoError(t, policy.ValidateBasic()) info := foundation.FoundationInfo{ - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), } require.NoError(t, policy.Validate(info, config)) require.Equal(t, time.Hour, policy.GetVotingPeriod()) - totalWeight := sdk.NewDec(10) + totalWeight := math.LegacyNewDec(10) testCases := map[string]struct { sinceSubmission time.Duration tally foundation.TallyResult @@ -293,38 +296,38 @@ func TestPercentageDecisionPolicyAllow(t *testing.T) { }{ "allow": { sinceSubmission: policy.Windows.MinExecutionPeriod, - tally: foundation.NewTallyResult(sdk.NewDec(8), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(math.LegacyNewDec(8), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), valid: true, final: true, allow: true, }, "allow (abstain)": { sinceSubmission: policy.Windows.MinExecutionPeriod, - tally: foundation.NewTallyResult(sdk.NewDec(4), sdk.NewDec(5), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(math.LegacyNewDec(4), math.LegacyNewDec(5), math.LegacyZeroDec(), math.LegacyZeroDec()), valid: true, final: true, allow: true, }, "not final": { sinceSubmission: policy.Windows.MinExecutionPeriod, - tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.NewDec(5), sdk.NewDec(1), sdk.ZeroDec()), + tally: foundation.NewTallyResult(math.LegacyZeroDec(), math.LegacyNewDec(5), math.LegacyNewDec(1), math.LegacyZeroDec()), valid: true, }, "deny": { sinceSubmission: policy.Windows.MinExecutionPeriod, - tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.ZeroDec(), sdk.NewDec(3), sdk.ZeroDec()), + tally: foundation.NewTallyResult(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyNewDec(3), math.LegacyZeroDec()), valid: true, final: true, }, "deny (all abstain)": { sinceSubmission: policy.Windows.MinExecutionPeriod, - tally: foundation.NewTallyResult(sdk.ZeroDec(), sdk.NewDec(10), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(math.LegacyZeroDec(), math.LegacyNewDec(10), math.LegacyZeroDec(), math.LegacyZeroDec()), valid: true, final: true, }, "too early": { sinceSubmission: policy.Windows.MinExecutionPeriod - time.Nanosecond, - tally: foundation.NewTallyResult(sdk.NewDec(8), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + tally: foundation.NewTallyResult(math.LegacyNewDec(8), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), }, } @@ -346,6 +349,13 @@ func TestPercentageDecisionPolicyAllow(t *testing.T) { } func TestMembers(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + addrs := make([]sdk.AccAddress, 2) for i := range addrs { addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) @@ -358,10 +368,10 @@ func TestMembers(t *testing.T) { "valid updates": { members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, { - Address: addrs[1].String(), + Address: bytesToString(addrs[1]), }, }, valid: true, @@ -372,10 +382,10 @@ func TestMembers(t *testing.T) { "duplicate members": { members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, }, @@ -384,7 +394,7 @@ func TestMembers(t *testing.T) { for name, tc := range testCases { t.Run(name, func(t *testing.T) { members := foundation.Members{tc.members} - err := members.ValidateBasic() + err := members.ValidateBasic(addressCodec) if !tc.valid { require.Error(t, err) return @@ -395,6 +405,13 @@ func TestMembers(t *testing.T) { } func TestMemberRequests(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + addrs := make([]sdk.AccAddress, 2) for i := range addrs { addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) @@ -407,10 +424,10 @@ func TestMemberRequests(t *testing.T) { "valid requests": { members: []foundation.MemberRequest{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, { - Address: addrs[1].String(), + Address: bytesToString(addrs[1]), Remove: true, }, }, @@ -422,10 +439,10 @@ func TestMemberRequests(t *testing.T) { "duplicate requests": { members: []foundation.MemberRequest{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), Remove: true, }, }, @@ -435,7 +452,7 @@ func TestMemberRequests(t *testing.T) { for name, tc := range testCases { t.Run(name, func(t *testing.T) { requests := foundation.MemberRequests{tc.members} - err := requests.ValidateBasic() + err := requests.ValidateBasic(addressCodec) if !tc.valid { require.Error(t, err) return @@ -446,6 +463,13 @@ func TestMemberRequests(t *testing.T) { } func TestProposal(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + addrs := make([]sdk.AccAddress, 4) for i := range addrs { addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) @@ -461,8 +485,8 @@ func TestProposal(t *testing.T) { "valid proposal": { id: 1, proposers: []string{ - addrs[0].String(), - addrs[1].String(), + bytesToString(addrs[0]), + bytesToString(addrs[1]), }, version: 1, msgs: []sdk.Msg{ @@ -472,8 +496,8 @@ func TestProposal(t *testing.T) { }, "invalid id": { proposers: []string{ - addrs[0].String(), - addrs[1].String(), + bytesToString(addrs[0]), + bytesToString(addrs[1]), }, version: 1, msgs: []sdk.Msg{ @@ -498,8 +522,8 @@ func TestProposal(t *testing.T) { "duplicate proposers": { id: 1, proposers: []string{ - addrs[0].String(), - addrs[0].String(), + bytesToString(addrs[0]), + bytesToString(addrs[0]), }, version: 1, msgs: []sdk.Msg{ @@ -509,8 +533,8 @@ func TestProposal(t *testing.T) { "invalid version": { id: 1, proposers: []string{ - addrs[0].String(), - addrs[1].String(), + bytesToString(addrs[0]), + bytesToString(addrs[1]), }, msgs: []sdk.Msg{ testdata.NewTestMsg(), @@ -519,22 +543,11 @@ func TestProposal(t *testing.T) { "empty msgs": { id: 1, proposers: []string{ - addrs[0].String(), - addrs[1].String(), + bytesToString(addrs[0]), + bytesToString(addrs[1]), }, version: 1, }, - "invalid msg": { - id: 1, - proposers: []string{ - addrs[0].String(), - addrs[1].String(), - }, - version: 1, - msgs: []sdk.Msg{ - &foundation.MsgWithdrawFromTreasury{}, - }, - }, } for name, tc := range testCases { @@ -546,7 +559,7 @@ func TestProposal(t *testing.T) { }.WithMsgs(tc.msgs) require.NotNil(t, proposal) - err := proposal.ValidateBasic() + err := proposal.ValidateBasic(addressCodec) if !tc.valid { require.Error(t, err) return @@ -560,12 +573,12 @@ func TestOutsourcingDecisionPolicy(t *testing.T) { config := foundation.DefaultConfig() testCases := map[string]struct { - totalWeight sdk.Dec + totalWeight math.LegacyDec validBasic bool valid bool }{ "invalid policy": { - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), validBasic: true, }, } @@ -601,14 +614,14 @@ func TestOutsourcingDecisionPolicyAllow(t *testing.T) { require.NoError(t, policy.ValidateBasic()) info := foundation.FoundationInfo{ - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), } require.Error(t, policy.Validate(info, config)) require.Zero(t, policy.GetVotingPeriod()) testCases := map[string]struct { sinceSubmission time.Duration - totalWeight sdk.Dec + totalWeight math.LegacyDec tally foundation.TallyResult valid bool final bool @@ -616,8 +629,8 @@ func TestOutsourcingDecisionPolicyAllow(t *testing.T) { }{ "deny": { sinceSubmission: 0, - totalWeight: sdk.OneDec(), - tally: foundation.NewTallyResult(sdk.OneDec(), sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + totalWeight: math.LegacyOneDec(), + tally: foundation.NewTallyResult(math.LegacyOneDec(), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), }, } diff --git a/x/foundation/genesis.go b/x/foundation/genesis.go index 4d699d2968..884ee840e8 100644 --- a/x/foundation/genesis.go +++ b/x/foundation/genesis.go @@ -4,6 +4,7 @@ import ( "github.com/gogo/protobuf/proto" "cosmossdk.io/math" + "cosmossdk.io/core/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -94,7 +95,7 @@ func (i FoundationInfo) ValidateBasic() error { // ValidateGenesis validates the provided genesis state to ensure the // expected invariants holds. -func ValidateGenesis(data GenesisState) error { +func ValidateGenesis(data GenesisState, addressCodec address.Codec) error { if err := data.Params.ValidateBasic(); err != nil { return err } @@ -110,7 +111,7 @@ func ValidateGenesis(data GenesisState) error { return sdkerrors.ErrInvalidRequest.Wrapf("total weight not match, %s != %s", info.TotalWeight, realWeight) } members := Members{Members: data.Members} - if err := members.ValidateBasic(); err != nil { + if err := members.ValidateBasic(addressCodec); err != nil { return err } @@ -128,7 +129,7 @@ func ValidateGenesis(data GenesisState) error { } proposalIDs[id] = true - if err := proposal.ValidateBasic(); err != nil { + if err := proposal.ValidateBasic(addressCodec); err != nil { return err } @@ -142,11 +143,11 @@ func ValidateGenesis(data GenesisState) error { return sdkerrors.ErrInvalidRequest.Wrapf("vote for a proposal which does not exist: id %d", vote.ProposalId) } - if _, err := sdk.AccAddressFromBech32(vote.Voter); err != nil { + if _, err := addressCodec.StringToBytes(vote.Voter); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", vote.Voter) } - if err := validateVoteOption(vote.Option); err != nil { + if err := ValidateVoteOption(vote.Option); err != nil { return err } } @@ -178,7 +179,7 @@ func ValidateGenesis(data GenesisState) error { return sdkerrors.ErrInvalidRequest.Wrapf("no censorship over %s", url) } - if _, err := sdk.AccAddressFromBech32(ga.Grantee); err != nil { + if _, err := addressCodec.StringToBytes(ga.Grantee); err != nil { return err } } diff --git a/x/foundation/genesis_test.go b/x/foundation/genesis_test.go index a5303c5ba3..3aaba3f092 100644 --- a/x/foundation/genesis_test.go +++ b/x/foundation/genesis_test.go @@ -7,10 +7,13 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -18,13 +21,13 @@ import ( func workingFoundation() foundation.FoundationInfo { return *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()) } func workingPolicy() foundation.DecisionPolicy { return &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: 7 * 24 * time.Hour, // one week }, @@ -32,8 +35,10 @@ func workingPolicy() foundation.DecisionPolicy { } func TestDefaultGenesisState(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + gs := foundation.DefaultGenesisState() - require.NoError(t, foundation.ValidateGenesis(*gs)) + require.NoError(t, foundation.ValidateGenesis(*gs, addressCodec)) require.True(t, gs.Params.FoundationTax.IsZero()) @@ -50,12 +55,22 @@ func TestDefaultGenesisState(t *testing.T) { } func TestValidateGenesis(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + addrs := make([]sdk.AccAddress, 3) for i := range addrs { addrs[i] = sdk.AccAddress(fmt.Sprint(i)) } - ir := codectypes.NewInterfaceRegistry() + ir := codectestutil.CodecOptions{ + AccAddressPrefix: "link", + ValAddressPrefix: "linkvaloper", + }.NewInterfaceRegistry() cdc := codec.NewProtoCodec(ir) foundation.RegisterInterfaces(ir) testdata.RegisterInterfaces(ir) @@ -79,7 +94,7 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, }, @@ -98,7 +113,7 @@ func TestValidateGenesis(t *testing.T) { }, Authorizations: []foundation.GrantAuthorization{ *foundation.GrantAuthorization{ - Grantee: addrs[0].String(), + Grantee: bytesToString(addrs[0]), }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), }, }, @@ -111,25 +126,25 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, }, valid: true, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "invalid foundation tax": { data: foundation.GenesisState{ Params: foundation.Params{ - FoundationTax: sdk.NewDec(2), + FoundationTax: math.LegacyNewDec(2), }, Foundation: foundation.DefaultFoundation(), }, @@ -155,7 +170,7 @@ func TestValidateGenesis(t *testing.T) { Foundation: foundation.DefaultFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, }, @@ -169,12 +184,12 @@ func TestValidateGenesis(t *testing.T) { Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[0].String()}, + Proposers: []string{bytesToString(addrs[0])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, }, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "invalid proposal": { data: foundation.GenesisState{ @@ -182,7 +197,7 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 1, @@ -196,19 +211,19 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 0, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, }, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "proposal of too far ahead version": { data: foundation.GenesisState{ @@ -216,19 +231,19 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 2, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, }, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x32, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x32, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "duplicate proposals": { data: foundation.GenesisState{ @@ -236,24 +251,24 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, }, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x2c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x2c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "no proposal for the vote": { data: foundation.GenesisState{ @@ -262,7 +277,7 @@ func TestValidateGenesis(t *testing.T) { Votes: []foundation.Vote{ { ProposalId: 1, - Voter: addrs[0].String(), + Voter: bytesToString(addrs[0]), Option: foundation.VOTE_OPTION_YES, }, }, @@ -275,14 +290,14 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, @@ -293,7 +308,7 @@ func TestValidateGenesis(t *testing.T) { }, }, }, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "invalid vote option": { data: foundation.GenesisState{ @@ -301,25 +316,25 @@ func TestValidateGenesis(t *testing.T) { Foundation: workingFoundation(), Members: []foundation.Member{ { - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{addrs[1].String()}, + Proposers: []string{bytesToString(addrs[1])}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, Votes: []foundation.Vote{ { ProposalId: 1, - Voter: addrs[2].String(), + Voter: bytesToString(addrs[2]), }, }, }, - raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x67, 0x79, 0x33, 0x78, 0x71, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, + raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x30, 0x34, 0x38, 0x30, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x79, 0x34, 0x30, 0x71, 0x32, 0x70, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x67, 0x79, 0x33, 0x78, 0x71, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d}, }, "invalid censorship": { data: foundation.GenesisState{ @@ -357,7 +372,7 @@ func TestValidateGenesis(t *testing.T) { }, }, Authorizations: []foundation.GrantAuthorization{{ - Grantee: addrs[0].String(), + Grantee: bytesToString(addrs[0]), }}, }, raw: []byte{0x7b, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3a, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x78, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x78, 0x71, 0x36, 0x39, 0x7a, 0x76, 0x77, 0x34, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x7d, 0x5d, 0x2c, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x2c, 0x22, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x22, 0x7d, 0x5d, 0x7d}, @@ -368,7 +383,7 @@ func TestValidateGenesis(t *testing.T) { Foundation: foundation.DefaultFoundation(), Authorizations: []foundation.GrantAuthorization{ *foundation.GrantAuthorization{ - Grantee: addrs[0].String(), + Grantee: bytesToString(addrs[0]), }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), }, }, @@ -398,7 +413,7 @@ func TestValidateGenesis(t *testing.T) { Treasury: sdk.DecCoins{ { Denom: sdk.DefaultBondDenom, - Amount: sdk.ZeroDec(), + Amount: math.LegacyZeroDec(), }, }, }, @@ -419,7 +434,7 @@ func TestValidateGenesis(t *testing.T) { require.NoError(t, err) require.Equal(t, tc.raw, marshaled) - err = foundation.ValidateGenesis(unmarshalled) + err = foundation.ValidateGenesis(unmarshalled, addressCodec) if !tc.valid { require.Error(t, err) return @@ -432,24 +447,24 @@ func TestValidateGenesis(t *testing.T) { func TestFoundationInfo(t *testing.T) { testCases := map[string]struct { version uint64 - totalWeight sdk.Dec + totalWeight math.LegacyDec policy foundation.DecisionPolicy valid bool }{ "valid info (default)": { version: 1, - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), policy: foundation.DefaultDecisionPolicy(), valid: true, }, "valid info (working policy)": { version: 1, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), policy: workingPolicy(), valid: true, }, "invalid version": { - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), policy: foundation.DefaultDecisionPolicy(), }, "invalid total weight": { @@ -458,21 +473,21 @@ func TestFoundationInfo(t *testing.T) { }, "empty policy": { version: 1, - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), }, "invalid policy": { version: 1, - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), policy: &foundation.ThresholdDecisionPolicy{}, }, "outsourcing with members": { version: 1, - totalWeight: sdk.OneDec(), + totalWeight: math.LegacyOneDec(), policy: foundation.DefaultDecisionPolicy(), }, "working policy without members": { version: 1, - totalWeight: sdk.ZeroDec(), + totalWeight: math.LegacyZeroDec(), policy: workingPolicy(), }, } diff --git a/x/foundation/keeper/internal/abci_test.go b/x/foundation/keeper/internal/abci_test.go index 5017dc0db2..a526ac9463 100644 --- a/x/foundation/keeper/internal/abci_test.go +++ b/x/foundation/keeper/internal/abci_test.go @@ -1,7 +1,7 @@ package internal_test import ( - abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,15 +11,15 @@ import ( func (s *KeeperTestSuite) TestBeginBlocker() { for name, tc := range map[string]struct { - taxRatio sdk.Dec + taxRatio math.LegacyDec valid bool }{ "valid ratio": { - taxRatio: sdk.OneDec(), + taxRatio: math.LegacyOneDec(), valid: true, }, "ratio > 1": { - taxRatio: sdk.MustNewDecFromStr("1.00000001"), + taxRatio: math.LegacyMustNewDecFromStr("1.00000001"), }, } { s.Run(name, func() { @@ -39,7 +39,7 @@ func (s *KeeperTestSuite) TestBeginBlocker() { s.Require().NotPanics(testing) if s.deterministic { - expectedEvents := sdk.Events{sdk.Event{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x37, 0x78, 0x70, 0x66, 0x76, 0x61, 0x6b, 0x6d, 0x32, 0x61, 0x6d, 0x67, 0x39, 0x36, 0x32, 0x79, 0x6c, 0x73, 0x36, 0x66, 0x38, 0x34, 0x7a, 0x33, 0x6b, 0x65, 0x6c, 0x6c, 0x38, 0x63, 0x35, 0x6c, 0x39, 0x68, 0x72, 0x7a, 0x73, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, sdk.Event{Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, sdk.Event{Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x37, 0x78, 0x70, 0x66, 0x76, 0x61, 0x6b, 0x6d, 0x32, 0x61, 0x6d, 0x67, 0x39, 0x36, 0x32, 0x79, 0x6c, 0x73, 0x36, 0x66, 0x38, 0x34, 0x7a, 0x33, 0x6b, 0x65, 0x6c, 0x6c, 0x38, 0x63, 0x35, 0x6c, 0x39, 0x68, 0x72, 0x7a, 0x73, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}} + expectedEvents := sdk.Events{} // TODO s.Require().Equal(expectedEvents, ctx.EventManager().Events()) } }) diff --git a/x/foundation/keeper/internal/censorship.go b/x/foundation/keeper/internal/censorship.go index 09d49a35b7..d19ee8c9da 100644 --- a/x/foundation/keeper/internal/censorship.go +++ b/x/foundation/keeper/internal/censorship.go @@ -97,8 +97,12 @@ func (k Keeper) Grant(ctx sdk.Context, grantee sdk.AccAddress, authorization fou return err } + granteeStr, err := k.addressCodec.BytesToString(grantee) + if err != nil { + panic(err) + } if err := ctx.EventManager().EmitTypedEvent(&foundation.EventGrant{ - Grantee: grantee.String(), + Grantee: granteeStr, Authorization: any, }); err != nil { panic(err) @@ -113,8 +117,12 @@ func (k Keeper) Revoke(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL strin } k.deleteAuthorization(ctx, grantee, msgTypeURL) + granteeStr, err := k.addressCodec.BytesToString(grantee) + if err != nil { + panic(err) + } if err := ctx.EventManager().EmitTypedEvent(&foundation.EventRevoke{ - Grantee: grantee.String(), + Grantee: granteeStr, MsgTypeUrl: msgTypeURL, }); err != nil { panic(err) @@ -127,8 +135,13 @@ func (k Keeper) pruneAuthorizations(ctx sdk.Context, msgTypeURL string) { var pruning []foundation.GrantAuthorization k.iterateAuthorizations(ctx, func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool) { if authorization.MsgTypeURL() == msgTypeURL { + granteeStr, err := k.addressCodec.BytesToString(grantee) + if err != nil { + panic(err) + } + grant := foundation.GrantAuthorization{ - Grantee: grantee.String(), + Grantee: granteeStr, }.WithAuthorization(authorization) pruning = append(pruning, *grant) @@ -137,7 +150,12 @@ func (k Keeper) pruneAuthorizations(ctx sdk.Context, msgTypeURL string) { }) for _, grant := range pruning { - k.deleteAuthorization(ctx, sdk.MustAccAddressFromBech32(grant.Grantee), grant.GetAuthorization().MsgTypeURL()) + grantee, err := k.addressCodec.StringToBytes(grant.Grantee) + if err != nil { + panic(err) + } + + k.deleteAuthorization(ctx, grantee, grant.GetAuthorization().MsgTypeURL()) } } diff --git a/x/foundation/keeper/internal/censorship_test.go b/x/foundation/keeper/internal/censorship_test.go index 3b54c6609c..df34f8c48e 100644 --- a/x/foundation/keeper/internal/censorship_test.go +++ b/x/foundation/keeper/internal/censorship_test.go @@ -3,6 +3,8 @@ package internal_test import ( sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" + "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -142,9 +144,9 @@ func (s *KeeperTestSuite) TestAccept() { "valid request": { grantee: s.stranger, msg: &foundation.MsgWithdrawFromTreasury{ - Authority: s.authority.String(), - To: s.stranger.String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.OneInt())), }, valid: true, }, @@ -158,18 +160,18 @@ func (s *KeeperTestSuite) TestAccept() { }, grantee: s.members[0], msg: &foundation.MsgWithdrawFromTreasury{ - Authority: s.authority.String(), - To: s.members[0].String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.members[0]), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.OneInt())), }, valid: true, }, "no authorization": { grantee: s.members[0], msg: &foundation.MsgWithdrawFromTreasury{ - Authority: s.authority.String(), - To: s.members[0].String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.members[0]), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.OneInt())), }, }, } diff --git a/x/foundation/keeper/internal/exec.go b/x/foundation/keeper/internal/exec.go index 680e1c9bad..ef2766dc26 100644 --- a/x/foundation/keeper/internal/exec.go +++ b/x/foundation/keeper/internal/exec.go @@ -97,7 +97,11 @@ func (k Keeper) doExecuteMsgs(ctx sdk.Context, proposal foundation.Proposal) ([] msgs := proposal.GetMsgs() results := make([]sdk.Result, len(msgs)) - authority := sdk.MustAccAddressFromBech32(k.GetAuthority()) + authority, err := k.addressCodec.StringToBytes(k.GetAuthority()) + if err != nil { + panic(err) + } + if err := ensureMsgAuthz(msgs, authority, k.cdc); err != nil { return nil, err } diff --git a/x/foundation/keeper/internal/genesis.go b/x/foundation/keeper/internal/genesis.go index 8333d26cf1..ae7c639c09 100644 --- a/x/foundation/keeper/internal/genesis.go +++ b/x/foundation/keeper/internal/genesis.go @@ -43,7 +43,10 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *foundation.GenesisState) erro } for _, ga := range data.Authorizations { - grantee := sdk.MustAccAddressFromBech32(ga.Grantee) + grantee, err := k.addressCodec.StringToBytes(ga.Grantee) + if err != nil { + panic(err) + } k.setAuthorization(ctx, grantee, ga.GetAuthorization()) } @@ -87,8 +90,12 @@ func (k Keeper) GetCensorships(ctx sdk.Context) []foundation.Censorship { func (k Keeper) GetGrants(ctx sdk.Context) []foundation.GrantAuthorization { var grantAuthorizations []foundation.GrantAuthorization k.iterateAuthorizations(ctx, func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool) { + granteeStr, err := k.addressCodec.BytesToString(grantee) + if err != nil { + panic(err) + } grantAuthorization := foundation.GrantAuthorization{ - Grantee: grantee.String(), + Grantee: granteeStr, } if err := grantAuthorization.SetAuthorization(authorization); err != nil { panic(err) diff --git a/x/foundation/keeper/internal/genesis_test.go b/x/foundation/keeper/internal/genesis_test.go index fc5912202d..c54bf57f64 100644 --- a/x/foundation/keeper/internal/genesis_test.go +++ b/x/foundation/keeper/internal/genesis_test.go @@ -5,7 +5,8 @@ import ( "time" "github.com/stretchr/testify/require" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -16,7 +17,7 @@ import ( func workingPolicy() foundation.DecisionPolicy { return &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: 7 * 24 * time.Hour, // one week }, @@ -24,21 +25,21 @@ func workingPolicy() foundation.DecisionPolicy { } func TestImportExportGenesis(t *testing.T) { - checkTx := false - app := simapp.Setup(checkTx) - testdata.RegisterInterfaces(app.InterfaceRegistry()) + _, keeper, _, _, _, addressCodec, ctx := setupFoundationKeeper(t, nil, nil) + + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } - ctx := app.BaseApp.NewContext(checkTx, cmtproto.Header{}) - keeper := app.FoundationKeeper + authority, err := addressCodec.StringToBytes(keeper.GetAuthority()) + require.NoError(t, err) createAddress := func() sdk.AccAddress { return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) } - authority := foundation.DefaultAuthority() - existingAccount := createAddress() - app.AccountKeeper.SetAccount(ctx, app.AccountKeeper.NewAccountWithAddress(ctx, existingAccount)) - member := createAddress() stranger := createAddress() @@ -63,11 +64,11 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), }, }, }, @@ -76,11 +77,11 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), }, }, }, @@ -90,25 +91,25 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{member.String()}, + Proposers: []string{bytesToString(member)}, FoundationVersion: 1, - }.WithMsgs([]sdk.Msg{testdata.NewTestMsg(authority)}), + }.WithMsgs([]sdk.Msg{&testdata.TestMsg{Signers: []string{bytesToString(authority)}}}), }, Votes: []foundation.Vote{ { ProposalId: 1, - Voter: member.String(), + Voter: bytesToString(member), Option: foundation.VOTE_OPTION_YES, }, }, @@ -118,31 +119,31 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{member.String()}, + Proposers: []string{bytesToString(member)}, FoundationVersion: 1, FinalTallyResult: foundation.TallyResult{ - YesCount: sdk.ZeroDec(), - NoCount: sdk.ZeroDec(), - AbstainCount: sdk.ZeroDec(), - NoWithVetoCount: sdk.ZeroDec(), + YesCount: math.LegacyZeroDec(), + NoCount: math.LegacyZeroDec(), + AbstainCount: math.LegacyZeroDec(), + NoWithVetoCount: math.LegacyZeroDec(), }, - }.WithMsgs([]sdk.Msg{testdata.NewTestMsg(authority)}), + }.WithMsgs([]sdk.Msg{&testdata.TestMsg{Signers: []string{bytesToString(authority)}}}), }, Votes: []foundation.Vote{ { ProposalId: 1, - Voter: member.String(), + Voter: bytesToString(member), Option: foundation.VOTE_OPTION_YES, }, }, @@ -160,7 +161,7 @@ func TestImportExportGenesis(t *testing.T) { }, Authorizations: []foundation.GrantAuthorization{ *foundation.GrantAuthorization{ - Grantee: stranger.String(), + Grantee: bytesToString(stranger), }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), }, }, @@ -176,7 +177,7 @@ func TestImportExportGenesis(t *testing.T) { }, Authorizations: []foundation.GrantAuthorization{ *foundation.GrantAuthorization{ - Grantee: stranger.String(), + Grantee: bytesToString(stranger), }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}), }, }, @@ -186,7 +187,7 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: foundation.DefaultFoundation(), Pool: foundation.Pool{ - Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, sdk.OneInt())), + Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, math.OneInt())), }, }, valid: true, @@ -194,7 +195,7 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: foundation.DefaultFoundation(), Pool: foundation.Pool{ - Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, sdk.OneInt())), + Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, math.OneInt())), }, }, }, @@ -203,11 +204,11 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), Metadata: string(make([]rune, 256)), }, }, @@ -218,11 +219,11 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), }, }, PreviousProposalId: 1, @@ -230,7 +231,7 @@ func TestImportExportGenesis(t *testing.T) { *foundation.Proposal{ Id: 1, Metadata: string(make([]rune, 256)), - Proposers: []string{member.String()}, + Proposers: []string{bytesToString(member)}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, @@ -241,25 +242,25 @@ func TestImportExportGenesis(t *testing.T) { Params: foundation.DefaultParams(), Foundation: *foundation.FoundationInfo{ Version: 1, - TotalWeight: sdk.OneDec(), + TotalWeight: math.LegacyOneDec(), }.WithDecisionPolicy(workingPolicy()), Members: []foundation.Member{ { - Address: member.String(), + Address: bytesToString(member), }, }, PreviousProposalId: 1, Proposals: []foundation.Proposal{ *foundation.Proposal{ Id: 1, - Proposers: []string{member.String()}, + Proposers: []string{bytesToString(member)}, FoundationVersion: 1, }.WithMsgs([]sdk.Msg{testdata.NewTestMsg()}), }, Votes: []foundation.Vote{ { ProposalId: 1, - Voter: member.String(), + Voter: bytesToString(member), Option: foundation.VOTE_OPTION_YES, Metadata: string(make([]rune, 256)), }, @@ -271,7 +272,7 @@ func TestImportExportGenesis(t *testing.T) { for name, tc := range testCases { ctx, _ := ctx.CacheContext() - err := foundation.ValidateGenesis(*tc.init) + err := foundation.ValidateGenesis(*tc.init, addressCodec) require.NoError(t, err, name) err = keeper.InitGenesis(ctx, tc.init) diff --git a/x/foundation/keeper/internal/grpc_query.go b/x/foundation/keeper/internal/grpc_query.go index bcfce8f808..4ada5774ac 100644 --- a/x/foundation/keeper/internal/grpc_query.go +++ b/x/foundation/keeper/internal/grpc_query.go @@ -68,7 +68,7 @@ func (s queryServer) Member(c context.Context, req *foundation.QueryMemberReques } ctx := sdk.UnwrapSDKContext(c) - addr, err := sdk.AccAddressFromBech32(req.Address) + addr, err := s.keeper.addressCodec.StringToBytes(req.Address) if err != nil { return nil, err } @@ -146,7 +146,7 @@ func (s queryServer) Vote(c context.Context, req *foundation.QueryVoteRequest) ( } ctx := sdk.UnwrapSDKContext(c) - voter, err := sdk.AccAddressFromBech32(req.Voter) + voter, err := s.keeper.addressCodec.StringToBytes(req.Voter) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "invalid voter address") } @@ -228,7 +228,7 @@ func (s queryServer) Grants(c context.Context, req *foundation.QueryGrantsReques return nil, status.Error(codes.InvalidArgument, "invalid request") } - grantee, err := sdk.AccAddressFromBech32(req.Grantee) + grantee, err := s.keeper.addressCodec.StringToBytes(req.Grantee) if err != nil { return nil, err } diff --git a/x/foundation/keeper/internal/grpc_query_test.go b/x/foundation/keeper/internal/grpc_query_test.go index e0167ea071..395ed56e24 100644 --- a/x/foundation/keeper/internal/grpc_query_test.go +++ b/x/foundation/keeper/internal/grpc_query_test.go @@ -6,11 +6,12 @@ import ( "testing" "github.com/stretchr/testify/suite" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper" @@ -20,7 +21,6 @@ import ( type FoundationTestSuite struct { suite.Suite - app *simapp.SimApp ctx sdk.Context queryClient foundation.QueryClient @@ -28,24 +28,13 @@ type FoundationTestSuite struct { } func (s *FoundationTestSuite) SetupTest() { - s.app = simapp.Setup(false) - s.ctx = s.app.BaseApp.NewContext(false, cmtproto.Header{}) + var encCfg moduletestutil.TestEncodingConfig + var k keeper.Keeper + s.impl, k, _, _, encCfg, _, s.ctx = setupFoundationKeeper(s.T(), nil, nil) - queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.app.InterfaceRegistry()) - foundation.RegisterQueryServer(queryHelper, keeper.NewQueryServer(s.app.FoundationKeeper)) + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, encCfg.InterfaceRegistry) + foundation.RegisterQueryServer(queryHelper, keeper.NewQueryServer(k)) s.queryClient = foundation.NewQueryClient(queryHelper) - - s.impl = internal.NewKeeper( - s.app.AppCodec(), - s.app.GetKey(foundation.ModuleName), - s.app.MsgServiceRouter(), - s.app.AccountKeeper, - s.app.BankKeeper, - authtypes.FeeCollectorName, - foundation.DefaultConfig(), - foundation.DefaultAuthority().String(), - s.app.GetSubspace(foundation.ModuleName), - ) } func (s *FoundationTestSuite) TestQueryParams() { @@ -63,7 +52,7 @@ func (s *FoundationTestSuite) TestQueryParams() { "with foundation tax", func() { params := foundation.Params{ - FoundationTax: sdk.OneDec(), + FoundationTax: math.LegacyOneDec(), } s.impl.SetParams(s.ctx, params) diff --git a/x/foundation/keeper/internal/invariants.go b/x/foundation/keeper/internal/invariants.go index 68d8c54467..18a1299d52 100644 --- a/x/foundation/keeper/internal/invariants.go +++ b/x/foundation/keeper/internal/invariants.go @@ -5,6 +5,7 @@ import ( "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/types/address" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" @@ -28,8 +29,9 @@ func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { func ModuleAccountInvariant(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { - treasuryAcc := k.authKeeper.GetModuleAccount(ctx, foundation.TreasuryName) - balance := k.bankKeeper.GetAllBalances(ctx, treasuryAcc.GetAddress()) + // TODO(@0Tech): use auth keeper after applying global bech32 removal + treasuryAcc := address.Module(foundation.TreasuryName) + balance := k.bankKeeper.GetAllBalances(ctx, treasuryAcc) treasury := k.GetTreasury(ctx) msg := fmt.Sprintf("coins in the treasury; expected %s, got %s\n", treasury, balance) diff --git a/x/foundation/keeper/internal/invariants_test.go b/x/foundation/keeper/internal/invariants_test.go index 195819240c..ae811c617c 100644 --- a/x/foundation/keeper/internal/invariants_test.go +++ b/x/foundation/keeper/internal/invariants_test.go @@ -1,6 +1,8 @@ package internal_test import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/Finschia/finschia-sdk/x/foundation" @@ -17,7 +19,7 @@ func (s *KeeperTestSuite) TestModuleAccountInvariant() { }, "treasury differs from the balance": { malleate: func(ctx sdk.Context) { - balance := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance.Add(sdk.OneInt()))) + balance := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance.Add(math.OneInt()))) s.impl.SetPool(ctx, foundation.Pool{ Treasury: sdk.NewDecCoinsFromCoins(balance...), }) @@ -33,8 +35,8 @@ func (s *KeeperTestSuite) TestModuleAccountInvariant() { } invariant := internal.ModuleAccountInvariant(s.impl) - _, broken := invariant(ctx) - s.Require().Equal(!tc.valid, broken) + msg, broken := invariant(ctx) + s.Require().Equal(!tc.valid, broken, msg) }) } } @@ -51,7 +53,7 @@ func (s *KeeperTestSuite) TestTotalWeightInvariant() { malleate: func(ctx sdk.Context) { info := s.impl.GetFoundationInfo(ctx) numMembers := len(s.impl.GetMembers(ctx)) - info.TotalWeight = sdk.NewDec(int64(numMembers)).Add(sdk.OneDec()) + info.TotalWeight = math.LegacyNewDec(int64(numMembers)).Add(math.LegacyOneDec()) s.impl.SetFoundationInfo(ctx, info) }, }, diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index 7d490dd283..ae9ac229f2 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -55,12 +55,16 @@ func NewKeeper( authority string, subspace paramstypes.Subspace, ) Keeper { - if _, err := sdk.AccAddressFromBech32(authority); err != nil { + if _, err := addressCodec.StringToBytes(authority); err != nil { panic("authority is not a valid acc address") } // authority is x/foundation module account for now. - if authority != foundation.DefaultAuthority().String() { + defaultAuthority, err := addressCodec.BytesToString(foundation.DefaultAuthority()) + if err != nil { + panic(err) + } + if authority != defaultAuthority { panic("x/foundation authority must be the module account") } diff --git a/x/foundation/keeper/internal/keeper_test.go b/x/foundation/keeper/internal/keeper_test.go index f2479ce6aa..31068c9fc1 100644 --- a/x/foundation/keeper/internal/keeper_test.go +++ b/x/foundation/keeper/internal/keeper_test.go @@ -1,23 +1,39 @@ package internal_test import ( - "fmt" + "context" "testing" + "time" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/core/address" + "cosmossdk.io/log" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/Finschia/finschia-sdk/x/foundation" - keeper "github.com/Finschia/finschia-sdk/x/foundation/keeper" + "github.com/Finschia/finschia-sdk/x/foundation/keeper" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" + "github.com/Finschia/finschia-sdk/x/foundation/module" + foundationtestutil "github.com/Finschia/finschia-sdk/x/foundation/testutil" ) type KeeperTestSuite struct { @@ -27,10 +43,12 @@ type KeeperTestSuite struct { ctx sdk.Context - bankKeeper foundation.BankKeeper + bankKeeper *foundationtestutil.MockBankKeeper keeper keeper.Keeper impl internal.Keeper + addressCodec address.Codec + queryServer foundation.QueryServer msgServer foundation.MsgServer proposalHandler govtypes.Handler @@ -46,7 +64,7 @@ type KeeperTestSuite struct { noHandlerProposal uint64 nextProposal uint64 - balance sdk.Int + balance math.Int } func newMsgCreateDog(name string) sdk.Msg { @@ -59,114 +77,246 @@ func newMsgCreateDog(name string) sdk.Msg { func (s *KeeperTestSuite) createAddresses(accNum int) []sdk.AccAddress { if s.deterministic { - addresses := make([]sdk.AccAddress, accNum) - for i := range addresses { - addresses[i] = sdk.AccAddress(fmt.Sprintf("address%d", i)) - } - return addresses + return simtestutil.CreateIncrementalAccounts(accNum) } else { - seenAddresses := make(map[string]bool, accNum) - addresses := make([]sdk.AccAddress, accNum) - for i := range addresses { - var address sdk.AccAddress - for { - pk := secp256k1.GenPrivKey().PubKey() - address = sdk.AccAddress(pk.Address()) - if !seenAddresses[address.String()] { - seenAddresses[address.String()] = true - break - } - } - addresses[i] = address - } - return addresses + return simtestutil.CreateRandomAccounts(accNum) } } -func (s *KeeperTestSuite) SetupTest() { - checkTx := false - app := simapp.Setup(checkTx) - testdata.RegisterInterfaces(app.InterfaceRegistry()) - testdata.RegisterMsgServer(app.MsgServiceRouter(), testdata.MsgServerImpl{}) - - s.ctx = app.BaseApp.NewContext(checkTx, cmtproto.Header{}) - s.bankKeeper = app.BankKeeper - s.keeper = app.FoundationKeeper - s.impl = internal.NewKeeper( - app.AppCodec(), - app.GetKey(foundation.ModuleName), - app.MsgServiceRouter(), - app.AccountKeeper, - app.BankKeeper, - authtypes.FeeCollectorName, - foundation.DefaultConfig(), - foundation.DefaultAuthority().String(), - app.GetSubspace(foundation.ModuleName), +func (s *KeeperTestSuite) bytesToString(addr sdk.AccAddress) string { + str, err := s.addressCodec.BytesToString(addr) + s.Require().NoError(err) + return str +} + +func (s *KeeperTestSuite) newTestMsg(addrs ...sdk.AccAddress) *testdata.TestMsg { + accAddresses := make([]string, len(addrs)) + + for i, addr := range addrs { + accAddresses[i] = s.bytesToString(addr) + } + + return &testdata.TestMsg{ + Signers: accAddresses, + } +} + +func setupFoundationKeeper(t *testing.T, balance *math.Int, addrs []sdk.AccAddress) ( + internal.Keeper, + keeper.Keeper, + *foundationtestutil.MockAuthKeeper, + *foundationtestutil.MockBankKeeper, + moduletestutil.TestEncodingConfig, + address.Codec, + sdk.Context, +) { + key := storetypes.NewKVStoreKey(foundation.StoreKey) + tkey := storetypes.NewTransientStoreKey("transient_test") + testCtx := testutil.DefaultContextWithDB(t, key, tkey) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) + + ir := codectestutil.CodecOptions{ + AccAddressPrefix: "link", + ValAddressPrefix: "linkvaloper", + }.NewInterfaceRegistry() + encCfg.InterfaceRegistry = ir + encCfg.Codec = codec.NewProtoCodec(ir) + + foundation.RegisterInterfaces(ir) + testdata.RegisterInterfaces(ir) + + addressCodec := ir.SigningContext().AddressCodec() + + bapp := baseapp.NewBaseApp( + "foundation", + log.NewNopLogger(), + testCtx.DB, + encCfg.TxConfig.TxDecoder(), + ) + bapp.SetInterfaceRegistry(ir) + + ctrl := gomock.NewController(t) + authKeeper := foundationtestutil.NewMockAuthKeeper(ctrl) + bankKeeper := foundationtestutil.NewMockBankKeeper(ctrl) + subspace := paramstypes.NewSubspace(encCfg.Codec, encCfg.Amino, key, tkey, "params") + + authority, err := addressCodec.BytesToString(foundation.DefaultAuthority()) + require.NoError(t, err) + + config := foundation.DefaultConfig() + feeCollector := authtypes.FeeCollectorName + k := keeper.NewKeeper(encCfg.Codec, addressCodec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, bankKeeper, feeCollector, config, authority, subspace) + + impl := internal.NewKeeper( + encCfg.Codec, + addressCodec, + runtime.NewKVStoreService(key), + bapp.MsgServiceRouter(), + authKeeper, + bankKeeper, + feeCollector, + config, + authority, + subspace, ) - s.queryServer = keeper.NewQueryServer(s.keeper) - s.msgServer = keeper.NewMsgServer(s.keeper) + msgServer := keeper.NewMsgServer(k) + queryServer := keeper.NewQueryServer(k) - s.proposalHandler = keeper.NewFoundationProposalsHandler(s.keeper) + foundation.RegisterMsgServer(bapp.MsgServiceRouter(), msgServer) + foundation.RegisterQueryServer(bapp.GRPCQueryRouter(), queryServer) - s.impl.SetParams(s.ctx, foundation.Params{ - FoundationTax: sdk.OneDec(), - }) + testdata.RegisterMsgServer(bapp.MsgServiceRouter(), testdata.MsgServerImpl{}) - s.impl.SetCensorship(s.ctx, foundation.Censorship{ - MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), - Authority: foundation.CensorshipAuthorityFoundation, - }) + // mock bank keeper + prefix := []byte{0xff} + getBalance := func(ctx context.Context, addr sdk.AccAddress) sdk.Coin { + store := runtime.NewKVStoreService(key).OpenKVStore(ctx) + + bz, err := store.Get(append(prefix, addr...)) + require.NoError(t, err) + + if bz == nil { + return sdk.NewCoin(sdk.DefaultBondDenom, math.ZeroInt()) + } + + var amt math.Int + err = amt.Unmarshal(bz) + require.NoError(t, err) + + return sdk.NewCoin(sdk.DefaultBondDenom, amt) + } + setBalance := func(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) { + store := runtime.NewKVStoreService(key).OpenKVStore(ctx) + + bz, err := amt.Amount.Marshal() + require.NoError(t, err) + + err = store.Set(append(prefix, addr...), bz) + require.NoError(t, err) + } + send := func(ctx context.Context, sender, recipient sdk.AccAddress, amt sdk.Coins) error { + require.LessOrEqual(t, len(amt), 1) + + if len(amt) == 0 { + return nil + } + + src := getBalance(ctx, sender) + src, err := src.SafeSub(amt[0]) + if err != nil { + return err + } + setBalance(ctx, sender, src) + + dst := getBalance(ctx, recipient).Add(amt[0]) + setBalance(ctx, recipient, dst) + + return nil + } + + bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, sender sdk.AccAddress, name string, amt sdk.Coins) error { + recipient := authtypes.NewModuleAddress(name) + return send(ctx, sender, recipient, amt) + }).AnyTimes() + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, name string, recipient sdk.AccAddress, amt sdk.Coins) error { + sender := authtypes.NewModuleAddress(name) + return send(ctx, sender, recipient, amt) + }).AnyTimes() + + bankKeeper.EXPECT().GetAllBalances(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, addr sdk.AccAddress) sdk.Coins { + return sdk.NewCoins(getBalance(ctx, addr)) + }).AnyTimes() - s.authority = sdk.MustAccAddressFromBech32(s.impl.GetAuthority()) + ctx := testCtx.Ctx + // set balance + for _, addr := range addrs{ + setBalance(ctx, addr, sdk.NewCoin(sdk.DefaultBondDenom, *balance)) + } + + return impl, k, authKeeper, bankKeeper, encCfg, addressCodec, ctx +} + +func (s *KeeperTestSuite) SetupTest() { numMembers := 10 addresses := s.createAddresses(numMembers + 1) s.members = addresses[:numMembers] + s.stranger = addresses[len(addresses)-1] + + s.balance = math.NewInt(987654321) + coinHolders := []sdk.AccAddress{ + s.stranger, + authtypes.NewModuleAddress(foundation.TreasuryName), + authtypes.NewModuleAddress(authtypes.FeeCollectorName), + } + + var authKeeper *foundationtestutil.MockAuthKeeper + s.impl, s.keeper, authKeeper, s.bankKeeper, _, s.addressCodec, s.ctx = setupFoundationKeeper(s.T(), &s.balance, coinHolders) + + if s.deterministic { + s.ctx = s.ctx.WithBlockTime(time.Date(2023, 11, 7, 19, 32, 0, 0, time.UTC)) + } + + s.authority = foundation.DefaultAuthority() + + s.queryServer = keeper.NewQueryServer(s.keeper) + s.msgServer = keeper.NewMsgServer(s.keeper) + + s.proposalHandler = keeper.NewFoundationProposalsHandler(s.keeper) + + // genesis + gs := &foundation.GenesisState{} + + params := foundation.DefaultParams() + params.FoundationTax = math.LegacyOneDec() + gs.Params = params + + members := make([]foundation.Member, len(s.members)) for i := range s.members { - member := foundation.Member{ - Address: s.members[i].String(), + members[i] = foundation.Member{ + Address: s.bytesToString(s.members[i]), } - s.impl.SetMember(s.ctx, member) } - s.stranger = addresses[len(addresses)-1] + gs.Members = members info := foundation.DefaultFoundation() - info.TotalWeight = sdk.NewDec(int64(len(s.members))) + info.TotalWeight = math.LegacyNewDec(int64(len(s.members))) err := info.SetDecisionPolicy(workingPolicy()) s.Require().NoError(err) - s.impl.SetFoundationInfo(s.ctx, info) + gs.Foundation = info + + gs.Censorships = []foundation.Censorship{{ + MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), + Authority: foundation.CensorshipAuthorityFoundation, + }} - s.balance = sdk.NewInt(987654321) - s.impl.SetPool(s.ctx, foundation.Pool{ + gs.Pool = foundation.Pool{ Treasury: sdk.NewDecCoinsFromCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)), - }) - holders := []sdk.AccAddress{ - s.stranger, - app.AccountKeeper.GetModuleAccount(s.ctx, foundation.TreasuryName).GetAddress(), - app.AccountKeeper.GetModuleAccount(s.ctx, authtypes.FeeCollectorName).GetAddress(), } - for _, holder := range holders { - amount := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)) - - // using minttypes here introduces dependency on x/mint - // the work around would be registering a new module account on this suite - // because x/bank already has dependency on x/mint, and we must have dependency - // on x/bank, it's OK to use x/mint here. - minterName := minttypes.ModuleName - err := app.BankKeeper.MintCoins(s.ctx, minterName, amount) - s.Require().NoError(err) - minter := app.AccountKeeper.GetModuleAccount(s.ctx, minterName).GetAddress() - err = app.BankKeeper.SendCoins(s.ctx, minter, holder, amount) - s.Require().NoError(err) + err = s.keeper.InitGenesis(s.ctx, gs) + s.Require().NoError(err) + + for _, name := range []string{ + foundation.TreasuryName, + authtypes.FeeCollectorName, + } { + addr := authtypes.NewModuleAddress(name) + account := &authtypes.ModuleAccount{ + BaseAccount: &authtypes.BaseAccount{ + Address: s.bytesToString(addr), + }, + Name: name, + } + authKeeper.EXPECT().GetModuleAccount(gomock.Any(), name).Return(account).AnyTimes() } // create an active proposal, voted yes by all members except the first member - activeProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{ + activeProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.bytesToString(s.members[0])}, "", []sdk.Msg{ &foundation.MsgWithdrawFromTreasury{ - Authority: s.authority.String(), - To: s.stranger.String(), + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)), }, }) @@ -176,28 +326,39 @@ func (s *KeeperTestSuite) SetupTest() { for _, member := range s.members[1:] { err := s.impl.Vote(s.ctx, foundation.Vote{ ProposalId: s.activeProposal, - Voter: member.String(), + Voter: s.bytesToString(member), Option: foundation.VOTE_OPTION_YES, }) s.Require().NoError(err) } // create a proposal voted no by all members - votedProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{newMsgCreateDog("shiba1")}) + votedProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.bytesToString(s.members[0])}, "", []sdk.Msg{ + &foundation.MsgWithdrawFromTreasury{ + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance))}, + }) s.Require().NoError(err) s.votedProposal = *votedProposal for _, member := range s.members { err := s.impl.Vote(s.ctx, foundation.Vote{ ProposalId: s.votedProposal, - Voter: member.String(), + Voter: s.bytesToString(member), Option: foundation.VOTE_OPTION_NO, }) s.Require().NoError(err) } // create an withdrawn proposal - withdrawnProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{newMsgCreateDog("shiba2")}) + withdrawnProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.bytesToString(s.members[0])}, "", []sdk.Msg{ + &foundation.MsgWithdrawFromTreasury{ + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance))}, + }) + s.Require().NoError(err) s.withdrawnProposal = *withdrawnProposal @@ -205,11 +366,11 @@ func (s *KeeperTestSuite) SetupTest() { s.Require().NoError(err) // create an invalid proposal which contains invalid message - invalidProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{ + invalidProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.bytesToString(s.members[0])}, "", []sdk.Msg{ &foundation.MsgWithdrawFromTreasury{ - Authority: s.authority.String(), - To: s.stranger.String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance.Add(sdk.OneInt()))), + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance.Add(math.OneInt()))), }, }) s.Require().NoError(err) @@ -218,21 +379,21 @@ func (s *KeeperTestSuite) SetupTest() { for _, member := range s.members { err := s.impl.Vote(s.ctx, foundation.Vote{ ProposalId: s.invalidProposal, - Voter: member.String(), + Voter: s.bytesToString(member), Option: foundation.VOTE_OPTION_YES, }) s.Require().NoError(err) } // create an invalid proposal which contains invalid message - noHandlerProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.members[0].String()}, "", []sdk.Msg{testdata.NewTestMsg(s.authority)}) + noHandlerProposal, err := s.impl.SubmitProposal(s.ctx, []string{s.bytesToString(s.members[0])}, "", []sdk.Msg{s.newTestMsg(s.authority)}) s.Require().NoError(err) s.noHandlerProposal = *noHandlerProposal for _, member := range s.members { err := s.impl.Vote(s.ctx, foundation.Vote{ ProposalId: s.noHandlerProposal, - Voter: member.String(), + Voter: s.bytesToString(member), Option: foundation.VOTE_OPTION_YES, }) s.Require().NoError(err) @@ -281,8 +442,42 @@ func TestNewKeeper(t *testing.T) { tc := tc t.Run(name, func(t *testing.T) { newKeeper := func() keeper.Keeper { - app := simapp.Setup(false) - return keeper.NewKeeper(app.AppCodec(), sdk.NewKVStoreKey(foundation.StoreKey), app.MsgServiceRouter(), app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, foundation.DefaultConfig(), tc.authority.String(), app.GetSubspace(foundation.ModuleName)) + key := storetypes.NewKVStoreKey(foundation.StoreKey) + tkey := storetypes.NewTransientStoreKey("transient_test") + testCtx := testutil.DefaultContextWithDB(t, key, tkey) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) + + ir := codectestutil.CodecOptions{ + AccAddressPrefix: "link", + ValAddressPrefix: "linkvaloper", + }.NewInterfaceRegistry() + encCfg.InterfaceRegistry = ir + encCfg.Codec = codec.NewProtoCodec(ir) + + foundation.RegisterInterfaces(ir) + testdata.RegisterInterfaces(ir) + + addressCodec := ir.SigningContext().AddressCodec() + + bapp := baseapp.NewBaseApp( + "foundation", + log.NewNopLogger(), + testCtx.DB, + encCfg.TxConfig.TxDecoder(), + ) + bapp.SetInterfaceRegistry(ir) + + ctrl := gomock.NewController(t) + authKeeper := foundationtestutil.NewMockAuthKeeper(ctrl) + bankKeeper := foundationtestutil.NewMockBankKeeper(ctrl) + subspace := paramstypes.NewSubspace(encCfg.Codec, encCfg.Amino, key, tkey, "params") + + authority, err := addressCodec.BytesToString(tc.authority) + require.NoError(t, err) + + config := foundation.DefaultConfig() + feeCollector := authtypes.FeeCollectorName + return keeper.NewKeeper(encCfg.Codec, addressCodec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, bankKeeper, feeCollector, config, authority, subspace) } if tc.panics { @@ -292,7 +487,14 @@ func TestNewKeeper(t *testing.T) { require.NotPanics(t, func() { newKeeper() }) k := newKeeper() - require.Equal(t, authority.String(), k.GetAuthority()) + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + + require.Equal(t, bytesToString(authority), k.GetAuthority()) }) } } diff --git a/x/foundation/keeper/internal/member.go b/x/foundation/keeper/internal/member.go index cf392be038..ef73fa8ee1 100644 --- a/x/foundation/keeper/internal/member.go +++ b/x/foundation/keeper/internal/member.go @@ -68,14 +68,17 @@ func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberReques Metadata: request.Metadata, AddedAt: ctx.BlockTime(), } - if err := new.ValidateBasic(); err != nil { + if err := new.ValidateBasic(k.addressCodec); err != nil { panic(err) } if err := validateMetadata(new.Metadata, k.config); err != nil { return err } - addr := sdk.MustAccAddressFromBech32(new.Address) + addr, err := k.addressCodec.StringToBytes(new.Address) + if err != nil { + panic(err) + } old, err := k.GetMember(ctx, addr) if err != nil && request.Remove { // the member must exist return err @@ -127,7 +130,10 @@ func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress) (*foundation. func (k Keeper) SetMember(ctx sdk.Context, member foundation.Member) { store := k.storeService.OpenKVStore(ctx) - addr := sdk.MustAccAddressFromBech32(member.Address) + addr, err := k.addressCodec.StringToBytes(member.Address) + if err != nil { + panic(err) + } key := memberKey(addr) bz := k.cdc.MustMarshal(&member) @@ -180,8 +186,12 @@ func (k Keeper) validateCensorshipAuthority(ctx sdk.Context, msgTypeURL, authori return err } + govAddr, err := k.addressCodec.BytesToString(authtypes.NewModuleAddress(govtypes.ModuleName)) + if err != nil { + return err + } authorityAddrs := map[foundation.CensorshipAuthority]string{ - foundation.CensorshipAuthorityGovernance: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + foundation.CensorshipAuthorityGovernance: govAddr, foundation.CensorshipAuthorityFoundation: k.authority, } if expected := authorityAddrs[censorship.Authority]; authority != expected { @@ -193,7 +203,10 @@ func (k Keeper) validateCensorshipAuthority(ctx sdk.Context, msgTypeURL, authori func (k Keeper) validateMembers(ctx sdk.Context, members []string) error { for _, member := range members { - addr := sdk.MustAccAddressFromBech32(member) + addr, err := k.addressCodec.StringToBytes(member) + if err != nil { + panic(err) + } if _, err := k.GetMember(ctx, addr); err != nil { return sdkerrors.ErrUnauthorized.Wrapf("%s is not a member", member) } diff --git a/x/foundation/keeper/internal/member_test.go b/x/foundation/keeper/internal/member_test.go index c44d84b5c2..2571b46576 100644 --- a/x/foundation/keeper/internal/member_test.go +++ b/x/foundation/keeper/internal/member_test.go @@ -3,7 +3,7 @@ package internal_test import ( "time" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -16,7 +16,7 @@ func (s *KeeperTestSuite) TestUpdateDecisionPolicy() { }{ "valid policy": { policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, @@ -25,7 +25,7 @@ func (s *KeeperTestSuite) TestUpdateDecisionPolicy() { }, "invalid policy (invalid min execution period)": { policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, MinExecutionPeriod: time.Hour + config.MaxExecutionPeriod, @@ -56,7 +56,7 @@ func (s *KeeperTestSuite) TestUpdateMembers() { "add a new member": { updates: []foundation.MemberRequest{ { - Address: s.stranger.String(), + Address: s.bytesToString(s.stranger), }, }, valid: true, @@ -64,7 +64,7 @@ func (s *KeeperTestSuite) TestUpdateMembers() { "remove a member": { updates: []foundation.MemberRequest{ { - Address: s.members[0].String(), + Address: s.bytesToString(s.members[0]), Remove: true, }, }, @@ -73,7 +73,7 @@ func (s *KeeperTestSuite) TestUpdateMembers() { "remove a non-member": { updates: []foundation.MemberRequest{ { - Address: s.stranger.String(), + Address: s.bytesToString(s.stranger), Remove: true, }, }, @@ -81,7 +81,7 @@ func (s *KeeperTestSuite) TestUpdateMembers() { "long metadata": { updates: []foundation.MemberRequest{ { - Address: s.stranger.String(), + Address: s.bytesToString(s.stranger), Metadata: string(make([]rune, 256)), }, }, diff --git a/x/foundation/keeper/internal/migrations/v2/store_test.go b/x/foundation/keeper/internal/migrations/v2/store_test.go index 68fe0fda30..a60628fb51 100644 --- a/x/foundation/keeper/internal/migrations/v2/store_test.go +++ b/x/foundation/keeper/internal/migrations/v2/store_test.go @@ -5,11 +5,17 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal/migrations/v2" + "github.com/Finschia/finschia-sdk/x/foundation/module" ) type mockSubspace struct { @@ -25,33 +31,34 @@ func (ms *mockSubspace) SetParamSet(ctx sdk.Context, ps v2.ParamSet) { } func TestMigrateStore(t *testing.T) { - foundationKey := sdk.NewKVStoreKey(foundation.StoreKey) - newKey := sdk.NewTransientStoreKey("transient_test") - encCfg := simappparams.MakeTestEncodingConfig() - ctx := testutil.DefaultContext(foundationKey, newKey) + foundationKey := storetypes.NewKVStoreKey(foundation.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, foundationKey, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) + + ctx := testCtx.Ctx for name, tc := range map[string]struct { malleate func(ctx sdk.Context) valid bool - tax sdk.Dec + tax math.LegacyDec }{ "valid": { malleate: func(ctx sdk.Context) { // set old keys - bz := encCfg.Marshaler.MustMarshal(&foundation.Params{ - FoundationTax: sdk.MustNewDecFromStr("0.123456789"), + bz := encCfg.Codec.MustMarshal(&foundation.Params{ + FoundationTax: math.LegacyMustNewDecFromStr("0.123456789"), }) store := ctx.KVStore(foundationKey) store.Set(v2.ParamsKey, bz) }, valid: true, - tax: sdk.MustNewDecFromStr("0.123456789"), + tax: math.LegacyMustNewDecFromStr("0.123456789"), }, "no params found": {}, "unmarshal fails": { malleate: func(ctx sdk.Context) { // invalid contents - bz := encCfg.Marshaler.MustMarshal(&foundation.Censorship{ + bz := encCfg.Codec.MustMarshal(&foundation.Censorship{ MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), Authority: foundation.CensorshipAuthorityFoundation, }) @@ -68,7 +75,7 @@ func TestMigrateStore(t *testing.T) { // migrate subspace := &mockSubspace{} - err := v2.MigrateStore(ctx, foundationKey, encCfg.Marshaler, subspace) + err := v2.MigrateStore(ctx, runtime.NewKVStoreService(foundationKey), encCfg.Codec, subspace) if !tc.valid { require.Error(t, err) return diff --git a/x/foundation/keeper/internal/msg_server.go b/x/foundation/keeper/internal/msg_server.go index f66e40edf3..fde2d12d1b 100644 --- a/x/foundation/keeper/internal/msg_server.go +++ b/x/foundation/keeper/internal/msg_server.go @@ -6,6 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/Finschia/finschia-sdk/x/foundation" ) @@ -28,8 +29,17 @@ var _ foundation.MsgServer = msgServer{} // FundTreasury defines a method to fund the treasury. func (s msgServer) FundTreasury(c context.Context, req *foundation.MsgFundTreasury) (*foundation.MsgFundTreasuryResponse, error) { + from, err := s.keeper.addressCodec.StringToBytes(req.From) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid from address: %s", req.From) + } + + if !req.Amount.IsValid() || !req.Amount.IsAllPositive() { + return nil, sdkerrors.ErrInvalidCoins.Wrap(req.Amount.String()) + } + ctx := sdk.UnwrapSDKContext(c) - from := sdk.MustAccAddressFromBech32(req.From) + if err := s.keeper.FundTreasury(ctx, from, req.Amount); err != nil { return nil, err } @@ -46,13 +56,25 @@ func (s msgServer) FundTreasury(c context.Context, req *foundation.MsgFundTreasu // WithdrawFromTreasury defines a method to withdraw coins from the treasury. func (s msgServer) WithdrawFromTreasury(c context.Context, req *foundation.MsgWithdrawFromTreasury) (*foundation.MsgWithdrawFromTreasuryResponse, error) { + if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) + } + + to, err := s.keeper.addressCodec.StringToBytes(req.To) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid to address: %s", req.To) + } + + if !req.Amount.IsValid() || !req.Amount.IsAllPositive() { + return nil, sdkerrors.ErrInvalidCoins.Wrap(req.Amount.String()) + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateAuthority(req.Authority); err != nil { return nil, err } - to := sdk.MustAccAddressFromBech32(req.To) if err := s.keeper.Accept(ctx, to, req); err != nil { return nil, err } @@ -72,6 +94,18 @@ func (s msgServer) WithdrawFromTreasury(c context.Context, req *foundation.MsgWi } func (s msgServer) UpdateMembers(c context.Context, req *foundation.MsgUpdateMembers) (*foundation.MsgUpdateMembersResponse, error) { + if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) + } + + if len(req.MemberUpdates) == 0 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("empty updates") + } + members := foundation.MemberRequests{Members: req.MemberUpdates} + if err := members.ValidateBasic(s.keeper.addressCodec); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateAuthority(req.Authority); err != nil { @@ -92,13 +126,24 @@ func (s msgServer) UpdateMembers(c context.Context, req *foundation.MsgUpdateMem } func (s msgServer) UpdateDecisionPolicy(c context.Context, req *foundation.MsgUpdateDecisionPolicy) (*foundation.MsgUpdateDecisionPolicyResponse, error) { + if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) + } + + policy := req.GetDecisionPolicy() + if policy == nil { + return nil, sdkerrors.ErrInvalidRequest.Wrap("nil decision policy") + } + if err := req.GetDecisionPolicy().ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateAuthority(req.Authority); err != nil { return nil, err } - policy := req.GetDecisionPolicy() if err := s.keeper.UpdateDecisionPolicy(ctx, policy); err != nil { return nil, err } @@ -115,6 +160,18 @@ func (s msgServer) UpdateDecisionPolicy(c context.Context, req *foundation.MsgUp } func (s msgServer) SubmitProposal(c context.Context, req *foundation.MsgSubmitProposal) (*foundation.MsgSubmitProposalResponse, error) { + if err := foundation.ValidateProposers(req.Proposers, s.keeper.addressCodec); err != nil { + return nil, err + } + + if len(req.GetMsgs()) == 0 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("no msgs") + } + + if _, ok := foundation.Exec_name[int32(req.Exec)]; !ok { + return nil, sdkerrors.ErrInvalidRequest.Wrap("invalid exec option") + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateMembers(ctx, req.Proposers); err != nil { @@ -163,8 +220,16 @@ func (s msgServer) SubmitProposal(c context.Context, req *foundation.MsgSubmitPr } func (s msgServer) WithdrawProposal(c context.Context, req *foundation.MsgWithdrawProposal) (*foundation.MsgWithdrawProposalResponse, error) { - ctx := sdk.UnwrapSDKContext(c) id := req.ProposalId + if id == 0 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") + } + + if _, err := s.keeper.addressCodec.StringToBytes(req.Address); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid withdrawer address: %s", req.Address) + } + + ctx := sdk.UnwrapSDKContext(c) proposal, err := s.keeper.GetProposal(ctx, id) if err != nil { @@ -193,6 +258,22 @@ func (s msgServer) WithdrawProposal(c context.Context, req *foundation.MsgWithdr } func (s msgServer) Vote(c context.Context, req *foundation.MsgVote) (*foundation.MsgVoteResponse, error) { + if req.ProposalId == 0 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") + } + + if _, err := s.keeper.addressCodec.StringToBytes(req.Voter); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", req.Voter) + } + + if err := foundation.ValidateVoteOption(req.Option); err != nil { + return nil, err + } + + if _, ok := foundation.Exec_name[int32(req.Exec)]; !ok { + return nil, sdkerrors.ErrInvalidRequest.Wrap("invalid exec option") + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateMembers(ctx, []string{req.Voter}); err != nil { @@ -220,6 +301,14 @@ func (s msgServer) Vote(c context.Context, req *foundation.MsgVote) (*foundation } func (s msgServer) Exec(c context.Context, req *foundation.MsgExec) (*foundation.MsgExecResponse, error) { + if req.ProposalId == 0 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") + } + + if _, err := s.keeper.addressCodec.StringToBytes(req.Signer); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid signer address: %s", req.Signer) + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateMembers(ctx, []string{req.Signer}); err != nil { @@ -234,6 +323,10 @@ func (s msgServer) Exec(c context.Context, req *foundation.MsgExec) (*foundation } func (s msgServer) LeaveFoundation(c context.Context, req *foundation.MsgLeaveFoundation) (*foundation.MsgLeaveFoundationResponse, error) { + if _, err := s.keeper.addressCodec.StringToBytes(req.Address); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", req.Address) + } + ctx := sdk.UnwrapSDKContext(c) if err := s.keeper.validateMembers(ctx, []string{req.Address}); err != nil { @@ -258,6 +351,14 @@ func (s msgServer) LeaveFoundation(c context.Context, req *foundation.MsgLeaveFo } func (s msgServer) UpdateCensorship(c context.Context, req *foundation.MsgUpdateCensorship) (*foundation.MsgUpdateCensorshipResponse, error) { + if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) + } + + if err := req.Censorship.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(c) url := req.Censorship.MsgTypeUrl @@ -279,16 +380,31 @@ func (s msgServer) UpdateCensorship(c context.Context, req *foundation.MsgUpdate } func (s msgServer) Grant(c context.Context, req *foundation.MsgGrant) (*foundation.MsgGrantResponse, error) { - ctx := sdk.UnwrapSDKContext(c) + if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) + } + + grantee, err := s.keeper.addressCodec.StringToBytes(req.Grantee) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", req.Grantee) + } authorization := req.GetAuthorization() + if authorization != nil { + if err := authorization.ValidateBasic(); err != nil { + return nil, err + } + } else { + return nil, sdkerrors.ErrInvalidType.Wrap("invalid authorization") + } + + ctx := sdk.UnwrapSDKContext(c) url := authorization.MsgTypeURL() if err := s.keeper.validateCensorshipAuthority(ctx, url, req.Authority); err != nil { return nil, err } - grantee := sdk.MustAccAddressFromBech32(req.Grantee) if err := s.keeper.Grant(ctx, grantee, authorization); err != nil { return nil, err } @@ -297,14 +413,26 @@ func (s msgServer) Grant(c context.Context, req *foundation.MsgGrant) (*foundati } func (s msgServer) Revoke(c context.Context, req *foundation.MsgRevoke) (*foundation.MsgRevokeResponse, error) { - ctx := sdk.UnwrapSDKContext(c) + if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) + } + + grantee, err := s.keeper.addressCodec.StringToBytes(req.Grantee) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", req.Grantee) + } url := req.MsgTypeUrl + if len(url) == 0 { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("empty url") + } + + ctx := sdk.UnwrapSDKContext(c) + if err := s.keeper.validateCensorshipAuthority(ctx, url, req.Authority); err != nil { return nil, err } - grantee := sdk.MustAccAddressFromBech32(req.Grantee) if err := s.keeper.Revoke(ctx, grantee, req.MsgTypeUrl); err != nil { return nil, err } diff --git a/x/foundation/keeper/internal/msg_server_test.go b/x/foundation/keeper/internal/msg_server_test.go index 847ee91a0b..144e1d5849 100644 --- a/x/foundation/keeper/internal/msg_server_test.go +++ b/x/foundation/keeper/internal/msg_server_test.go @@ -5,6 +5,8 @@ import ( abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,17 +15,27 @@ import ( func (s *KeeperTestSuite) TestMsgFundTreasury() { testCases := map[string]struct { - amount sdk.Int + from sdk.AccAddress + amount math.Int valid bool events sdk.Events }{ "valid request": { + from: s.stranger, amount: s.balance, valid: true, - events: sdk.Events{{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventFundTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x66, 0x72, 0x6f, 0x6d}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventFundTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"from", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}}, + }, + "empty from": { + amount: s.balance, + }, + "zero amount": { + from: s.stranger, + amount: math.ZeroInt(), }, "insufficient funds": { - amount: s.balance.Add(sdk.OneInt()), + from: s.stranger, + amount: s.balance.Add(math.OneInt()), }, } @@ -32,10 +44,10 @@ func (s *KeeperTestSuite) TestMsgFundTreasury() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgFundTreasury{ - From: s.stranger.String(), + From: s.bytesToString(tc.from), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), } - res, err := s.msgServer.FundTreasury(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.FundTreasury(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -55,7 +67,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawFromTreasury() { testCases := map[string]struct { authority sdk.AccAddress to sdk.AccAddress - amount sdk.Int + amount math.Int valid bool events sdk.Events }{ @@ -64,7 +76,20 @@ func (s *KeeperTestSuite) TestMsgWithdrawFromTreasury() { to: s.stranger, amount: s.balance, valid: true, - events: sdk.Events{{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x74, 0x6f}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawFromTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"to", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}}, + }, + "empty authority": { + to: s.stranger, + amount: math.OneInt(), + }, + "empty to": { + authority: s.authority, + amount: math.OneInt(), + }, + "zero amount": { + authority: s.authority, + to: s.stranger, + amount: math.ZeroInt(), }, "authority not authorized": { authority: s.stranger, @@ -79,7 +104,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawFromTreasury() { "insufficient funds": { authority: s.authority, to: s.stranger, - amount: s.balance.Add(sdk.OneInt()), + amount: s.balance.Add(math.OneInt()), }, } @@ -88,11 +113,11 @@ func (s *KeeperTestSuite) TestMsgWithdrawFromTreasury() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgWithdrawFromTreasury{ - Authority: tc.authority.String(), - To: tc.to.String(), + Authority: s.bytesToString(tc.authority), + To: s.bytesToString(tc.to), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), } - res, err := s.msgServer.WithdrawFromTreasury(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.WithdrawFromTreasury(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -115,26 +140,75 @@ func (s *KeeperTestSuite) TestMsgUpdateDecisionPolicy() { valid bool events sdk.Events }{ - "valid request": { + "valid threshold policy": { authority: s.authority, policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Windows: &foundation.DecisionPolicyWindows{}, + Threshold: math.LegacyOneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + valid: true, + events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes:[]abci.EventAttribute{{Key:"decision_policy", Value:"{\"@type\":\"/lbm.foundation.v1.ThresholdDecisionPolicy\",\"threshold\":\"1.000000000000000000\",\"windows\":{\"voting_period\":\"3600s\",\"min_execution_period\":\"0s\"}}", Index:false}}}}, + }, + "valid percentage policy": { + authority: s.authority, + policy: &foundation.PercentageDecisionPolicy{ + Percentage: math.LegacyOneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, }, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes: []abci.EventAttribute{{Key: []uint8{0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79}, Value: []uint8{0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x2c, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x73, 0x22, 0x7d, 0x7d}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes:[]abci.EventAttribute{{Key:"decision_policy", Value:"{\"@type\":\"/lbm.foundation.v1.PercentageDecisionPolicy\",\"percentage\":\"1.000000000000000000\",\"windows\":{\"voting_period\":\"3600s\",\"min_execution_period\":\"0s\"}}", Index:false}}}}, + }, + "empty authority": { + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: math.LegacyOneDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + }, + "empty policy": { + authority: s.authority, + }, + "zero threshold": { + authority: s.authority, + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: math.LegacyZeroDec(), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, + }, + "zero voting period": { + authority: s.authority, + policy: &foundation.ThresholdDecisionPolicy{ + Threshold: math.LegacyOneDec(), + Windows: &foundation.DecisionPolicyWindows{}, + }, + }, + "invalid percentage": { + authority: s.authority, + policy: &foundation.PercentageDecisionPolicy{ + Percentage: math.LegacyNewDec(2), + Windows: &foundation.DecisionPolicyWindows{ + VotingPeriod: time.Hour, + }, + }, }, "not authorized": { authority: s.stranger, policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{}, }, }, "invalid policy": { authority: s.authority, policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, MinExecutionPeriod: foundation.DefaultConfig().MaxExecutionPeriod + time.Hour, @@ -148,12 +222,14 @@ func (s *KeeperTestSuite) TestMsgUpdateDecisionPolicy() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgUpdateDecisionPolicy{ - Authority: tc.authority.String(), + Authority: s.bytesToString(tc.authority), + } + if tc.policy != nil { + err := req.SetDecisionPolicy(tc.policy) + s.Require().NoError(err) } - err := req.SetDecisionPolicy(tc.policy) - s.Require().NoError(err) - res, err := s.msgServer.UpdateDecisionPolicy(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.UpdateDecisionPolicy(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -172,30 +248,42 @@ func (s *KeeperTestSuite) TestMsgUpdateDecisionPolicy() { func (s *KeeperTestSuite) TestMsgUpdateMembers() { testCases := map[string]struct { authority sdk.AccAddress - member foundation.MemberRequest + members []foundation.MemberRequest valid bool events sdk.Events }{ "valid request": { authority: s.authority, - member: foundation.MemberRequest{ - Address: s.members[0].String(), - }, + members: []foundation.MemberRequest{{ + Address: s.bytesToString(s.members[0]), + }}, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateMembers", Attributes: []abci.EventAttribute{{Key: []uint8{0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73}, Value: []uint8{0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x7d, 0x5d}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateMembers", Attributes:[]abci.EventAttribute{{Key:"member_updates", Value:"[{\"address\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"remove\":false,\"metadata\":\"\"}]", Index:false}}}}, + }, + "empty authority": { + members: []foundation.MemberRequest{{ + Address: s.bytesToString(s.members[0]), + }}, + }, + "empty requests": { + authority: s.authority, + }, + "invalid requests": { + authority: s.authority, + members: []foundation.MemberRequest{{}}, }, "not authorized": { authority: s.stranger, - member: foundation.MemberRequest{ - Address: s.members[0].String(), - }, + members: []foundation.MemberRequest{{ + Address: s.bytesToString(s.members[0]), + }}, }, "remove a non-member": { authority: s.authority, - member: foundation.MemberRequest{ - Address: s.stranger.String(), + members: []foundation.MemberRequest{{ + Address: s.bytesToString(s.stranger), Remove: true, - }, + }}, }, } @@ -204,10 +292,10 @@ func (s *KeeperTestSuite) TestMsgUpdateMembers() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgUpdateMembers{ - Authority: tc.authority.String(), - MemberUpdates: []foundation.MemberRequest{tc.member}, + Authority: s.bytesToString(tc.authority), + MemberUpdates: tc.members, } - res, err := s.msgServer.UpdateMembers(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.UpdateMembers(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -226,51 +314,74 @@ func (s *KeeperTestSuite) TestMsgUpdateMembers() { func (s *KeeperTestSuite) TestMsgSubmitProposal() { members := make([]string, len(s.members)) for i, member := range s.members { - members[i] = member.String() + members[i] = s.bytesToString(member) } testCases := map[string]struct { malleate func(ctx sdk.Context) proposers []string metadata string - msg sdk.Msg + msgs []sdk.Msg exec foundation.Exec valid bool events sdk.Events }{ "valid request (submit)": { proposers: members, - msg: testdata.NewTestMsg(s.authority), + msgs: []sdk.Msg{s.newTestMsg(s.authority)}, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c}, Value: []uint8{0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x77, 0x30, 0x38, 0x70, 0x36, 0x74, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x79, 0x6a, 0x71, 0x79, 0x79, 0x78, 0x75, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x78, 0x70, 0x39, 0x39, 0x38, 0x34, 0x33, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x67, 0x72, 0x37, 0x7a, 0x77, 0x68, 0x6d, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x32, 0x73, 0x6d, 0x72, 0x64, 0x79, 0x6b, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x76, 0x76, 0x35, 0x71, 0x67, 0x63, 0x70, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x77, 0x6c, 0x33, 0x70, 0x74, 0x74, 0x76, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x73, 0x67, 0x74, 0x77, 0x36, 0x75, 0x34, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x6a, 0x6d, 0x77, 0x30, 0x65, 0x30, 0x63, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x38, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x39, 0x30, 0x76, 0x74, 0x30, 0x76, 0x78, 0x63, 0x38, 0x63, 0x38, 0x76, 0x6a, 0x32, 0x34, 0x61, 0x37, 0x6d, 0x6d, 0x33, 0x66, 0x6a, 0x73, 0x65, 0x6e, 0x66, 0x75, 0x38, 0x66, 0x35, 0x79, 0x78, 0x78, 0x6a, 0x37, 0x36, 0x63, 0x70, 0x22, 0x5d, 0x7d, 0x5d, 0x7d}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventSubmitProposal", Attributes:[]abci.EventAttribute{{Key:"proposal", Value:"{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index:false}}}}, }, "valid request (submit & execute)": { proposers: members, - msg: testdata.NewTestMsg(s.authority), + msgs: []sdk.Msg{s.newTestMsg(s.authority)}, exec: foundation.Exec_EXEC_TRY, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c}, Value: []uint8{0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x77, 0x30, 0x38, 0x70, 0x36, 0x74, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x79, 0x6a, 0x71, 0x79, 0x79, 0x78, 0x75, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x78, 0x70, 0x39, 0x39, 0x38, 0x34, 0x33, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x67, 0x72, 0x37, 0x7a, 0x77, 0x68, 0x6d, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x32, 0x73, 0x6d, 0x72, 0x64, 0x79, 0x6b, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x76, 0x76, 0x35, 0x71, 0x67, 0x63, 0x70, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x77, 0x6c, 0x33, 0x70, 0x74, 0x74, 0x76, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x73, 0x67, 0x74, 0x77, 0x36, 0x75, 0x34, 0x22, 0x2c, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x6a, 0x6d, 0x77, 0x30, 0x65, 0x30, 0x63, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x38, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x39, 0x30, 0x76, 0x74, 0x30, 0x76, 0x78, 0x63, 0x38, 0x63, 0x38, 0x76, 0x6a, 0x32, 0x34, 0x61, 0x37, 0x6d, 0x6d, 0x33, 0x66, 0x6a, 0x73, 0x65, 0x6e, 0x66, 0x75, 0x38, 0x66, 0x35, 0x79, 0x78, 0x78, 0x6a, 0x37, 0x36, 0x63, 0x70, 0x22, 0x5d, 0x7d, 0x5d, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x77, 0x30, 0x38, 0x70, 0x36, 0x74, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x79, 0x6a, 0x71, 0x79, 0x79, 0x78, 0x75, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x78, 0x70, 0x39, 0x39, 0x38, 0x34, 0x33, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x67, 0x72, 0x37, 0x7a, 0x77, 0x68, 0x6d, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x32, 0x73, 0x6d, 0x72, 0x64, 0x79, 0x6b, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x76, 0x76, 0x35, 0x71, 0x67, 0x63, 0x70, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x77, 0x6c, 0x33, 0x70, 0x74, 0x74, 0x76, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x73, 0x67, 0x74, 0x77, 0x36, 0x75, 0x34, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x6a, 0x6d, 0x77, 0x30, 0x65, 0x30, 0x63, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x36, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x5c, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x5c, 0x22, 0x3a, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x36, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventSubmitProposal", Attributes:[]abci.EventAttribute{{Key:"proposal", Value:"{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"proposal execution failed on proposal 6, because of error no message handler found for \\\"/testpb.TestMsg\\\": unknown request\"", Index:false}, {Key:"proposal_id", Value:"\"6\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_FAILURE\"", Index:false}}}}, }, "valid request (submit & unable to reach quorum)": { proposers: []string{members[0]}, - msg: testdata.NewTestMsg(s.authority), + msgs: []sdk.Msg{s.newTestMsg(s.authority)}, exec: foundation.Exec_EXEC_TRY, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c}, Value: []uint8{0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x5d, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x22, 0x2c, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x38, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x2c, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x39, 0x30, 0x76, 0x74, 0x30, 0x76, 0x78, 0x63, 0x38, 0x63, 0x38, 0x76, 0x6a, 0x32, 0x34, 0x61, 0x37, 0x6d, 0x6d, 0x33, 0x66, 0x6a, 0x73, 0x65, 0x6e, 0x66, 0x75, 0x38, 0x66, 0x35, 0x79, 0x78, 0x78, 0x6a, 0x37, 0x36, 0x63, 0x70, 0x22, 0x5d, 0x7d, 0x5d, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x36, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x20, 0x36, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x5c, 0x22, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x5c, 0x22, 0x3a, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x36, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventSubmitProposal", Attributes:[]abci.EventAttribute{{Key:"proposal", Value:"{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"proposal execution failed on proposal 6, because of error no message handler found for \\\"/testpb.TestMsg\\\": unknown request\"", Index:false}, {Key:"proposal_id", Value:"\"6\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_FAILURE\"", Index:false}}}}, + }, + "empty proposers": { + msgs: []sdk.Msg{s.newTestMsg()}, + }, + "invalid proposer": { + proposers: []string{}, + msgs: []sdk.Msg{s.newTestMsg()}, + }, + "duplicate proposers": { + proposers: []string{members[0], members[0]}, + msgs: []sdk.Msg{s.newTestMsg()}, + }, + "empty msgs": { + proposers: []string{members[0]}, + }, + "invalid msg": { + proposers: []string{members[0]}, + msgs: []sdk.Msg{&foundation.MsgWithdrawFromTreasury{}}, + }, + "invalid exec": { + proposers: []string{members[0]}, + msgs: []sdk.Msg{s.newTestMsg()}, + exec: -1, }, "not a member": { - proposers: []string{s.stranger.String()}, - msg: testdata.NewTestMsg(s.authority), + proposers: []string{s.bytesToString(s.stranger)}, + msgs: []sdk.Msg{s.newTestMsg(s.authority)}, }, "unauthorized msg": { proposers: []string{members[0]}, - msg: testdata.NewTestMsg(s.stranger), + msgs: []sdk.Msg{s.newTestMsg(s.stranger)}, }, "exec fails": { malleate: func(ctx sdk.Context) { // try exec will fail because of a non-zero MinExecutionPeriod. err := s.impl.UpdateDecisionPolicy(ctx, &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, MinExecutionPeriod: time.Second, @@ -279,7 +390,7 @@ func (s *KeeperTestSuite) TestMsgSubmitProposal() { s.Require().NoError(err) }, proposers: members, - msg: testdata.NewTestMsg(s.authority), + msgs: []sdk.Msg{s.newTestMsg(s.authority)}, exec: foundation.Exec_EXEC_TRY, }, } @@ -296,10 +407,10 @@ func (s *KeeperTestSuite) TestMsgSubmitProposal() { Metadata: tc.metadata, Exec: tc.exec, } - err := req.SetMsgs([]sdk.Msg{tc.msg}) + err := req.SetMsgs(tc.msgs) s.Require().NoError(err) - res, err := s.msgServer.SubmitProposal(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.SubmitProposal(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -326,13 +437,19 @@ func (s *KeeperTestSuite) TestMsgWithdrawProposal() { proposalID: s.activeProposal, address: s.members[0], valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawProposal", Attributes:[]abci.EventAttribute{{Key:"proposal_id", Value:"\"1\"", Index:false}}}}, }, "valid request (authority)": { proposalID: s.activeProposal, address: s.authority, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawProposal", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawProposal", Attributes:[]abci.EventAttribute{{Key:"proposal_id", Value:"\"1\"", Index:false}}}}, + }, + "empty proposal id": { + address: s.members[0], + }, + "empty address": { + proposalID: 1, }, "not authorized": { proposalID: s.activeProposal, @@ -350,9 +467,9 @@ func (s *KeeperTestSuite) TestMsgWithdrawProposal() { req := &foundation.MsgWithdrawProposal{ ProposalId: tc.proposalID, - Address: tc.address.String(), + Address: s.bytesToString(tc.address), } - res, err := s.msgServer.WithdrawProposal(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.WithdrawProposal(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -373,7 +490,7 @@ func (s *KeeperTestSuite) TestMsgVote() { malleate func(ctx sdk.Context) proposalID uint64 voter sdk.AccAddress - msg sdk.Msg + option foundation.VoteOption exec foundation.Exec valid bool events sdk.Events @@ -381,15 +498,40 @@ func (s *KeeperTestSuite) TestMsgVote() { "valid request (vote)": { proposalID: s.activeProposal, voter: s.members[0], + option: foundation.VOTE_OPTION_YES, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"1\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}}, }, "valid request (vote & execute)": { proposalID: s.activeProposal, voter: s.members[0], + option: foundation.VOTE_OPTION_YES, exec: foundation.Exec_EXEC_TRY, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: []uint8{0x76, 0x6f, 0x74, 0x65}, Value: []uint8{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22, 0x2c, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d}, Index: false}}}, {Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x74, 0x6f}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"1\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventWithdrawFromTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"to", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"\"", Index:false}, {Key:"proposal_id", Value:"\"1\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_SUCCESS\"", Index:false}}}}, + }, + "empty proposal id": { + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + }, + "empty voter": { + proposalID: 1, + option: foundation.VOTE_OPTION_YES, + }, + "empty option": { + proposalID: 1, + voter: s.members[0], + }, + "invalid option": { + proposalID: 1, + voter: s.members[0], + option: -1, + }, + "invalid exec": { + proposalID: 1, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + exec: -1, }, "not authorized": { proposalID: s.activeProposal, @@ -403,7 +545,7 @@ func (s *KeeperTestSuite) TestMsgVote() { malleate: func(ctx sdk.Context) { // try exec will fail because of a non-zero MinExecutionPeriod. err := s.impl.UpdateDecisionPolicy(ctx, &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, MinExecutionPeriod: time.Second, @@ -414,15 +556,15 @@ func (s *KeeperTestSuite) TestMsgVote() { // submit a proposal proposers := make([]string, len(s.members)) for i, member := range s.members { - proposers[i] = member.String() + proposers[i] = s.bytesToString(member) } req := &foundation.MsgSubmitProposal{ Proposers: proposers, } - err = req.SetMsgs([]sdk.Msg{testdata.NewTestMsg(s.authority)}) + err = req.SetMsgs([]sdk.Msg{s.newTestMsg(s.authority)}) s.Require().NoError(err) - res, err := s.msgServer.SubmitProposal(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.SubmitProposal(ctx, req) s.Require().NoError(err) s.Require().NotNil(res) @@ -443,11 +585,11 @@ func (s *KeeperTestSuite) TestMsgVote() { req := &foundation.MsgVote{ ProposalId: tc.proposalID, - Voter: tc.voter.String(), - Option: foundation.VOTE_OPTION_YES, + Voter: s.bytesToString(tc.voter), + Option: tc.option, Exec: tc.exec, } - res, err := s.msgServer.Vote(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.Vote(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -475,13 +617,19 @@ func (s *KeeperTestSuite) TestMsgExec() { proposalID: s.activeProposal, signer: s.members[0], valid: true, - events: sdk.Events{{Type: "coin_spent", Attributes: []abci.EventAttribute{{Key: []uint8{0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "coin_received", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "transfer", Attributes: []abci.EventAttribute{{Key: []uint8{0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34}, Index: false}, {Key: []uint8{0x73, 0x65, 0x6e, 0x64, 0x65, 0x72}, Value: []uint8{0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x6d, 0x61, 0x66, 0x6c, 0x38, 0x66, 0x33, 0x73, 0x36, 0x75, 0x75, 0x7a, 0x77, 0x6e, 0x78, 0x6b, 0x71, 0x7a, 0x30, 0x65, 0x7a, 0x61, 0x34, 0x37, 0x76, 0x36, 0x65, 0x63, 0x6e, 0x30, 0x74, 0x75, 0x77, 0x72, 0x36, 0x79, 0x6b}, Index: false}, {Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x73, 0x74, 0x61, 0x6b, 0x65}, Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74}, Value: []uint8{0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x22, 0x7d, 0x5d}, Index: false}, {Key: []uint8{0x74, 0x6f}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x31, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawFromTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"to", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"\"", Index:false}, {Key:"proposal_id", Value:"\"1\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_SUCCESS\"", Index:false}}}}, }, "valid request (not finalized)": { proposalID: s.votedProposal, signer: s.members[0], valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: []uint8{0x6c, 0x6f, 0x67, 0x73}, Value: []uint8{0x22, 0x22}, Index: false}, {Key: []uint8{0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64}, Value: []uint8{0x22, 0x32, 0x22}, Index: false}, {Key: []uint8{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74}, Value: []uint8{0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"\"", Index:false}, {Key:"proposal_id", Value:"\"2\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\"", Index:false}}}}, + }, + "empty proposal id": { + signer: s.members[0], + }, + "empty signer": { + proposalID: 1, }, "not authorized": { proposalID: s.votedProposal, @@ -499,9 +647,9 @@ func (s *KeeperTestSuite) TestMsgExec() { req := &foundation.MsgExec{ ProposalId: tc.proposalID, - Signer: tc.signer.String(), + Signer: s.bytesToString(tc.signer), } - res, err := s.msgServer.Exec(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.Exec(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -527,8 +675,9 @@ func (s *KeeperTestSuite) TestMsgLeaveFoundation() { "valid request": { address: s.members[0], valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventLeaveFoundation", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventLeaveFoundation", Attributes:[]abci.EventAttribute{{Key:"address", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"", Index:false}}}}, }, + "empty address": {}, "not authorized": { address: s.stranger, }, @@ -539,7 +688,7 @@ func (s *KeeperTestSuite) TestMsgLeaveFoundation() { requests := make([]foundation.MemberRequest, len(s.members)-1) for i, member := range s.members[1:] { requests[i] = foundation.MemberRequest{ - Address: member.String(), + Address: s.bytesToString(member), Remove: true, } } @@ -558,9 +707,9 @@ func (s *KeeperTestSuite) TestMsgLeaveFoundation() { } req := &foundation.MsgLeaveFoundation{ - Address: tc.address.String(), + Address: s.bytesToString(tc.address), } - res, err := s.msgServer.LeaveFoundation(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.LeaveFoundation(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -590,7 +739,7 @@ func (s *KeeperTestSuite) TestMsgUpdateCensorship() { Authority: foundation.CensorshipAuthorityGovernance, }, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateCensorship", Attributes: []abci.EventAttribute{{Key: []uint8{0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70}, Value: []uint8{0x7b, 0x22, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x22, 0x43, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x22, 0x7d}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateCensorship", Attributes:[]abci.EventAttribute{{Key:"censorship", Value:"{\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\",\"authority\":\"CENSORSHIP_AUTHORITY_GOVERNANCE\"}", Index:false}}}}, }, "invalid authority": { authority: s.stranger, @@ -613,10 +762,10 @@ func (s *KeeperTestSuite) TestMsgUpdateCensorship() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgUpdateCensorship{ - Authority: tc.authority.String(), + Authority: s.bytesToString(tc.authority), Censorship: tc.censorship, } - res, err := s.msgServer.UpdateCensorship(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.UpdateCensorship(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -645,7 +794,19 @@ func (s *KeeperTestSuite) TestMsgGrant() { grantee: s.members[0], authorization: &foundation.ReceiveFromTreasuryAuthorization{}, valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventGrant", Attributes: []abci.EventAttribute{{Key: []uint8{0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e}, Value: []uint8{0x7b, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d}, Index: false}, {Key: []uint8{0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x71, 0x61, 0x32, 0x78, 0x7a, 0x66, 0x78, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventGrant", Attributes:[]abci.EventAttribute{{Key:"authorization", Value:"{\"@type\":\"/lbm.foundation.v1.ReceiveFromTreasuryAuthorization\"}", Index:false}, {Key:"grantee", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"", Index:false}}}}, + }, + "empty authority": { + grantee: s.members[0], + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + "empty grantee": { + authority: s.authority, + authorization: &foundation.ReceiveFromTreasuryAuthorization{}, + }, + "empty authorization": { + authority: s.authority, + grantee: s.members[0], }, "not authorized": { authority: s.stranger, @@ -664,13 +825,15 @@ func (s *KeeperTestSuite) TestMsgGrant() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgGrant{ - Authority: tc.authority.String(), - Grantee: tc.grantee.String(), + Authority: s.bytesToString(tc.authority), + Grantee: s.bytesToString(tc.grantee), + } + if tc.authorization != nil { + err := req.SetAuthorization(tc.authorization) + s.Require().NoError(err) } - err := req.SetAuthorization(tc.authorization) - s.Require().NoError(err) - res, err := s.msgServer.Grant(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.Grant(ctx, req) if !tc.valid { s.Require().Error(err) return @@ -699,7 +862,19 @@ func (s *KeeperTestSuite) TestMsgRevoke() { grantee: s.stranger, msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), valid: true, - events: sdk.Events{{Type: "lbm.foundation.v1.EventRevoke", Attributes: []abci.EventAttribute{{Key: []uint8{0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65}, Value: []uint8{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6e, 0x39, 0x77, 0x64, 0x65, 0x6e, 0x7a, 0x76, 0x71, 0x78, 0x6c, 0x68, 0x74, 0x66, 0x34, 0x22}, Index: false}, {Key: []uint8{0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c}, Value: []uint8{0x22, 0x2f, 0x6c, 0x62, 0x6d, 0x2e, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x22}, Index: false}}}}, + events: sdk.Events{{Type:"lbm.foundation.v1.EventRevoke", Attributes:[]abci.EventAttribute{{Key:"grantee", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}, {Key:"msg_type_url", Value:"\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"", Index:false}}}}, + }, + "empty authority": { + grantee: s.stranger, + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + "empty grantee": { + authority: s.authority, + msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), + }, + "empty url": { + authority: s.authority, + grantee: s.stranger, }, "not authorized": { authority: s.stranger, @@ -718,11 +893,11 @@ func (s *KeeperTestSuite) TestMsgRevoke() { ctx, _ := s.ctx.CacheContext() req := &foundation.MsgRevoke{ - Authority: tc.authority.String(), - Grantee: tc.grantee.String(), + Authority: s.bytesToString(tc.authority), + Grantee: s.bytesToString(tc.grantee), MsgTypeUrl: tc.msgTypeURL, } - res, err := s.msgServer.Revoke(sdk.WrapSDKContext(ctx), req) + res, err := s.msgServer.Revoke(ctx, req) if !tc.valid { s.Require().Error(err) return diff --git a/x/foundation/keeper/internal/proposal.go b/x/foundation/keeper/internal/proposal.go index 1dc08bd7d8..b09ab962cf 100644 --- a/x/foundation/keeper/internal/proposal.go +++ b/x/foundation/keeper/internal/proposal.go @@ -42,7 +42,10 @@ func (k Keeper) SubmitProposal(ctx sdk.Context, proposers []string, metadata str } foundationInfo := k.GetFoundationInfo(ctx) - authority := sdk.MustAccAddressFromBech32(k.GetAuthority()) + authority, err := k.addressCodec.StringToBytes(k.GetAuthority()) + if err != nil { + panic(err) + } if err := ensureMsgAuthz(msgs, authority, k.cdc); err != nil { return nil, err } diff --git a/x/foundation/keeper/internal/proposal_handler_test.go b/x/foundation/keeper/internal/proposal_handler_test.go index 6eed75e9c1..f47e574ec3 100644 --- a/x/foundation/keeper/internal/proposal_handler_test.go +++ b/x/foundation/keeper/internal/proposal_handler_test.go @@ -1,7 +1,6 @@ package internal_test import ( - "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -24,7 +23,7 @@ func (s *KeeperTestSuite) TestProposalHandler() { }) }, msg: &foundation.MsgUpdateCensorship{ - Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Authority: s.bytesToString(authtypes.NewModuleAddress(govtypes.ModuleName)), Censorship: foundation.Censorship{ MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), Authority: foundation.CensorshipAuthorityUnspecified, @@ -66,7 +65,7 @@ func (s *KeeperTestSuite) TestProposalHandler() { Authority: foundation.CensorshipAuthorityGovernance, }) }, - msg: testdata.NewTestMsg(authtypes.NewModuleAddress(govtypes.ModuleName)), + msg: s.newTestMsg(authtypes.NewModuleAddress(govtypes.ModuleName)), }, "message execution failed": { malleate: func(ctx sdk.Context) { @@ -76,7 +75,7 @@ func (s *KeeperTestSuite) TestProposalHandler() { }) }, msg: &foundation.MsgUpdateCensorship{ - Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Authority: s.bytesToString(authtypes.NewModuleAddress(govtypes.ModuleName)), Censorship: foundation.Censorship{ MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), Authority: foundation.CensorshipAuthorityFoundation, @@ -85,7 +84,7 @@ func (s *KeeperTestSuite) TestProposalHandler() { }, "authority is not x/gov yet": { msg: &foundation.MsgUpdateCensorship{ - Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Authority: s.bytesToString(authtypes.NewModuleAddress(govtypes.ModuleName)), Censorship: foundation.Censorship{ MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), Authority: foundation.CensorshipAuthorityUnspecified, diff --git a/x/foundation/keeper/internal/proposal_test.go b/x/foundation/keeper/internal/proposal_test.go index 85841d783f..86a473d1d9 100644 --- a/x/foundation/keeper/internal/proposal_test.go +++ b/x/foundation/keeper/internal/proposal_test.go @@ -4,15 +4,14 @@ import ( "testing" "github.com/stretchr/testify/require" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/Finschia/finschia-sdk/x/foundation" - "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" ) func (s *KeeperTestSuite) TestSubmitProposal() { @@ -23,18 +22,18 @@ func (s *KeeperTestSuite) TestSubmitProposal() { valid bool }{ "valid proposal": { - proposers: []string{s.members[0].String()}, - msg: testdata.NewTestMsg(s.authority), + proposers: []string{s.bytesToString(s.members[0])}, + msg: s.newTestMsg(s.authority), valid: true, }, "long metadata": { - proposers: []string{s.members[0].String()}, + proposers: []string{s.bytesToString(s.members[0])}, metadata: string(make([]rune, 256)), - msg: testdata.NewTestMsg(s.authority), + msg: s.newTestMsg(s.authority), }, "unauthorized msg": { - proposers: []string{s.members[0].String()}, - msg: testdata.NewTestMsg(s.stranger), + proposers: []string{s.bytesToString(s.members[0])}, + msg: s.newTestMsg(s.stranger), }, } @@ -84,51 +83,48 @@ func (s *KeeperTestSuite) TestWithdrawProposal() { } func TestAbortProposal(t *testing.T) { - checkTx := false - app := simapp.Setup(checkTx) - testdata.RegisterInterfaces(app.InterfaceRegistry()) - - ctx := app.BaseApp.NewContext(checkTx, cmtproto.Header{}) - impl := internal.NewKeeper( - app.AppCodec(), - app.GetKey(foundation.ModuleName), - app.MsgServiceRouter(), - app.AccountKeeper, - app.BankKeeper, - authtypes.FeeCollectorName, - foundation.DefaultConfig(), - foundation.DefaultAuthority().String(), - app.GetSubspace(foundation.ModuleName), - ) + impl, _, _, _, _, addressCodec, ctx := setupFoundationKeeper(t, nil, nil) + + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } createAddress := func() sdk.AccAddress { return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) } - authority := sdk.MustAccAddressFromBech32(impl.GetAuthority()) + gs := &foundation.GenesisState{ + Params: foundation.DefaultParams(), + } members := make([]sdk.AccAddress, 10) for i := range members { members[i] = createAddress() } - impl.SetMember(ctx, foundation.Member{ - Address: members[0].String(), - }) + gs.Members = []foundation.Member{{ + Address: bytesToString(members[0]), + }} info := foundation.DefaultFoundation() - info.TotalWeight = sdk.NewDec(int64(len(members))) + info.TotalWeight = math.LegacyNewDec(1) err := info.SetDecisionPolicy(workingPolicy()) require.NoError(t, err) - impl.SetFoundationInfo(ctx, info) + gs.Foundation = info + + impl.InitGenesis(ctx, gs) // create proposals of different versions and abort them for _, newMember := range members[1:] { - _, err := impl.SubmitProposal(ctx, []string{members[0].String()}, "", []sdk.Msg{testdata.NewTestMsg(authority)}) + _, err := impl.SubmitProposal(ctx, []string{bytesToString(members[0])}, "", []sdk.Msg{&testdata.TestMsg{ + Signers: []string{impl.GetAuthority()}, + }}) require.NoError(t, err) err = impl.UpdateMembers(ctx, []foundation.MemberRequest{ { - Address: newMember.String(), + Address: bytesToString(newMember), }, }) require.NoError(t, err) diff --git a/x/foundation/keeper/internal/tally.go b/x/foundation/keeper/internal/tally.go index ca9944b2a0..149e83e24d 100644 --- a/x/foundation/keeper/internal/tally.go +++ b/x/foundation/keeper/internal/tally.go @@ -54,9 +54,12 @@ func (k Keeper) tally(ctx sdk.Context, p foundation.Proposal) (foundation.TallyR tallyResult := foundation.DefaultTallyResult() var errIter error k.iterateVotes(ctx, p.Id, func(vote foundation.Vote) (stop bool) { - voter := sdk.MustAccAddressFromBech32(vote.Voter) + voter, err := k.addressCodec.StringToBytes(vote.Voter) + if err != nil { + panic(err) + } - _, err := k.GetMember(ctx, voter) + _, err = k.GetMember(ctx, voter) switch { case sdkerrors.ErrNotFound.Is(err): // If the member left the foundation after voting, then we simply skip the diff --git a/x/foundation/keeper/internal/treasury.go b/x/foundation/keeper/internal/treasury.go index 4ab140d33b..dd5ac5638a 100644 --- a/x/foundation/keeper/internal/treasury.go +++ b/x/foundation/keeper/internal/treasury.go @@ -1,6 +1,7 @@ package internal import ( + "github.com/cosmos/cosmos-sdk/types/address" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -8,7 +9,8 @@ import ( ) func (k Keeper) CollectFoundationTax(ctx sdk.Context) error { - feeCollector := k.authKeeper.GetModuleAccount(ctx, k.feeCollectorName).GetAddress() + // TODO(@0Tech): use auth keeper after applying global bech32 removal + feeCollector := address.Module(k.feeCollectorName) feesCollectedInt := k.bankKeeper.GetAllBalances(ctx, feeCollector) if feesCollectedInt.Empty() { return nil diff --git a/x/foundation/keeper/internal/treasury_test.go b/x/foundation/keeper/internal/treasury_test.go index 6760a8b3a3..43b5021a31 100644 --- a/x/foundation/keeper/internal/treasury_test.go +++ b/x/foundation/keeper/internal/treasury_test.go @@ -1,6 +1,8 @@ package internal_test import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -19,27 +21,27 @@ func (s *KeeperTestSuite) TestCollectFoundationTax() { s.Require().NoError(err) for name, tc := range map[string]struct { - fee sdk.Int - taxRatio sdk.Dec - tax sdk.Int + fee math.Int + taxRatio math.LegacyDec + tax math.Int valid bool }{ "common": { fee: fees[0].Amount, - taxRatio: sdk.MustNewDecFromStr("0.123456789"), - tax: sdk.NewInt(121932631), + taxRatio: math.LegacyMustNewDecFromStr("0.123456789"), + tax: math.NewInt(121932631), valid: true, }, "zero fee": { - fee: sdk.ZeroInt(), - taxRatio: sdk.MustNewDecFromStr("0.123456789"), - tax: sdk.ZeroInt(), + fee: math.ZeroInt(), + taxRatio: math.LegacyMustNewDecFromStr("0.123456789"), + tax: math.ZeroInt(), valid: true, }, "zero ratio": { fee: fees[0].Amount, - taxRatio: sdk.ZeroDec(), - tax: sdk.ZeroInt(), + taxRatio: math.LegacyZeroDec(), + tax: math.ZeroInt(), valid: true, }, } { @@ -57,9 +59,9 @@ func (s *KeeperTestSuite) TestCollectFoundationTax() { before := s.impl.GetTreasury(ctx) s.Require().Equal(1, len(before)) - s.Require().Equal(sdk.NewDecFromInt(s.balance), before[0].Amount) + s.Require().Equal(math.LegacyNewDecFromInt(s.balance), before[0].Amount) - tax := sdk.NewDecFromInt(tc.fee).MulTruncate(tc.taxRatio).TruncateInt() + tax := math.LegacyNewDecFromInt(tc.fee).MulTruncate(tc.taxRatio).TruncateInt() // ensure the behavior does not change s.Require().Equal(tc.tax, tax) @@ -73,14 +75,14 @@ func (s *KeeperTestSuite) TestCollectFoundationTax() { expectedAfter := s.balance.Add(tax) after := s.impl.GetTreasury(ctx) s.Require().Equal(1, len(after)) - s.Require().Equal(sdk.NewDecFromInt(expectedAfter), after[0].Amount) + s.Require().Equal(math.LegacyNewDecFromInt(expectedAfter), after[0].Amount) }) } } func (s *KeeperTestSuite) TestFundTreasury() { testCases := map[string]struct { - amount sdk.Int + amount math.Int valid bool }{ "valid amount": { @@ -88,7 +90,7 @@ func (s *KeeperTestSuite) TestFundTreasury() { valid: true, }, "insufficient coins": { - amount: s.balance.Add(sdk.OneInt()), + amount: s.balance.Add(math.OneInt()), }, } @@ -117,7 +119,7 @@ func (s *KeeperTestSuite) TestFundTreasury() { func (s *KeeperTestSuite) TestWithdrawFromTreasury() { testCases := map[string]struct { - amount sdk.Int + amount math.Int valid bool }{ "valid amount": { @@ -125,7 +127,7 @@ func (s *KeeperTestSuite) TestWithdrawFromTreasury() { valid: true, }, "insufficient coins": { - amount: s.balance.Add(sdk.OneInt()), + amount: s.balance.Add(math.OneInt()), }, } diff --git a/x/foundation/keeper/internal/vote.go b/x/foundation/keeper/internal/vote.go index 01399ff295..c9d6db6f7d 100644 --- a/x/foundation/keeper/internal/vote.go +++ b/x/foundation/keeper/internal/vote.go @@ -16,7 +16,11 @@ func (k Keeper) Vote(ctx sdk.Context, vote foundation.Vote) error { } // Make sure that a voter hasn't already voted. - voter := sdk.MustAccAddressFromBech32(vote.Voter) + voter, err := k.addressCodec.StringToBytes(vote.Voter) + if err != nil { + panic(err) + } + if k.hasVote(ctx, vote.ProposalId, voter) { return sdkerrors.ErrInvalidRequest.Wrapf("Already voted: %s", vote.Voter) } @@ -50,7 +54,7 @@ func (k Keeper) hasVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress store := k.storeService.OpenKVStore(ctx) key := voteKey(proposalID, voter) has, err := store.Has(key) - return (err != nil) && has + return (err == nil) && has } func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) (*foundation.Vote, error) { @@ -72,7 +76,11 @@ func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress func (k Keeper) setVote(ctx sdk.Context, vote foundation.Vote) { store := k.storeService.OpenKVStore(ctx) - voter := sdk.MustAccAddressFromBech32(vote.Voter) + voter, err := k.addressCodec.StringToBytes(vote.Voter) + if err != nil { + panic(err) + } + key := voteKey(vote.ProposalId, voter) bz := k.cdc.MustMarshal(&vote) store.Set(key, bz) @@ -108,7 +116,11 @@ func (k Keeper) GetVotes(ctx sdk.Context, proposalID uint64) []foundation.Vote { func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) { keys := [][]byte{} k.iterateVotes(ctx, proposalID, func(vote foundation.Vote) (stop bool) { - voter := sdk.MustAccAddressFromBech32(vote.Voter) + voter, err := k.addressCodec.StringToBytes(vote.Voter) + if err != nil { + panic(err) + } + keys = append(keys, voteKey(proposalID, voter)) return false }) diff --git a/x/foundation/keeper/internal/vote_test.go b/x/foundation/keeper/internal/vote_test.go index 849f5d469c..65fc92e1d4 100644 --- a/x/foundation/keeper/internal/vote_test.go +++ b/x/foundation/keeper/internal/vote_test.go @@ -9,8 +9,8 @@ import ( ) func (s *KeeperTestSuite) TestVote() { - // no such a vote - _, err := s.impl.GetVote(s.ctx, s.nextProposal, s.members[0]) + // no such a proposal + _, err := s.impl.GetProposal(s.ctx, s.nextProposal) s.Require().Error(err) testCases := map[string]struct { @@ -69,7 +69,7 @@ func (s *KeeperTestSuite) TestVote() { vote := foundation.Vote{ ProposalId: tc.proposalID, - Voter: tc.voter.String(), + Voter: s.bytesToString(tc.voter), Option: tc.option, Metadata: tc.metadata, } @@ -80,7 +80,7 @@ func (s *KeeperTestSuite) TestVote() { } s.Require().NoError(err) - _, err = s.impl.GetVote(ctx, vote.ProposalId, sdk.MustAccAddressFromBech32(vote.Voter)) + _, err = s.impl.GetVote(ctx, vote.ProposalId, tc.voter) s.Require().NoError(err) }) } diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index 2ac126dfa5..9a57b86319 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -42,7 +42,9 @@ var ( ) // AppModuleBasic defines the basic application module used by the foundation module. -type AppModuleBasic struct{} +type AppModuleBasic struct{ + addressCodec address.Codec +} // Name returns the ModuleName func (AppModuleBasic) Name() string { @@ -59,13 +61,13 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the foundation module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var data foundation.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", foundation.ModuleName, err) } - return foundation.ValidateGenesis(data) + return foundation.ValidateGenesis(data, am.addressCodec) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the foundation module. @@ -99,8 +101,11 @@ type AppModule struct { } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, addressCodec address.Codec) AppModule { return AppModule{ + AppModuleBasic: AppModuleBasic{ + addressCodec: addressCodec, + }, keeper: keeper, } } @@ -242,7 +247,7 @@ func ProvideModule(in FoundationInputs) FoundationOutputs { } k := keeper.NewKeeper(in.Cdc, in.AddressCodec, in.StoreService, in.MsgServiceRouter, in.AuthKeeper, in.BankKeeper, feeCollectorName, config, authorityStr, in.Subspace) - m := NewAppModule(in.Cdc, k) + m := NewAppModule(in.Cdc, k, in.AddressCodec) return FoundationOutputs{ Keeper: k, diff --git a/x/foundation/msgs.go b/x/foundation/msgs.go index 396a986cdb..a75500d0de 100644 --- a/x/foundation/msgs.go +++ b/x/foundation/msgs.go @@ -10,184 +10,26 @@ import ( "github.com/Finschia/finschia-sdk/x/foundation/codec" ) -var _ sdk.Msg = (*MsgUpdateParams)(nil) - -// ValidateBasic implements Msg. -func (m MsgUpdateParams) ValidateBasic() error { - return sdkerrors.ErrUnknownRequest.Wrapf("unrecognized message route: %s", m.Route()) -} - -// GetSigners implements Msg. -func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgUpdateParams) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgUpdateParams) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgUpdateParams) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgFundTreasury)(nil) - -// ValidateBasic implements Msg. -func (m MsgFundTreasury) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.From); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid from address: %s", m.From) - } - - if !m.Amount.IsValid() || !m.Amount.IsAllPositive() { - return sdkerrors.ErrInvalidCoins.Wrap(m.Amount.String()) - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgFundTreasury) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.From) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgFundTreasury) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgFundTreasury) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgFundTreasury) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgWithdrawFromTreasury)(nil) - -// ValidateBasic implements Msg. -func (m MsgWithdrawFromTreasury) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) - } - - if _, err := sdk.AccAddressFromBech32(m.To); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid to address: %s", m.To) - } - - if !m.Amount.IsValid() || !m.Amount.IsAllPositive() { - return sdkerrors.ErrInvalidCoins.Wrap(m.Amount.String()) - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgWithdrawFromTreasury) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgWithdrawFromTreasury) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgWithdrawFromTreasury) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgWithdrawFromTreasury) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgUpdateMembers)(nil) - -// ValidateBasic implements Msg. -func (m MsgUpdateMembers) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) - } - - if len(m.MemberUpdates) == 0 { - return sdkerrors.ErrInvalidRequest.Wrap("empty updates") - } - members := MemberRequests{Members: m.MemberUpdates} - if err := members.ValidateBasic(); err != nil { - return err - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgUpdateMembers) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgUpdateMembers) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgUpdateMembers) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgUpdateMembers) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgUpdateDecisionPolicy)(nil) - -// ValidateBasic implements Msg. -func (m MsgUpdateDecisionPolicy) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) - } - - if m.GetDecisionPolicy() == nil { - return sdkerrors.ErrInvalidRequest.Wrap("nil decision policy") - } - if err := m.GetDecisionPolicy().ValidateBasic(); err != nil { - return err - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgUpdateDecisionPolicy) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgUpdateDecisionPolicy) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgUpdateDecisionPolicy) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgUpdateDecisionPolicy) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) @@ -225,25 +67,6 @@ func (m MsgUpdateDecisionPolicy) UnpackInterfaces(unpacker codectypes.AnyUnpacke return unpacker.UnpackAny(m.DecisionPolicy, &policy) } -var _ sdk.Msg = (*MsgSubmitProposal)(nil) - -// ValidateBasic implements Msg. -func (m MsgSubmitProposal) ValidateBasic() error { - if err := validateProposers(m.Proposers); err != nil { - return err - } - - if err := validateMsgs(m.GetMsgs()); err != nil { - return err - } - - if _, ok := Exec_name[int32(m.Exec)]; !ok { - return sdkerrors.ErrInvalidRequest.Wrap("invalid exec option") - } - - return nil -} - func (m MsgSubmitProposal) GetMsgs() []sdk.Msg { msgs, err := GetMsgs(m.Messages, "proposal") if err != nil { @@ -265,238 +88,36 @@ func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err return UnpackInterfaces(unpacker, m.Messages) } -// GetSigners implements Msg. -func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - signers := make([]sdk.AccAddress, len(m.Proposers)) - for i, p := range m.Proposers { - proposer := sdk.MustAccAddressFromBech32(p) - signers[i] = proposer - } - return signers -} - -// Type implements the LegacyMsg.Type method. -func (m MsgSubmitProposal) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgSubmitProposal) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgSubmitProposal) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgWithdrawProposal)(nil) - -// ValidateBasic implements Msg. -func (m MsgWithdrawProposal) ValidateBasic() error { - if m.ProposalId == 0 { - return sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") - } - - if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid withdrawer address: %s", m.Address) - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgWithdrawProposal) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Address) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgWithdrawProposal) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgWithdrawProposal) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgWithdrawProposal) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgVote)(nil) - -// ValidateBasic implements Msg. -func (m MsgVote) ValidateBasic() error { - if m.ProposalId == 0 { - return sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") - } - - if _, err := sdk.AccAddressFromBech32(m.Voter); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", m.Voter) - } - - if err := validateVoteOption(m.Option); err != nil { - return err - } - - if _, ok := Exec_name[int32(m.Exec)]; !ok { - return sdkerrors.ErrInvalidRequest.Wrap("invalid exec option") - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgVote) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Voter) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgVote) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgVote) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgVote) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgExec)(nil) - -// ValidateBasic implements Msg. -func (m MsgExec) ValidateBasic() error { - if m.ProposalId == 0 { - return sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") - } - - if _, err := sdk.AccAddressFromBech32(m.Signer); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid signer address: %s", m.Signer) - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgExec) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Signer) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgExec) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgExec) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgExec) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgLeaveFoundation)(nil) - -// ValidateBasic implements Msg. -func (m MsgLeaveFoundation) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Address); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", m.Address) - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgLeaveFoundation) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Address) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgLeaveFoundation) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgLeaveFoundation) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgLeaveFoundation) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgUpdateCensorship)(nil) - -// ValidateBasic implements Msg. -func (m MsgUpdateCensorship) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) - } - - if err := m.Censorship.ValidateBasic(); err != nil { - return err - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgUpdateCensorship) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgUpdateCensorship) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgUpdateCensorship) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgUpdateCensorship) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgGrant)(nil) - -// ValidateBasic implements Msg. -func (m MsgGrant) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) - } - - if _, err := sdk.AccAddressFromBech32(m.Grantee); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", m.Grantee) - } - - if a := m.GetAuthorization(); a != nil { - if err := a.ValidateBasic(); err != nil { - return err - } - } else { - return sdkerrors.ErrInvalidType.Wrap("invalid authorization") - } - - return nil -} - func (m MsgGrant) GetAuthorization() Authorization { if m.Authorization == nil { return nil @@ -524,62 +145,11 @@ func (m MsgGrant) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { return unpacker.UnpackAny(m.Authorization, &authorization) } -// GetSigners implements Msg. -func (m MsgGrant) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgGrant) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgGrant) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgGrant) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) } -var _ sdk.Msg = (*MsgRevoke)(nil) - -// ValidateBasic implements Msg. -func (m MsgRevoke) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority) - } - - if _, err := sdk.AccAddressFromBech32(m.Grantee); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", m.Grantee) - } - - if len(m.MsgTypeUrl) == 0 { - return sdkerrors.ErrInvalidRequest.Wrapf("empty url") - } - - return nil -} - -// GetSigners implements Msg. -func (m MsgRevoke) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Authority) - return []sdk.AccAddress{signer} -} - -// Type implements the LegacyMsg.Type method. -func (m MsgRevoke) Type() string { - return sdk.MsgTypeURL(&m) -} - -// Route implements the LegacyMsg.Route method. -func (m MsgRevoke) Route() string { - return sdk.MsgTypeURL(&m) -} - // GetSignBytes implements the LegacyMsg.GetSignBytes method. func (m MsgRevoke) GetSignBytes() []byte { return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) diff --git a/x/foundation/msgs_test.go b/x/foundation/msgs_test.go index 924598b38e..6753381b12 100644 --- a/x/foundation/msgs_test.go +++ b/x/foundation/msgs_test.go @@ -7,666 +7,82 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/Finschia/finschia-sdk/x/foundation" ) -func TestMsgUpdateParams(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - authority sdk.AccAddress - params foundation.Params - valid bool - }{ - "handler for MsgUpdateParams removed, ValidateBasic should throw error always": { - authority: addrs[0], - params: foundation.Params{ - FoundationTax: sdk.ZeroDec(), - }, - valid: false, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgUpdateParams{ - Authority: tc.authority.String(), - Params: tc.params, - } - - err := msg.ValidateBasic() - require.Error(t, err) - require.ErrorIs(t, err, sdkerrors.ErrUnknownRequest) - }) - msg := foundation.MsgUpdateParams{ - addrs[0].String(), - foundation.Params{}, - } - // Note: Dummy test for coverage of deprecated message - _ = msg.GetSigners() - _ = msg.String() - _, _ = msg.Descriptor() - _ = msg.GetSignBytes() - _, _ = msg.Marshal() - msg.ProtoMessage() - msg.Reset() - _ = msg.Route() - _ = msg.Size() - _ = msg.Type() - _ = msg.XXX_Size() - } -} - -func TestMsgFundTreasury(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - from sdk.AccAddress - amount sdk.Int - valid bool - }{ - "valid msg": { - from: addrs[0], - amount: sdk.OneInt(), - valid: true, - }, - "empty from": { - amount: sdk.OneInt(), - }, - "zero amount": { - from: addrs[0], - amount: sdk.ZeroInt(), - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgFundTreasury{ - From: tc.from.String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.from}, msg.GetSigners()) - }) - } -} - -func TestMsgWithdrawFromTreasury(t *testing.T) { - addrs := make([]sdk.AccAddress, 2) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - authority sdk.AccAddress - to sdk.AccAddress - amount sdk.Int - valid bool - }{ - "valid msg": { - authority: addrs[0], - to: addrs[1], - amount: sdk.OneInt(), - valid: true, - }, - "empty authority": { - to: addrs[1], - amount: sdk.OneInt(), - }, - "empty to": { - authority: addrs[0], - amount: sdk.OneInt(), - }, - "zero amount": { - authority: addrs[0], - to: addrs[1], - amount: sdk.ZeroInt(), - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgWithdrawFromTreasury{ - Authority: tc.authority.String(), - To: tc.to.String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.amount)), - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) - }) - } -} - -func TestMsgUpdateMembers(t *testing.T) { - addrs := make([]sdk.AccAddress, 2) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - authority sdk.AccAddress - members []foundation.MemberRequest - valid bool - }{ - "valid msg": { - authority: addrs[0], - members: []foundation.MemberRequest{{ - Address: addrs[1].String(), - }}, - valid: true, - }, - "empty authority": { - members: []foundation.MemberRequest{{ - Address: addrs[1].String(), - }}, - }, - "empty requests": { - authority: addrs[0], - }, - "invalid requests": { - authority: addrs[0], - members: []foundation.MemberRequest{{}}, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgUpdateMembers{ - Authority: tc.authority.String(), - MemberUpdates: tc.members, - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) - }) - } -} - -func TestMsgUpdateDecisionPolicy(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - authority sdk.AccAddress - policy foundation.DecisionPolicy - valid bool - }{ - "valid threshold policy": { - authority: addrs[0], - policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Windows: &foundation.DecisionPolicyWindows{ - VotingPeriod: time.Hour, - }, - }, - valid: true, - }, - "valid percentage policy": { - authority: addrs[0], - policy: &foundation.PercentageDecisionPolicy{ - Percentage: sdk.OneDec(), - Windows: &foundation.DecisionPolicyWindows{ - VotingPeriod: time.Hour, - }, - }, - valid: true, - }, - "empty authority": { - policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Windows: &foundation.DecisionPolicyWindows{ - VotingPeriod: time.Hour, - }, - }, - }, - "empty policy": { - authority: addrs[0], - }, - "zero threshold": { - authority: addrs[0], - policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - Windows: &foundation.DecisionPolicyWindows{ - VotingPeriod: time.Hour, - }, - }, - }, - "zero voting period": { - authority: addrs[0], - policy: &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Windows: &foundation.DecisionPolicyWindows{}, - }, - }, - "invalid percentage": { - authority: addrs[0], - policy: &foundation.PercentageDecisionPolicy{ - Percentage: sdk.NewDec(2), - Windows: &foundation.DecisionPolicyWindows{ - VotingPeriod: time.Hour, - }, - }, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgUpdateDecisionPolicy{ - Authority: tc.authority.String(), - } - if tc.policy != nil { - err := msg.SetDecisionPolicy(tc.policy) - require.NoError(t, err) - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) - }) - } -} - -func TestMsgSubmitProposal(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - proposers []sdk.AccAddress - msgs []sdk.Msg - exec foundation.Exec - valid bool - }{ - "valid msg": { - proposers: []sdk.AccAddress{addrs[0]}, - msgs: []sdk.Msg{testdata.NewTestMsg()}, - valid: true, - }, - "empty proposers": { - msgs: []sdk.Msg{testdata.NewTestMsg()}, - }, - "invalid proposer": { - proposers: []sdk.AccAddress{nil}, - msgs: []sdk.Msg{testdata.NewTestMsg()}, - }, - "duplicate proposers": { - proposers: []sdk.AccAddress{addrs[0], addrs[0]}, - msgs: []sdk.Msg{testdata.NewTestMsg()}, - }, - "empty msgs": { - proposers: []sdk.AccAddress{addrs[0]}, - }, - "invalid msg": { - proposers: []sdk.AccAddress{addrs[0]}, - msgs: []sdk.Msg{&foundation.MsgWithdrawFromTreasury{}}, - }, - "invalid exec": { - proposers: []sdk.AccAddress{addrs[0]}, - msgs: []sdk.Msg{testdata.NewTestMsg()}, - exec: -1, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - var proposers []string - for _, proposer := range tc.proposers { - proposers = append(proposers, proposer.String()) - } - - msg := foundation.MsgSubmitProposal{ - Proposers: proposers, - Exec: tc.exec, - } - err := msg.SetMsgs(tc.msgs) - require.NoError(t, err) - - err = msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, tc.proposers, msg.GetSigners()) - }) - } -} - -func TestMsgWithdrawProposal(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - id uint64 - address sdk.AccAddress - valid bool - }{ - "valid msg": { - id: 1, - address: addrs[0], - valid: true, - }, - "empty proposal id": { - address: addrs[0], - }, - "empty address": { - id: 1, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgWithdrawProposal{ - ProposalId: tc.id, - Address: tc.address.String(), - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) - }) - } -} +// func TestMsgUpdateParams(t *testing.T) { +// addressCodec := addresscodec.NewBech32Codec("link") +// bytesToString := func(addr sdk.AccAddress) string { +// str, err := addressCodec.BytesToString(addr) +// require.NoError(t, err) +// return str +// } + +// addrs := make([]sdk.AccAddress, 1) +// for i := range addrs { +// addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) +// } + +// testCases := map[string]struct { +// authority sdk.AccAddress +// params foundation.Params +// valid bool +// }{ +// "handler for MsgUpdateParams removed, ValidateBasic should throw error always": { +// authority: addrs[0], +// params: foundation.Params{ +// FoundationTax: math.LegacyZeroDec(), +// }, +// valid: false, +// }, +// } + +// for name, tc := range testCases { +// t.Run(name, func(t *testing.T) { +// msg := foundation.MsgUpdateParams{ +// Authority: bytesToString(tc.authority), +// Params: tc.params, +// } + +// err := msg.ValidateBasic() +// require.Error(t, err) +// require.ErrorIs(t, err, sdkerrors.ErrUnknownRequest) +// }) +// msg := foundation.MsgUpdateParams{ +// addrs[0].String(), +// foundation.Params{}, +// } +// // Note: Dummy test for coverage of deprecated message +// _ = msg.String() +// _, _ = msg.Descriptor() +// _, _ = msg.Marshal() +// msg.ProtoMessage() +// msg.Reset() +// _ = msg.Size() +// _ = msg.XXX_Size() +// } +// } -func TestMsgVote(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - id uint64 - voter sdk.AccAddress - option foundation.VoteOption - exec foundation.Exec - valid bool - }{ - "valid msg": { - id: 1, - voter: addrs[0], - option: foundation.VOTE_OPTION_YES, - valid: true, - }, - "empty proposal id": { - voter: addrs[0], - option: foundation.VOTE_OPTION_YES, - }, - "empty voter": { - id: 1, - option: foundation.VOTE_OPTION_YES, - }, - "empty option": { - id: 1, - voter: addrs[0], - }, - "invalid option": { - id: 1, - voter: addrs[0], - option: -1, - }, - "invalid exec": { - id: 1, - voter: addrs[0], - option: foundation.VOTE_OPTION_YES, - exec: -1, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgVote{ - ProposalId: tc.id, - Voter: tc.voter.String(), - Option: tc.option, - Exec: tc.exec, - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.voter}, msg.GetSigners()) - }) - } -} - -func TestMsgExec(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - id uint64 - signer sdk.AccAddress - valid bool - }{ - "valid msg": { - id: 1, - signer: addrs[0], - valid: true, - }, - "empty proposal id": { - signer: addrs[0], - }, - "empty signer": { - id: 1, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgExec{ - ProposalId: tc.id, - Signer: tc.signer.String(), - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.signer}, msg.GetSigners()) - }) - } -} - -func TestMsgLeaveFoundation(t *testing.T) { - addrs := make([]sdk.AccAddress, 1) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - address sdk.AccAddress - valid bool - }{ - "valid msg": { - address: addrs[0], - valid: true, - }, - "empty address": {}, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgLeaveFoundation{ - Address: tc.address.String(), - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) - }) - } -} - -func TestMsgGrant(t *testing.T) { - addrs := make([]sdk.AccAddress, 2) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - authority sdk.AccAddress - grantee sdk.AccAddress - authorization foundation.Authorization - valid bool - }{ - "valid msg": { - authority: addrs[0], - grantee: addrs[1], - authorization: &foundation.ReceiveFromTreasuryAuthorization{}, - valid: true, - }, - "empty authority": { - grantee: addrs[1], - authorization: &foundation.ReceiveFromTreasuryAuthorization{}, - }, - "empty grantee": { - authority: addrs[0], - authorization: &foundation.ReceiveFromTreasuryAuthorization{}, - }, - "empty authorization": { - authority: addrs[0], - grantee: addrs[1], - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgGrant{ - Authority: tc.authority.String(), - Grantee: tc.grantee.String(), - } - if tc.authorization != nil { - err := msg.SetAuthorization(tc.authorization) - require.NoError(t, err) - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) - }) - } -} - -func TestMsgRevoke(t *testing.T) { - addrs := make([]sdk.AccAddress, 2) - for i := range addrs { - addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - } - - testCases := map[string]struct { - authority sdk.AccAddress - grantee sdk.AccAddress - msgTypeURL string - valid bool - }{ - "valid msg": { - authority: addrs[0], - grantee: addrs[1], - msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), - valid: true, - }, - "empty authority": { - grantee: addrs[1], - msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), - }, - "empty grantee": { - authority: addrs[0], - msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), - }, - "empty url": { - authority: addrs[0], - grantee: addrs[1], - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - msg := foundation.MsgRevoke{ - Authority: tc.authority.String(), - Grantee: tc.grantee.String(), - MsgTypeUrl: tc.msgTypeURL, - } - - err := msg.ValidateBasic() - if !tc.valid { - require.Error(t, err) - return - } - require.NoError(t, err) - - require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners()) - }) +func TestAminoJSON(t *testing.T) { + legacyAmino := codec.NewLegacyAmino() + foundation.RegisterLegacyAminoCodec(legacyAmino) + legacytx.RegressionTestingAminoCodec = legacyAmino + + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str } -} -func TestAminoJSON(t *testing.T) { addrs := make([]sdk.AccAddress, 3) for i := range addrs { addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) @@ -678,38 +94,38 @@ func TestAminoJSON(t *testing.T) { }{ "MsgFundTreasury": { &foundation.MsgFundTreasury{ - From: addrs[0].String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt())), + From: bytesToString(addrs[0]), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.OneInt())), }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgFundTreasury\",\"value\":{\"amount\":[{\"amount\":\"1\",\"denom\":\"stake\"}],\"from\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgFundTreasury\",\"value\":{\"amount\":[{\"amount\":\"1\",\"denom\":\"stake\"}],\"from\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0])), }, "MsgVote": { &foundation.MsgVote{ ProposalId: 1, - Voter: addrs[0].String(), + Voter: bytesToString(addrs[0]), Option: foundation.VOTE_OPTION_YES, Metadata: "I'm YES", Exec: foundation.Exec_EXEC_UNSPECIFIED, }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgVote\",\"value\":{\"metadata\":\"I'm YES\",\"option\":1,\"proposal_id\":\"1\",\"voter\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgVote\",\"value\":{\"metadata\":\"I'm YES\",\"option\":1,\"proposal_id\":\"1\",\"voter\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0])), }, "MsgExec": { &foundation.MsgExec{ ProposalId: 1, - Signer: addrs[0].String(), + Signer: bytesToString(addrs[0]), }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgExec\",\"value\":{\"proposal_id\":\"1\",\"signer\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgExec\",\"value\":{\"proposal_id\":\"1\",\"signer\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0])), }, "MsgLeaveFoundation": { - &foundation.MsgLeaveFoundation{Address: addrs[0].String()}, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgLeaveFoundation\",\"value\":{\"address\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + &foundation.MsgLeaveFoundation{Address: bytesToString(addrs[0])}, + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgLeaveFoundation\",\"value\":{\"address\":\"%s\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0])), }, "MsgWithdrawProposal": { &foundation.MsgWithdrawProposal{ ProposalId: 1, - Address: addrs[0].String(), + Address: bytesToString(addrs[0]), }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgWithdrawProposal\",\"value\":{\"address\":\"%s\",\"proposal_id\":\"1\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgWithdrawProposal\",\"value\":{\"address\":\"%s\",\"proposal_id\":\"1\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0])), }, } @@ -723,6 +139,13 @@ func TestAminoJSON(t *testing.T) { } func TestMsgSubmitProposalAminoJSON(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + addrs := make([]sdk.AccAddress, 2) for i := range addrs { addrs[i] = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) @@ -736,45 +159,45 @@ func TestMsgSubmitProposalAminoJSON(t *testing.T) { }{ "MsgUpdateParams": { &foundation.MsgUpdateParams{ - Authority: addrs[0].String(), - Params: foundation.Params{FoundationTax: sdk.ZeroDec()}, + Authority: bytesToString(addrs[0]), + Params: foundation.Params{FoundationTax: math.LegacyZeroDec()}, }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateParams\",\"value\":{\"authority\":\"%s\",\"params\":{\"foundation_tax\":\"0.000000000000000000\"}}}],\"metadata\":\"MsgUpdateParams\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), proposer.String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateParams\",\"value\":{\"authority\":\"%s\",\"params\":{\"foundation_tax\":\"0.000000000000000000\"}}}],\"metadata\":\"MsgUpdateParams\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0]), bytesToString(proposer)), }, "MsgWithdrawFromTreasury": { &foundation.MsgWithdrawFromTreasury{ - Authority: addrs[0].String(), - To: addrs[1].String(), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1000000))), + Authority: bytesToString(addrs[0]), + To: bytesToString(addrs[1]), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000))), }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgWithdrawFromTreasury\",\"value\":{\"amount\":[{\"amount\":\"1000000\",\"denom\":\"stake\"}],\"authority\":\"%s\",\"to\":\"%s\"}}],\"metadata\":\"MsgWithdrawFromTreasury\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgWithdrawFromTreasury\",\"value\":{\"amount\":[{\"amount\":\"1000000\",\"denom\":\"stake\"}],\"authority\":\"%s\",\"to\":\"%s\"}}],\"metadata\":\"MsgWithdrawFromTreasury\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0]), bytesToString(addrs[1]), bytesToString(proposer)), }, "MsgUpdateMembers": { &foundation.MsgUpdateMembers{ - Authority: addrs[0].String(), + Authority: bytesToString(addrs[0]), MemberUpdates: []foundation.MemberRequest{{ - Address: addrs[1].String(), + Address: bytesToString(addrs[1]), }}, }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateMembers\",\"value\":{\"authority\":\"%s\",\"member_updates\":[{\"address\":\"%s\"}]}}],\"metadata\":\"MsgUpdateMembers\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateMembers\",\"value\":{\"authority\":\"%s\",\"member_updates\":[{\"address\":\"%s\"}]}}],\"metadata\":\"MsgUpdateMembers\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0]), bytesToString(addrs[1]), bytesToString(proposer)), }, "MsgUpdateCensorship": { &foundation.MsgUpdateCensorship{ - Authority: addrs[0].String(), + Authority: bytesToString(addrs[0]), Censorship: foundation.Censorship{ MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)), Authority: foundation.CensorshipAuthorityGovernance, }, }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateCensorship\",\"value\":{\"authority\":\"%s\",\"censorship\":{\"authority\":1,\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}}],\"metadata\":\"MsgUpdateCensorship\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), proposer.String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateCensorship\",\"value\":{\"authority\":\"%s\",\"censorship\":{\"authority\":1,\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}}],\"metadata\":\"MsgUpdateCensorship\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0]), bytesToString(proposer)), }, "MsgRevoke": { &foundation.MsgRevoke{ - Authority: addrs[0].String(), - Grantee: addrs[1].String(), + Authority: bytesToString(addrs[0]), + Grantee: bytesToString(addrs[1]), MsgTypeUrl: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgRevoke\",\"value\":{\"authority\":\"%s\",\"grantee\":\"%s\",\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}],\"metadata\":\"MsgRevoke\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgRevoke\",\"value\":{\"authority\":\"%s\",\"grantee\":\"%s\",\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}],\"metadata\":\"MsgRevoke\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(addrs[0]), bytesToString(addrs[1]), bytesToString(proposer)), }, } @@ -783,7 +206,7 @@ func TestMsgSubmitProposalAminoJSON(t *testing.T) { t.Run(name, func(t *testing.T) { proposalMsg := &foundation.MsgSubmitProposal{ - Proposers: []string{proposer.String()}, + Proposers: []string{bytesToString(proposer)}, Metadata: name, Exec: foundation.Exec_EXEC_TRY, } @@ -800,27 +223,34 @@ func TestMsgUpdateDecisionPolicyAminoJson(t *testing.T) { proposer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) ) + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + testCases := map[string]struct { policy foundation.DecisionPolicy expected string }{ "ThresholdDecisionPolicy": { &foundation.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), + Threshold: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateDecisionPolicy\",\"value\":{\"authority\":\"%s\",\"decision_policy\":{\"type\":\"lbm-sdk/ThresholdDecisionPolicy\",\"value\":{\"threshold\":\"1.000000000000000000\",\"windows\":{\"min_execution_period\":\"0\",\"voting_period\":\"3600000000000\"}}}}}],\"metadata\":\"ThresholdDecisionPolicy\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", authority, proposer), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateDecisionPolicy\",\"value\":{\"authority\":\"%s\",\"decision_policy\":{\"type\":\"lbm-sdk/ThresholdDecisionPolicy\",\"value\":{\"threshold\":\"1.000000000000000000\",\"windows\":{\"min_execution_period\":\"0\",\"voting_period\":\"3600000000000\"}}}}}],\"metadata\":\"ThresholdDecisionPolicy\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(authority), bytesToString(proposer)), }, "PercentageDecisionPolicy": { &foundation.PercentageDecisionPolicy{ - Percentage: sdk.OneDec(), + Percentage: math.LegacyOneDec(), Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, }, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateDecisionPolicy\",\"value\":{\"authority\":\"%s\",\"decision_policy\":{\"type\":\"lbm-sdk/PercentageDecisionPolicy\",\"value\":{\"percentage\":\"1.000000000000000000\",\"windows\":{\"min_execution_period\":\"0\",\"voting_period\":\"3600000000000\"}}}}}],\"metadata\":\"PercentageDecisionPolicy\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", authority, proposer), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateDecisionPolicy\",\"value\":{\"authority\":\"%s\",\"decision_policy\":{\"type\":\"lbm-sdk/PercentageDecisionPolicy\",\"value\":{\"percentage\":\"1.000000000000000000\",\"windows\":{\"min_execution_period\":\"0\",\"voting_period\":\"3600000000000\"}}}}}],\"metadata\":\"PercentageDecisionPolicy\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(authority), bytesToString(proposer)), }, } @@ -829,16 +259,13 @@ func TestMsgUpdateDecisionPolicyAminoJson(t *testing.T) { t.Run(name, func(t *testing.T) { policyMsg := &foundation.MsgUpdateDecisionPolicy{ - Authority: authority.String(), + Authority: bytesToString(authority), } err := policyMsg.SetDecisionPolicy(tc.policy) require.NoError(t, err) - err = policyMsg.ValidateBasic() - require.NoError(t, err) - proposalMsg := &foundation.MsgSubmitProposal{ - Proposers: []string{proposer.String()}, + Proposers: []string{bytesToString(proposer)}, Metadata: name, Exec: foundation.Exec_EXEC_TRY, } @@ -851,6 +278,13 @@ func TestMsgUpdateDecisionPolicyAminoJson(t *testing.T) { } func TestMsgGrantAminoJson(t *testing.T) { + addressCodec := addresscodec.NewBech32Codec("link") + bytesToString := func(addr sdk.AccAddress) string { + str, err := addressCodec.BytesToString(addr) + require.NoError(t, err) + return str + } + var ( operator = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) grantee = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) @@ -863,7 +297,7 @@ func TestMsgGrantAminoJson(t *testing.T) { }{ "ReceiveFromTreasuryAuthorization": { &foundation.ReceiveFromTreasuryAuthorization{}, - fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgGrant\",\"value\":{\"authority\":\"%s\",\"authorization\":{\"type\":\"lbm-sdk/ReceiveFromTreasuryAuthorization\",\"value\":{}},\"grantee\":\"%s\"}}],\"metadata\":\"ReceiveFromTreasuryAuthorization\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", operator.String(), grantee.String(), proposer.String()), + fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgGrant\",\"value\":{\"authority\":\"%s\",\"authorization\":{\"type\":\"lbm-sdk/ReceiveFromTreasuryAuthorization\",\"value\":{}},\"grantee\":\"%s\"}}],\"metadata\":\"ReceiveFromTreasuryAuthorization\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", bytesToString(operator), bytesToString(grantee), bytesToString(proposer)), }, } @@ -872,17 +306,14 @@ func TestMsgGrantAminoJson(t *testing.T) { t.Run(name, func(t *testing.T) { grantMsg := &foundation.MsgGrant{ - Authority: operator.String(), - Grantee: grantee.String(), + Authority: bytesToString(operator), + Grantee: bytesToString(grantee), } err := grantMsg.SetAuthorization(tc.authorization) require.NoError(t, err) - err = grantMsg.ValidateBasic() - require.NoError(t, err) - proposalMsg := &foundation.MsgSubmitProposal{ - Proposers: []string{proposer.String()}, + Proposers: []string{bytesToString(proposer)}, Metadata: name, Exec: foundation.Exec_EXEC_TRY, } diff --git a/x/foundation/testutil/expected_keepers_mocks.go b/x/foundation/testutil/expected_keepers_mocks.go new file mode 100644 index 0000000000..d633f55dcb --- /dev/null +++ b/x/foundation/testutil/expected_keepers_mocks.go @@ -0,0 +1,168 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/foundation/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + context "context" + reflect "reflect" + + types "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/x/params/types" + gomock "github.com/golang/mock/gomock" +) + +// MockAuthKeeper is a mock of AuthKeeper interface. +type MockAuthKeeper struct { + ctrl *gomock.Controller + recorder *MockAuthKeeperMockRecorder +} + +// MockAuthKeeperMockRecorder is the mock recorder for MockAuthKeeper. +type MockAuthKeeperMockRecorder struct { + mock *MockAuthKeeper +} + +// NewMockAuthKeeper creates a new mock instance. +func NewMockAuthKeeper(ctrl *gomock.Controller) *MockAuthKeeper { + mock := &MockAuthKeeper{ctrl: ctrl} + mock.recorder = &MockAuthKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAuthKeeper) EXPECT() *MockAuthKeeperMockRecorder { + return m.recorder +} + +// GetModuleAccount mocks base method. +func (m *MockAuthKeeper) GetModuleAccount(ctx context.Context, name string) types.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, name) + ret0, _ := ret[0].(types.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAuthKeeperMockRecorder) GetModuleAccount(ctx, name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAuthKeeper)(nil).GetModuleAccount), ctx, name) +} + +// MockBankKeeper is a mock of BankKeeper interface. +type MockBankKeeper struct { + ctrl *gomock.Controller + recorder *MockBankKeeperMockRecorder +} + +// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. +type MockBankKeeperMockRecorder struct { + mock *MockBankKeeper +} + +// NewMockBankKeeper creates a new mock instance. +func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { + mock := &MockBankKeeper{ctrl: ctrl} + mock.recorder = &MockBankKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { + return m.recorder +} + +// GetAllBalances mocks base method. +func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types.AccAddress) types.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 +} + +// GetAllBalances indicates an expected call of GetAllBalances. +func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) +} + +// SendCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) +} + +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) +} + +// MockParamsKeeper is a mock of ParamsKeeper interface. +type MockParamsKeeper struct { + ctrl *gomock.Controller + recorder *MockParamsKeeperMockRecorder +} + +// MockParamsKeeperMockRecorder is the mock recorder for MockParamsKeeper. +type MockParamsKeeperMockRecorder struct { + mock *MockParamsKeeper +} + +// NewMockParamsKeeper creates a new mock instance. +func NewMockParamsKeeper(ctrl *gomock.Controller) *MockParamsKeeper { + mock := &MockParamsKeeper{ctrl: ctrl} + mock.recorder = &MockParamsKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockParamsKeeper) EXPECT() *MockParamsKeeperMockRecorder { + return m.recorder +} + +// GetSubspace mocks base method. +func (m *MockParamsKeeper) GetSubspace(s string) (types0.Subspace, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubspace", s) + ret0, _ := ret[0].(types0.Subspace) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetSubspace indicates an expected call of GetSubspace. +func (mr *MockParamsKeeperMockRecorder) GetSubspace(s interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubspace", reflect.TypeOf((*MockParamsKeeper)(nil).GetSubspace), s) +} + +// Subspace mocks base method. +func (m *MockParamsKeeper) Subspace(s string) types0.Subspace { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Subspace", s) + ret0, _ := ret[0].(types0.Subspace) + return ret0 +} + +// Subspace indicates an expected call of Subspace. +func (mr *MockParamsKeeperMockRecorder) Subspace(s interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subspace", reflect.TypeOf((*MockParamsKeeper)(nil).Subspace), s) +} From 1e974c370fdaf065bced31298e70f0015a4491bf Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 3 Jan 2024 01:52:52 +0000 Subject: [PATCH 07/26] Update go.mod --- api/go.mod | 2 +- simapp/go.mod | 5 ++++- x/foundation/go.mod | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/api/go.mod b/api/go.mod index 8501553307..0f85d2c1e8 100644 --- a/api/go.mod +++ b/api/go.mod @@ -5,6 +5,7 @@ go 1.21 toolchain go1.21.5 require ( + cosmossdk.io/api v0.7.2 github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.50.2 github.com/cosmos/gogoproto v1.4.11 @@ -14,7 +15,6 @@ require ( ) require ( - cosmossdk.io/api v0.7.2 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect diff --git a/simapp/go.mod b/simapp/go.mod index b1e5f66dec..f1ff370697 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -18,6 +18,8 @@ require ( cosmossdk.io/x/nft v0.1.0 cosmossdk.io/x/tx v0.12.0 cosmossdk.io/x/upgrade v0.1.1 + github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c + github.com/Finschia/finschia-sdk/x/foundation v0.0.0-00010101000000-000000000000 github.com/cometbft/cometbft v0.38.2 github.com/cosmos/cosmos-db v1.0.0 // this version is not used as it is always replaced by the latest Cosmos SDK version @@ -202,7 +204,8 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // Simapp always use the latest version of the finschia-sdk - github.com/Finschia/finschia-sdk => ../. + github.com/Finschia/finschia-sdk/api => ../api + github.com/Finschia/finschia-sdk/x/foundation => ../x/foundation // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 diff --git a/x/foundation/go.mod b/x/foundation/go.mod index 4bdfa039f4..f559e4eb55 100644 --- a/x/foundation/go.mod +++ b/x/foundation/go.mod @@ -4,15 +4,18 @@ go 1.21 require ( cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 cosmossdk.io/log v1.2.1 cosmossdk.io/math v1.2.0 cosmossdk.io/store v1.0.1 + github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c github.com/cometbft/cometbft v0.38.2 github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.50.2 github.com/cosmos/gogoproto v1.4.11 github.com/gogo/protobuf v1.3.2 + github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.7.0 @@ -25,14 +28,12 @@ require ( require ( cosmossdk.io/api v0.7.2 // indirect cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/x/tx v0.12.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect @@ -73,7 +74,6 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/glog v1.2.0 // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect From 02691ad972ec00c0b160e10415c1223b920a9777 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 3 Jan 2024 02:48:22 +0000 Subject: [PATCH 08/26] Lint --- .golangci.yml | 4 ++ simapp/app_config.go | 2 +- x/foundation/client/testutil/query.go | 2 +- x/foundation/client/testutil/suite.go | 4 +- x/foundation/foundation.go | 5 +- x/foundation/genesis.go | 2 +- x/foundation/genesis_test.go | 2 +- .../keeper/internal/censorship_test.go | 4 +- x/foundation/keeper/internal/grpc_query.go | 2 +- x/foundation/keeper/internal/invariants.go | 2 +- x/foundation/keeper/internal/keeper.go | 2 +- x/foundation/keeper/internal/keeper_test.go | 16 +++-- .../keeper/internal/msg_server_test.go | 66 +++++++++---------- .../keeper/internal/proposal_handler.go | 2 +- x/foundation/keeper/internal/treasury.go | 2 +- x/foundation/module/module.go | 32 ++++----- x/foundation/msgs_test.go | 2 +- 17 files changed, 78 insertions(+), 73 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 889399c42b..37d5c4b41d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -52,6 +52,10 @@ issues: - text: "SA1019: codec.NewAminoCodec is deprecated" # TODO remove once migration path is set out linters: - staticcheck + - path: "client/cli" # TODO(@0Tech): remove after foundation exec proposal removed + text: "SA1019: govcli.FlagDescription is deprecated" + linters: + - staticcheck - text: "leading space" linters: - nolintlint diff --git a/simapp/app_config.go b/simapp/app_config.go index 2d2edbb8cd..61a6c93208 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -274,7 +274,7 @@ var ( { Name: foundation.ModuleName, Config: appconfig.WrapAny(&foundationmodulev1.Module{ - Authority: foundation.ModuleName, + Authority: foundation.ModuleName, MaxExecutionPeriod: durationpb.New(time.Hour * 24 * 7 * 2), MaxMetadataLen: 255, }), diff --git a/x/foundation/client/testutil/query.go b/x/foundation/client/testutil/query.go index 2af49a1869..6e60fa4f6c 100644 --- a/x/foundation/client/testutil/query.go +++ b/x/foundation/client/testutil/query.go @@ -3,8 +3,8 @@ package testutil import ( "fmt" - "github.com/gogo/protobuf/proto" cmtcli "github.com/cometbft/cometbft/libs/cli" + "github.com/gogo/protobuf/proto" "cosmossdk.io/math" diff --git a/x/foundation/client/testutil/suite.go b/x/foundation/client/testutil/suite.go index 15c1a09a52..910fed75bc 100644 --- a/x/foundation/client/testutil/suite.go +++ b/x/foundation/client/testutil/suite.go @@ -7,11 +7,11 @@ import ( "github.com/stretchr/testify/suite" - "cosmossdk.io/math" "cosmossdk.io/core/address" + "cosmossdk.io/math" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/client/flags" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" diff --git a/x/foundation/foundation.go b/x/foundation/foundation.go index 454b0ebd55..5fe3e68945 100644 --- a/x/foundation/foundation.go +++ b/x/foundation/foundation.go @@ -6,11 +6,10 @@ import ( "github.com/gogo/protobuf/proto" + "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" - "cosmossdk.io/core/address" - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -111,7 +110,7 @@ type DecisionPolicyResult struct { } type DecisionPolicy interface { - codec.ProtoMarshaler + proto.Message // GetVotingPeriod returns the duration after proposal submission where // votes are accepted. diff --git a/x/foundation/genesis.go b/x/foundation/genesis.go index 884ee840e8..8cfb5e46b1 100644 --- a/x/foundation/genesis.go +++ b/x/foundation/genesis.go @@ -3,8 +3,8 @@ package foundation import ( "github.com/gogo/protobuf/proto" - "cosmossdk.io/math" "cosmossdk.io/core/address" + "cosmossdk.io/math" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/foundation/genesis_test.go b/x/foundation/genesis_test.go index 3aaba3f092..2b8593df7a 100644 --- a/x/foundation/genesis_test.go +++ b/x/foundation/genesis_test.go @@ -11,9 +11,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/censorship_test.go b/x/foundation/keeper/internal/censorship_test.go index df34f8c48e..6f9c63ed1b 100644 --- a/x/foundation/keeper/internal/censorship_test.go +++ b/x/foundation/keeper/internal/censorship_test.go @@ -1,10 +1,10 @@ package internal_test import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/grpc_query.go b/x/foundation/keeper/internal/grpc_query.go index 4ada5774ac..80c2c8a81d 100644 --- a/x/foundation/keeper/internal/grpc_query.go +++ b/x/foundation/keeper/internal/grpc_query.go @@ -9,8 +9,8 @@ import ( "cosmossdk.io/store/prefix" - "github.com/cosmos/cosmos-sdk/runtime" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" diff --git a/x/foundation/keeper/internal/invariants.go b/x/foundation/keeper/internal/invariants.go index 18a1299d52..494c673db5 100644 --- a/x/foundation/keeper/internal/invariants.go +++ b/x/foundation/keeper/internal/invariants.go @@ -5,8 +5,8 @@ import ( "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/types/address" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index ae9ac229f2..71ab7a608f 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -16,7 +16,7 @@ import ( // Keeper defines the foundation module Keeper type Keeper struct { // The codec for binary encoding/decoding. - cdc codec.Codec + cdc codec.Codec addressCodec addresscodec.Codec storeService store.KVStoreService diff --git a/x/foundation/keeper/internal/keeper_test.go b/x/foundation/keeper/internal/keeper_test.go index 31068c9fc1..e51ec9d0a0 100644 --- a/x/foundation/keeper/internal/keeper_test.go +++ b/x/foundation/keeper/internal/keeper_test.go @@ -78,9 +78,9 @@ func newMsgCreateDog(name string) sdk.Msg { func (s *KeeperTestSuite) createAddresses(accNum int) []sdk.AccAddress { if s.deterministic { return simtestutil.CreateIncrementalAccounts(accNum) - } else { - return simtestutil.CreateRandomAccounts(accNum) } + + return simtestutil.CreateRandomAccounts(accNum) } func (s *KeeperTestSuite) bytesToString(addr sdk.AccAddress) string { @@ -231,7 +231,7 @@ func setupFoundationKeeper(t *testing.T, balance *math.Int, addrs []sdk.AccAddre ctx := testCtx.Ctx // set balance - for _, addr := range addrs{ + for _, addr := range addrs { setBalance(ctx, addr, sdk.NewCoin(sdk.DefaultBondDenom, *balance)) } @@ -271,7 +271,7 @@ func (s *KeeperTestSuite) SetupTest() { params := foundation.DefaultParams() params.FoundationTax = math.LegacyOneDec() gs.Params = params - + members := make([]foundation.Member, len(s.members)) for i := range s.members { members[i] = foundation.Member{ @@ -337,7 +337,8 @@ func (s *KeeperTestSuite) SetupTest() { &foundation.MsgWithdrawFromTreasury{ Authority: s.bytesToString(s.authority), To: s.bytesToString(s.stranger), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance))}, + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)), + }, }) s.Require().NoError(err) s.votedProposal = *votedProposal @@ -356,7 +357,8 @@ func (s *KeeperTestSuite) SetupTest() { &foundation.MsgWithdrawFromTreasury{ Authority: s.bytesToString(s.authority), To: s.bytesToString(s.stranger), - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance))}, + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, s.balance)), + }, }) s.Require().NoError(err) @@ -494,7 +496,7 @@ func TestNewKeeper(t *testing.T) { return str } - require.Equal(t, bytesToString(authority), k.GetAuthority()) + require.Equal(t, bytesToString(authority), k.GetAuthority()) }) } } diff --git a/x/foundation/keeper/internal/msg_server_test.go b/x/foundation/keeper/internal/msg_server_test.go index 144e1d5849..ab92b63186 100644 --- a/x/foundation/keeper/internal/msg_server_test.go +++ b/x/foundation/keeper/internal/msg_server_test.go @@ -21,10 +21,10 @@ func (s *KeeperTestSuite) TestMsgFundTreasury() { events sdk.Events }{ "valid request": { - from: s.stranger, + from: s.stranger, amount: s.balance, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventFundTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"from", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventFundTreasury", Attributes: []abci.EventAttribute{{Key: "amount", Value: "[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index: false}, {Key: "from", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index: false}}}}, }, "empty from": { amount: s.balance, @@ -34,7 +34,7 @@ func (s *KeeperTestSuite) TestMsgFundTreasury() { amount: math.ZeroInt(), }, "insufficient funds": { - from: s.stranger, + from: s.stranger, amount: s.balance.Add(math.OneInt()), }, } @@ -76,7 +76,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawFromTreasury() { to: s.stranger, amount: s.balance, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawFromTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"to", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: "amount", Value: "[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index: false}, {Key: "to", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index: false}}}}, }, "empty authority": { to: s.stranger, @@ -144,23 +144,23 @@ func (s *KeeperTestSuite) TestMsgUpdateDecisionPolicy() { authority: s.authority, policy: &foundation.ThresholdDecisionPolicy{ Threshold: math.LegacyOneDec(), - Windows: &foundation.DecisionPolicyWindows{ + Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, }, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes:[]abci.EventAttribute{{Key:"decision_policy", Value:"{\"@type\":\"/lbm.foundation.v1.ThresholdDecisionPolicy\",\"threshold\":\"1.000000000000000000\",\"windows\":{\"voting_period\":\"3600s\",\"min_execution_period\":\"0s\"}}", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes: []abci.EventAttribute{{Key: "decision_policy", Value: "{\"@type\":\"/lbm.foundation.v1.ThresholdDecisionPolicy\",\"threshold\":\"1.000000000000000000\",\"windows\":{\"voting_period\":\"3600s\",\"min_execution_period\":\"0s\"}}", Index: false}}}}, }, "valid percentage policy": { authority: s.authority, policy: &foundation.PercentageDecisionPolicy{ Percentage: math.LegacyOneDec(), - Windows: &foundation.DecisionPolicyWindows{ + Windows: &foundation.DecisionPolicyWindows{ VotingPeriod: time.Hour, }, }, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes:[]abci.EventAttribute{{Key:"decision_policy", Value:"{\"@type\":\"/lbm.foundation.v1.PercentageDecisionPolicy\",\"percentage\":\"1.000000000000000000\",\"windows\":{\"voting_period\":\"3600s\",\"min_execution_period\":\"0s\"}}", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateDecisionPolicy", Attributes: []abci.EventAttribute{{Key: "decision_policy", Value: "{\"@type\":\"/lbm.foundation.v1.PercentageDecisionPolicy\",\"percentage\":\"1.000000000000000000\",\"windows\":{\"voting_period\":\"3600s\",\"min_execution_period\":\"0s\"}}", Index: false}}}}, }, "empty authority": { policy: &foundation.ThresholdDecisionPolicy{ @@ -258,7 +258,7 @@ func (s *KeeperTestSuite) TestMsgUpdateMembers() { Address: s.bytesToString(s.members[0]), }}, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateMembers", Attributes:[]abci.EventAttribute{{Key:"member_updates", Value:"[{\"address\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"remove\":false,\"metadata\":\"\"}]", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateMembers", Attributes: []abci.EventAttribute{{Key: "member_updates", Value: "[{\"address\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"remove\":false,\"metadata\":\"\"}]", Index: false}}}}, }, "empty authority": { members: []foundation.MemberRequest{{ @@ -330,21 +330,21 @@ func (s *KeeperTestSuite) TestMsgSubmitProposal() { proposers: members, msgs: []sdk.Msg{s.newTestMsg(s.authority)}, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventSubmitProposal", Attributes:[]abci.EventAttribute{{Key:"proposal", Value:"{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: "proposal", Value: "{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index: false}}}}, }, "valid request (submit & execute)": { proposers: members, msgs: []sdk.Msg{s.newTestMsg(s.authority)}, exec: foundation.Exec_EXEC_TRY, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventSubmitProposal", Attributes:[]abci.EventAttribute{{Key:"proposal", Value:"{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"proposal execution failed on proposal 6, because of error no message handler found for \\\"/testpb.TestMsg\\\": unknown request\"", Index:false}, {Key:"proposal_id", Value:"\"6\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_FAILURE\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: "proposal", Value: "{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgp6ktsk6\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgz597xc9\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgrfn2n9h\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgyg2aryj\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg94ufkeq\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgxm0uqhl\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cg8xeg42d\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgge5mf44\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgfyz0ug8\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: "logs", Value: "\"proposal execution failed on proposal 6, because of error no message handler found for \\\"/testpb.TestMsg\\\": unknown request\"", Index: false}, {Key: "proposal_id", Value: "\"6\"", Index: false}, {Key: "result", Value: "\"PROPOSAL_EXECUTOR_RESULT_FAILURE\"", Index: false}}}}, }, "valid request (submit & unable to reach quorum)": { proposers: []string{members[0]}, msgs: []sdk.Msg{s.newTestMsg(s.authority)}, exec: foundation.Exec_EXEC_TRY, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventSubmitProposal", Attributes:[]abci.EventAttribute{{Key:"proposal", Value:"{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index:false}}}, {Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"proposal execution failed on proposal 6, because of error no message handler found for \\\"/testpb.TestMsg\\\": unknown request\"", Index:false}, {Key:"proposal_id", Value:"\"6\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_FAILURE\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventSubmitProposal", Attributes: []abci.EventAttribute{{Key: "proposal", Value: "{\"id\":\"6\",\"metadata\":\"\",\"proposers\":[\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"],\"submit_time\":\"2023-11-07T19:32:00Z\",\"foundation_version\":\"1\",\"status\":\"PROPOSAL_STATUS_SUBMITTED\",\"final_tally_result\":{\"yes_count\":\"0.000000000000000000\",\"abstain_count\":\"0.000000000000000000\",\"no_count\":\"0.000000000000000000\",\"no_with_veto_count\":\"0.000000000000000000\"},\"voting_period_end\":\"2023-11-14T19:32:00Z\",\"executor_result\":\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\",\"messages\":[{\"@type\":\"/testpb.TestMsg\",\"signers\":[\"link190vt0vxc8c8vj24a7mm3fjsenfu8f5yxxj76cp\"]}]}", Index: false}}}, {Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"6\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: "logs", Value: "\"proposal execution failed on proposal 6, because of error no message handler found for \\\"/testpb.TestMsg\\\": unknown request\"", Index: false}, {Key: "proposal_id", Value: "\"6\"", Index: false}, {Key: "result", Value: "\"PROPOSAL_EXECUTOR_RESULT_FAILURE\"", Index: false}}}}, }, "empty proposers": { msgs: []sdk.Msg{s.newTestMsg()}, @@ -437,13 +437,13 @@ func (s *KeeperTestSuite) TestMsgWithdrawProposal() { proposalID: s.activeProposal, address: s.members[0], valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawProposal", Attributes:[]abci.EventAttribute{{Key:"proposal_id", Value:"\"1\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawProposal", Attributes: []abci.EventAttribute{{Key: "proposal_id", Value: "\"1\"", Index: false}}}}, }, "valid request (authority)": { proposalID: s.activeProposal, address: s.authority, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawProposal", Attributes:[]abci.EventAttribute{{Key:"proposal_id", Value:"\"1\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawProposal", Attributes: []abci.EventAttribute{{Key: "proposal_id", Value: "\"1\"", Index: false}}}}, }, "empty proposal id": { address: s.members[0], @@ -500,7 +500,7 @@ func (s *KeeperTestSuite) TestMsgVote() { voter: s.members[0], option: foundation.VOTE_OPTION_YES, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"1\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"1\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}}, }, "valid request (vote & execute)": { proposalID: s.activeProposal, @@ -508,30 +508,30 @@ func (s *KeeperTestSuite) TestMsgVote() { option: foundation.VOTE_OPTION_YES, exec: foundation.Exec_EXEC_TRY, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventVote", Attributes:[]abci.EventAttribute{{Key:"vote", Value:"{\"proposal_id\":\"1\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index:false}}}, {Type:"lbm.foundation.v1.EventWithdrawFromTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"to", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"\"", Index:false}, {Key:"proposal_id", Value:"\"1\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_SUCCESS\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventVote", Attributes: []abci.EventAttribute{{Key: "vote", Value: "{\"proposal_id\":\"1\",\"voter\":\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\",\"option\":\"VOTE_OPTION_YES\",\"metadata\":\"\",\"submit_time\":\"2023-11-07T19:32:00Z\"}", Index: false}}}, {Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: "amount", Value: "[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index: false}, {Key: "to", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: "logs", Value: "\"\"", Index: false}, {Key: "proposal_id", Value: "\"1\"", Index: false}, {Key: "result", Value: "\"PROPOSAL_EXECUTOR_RESULT_SUCCESS\"", Index: false}}}}, }, "empty proposal id": { voter: s.members[0], option: foundation.VOTE_OPTION_YES, }, "empty voter": { - proposalID: 1, - option: foundation.VOTE_OPTION_YES, + proposalID: 1, + option: foundation.VOTE_OPTION_YES, }, "empty option": { - proposalID: 1, - voter: s.members[0], + proposalID: 1, + voter: s.members[0], }, "invalid option": { - proposalID: 1, - voter: s.members[0], - option: -1, + proposalID: 1, + voter: s.members[0], + option: -1, }, "invalid exec": { - proposalID: 1, - voter: s.members[0], - option: foundation.VOTE_OPTION_YES, - exec: -1, + proposalID: 1, + voter: s.members[0], + option: foundation.VOTE_OPTION_YES, + exec: -1, }, "not authorized": { proposalID: s.activeProposal, @@ -617,13 +617,13 @@ func (s *KeeperTestSuite) TestMsgExec() { proposalID: s.activeProposal, signer: s.members[0], valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventWithdrawFromTreasury", Attributes:[]abci.EventAttribute{{Key:"amount", Value:"[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index:false}, {Key:"to", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}}}, {Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"\"", Index:false}, {Key:"proposal_id", Value:"\"1\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_SUCCESS\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventWithdrawFromTreasury", Attributes: []abci.EventAttribute{{Key: "amount", Value: "[{\"denom\":\"stake\",\"amount\":\"987654321\"}]", Index: false}, {Key: "to", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index: false}}}, {Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: "logs", Value: "\"\"", Index: false}, {Key: "proposal_id", Value: "\"1\"", Index: false}, {Key: "result", Value: "\"PROPOSAL_EXECUTOR_RESULT_SUCCESS\"", Index: false}}}}, }, "valid request (not finalized)": { proposalID: s.votedProposal, signer: s.members[0], valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventExec", Attributes:[]abci.EventAttribute{{Key:"logs", Value:"\"\"", Index:false}, {Key:"proposal_id", Value:"\"2\"", Index:false}, {Key:"result", Value:"\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventExec", Attributes: []abci.EventAttribute{{Key: "logs", Value: "\"\"", Index: false}, {Key: "proposal_id", Value: "\"2\"", Index: false}, {Key: "result", Value: "\"PROPOSAL_EXECUTOR_RESULT_NOT_RUN\"", Index: false}}}}, }, "empty proposal id": { signer: s.members[0], @@ -675,7 +675,7 @@ func (s *KeeperTestSuite) TestMsgLeaveFoundation() { "valid request": { address: s.members[0], valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventLeaveFoundation", Attributes:[]abci.EventAttribute{{Key:"address", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventLeaveFoundation", Attributes: []abci.EventAttribute{{Key: "address", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"", Index: false}}}}, }, "empty address": {}, "not authorized": { @@ -739,7 +739,7 @@ func (s *KeeperTestSuite) TestMsgUpdateCensorship() { Authority: foundation.CensorshipAuthorityGovernance, }, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventUpdateCensorship", Attributes:[]abci.EventAttribute{{Key:"censorship", Value:"{\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\",\"authority\":\"CENSORSHIP_AUTHORITY_GOVERNANCE\"}", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventUpdateCensorship", Attributes: []abci.EventAttribute{{Key: "censorship", Value: "{\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\",\"authority\":\"CENSORSHIP_AUTHORITY_GOVERNANCE\"}", Index: false}}}}, }, "invalid authority": { authority: s.stranger, @@ -794,7 +794,7 @@ func (s *KeeperTestSuite) TestMsgGrant() { grantee: s.members[0], authorization: &foundation.ReceiveFromTreasuryAuthorization{}, valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventGrant", Attributes:[]abci.EventAttribute{{Key:"authorization", Value:"{\"@type\":\"/lbm.foundation.v1.ReceiveFromTreasuryAuthorization\"}", Index:false}, {Key:"grantee", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventGrant", Attributes: []abci.EventAttribute{{Key: "authorization", Value: "{\"@type\":\"/lbm.foundation.v1.ReceiveFromTreasuryAuthorization\"}", Index: false}, {Key: "grantee", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgq8ql9tg\"", Index: false}}}}, }, "empty authority": { grantee: s.members[0], @@ -862,7 +862,7 @@ func (s *KeeperTestSuite) TestMsgRevoke() { grantee: s.stranger, msgTypeURL: foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), valid: true, - events: sdk.Events{{Type:"lbm.foundation.v1.EventRevoke", Attributes:[]abci.EventAttribute{{Key:"grantee", Value:"\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index:false}, {Key:"msg_type_url", Value:"\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"", Index:false}}}}, + events: sdk.Events{{Type: "lbm.foundation.v1.EventRevoke", Attributes: []abci.EventAttribute{{Key: "grantee", Value: "\"link15ky9du8a2wlstz6fpx3p4mqpjyrm5cgsjpha7m\"", Index: false}, {Key: "msg_type_url", Value: "\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"", Index: false}}}}, }, "empty authority": { grantee: s.stranger, diff --git a/x/foundation/keeper/internal/proposal_handler.go b/x/foundation/keeper/internal/proposal_handler.go index 8319fdf012..a259d96275 100644 --- a/x/foundation/keeper/internal/proposal_handler.go +++ b/x/foundation/keeper/internal/proposal_handler.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govv1beta1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/Finschia/finschia-sdk/x/foundation" ) diff --git a/x/foundation/keeper/internal/treasury.go b/x/foundation/keeper/internal/treasury.go index dd5ac5638a..18c0508fac 100644 --- a/x/foundation/keeper/internal/treasury.go +++ b/x/foundation/keeper/internal/treasury.go @@ -1,8 +1,8 @@ package internal import ( - "github.com/cosmos/cosmos-sdk/types/address" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/Finschia/finschia-sdk/x/foundation" diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index 9a57b86319..f7ea0af3d0 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -5,14 +5,14 @@ import ( "encoding/json" "fmt" + abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/cometbft/cometbft/abci/types" - "cosmossdk.io/core/appmodule" "cosmossdk.io/core/address" - "cosmossdk.io/depinject" + "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -24,10 +24,10 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + modulev1 "github.com/Finschia/finschia-sdk/api/lbm/foundation/module/v1" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/client/cli" "github.com/Finschia/finschia-sdk/x/foundation/keeper" - modulev1 "github.com/Finschia/finschia-sdk/api/lbm/foundation/module/v1" ) const ( @@ -35,14 +35,14 @@ const ( ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} - _ appmodule.HasBeginBlocker = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} + _ module.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the foundation module. -type AppModuleBasic struct{ +type AppModuleBasic struct { addressCodec address.Codec } @@ -87,7 +87,7 @@ func (AppModuleBasic) GetTxCmd() *cobra.Command { return cli.NewTxCmd() } -func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { +func (am AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { foundation.RegisterInterfaces(registry) } @@ -205,14 +205,14 @@ func init() { type FoundationInputs struct { depinject.In - StoreService store.KVStoreService - Cdc codec.Codec - Config *modulev1.Module + StoreService store.KVStoreService + Cdc codec.Codec + Config *modulev1.Module AddressCodec address.Codec - AuthKeeper foundation.AuthKeeper - BankKeeper foundation.BankKeeper + AuthKeeper foundation.AuthKeeper + BankKeeper foundation.BankKeeper Subspace paramstypes.Subspace MsgServiceRouter baseapp.MessageRouter } @@ -238,7 +238,7 @@ func ProvideModule(in FoundationInputs) FoundationOutputs { config := foundation.Config{ MaxExecutionPeriod: in.Config.MaxExecutionPeriod.AsDuration(), - MaxMetadataLen: in.Config.MaxMetadataLen, + MaxMetadataLen: in.Config.MaxMetadataLen, } authorityStr, err := in.AddressCodec.BytesToString(authority) diff --git a/x/foundation/msgs_test.go b/x/foundation/msgs_test.go index 6753381b12..0c0e0205e3 100644 --- a/x/foundation/msgs_test.go +++ b/x/foundation/msgs_test.go @@ -75,7 +75,7 @@ func TestAminoJSON(t *testing.T) { legacyAmino := codec.NewLegacyAmino() foundation.RegisterLegacyAminoCodec(legacyAmino) legacytx.RegressionTestingAminoCodec = legacyAmino - + addressCodec := addresscodec.NewBech32Codec("link") bytesToString := func(addr sdk.AccAddress) string { str, err := addressCodec.BytesToString(addr) From cfb491bb32cbd4239d586584e011a660cc6eb1d1 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 3 Jan 2024 03:27:48 +0000 Subject: [PATCH 09/26] Use Finschia/cometbft --- x/foundation/go.mod | 5 ++++- x/foundation/go.sum | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/x/foundation/go.mod b/x/foundation/go.mod index f559e4eb55..94d6ef675a 100644 --- a/x/foundation/go.mod +++ b/x/foundation/go.mod @@ -156,4 +156,7 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 +replace ( + github.com/cometbft/cometbft => github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d + github.com/cosmos/cosmos-sdk => github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 +) diff --git a/x/foundation/go.sum b/x/foundation/go.sum index 7269ccef15..b00e6d5ee7 100644 --- a/x/foundation/go.sum +++ b/x/foundation/go.sum @@ -68,6 +68,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dX github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d h1:7x3LqhrO4lXTt3kh0eCwSzGAE+sUn6tjhKNfGOE/nc8= +github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 h1:lm4mGuo+arhc/GrVm8hjGE3CCcfSQEvxI+uZODfEhQY= github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c h1:udPyEWzmxkmmXK2btB/rWeApcMsjcFZl2B59EYxOdss= @@ -169,8 +171,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.2 h1:io0JCh5EPxINKN5ZMI5hCdpW3QVZRy+o8qWe3mlJa/8= -github.com/cometbft/cometbft v0.38.2/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= From 818e934fbe5de7fcd3767287ed0240511f64d532 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 3 Jan 2024 12:54:30 +0000 Subject: [PATCH 10/26] Refactor address codec --- x/foundation/keeper/exported.go | 3 -- x/foundation/keeper/internal/censorship.go | 8 +++--- x/foundation/keeper/internal/exec.go | 2 +- x/foundation/keeper/internal/genesis.go | 4 +-- x/foundation/keeper/internal/grpc_query.go | 6 ++-- x/foundation/keeper/internal/keeper.go | 13 +++++---- x/foundation/keeper/internal/keeper_test.go | 5 ++-- x/foundation/keeper/internal/member.go | 10 +++---- x/foundation/keeper/internal/msg_server.go | 32 ++++++++++----------- x/foundation/keeper/internal/proposal.go | 2 +- x/foundation/keeper/internal/tally.go | 2 +- x/foundation/keeper/internal/vote.go | 6 ++-- x/foundation/module/module.go | 18 ++++++------ 13 files changed, 54 insertions(+), 57 deletions(-) diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go index 4ba2f5ae0a..7916b7cf4e 100644 --- a/x/foundation/keeper/exported.go +++ b/x/foundation/keeper/exported.go @@ -1,7 +1,6 @@ package keeper import ( - addresscodec "cosmossdk.io/core/address" "cosmossdk.io/core/store" "github.com/cosmos/cosmos-sdk/baseapp" @@ -28,7 +27,6 @@ type keeper struct { func NewKeeper( cdc codec.Codec, - addressCodec addresscodec.Codec, storeService store.KVStoreService, router baseapp.MessageRouter, authKeeper foundation.AuthKeeper, @@ -41,7 +39,6 @@ func NewKeeper( return &keeper{ impl: internal.NewKeeper( cdc, - addressCodec, storeService, router, authKeeper, diff --git a/x/foundation/keeper/internal/censorship.go b/x/foundation/keeper/internal/censorship.go index d19ee8c9da..23b212695c 100644 --- a/x/foundation/keeper/internal/censorship.go +++ b/x/foundation/keeper/internal/censorship.go @@ -97,7 +97,7 @@ func (k Keeper) Grant(ctx sdk.Context, grantee sdk.AccAddress, authorization fou return err } - granteeStr, err := k.addressCodec.BytesToString(grantee) + granteeStr, err := k.addressCodec().BytesToString(grantee) if err != nil { panic(err) } @@ -117,7 +117,7 @@ func (k Keeper) Revoke(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL strin } k.deleteAuthorization(ctx, grantee, msgTypeURL) - granteeStr, err := k.addressCodec.BytesToString(grantee) + granteeStr, err := k.addressCodec().BytesToString(grantee) if err != nil { panic(err) } @@ -135,7 +135,7 @@ func (k Keeper) pruneAuthorizations(ctx sdk.Context, msgTypeURL string) { var pruning []foundation.GrantAuthorization k.iterateAuthorizations(ctx, func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool) { if authorization.MsgTypeURL() == msgTypeURL { - granteeStr, err := k.addressCodec.BytesToString(grantee) + granteeStr, err := k.addressCodec().BytesToString(grantee) if err != nil { panic(err) } @@ -150,7 +150,7 @@ func (k Keeper) pruneAuthorizations(ctx sdk.Context, msgTypeURL string) { }) for _, grant := range pruning { - grantee, err := k.addressCodec.StringToBytes(grant.Grantee) + grantee, err := k.addressCodec().StringToBytes(grant.Grantee) if err != nil { panic(err) } diff --git a/x/foundation/keeper/internal/exec.go b/x/foundation/keeper/internal/exec.go index ef2766dc26..220c0afd90 100644 --- a/x/foundation/keeper/internal/exec.go +++ b/x/foundation/keeper/internal/exec.go @@ -97,7 +97,7 @@ func (k Keeper) doExecuteMsgs(ctx sdk.Context, proposal foundation.Proposal) ([] msgs := proposal.GetMsgs() results := make([]sdk.Result, len(msgs)) - authority, err := k.addressCodec.StringToBytes(k.GetAuthority()) + authority, err := k.addressCodec().StringToBytes(k.GetAuthority()) if err != nil { panic(err) } diff --git a/x/foundation/keeper/internal/genesis.go b/x/foundation/keeper/internal/genesis.go index ae7c639c09..61be9edbf4 100644 --- a/x/foundation/keeper/internal/genesis.go +++ b/x/foundation/keeper/internal/genesis.go @@ -43,7 +43,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *foundation.GenesisState) erro } for _, ga := range data.Authorizations { - grantee, err := k.addressCodec.StringToBytes(ga.Grantee) + grantee, err := k.addressCodec().StringToBytes(ga.Grantee) if err != nil { panic(err) } @@ -90,7 +90,7 @@ func (k Keeper) GetCensorships(ctx sdk.Context) []foundation.Censorship { func (k Keeper) GetGrants(ctx sdk.Context) []foundation.GrantAuthorization { var grantAuthorizations []foundation.GrantAuthorization k.iterateAuthorizations(ctx, func(grantee sdk.AccAddress, authorization foundation.Authorization) (stop bool) { - granteeStr, err := k.addressCodec.BytesToString(grantee) + granteeStr, err := k.addressCodec().BytesToString(grantee) if err != nil { panic(err) } diff --git a/x/foundation/keeper/internal/grpc_query.go b/x/foundation/keeper/internal/grpc_query.go index 80c2c8a81d..deef12f9b9 100644 --- a/x/foundation/keeper/internal/grpc_query.go +++ b/x/foundation/keeper/internal/grpc_query.go @@ -68,7 +68,7 @@ func (s queryServer) Member(c context.Context, req *foundation.QueryMemberReques } ctx := sdk.UnwrapSDKContext(c) - addr, err := s.keeper.addressCodec.StringToBytes(req.Address) + addr, err := s.keeper.addressCodec().StringToBytes(req.Address) if err != nil { return nil, err } @@ -146,7 +146,7 @@ func (s queryServer) Vote(c context.Context, req *foundation.QueryVoteRequest) ( } ctx := sdk.UnwrapSDKContext(c) - voter, err := s.keeper.addressCodec.StringToBytes(req.Voter) + voter, err := s.keeper.addressCodec().StringToBytes(req.Voter) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "invalid voter address") } @@ -228,7 +228,7 @@ func (s queryServer) Grants(c context.Context, req *foundation.QueryGrantsReques return nil, status.Error(codes.InvalidArgument, "invalid request") } - grantee, err := s.keeper.addressCodec.StringToBytes(req.Grantee) + grantee, err := s.keeper.addressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index 71ab7a608f..6c5f5eb5ad 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -1,7 +1,7 @@ package internal import ( - addresscodec "cosmossdk.io/core/address" + "cosmossdk.io/core/address" "cosmossdk.io/core/store" "cosmossdk.io/log" @@ -16,8 +16,7 @@ import ( // Keeper defines the foundation module Keeper type Keeper struct { // The codec for binary encoding/decoding. - cdc codec.Codec - addressCodec addresscodec.Codec + cdc codec.Codec storeService store.KVStoreService @@ -45,7 +44,6 @@ type Keeper struct { func NewKeeper( cdc codec.Codec, - addressCodec addresscodec.Codec, storeService store.KVStoreService, router baseapp.MessageRouter, authKeeper foundation.AuthKeeper, @@ -55,6 +53,8 @@ func NewKeeper( authority string, subspace paramstypes.Subspace, ) Keeper { + addressCodec := cdc.InterfaceRegistry().SigningContext().AddressCodec() + if _, err := addressCodec.StringToBytes(authority); err != nil { panic("authority is not a valid acc address") } @@ -76,7 +76,6 @@ func NewKeeper( return Keeper{ cdc: cdc, - addressCodec: addressCodec, storeService: storeService, router: router, authKeeper: authKeeper, @@ -97,3 +96,7 @@ func (k Keeper) GetAuthority() string { func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+foundation.ModuleName) } + +func (k Keeper) addressCodec() address.Codec { + return k.cdc.InterfaceRegistry().SigningContext().AddressCodec() +} diff --git a/x/foundation/keeper/internal/keeper_test.go b/x/foundation/keeper/internal/keeper_test.go index e51ec9d0a0..486cda8cb1 100644 --- a/x/foundation/keeper/internal/keeper_test.go +++ b/x/foundation/keeper/internal/keeper_test.go @@ -145,11 +145,10 @@ func setupFoundationKeeper(t *testing.T, balance *math.Int, addrs []sdk.AccAddre config := foundation.DefaultConfig() feeCollector := authtypes.FeeCollectorName - k := keeper.NewKeeper(encCfg.Codec, addressCodec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, bankKeeper, feeCollector, config, authority, subspace) + k := keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, bankKeeper, feeCollector, config, authority, subspace) impl := internal.NewKeeper( encCfg.Codec, - addressCodec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, @@ -479,7 +478,7 @@ func TestNewKeeper(t *testing.T) { config := foundation.DefaultConfig() feeCollector := authtypes.FeeCollectorName - return keeper.NewKeeper(encCfg.Codec, addressCodec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, bankKeeper, feeCollector, config, authority, subspace) + return keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), bapp.MsgServiceRouter(), authKeeper, bankKeeper, feeCollector, config, authority, subspace) } if tc.panics { diff --git a/x/foundation/keeper/internal/member.go b/x/foundation/keeper/internal/member.go index ef73fa8ee1..3066fa23c2 100644 --- a/x/foundation/keeper/internal/member.go +++ b/x/foundation/keeper/internal/member.go @@ -68,14 +68,14 @@ func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberReques Metadata: request.Metadata, AddedAt: ctx.BlockTime(), } - if err := new.ValidateBasic(k.addressCodec); err != nil { + if err := new.ValidateBasic(k.addressCodec()); err != nil { panic(err) } if err := validateMetadata(new.Metadata, k.config); err != nil { return err } - addr, err := k.addressCodec.StringToBytes(new.Address) + addr, err := k.addressCodec().StringToBytes(new.Address) if err != nil { panic(err) } @@ -130,7 +130,7 @@ func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress) (*foundation. func (k Keeper) SetMember(ctx sdk.Context, member foundation.Member) { store := k.storeService.OpenKVStore(ctx) - addr, err := k.addressCodec.StringToBytes(member.Address) + addr, err := k.addressCodec().StringToBytes(member.Address) if err != nil { panic(err) } @@ -186,7 +186,7 @@ func (k Keeper) validateCensorshipAuthority(ctx sdk.Context, msgTypeURL, authori return err } - govAddr, err := k.addressCodec.BytesToString(authtypes.NewModuleAddress(govtypes.ModuleName)) + govAddr, err := k.addressCodec().BytesToString(authtypes.NewModuleAddress(govtypes.ModuleName)) if err != nil { return err } @@ -203,7 +203,7 @@ func (k Keeper) validateCensorshipAuthority(ctx sdk.Context, msgTypeURL, authori func (k Keeper) validateMembers(ctx sdk.Context, members []string) error { for _, member := range members { - addr, err := k.addressCodec.StringToBytes(member) + addr, err := k.addressCodec().StringToBytes(member) if err != nil { panic(err) } diff --git a/x/foundation/keeper/internal/msg_server.go b/x/foundation/keeper/internal/msg_server.go index fde2d12d1b..aca10010d7 100644 --- a/x/foundation/keeper/internal/msg_server.go +++ b/x/foundation/keeper/internal/msg_server.go @@ -29,7 +29,7 @@ var _ foundation.MsgServer = msgServer{} // FundTreasury defines a method to fund the treasury. func (s msgServer) FundTreasury(c context.Context, req *foundation.MsgFundTreasury) (*foundation.MsgFundTreasuryResponse, error) { - from, err := s.keeper.addressCodec.StringToBytes(req.From) + from, err := s.keeper.addressCodec().StringToBytes(req.From) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid from address: %s", req.From) } @@ -56,11 +56,11 @@ func (s msgServer) FundTreasury(c context.Context, req *foundation.MsgFundTreasu // WithdrawFromTreasury defines a method to withdraw coins from the treasury. func (s msgServer) WithdrawFromTreasury(c context.Context, req *foundation.MsgWithdrawFromTreasury) (*foundation.MsgWithdrawFromTreasuryResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Authority); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) } - to, err := s.keeper.addressCodec.StringToBytes(req.To) + to, err := s.keeper.addressCodec().StringToBytes(req.To) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid to address: %s", req.To) } @@ -94,7 +94,7 @@ func (s msgServer) WithdrawFromTreasury(c context.Context, req *foundation.MsgWi } func (s msgServer) UpdateMembers(c context.Context, req *foundation.MsgUpdateMembers) (*foundation.MsgUpdateMembersResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Authority); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) } @@ -102,7 +102,7 @@ func (s msgServer) UpdateMembers(c context.Context, req *foundation.MsgUpdateMem return nil, sdkerrors.ErrInvalidRequest.Wrap("empty updates") } members := foundation.MemberRequests{Members: req.MemberUpdates} - if err := members.ValidateBasic(s.keeper.addressCodec); err != nil { + if err := members.ValidateBasic(s.keeper.addressCodec()); err != nil { return nil, err } @@ -126,7 +126,7 @@ func (s msgServer) UpdateMembers(c context.Context, req *foundation.MsgUpdateMem } func (s msgServer) UpdateDecisionPolicy(c context.Context, req *foundation.MsgUpdateDecisionPolicy) (*foundation.MsgUpdateDecisionPolicyResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Authority); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) } @@ -160,7 +160,7 @@ func (s msgServer) UpdateDecisionPolicy(c context.Context, req *foundation.MsgUp } func (s msgServer) SubmitProposal(c context.Context, req *foundation.MsgSubmitProposal) (*foundation.MsgSubmitProposalResponse, error) { - if err := foundation.ValidateProposers(req.Proposers, s.keeper.addressCodec); err != nil { + if err := foundation.ValidateProposers(req.Proposers, s.keeper.addressCodec()); err != nil { return nil, err } @@ -225,7 +225,7 @@ func (s msgServer) WithdrawProposal(c context.Context, req *foundation.MsgWithdr return nil, sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") } - if _, err := s.keeper.addressCodec.StringToBytes(req.Address); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Address); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid withdrawer address: %s", req.Address) } @@ -262,7 +262,7 @@ func (s msgServer) Vote(c context.Context, req *foundation.MsgVote) (*foundation return nil, sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") } - if _, err := s.keeper.addressCodec.StringToBytes(req.Voter); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Voter); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", req.Voter) } @@ -305,7 +305,7 @@ func (s msgServer) Exec(c context.Context, req *foundation.MsgExec) (*foundation return nil, sdkerrors.ErrInvalidRequest.Wrap("empty proposal id") } - if _, err := s.keeper.addressCodec.StringToBytes(req.Signer); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Signer); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid signer address: %s", req.Signer) } @@ -323,7 +323,7 @@ func (s msgServer) Exec(c context.Context, req *foundation.MsgExec) (*foundation } func (s msgServer) LeaveFoundation(c context.Context, req *foundation.MsgLeaveFoundation) (*foundation.MsgLeaveFoundationResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Address); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Address); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid member address: %s", req.Address) } @@ -351,7 +351,7 @@ func (s msgServer) LeaveFoundation(c context.Context, req *foundation.MsgLeaveFo } func (s msgServer) UpdateCensorship(c context.Context, req *foundation.MsgUpdateCensorship) (*foundation.MsgUpdateCensorshipResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Authority); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) } @@ -380,11 +380,11 @@ func (s msgServer) UpdateCensorship(c context.Context, req *foundation.MsgUpdate } func (s msgServer) Grant(c context.Context, req *foundation.MsgGrant) (*foundation.MsgGrantResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Authority); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) } - grantee, err := s.keeper.addressCodec.StringToBytes(req.Grantee) + grantee, err := s.keeper.addressCodec().StringToBytes(req.Grantee) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", req.Grantee) } @@ -413,11 +413,11 @@ func (s msgServer) Grant(c context.Context, req *foundation.MsgGrant) (*foundati } func (s msgServer) Revoke(c context.Context, req *foundation.MsgRevoke) (*foundation.MsgRevokeResponse, error) { - if _, err := s.keeper.addressCodec.StringToBytes(req.Authority); err != nil { + if _, err := s.keeper.addressCodec().StringToBytes(req.Authority); err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", req.Authority) } - grantee, err := s.keeper.addressCodec.StringToBytes(req.Grantee) + grantee, err := s.keeper.addressCodec().StringToBytes(req.Grantee) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", req.Grantee) } diff --git a/x/foundation/keeper/internal/proposal.go b/x/foundation/keeper/internal/proposal.go index b09ab962cf..3d3d342f4e 100644 --- a/x/foundation/keeper/internal/proposal.go +++ b/x/foundation/keeper/internal/proposal.go @@ -42,7 +42,7 @@ func (k Keeper) SubmitProposal(ctx sdk.Context, proposers []string, metadata str } foundationInfo := k.GetFoundationInfo(ctx) - authority, err := k.addressCodec.StringToBytes(k.GetAuthority()) + authority, err := k.addressCodec().StringToBytes(k.GetAuthority()) if err != nil { panic(err) } diff --git a/x/foundation/keeper/internal/tally.go b/x/foundation/keeper/internal/tally.go index 149e83e24d..5aa50e496a 100644 --- a/x/foundation/keeper/internal/tally.go +++ b/x/foundation/keeper/internal/tally.go @@ -54,7 +54,7 @@ func (k Keeper) tally(ctx sdk.Context, p foundation.Proposal) (foundation.TallyR tallyResult := foundation.DefaultTallyResult() var errIter error k.iterateVotes(ctx, p.Id, func(vote foundation.Vote) (stop bool) { - voter, err := k.addressCodec.StringToBytes(vote.Voter) + voter, err := k.addressCodec().StringToBytes(vote.Voter) if err != nil { panic(err) } diff --git a/x/foundation/keeper/internal/vote.go b/x/foundation/keeper/internal/vote.go index c9d6db6f7d..cc3296a448 100644 --- a/x/foundation/keeper/internal/vote.go +++ b/x/foundation/keeper/internal/vote.go @@ -16,7 +16,7 @@ func (k Keeper) Vote(ctx sdk.Context, vote foundation.Vote) error { } // Make sure that a voter hasn't already voted. - voter, err := k.addressCodec.StringToBytes(vote.Voter) + voter, err := k.addressCodec().StringToBytes(vote.Voter) if err != nil { panic(err) } @@ -76,7 +76,7 @@ func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress func (k Keeper) setVote(ctx sdk.Context, vote foundation.Vote) { store := k.storeService.OpenKVStore(ctx) - voter, err := k.addressCodec.StringToBytes(vote.Voter) + voter, err := k.addressCodec().StringToBytes(vote.Voter) if err != nil { panic(err) } @@ -116,7 +116,7 @@ func (k Keeper) GetVotes(ctx sdk.Context, proposalID uint64) []foundation.Vote { func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) { keys := [][]byte{} k.iterateVotes(ctx, proposalID, func(vote foundation.Vote) (stop bool) { - voter, err := k.addressCodec.StringToBytes(vote.Voter) + voter, err := k.addressCodec().StringToBytes(vote.Voter) if err != nil { panic(err) } diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index f7ea0af3d0..1473102fd7 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -9,7 +9,6 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" @@ -43,7 +42,7 @@ var ( // AppModuleBasic defines the basic application module used by the foundation module. type AppModuleBasic struct { - addressCodec address.Codec + cdc codec.Codec } // Name returns the ModuleName @@ -67,7 +66,7 @@ func (am AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEn return fmt.Errorf("failed to unmarshal %s genesis state: %w", foundation.ModuleName, err) } - return foundation.ValidateGenesis(data, am.addressCodec) + return foundation.ValidateGenesis(data, am.cdc.InterfaceRegistry().SigningContext().AddressCodec()) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the foundation module. @@ -101,10 +100,10 @@ type AppModule struct { } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, addressCodec address.Codec) AppModule { +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{ - addressCodec: addressCodec, + cdc: cdc, }, keeper: keeper, } @@ -209,8 +208,6 @@ type FoundationInputs struct { Cdc codec.Codec Config *modulev1.Module - AddressCodec address.Codec - AuthKeeper foundation.AuthKeeper BankKeeper foundation.BankKeeper Subspace paramstypes.Subspace @@ -241,13 +238,14 @@ func ProvideModule(in FoundationInputs) FoundationOutputs { MaxMetadataLen: in.Config.MaxMetadataLen, } - authorityStr, err := in.AddressCodec.BytesToString(authority) + addressCodec := in.Cdc.InterfaceRegistry().SigningContext().AddressCodec() + authorityStr, err := addressCodec.BytesToString(authority) if err != nil { panic(err) } - k := keeper.NewKeeper(in.Cdc, in.AddressCodec, in.StoreService, in.MsgServiceRouter, in.AuthKeeper, in.BankKeeper, feeCollectorName, config, authorityStr, in.Subspace) - m := NewAppModule(in.Cdc, k, in.AddressCodec) + k := keeper.NewKeeper(in.Cdc, in.StoreService, in.MsgServiceRouter, in.AuthKeeper, in.BankKeeper, feeCollectorName, config, authorityStr, in.Subspace) + m := NewAppModule(in.Cdc, k) return FoundationOutputs{ Keeper: k, From 9f782a14bb551bc2ccc7f6d05527f61fb290cdd2 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 10 Jan 2024 03:47:38 +0000 Subject: [PATCH 11/26] Proto gen --- x/foundation/authz.pb.go | 26 ++++++++++++-------------- x/foundation/foundation.pb.go | 2 ++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/x/foundation/authz.pb.go b/x/foundation/authz.pb.go index 70c3a9be21..8fffb26135 100644 --- a/x/foundation/authz.pb.go +++ b/x/foundation/authz.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -70,22 +69,21 @@ func init() { func init() { proto.RegisterFile("lbm/foundation/v1/authz.proto", fileDescriptor_8bdb89c90659aa0e) } var fileDescriptor_8bdb89c90659aa0e = []byte{ - // 228 bytes of a gzipped FileDescriptorProto + // 218 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x49, 0xca, 0xd5, 0x4f, 0xcb, 0x2f, 0xcd, 0x4b, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xcc, 0x49, 0xca, 0xd5, 0x43, - 0x48, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, - 0x42, 0x29, 0xc9, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0xe2, 0x78, 0x88, 0x04, 0x84, 0x03, 0x95, 0x12, - 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x21, 0xa5, 0x09, 0x8c, 0x5c, 0x0a, 0x41, - 0xa9, 0xc9, 0xa9, 0x99, 0x65, 0xa9, 0x6e, 0x45, 0xf9, 0xb9, 0x21, 0x45, 0xa9, 0x89, 0xc5, 0xa5, - 0x45, 0x95, 0x8e, 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x55, 0x60, 0xbb, 0xac, 0x72, 0x4e, 0x6d, - 0xd1, 0xb5, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x77, 0xcb, 0xcc, - 0x2b, 0x4e, 0xce, 0xc8, 0x4c, 0xd4, 0x4f, 0x83, 0x32, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x90, - 0x5c, 0xaf, 0x87, 0x62, 0x40, 0xd7, 0xf3, 0x0d, 0x5a, 0x1a, 0x39, 0x49, 0xb9, 0x60, 0x65, 0x84, - 0x6c, 0x73, 0x72, 0x3f, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, - 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x5d, 0x92, - 0xdc, 0x90, 0xc4, 0x06, 0xf6, 0xa2, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x91, 0x7b, 0x62, 0xde, - 0x5a, 0x01, 0x00, 0x00, + 0x48, 0xeb, 0x95, 0x19, 0x4a, 0x49, 0x26, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xc7, 0x83, 0x15, 0xe8, + 0x43, 0x38, 0x10, 0xd5, 0x52, 0x82, 0x89, 0xb9, 0x99, 0x79, 0xf9, 0xfa, 0x60, 0x12, 0x22, 0xa4, + 0x34, 0x81, 0x91, 0x4b, 0x21, 0x28, 0x35, 0x39, 0x35, 0xb3, 0x2c, 0xd5, 0xad, 0x28, 0x3f, 0x37, + 0xa4, 0x28, 0x35, 0xb1, 0xb8, 0xb4, 0xa8, 0xd2, 0xb1, 0xb4, 0x24, 0x23, 0xbf, 0x28, 0xb3, 0x0a, + 0x6c, 0xaa, 0x55, 0xce, 0xa9, 0x2d, 0xba, 0xd6, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, + 0xf9, 0xb9, 0xfa, 0x6e, 0x99, 0x79, 0xc5, 0xc9, 0x19, 0x99, 0x89, 0xfa, 0x69, 0x50, 0x86, 0x6e, + 0x71, 0x4a, 0xb6, 0x7e, 0x05, 0x92, 0x3b, 0xf5, 0x50, 0x0c, 0xe8, 0x7a, 0xbe, 0x41, 0x4b, 0x23, + 0x27, 0x29, 0x17, 0xac, 0x8c, 0x90, 0x6d, 0x4e, 0xee, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, + 0x2c, 0xc7, 0x10, 0xa5, 0x4b, 0x92, 0x1b, 0x92, 0xd8, 0xc0, 0x5e, 0x34, 0x06, 0x04, 0x00, 0x00, + 0xff, 0xff, 0xba, 0x46, 0x80, 0x15, 0x44, 0x01, 0x00, 0x00, } func (m *ReceiveFromTreasuryAuthorization) Marshal() (dAtA []byte, err error) { diff --git a/x/foundation/foundation.pb.go b/x/foundation/foundation.pb.go index 73f3be2ead..ea3ab7c83a 100644 --- a/x/foundation/foundation.pb.go +++ b/x/foundation/foundation.pb.go @@ -34,6 +34,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// CensorshipAuthority defines the authorities which could be used in Censorship. type CensorshipAuthority int32 const ( @@ -227,6 +228,7 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +// Censorship states which message is being censored by a certain authority. type Censorship struct { MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` Authority CensorshipAuthority `protobuf:"varint,2,opt,name=authority,proto3,enum=lbm.foundation.v1.CensorshipAuthority" json:"authority,omitempty"` From 9113ec24e83b511f2733584e950a2c2650991d0f Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 10 Jan 2024 03:52:59 +0000 Subject: [PATCH 12/26] Add x/foundation to pr labeler --- .github/pr_labeler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/pr_labeler.yml b/.github/pr_labeler.yml index ced2486970..e22fccb0d1 100644 --- a/.github/pr_labeler.yml +++ b/.github/pr_labeler.yml @@ -13,3 +13,5 @@ # - x/*/client/**/* # "Type: ADR": # - docs/architecture/**/* +"C:x/foundation": + - x/foundation/**/* From 2dac22ed89afd2057dfb5f4ccb282d582300d134 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 10 Jan 2024 04:06:19 +0000 Subject: [PATCH 13/26] Cover x/foundation --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9632de421..d59ce23e30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -296,3 +296,34 @@ jobs: # NOTE: The following jobs are used to test the Finschia SDK Go submodules present under x/{module}. # They run when there is a diff in their respective directories. + + test-x-foundation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.21" + check-latest: true + cache: true + cache-dependency-path: x/foundation/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/foundation/**/*.go + x/foundation/go.mod + x/foundation/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/foundation + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + - name: sonarcloud + if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + projectBaseDir: x/foundation/ From f4d76b18cc598313a498113463da0e19d00a39c1 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 10 Jan 2024 09:52:09 +0000 Subject: [PATCH 14/26] Add e2e tests --- go.work.example | 1 + tests/Makefile | 11 + tests/e2e/foundation/cli_test.go | 20 + .../testutil => tests/e2e/foundation}/grpc.go | 4 +- .../e2e/foundation}/query.go | 26 +- .../e2e/foundation}/suite.go | 85 +- .../testutil => tests/e2e/foundation}/tx.go | 143 +- tests/go.mod | 221 +++ tests/go.sum | 1739 +++++++++++++++++ x/foundation/client/testutil/cli_test.go | 18 - 10 files changed, 2135 insertions(+), 133 deletions(-) create mode 100644 tests/Makefile create mode 100644 tests/e2e/foundation/cli_test.go rename {x/foundation/client/testutil => tests/e2e/foundation}/grpc.go (93%) rename {x/foundation/client/testutil => tests/e2e/foundation}/query.go (94%) rename {x/foundation/client/testutil => tests/e2e/foundation}/suite.go (78%) rename {x/foundation/client/testutil => tests/e2e/foundation}/tx.go (78%) create mode 100644 tests/go.mod create mode 100644 tests/go.sum delete mode 100644 x/foundation/client/testutil/cli_test.go diff --git a/go.work.example b/go.work.example index d326eab038..33d7bab29e 100644 --- a/go.work.example +++ b/go.work.example @@ -6,5 +6,6 @@ use ( . ./api ./simapp + ./tests ./x/foundation ) diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000000..1c3a6f3e8d --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,11 @@ +test-integration: + # go test ./integration/... -timeout 30m + +test-integration-cov: + # go test ./integration/... -timeout 30m -coverpkg=../... -coverprofile=integration-profile.out -covermode=atomic + +test-e2e: + go test ./e2e/... -mod=readonly -timeout 30m -race -tags='e2e' + +test-e2e-cov: + go test ./e2e/... -mod=readonly -timeout 30m -race -tags='e2e' -coverpkg=../... -coverprofile=e2e-profile.out -covermode=atomic diff --git a/tests/e2e/foundation/cli_test.go b/tests/e2e/foundation/cli_test.go new file mode 100644 index 0000000000..e034a0e7c2 --- /dev/null +++ b/tests/e2e/foundation/cli_test.go @@ -0,0 +1,20 @@ +//go:build e2e +// +build e2e + +package foundation + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/testutil/network" + + "github.com/Finschia/finschia-sdk/simapp" +) + +func TestIntegrationTestSuite(t *testing.T) { + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) + cfg.NumValidators = 1 + suite.Run(t, NewE2ETestSuite(cfg)) +} diff --git a/x/foundation/client/testutil/grpc.go b/tests/e2e/foundation/grpc.go similarity index 93% rename from x/foundation/client/testutil/grpc.go rename to tests/e2e/foundation/grpc.go index 701ae708c9..95aa701f65 100644 --- a/x/foundation/client/testutil/grpc.go +++ b/tests/e2e/foundation/grpc.go @@ -1,4 +1,4 @@ -package testutil +package foundation import ( "fmt" @@ -12,7 +12,7 @@ import ( "github.com/Finschia/finschia-sdk/x/foundation" ) -func (s *IntegrationTestSuite) TestGRPCParams() { +func (s *E2ETestSuite) TestGRPCParams() { val := s.network.Validators[0] testCases := []struct { diff --git a/x/foundation/client/testutil/query.go b/tests/e2e/foundation/query.go similarity index 94% rename from x/foundation/client/testutil/query.go rename to tests/e2e/foundation/query.go index 6e60fa4f6c..a31f9ffe8c 100644 --- a/x/foundation/client/testutil/query.go +++ b/tests/e2e/foundation/query.go @@ -1,4 +1,4 @@ -package testutil +package foundation import ( "fmt" @@ -15,7 +15,7 @@ import ( "github.com/Finschia/finschia-sdk/x/foundation/client/cli" ) -func (s *IntegrationTestSuite) TestNewQueryCmdParams() { +func (s *E2ETestSuite) TestNewQueryCmdParams() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -64,7 +64,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdParams() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdTreasury() { +func (s *E2ETestSuite) TestNewQueryCmdTreasury() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -105,7 +105,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTreasury() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdFoundationInfo() { +func (s *E2ETestSuite) TestNewQueryCmdFoundationInfo() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -146,7 +146,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdFoundationInfo() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdMember() { +func (s *E2ETestSuite) TestNewQueryCmdMember() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -204,7 +204,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdMember() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdMembers() { +func (s *E2ETestSuite) TestNewQueryCmdMembers() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -245,7 +245,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdMembers() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdProposal() { +func (s *E2ETestSuite) TestNewQueryCmdProposal() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -295,7 +295,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdProposal() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdProposals() { +func (s *E2ETestSuite) TestNewQueryCmdProposals() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -336,7 +336,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdProposals() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdVote() { +func (s *E2ETestSuite) TestNewQueryCmdVote() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -396,7 +396,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdVote() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdVotes() { +func (s *E2ETestSuite) TestNewQueryCmdVotes() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -446,7 +446,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdVotes() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdTallyResult() { +func (s *E2ETestSuite) TestNewQueryCmdTallyResult() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -496,7 +496,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTallyResult() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdCensorships() { +func (s *E2ETestSuite) TestNewQueryCmdCensorships() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), @@ -541,7 +541,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdCensorships() { } } -func (s *IntegrationTestSuite) TestNewQueryCmdGrants() { +func (s *E2ETestSuite) TestNewQueryCmdGrants() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), diff --git a/x/foundation/client/testutil/suite.go b/tests/e2e/foundation/suite.go similarity index 78% rename from x/foundation/client/testutil/suite.go rename to tests/e2e/foundation/suite.go index 910fed75bc..9d65a7d9bb 100644 --- a/x/foundation/client/testutil/suite.go +++ b/tests/e2e/foundation/suite.go @@ -1,4 +1,4 @@ -package testutil +package foundation import ( "encoding/json" @@ -16,7 +16,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" - "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" @@ -24,7 +23,7 @@ import ( "github.com/Finschia/finschia-sdk/x/foundation/client/cli" ) -type IntegrationTestSuite struct { +type E2ETestSuite struct { suite.Suite cfg network.Config @@ -49,13 +48,12 @@ var commonArgs = []string{ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100)))), } -func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { - return &IntegrationTestSuite{cfg: cfg} +func NewE2ETestSuite(cfg network.Config) *E2ETestSuite { + return &E2ETestSuite{cfg: cfg} } -func (s *IntegrationTestSuite) SetupSuite() { - s.T().Log("setting up integration test suite") - testdata.RegisterInterfaces(s.cfg.InterfaceRegistry) +func (s *E2ETestSuite) SetupSuite() { + s.T().Log("setting up e2e test suite") s.addressCodec = addresscodec.NewBech32Codec("link") @@ -79,11 +77,11 @@ func (s *IntegrationTestSuite) SetupSuite() { foundationData.Members = []foundation.Member{ { - Address: s.leavingMember.String(), + Address: s.bytesToString(s.leavingMember), Metadata: "leaving member", }, { - Address: s.permanentMember.String(), + Address: s.bytesToString(s.permanentMember), Metadata: "permanent member", }, } @@ -111,7 +109,7 @@ func (s *IntegrationTestSuite) SetupSuite() { treasuryReceivers := []sdk.AccAddress{s.stranger, s.leavingMember} for _, receiver := range treasuryReceivers { ga := foundation.GrantAuthorization{ - Grantee: receiver.String(), + Grantee: s.bytesToString(receiver), }.WithAuthorization(&foundation.ReceiveFromTreasuryAuthorization{}) s.Require().NotNil(ga) foundationData.Authorizations = append(foundationData.Authorizations, *ga) @@ -137,25 +135,43 @@ func (s *IntegrationTestSuite) SetupSuite() { s.createAccount("leavingmember", leavingMemberMnemonic) s.createAccount("permanentmember", permanentMemberMnemonic) - s.proposalID = s.submitProposal(testdata.NewTestMsg(s.authority), false) + s.submitProposal(&foundation.MsgWithdrawFromTreasury{ + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(123))), + }, false) + s.proposalID = 1 s.vote(s.proposalID, []sdk.AccAddress{s.leavingMember, s.permanentMember}) - s.Require().NoError(s.network.WaitForNextBlock()) + + // submit another two proposals without votes + for range make([]struct{}, 2) { + s.submitProposal(&foundation.MsgWithdrawFromTreasury{ + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(123))), + }, false) + } s.setupHeight, err = s.network.LatestHeight() s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) } -func (s *IntegrationTestSuite) TearDownSuite() { - s.T().Log("tearing down integration test suite") +func (s *E2ETestSuite) TearDownSuite() { + s.T().Log("tearing down e2e test suite") s.network.Cleanup() } +func (s *E2ETestSuite) bytesToString(addr sdk.AccAddress) string { + str, err := s.addressCodec.BytesToString(addr) + s.Require().NoError(err) + return str +} + // submit a proposal -func (s *IntegrationTestSuite) submitProposal(msg sdk.Msg, try bool) uint64 { +func (s *E2ETestSuite) submitProposal(msg sdk.Msg, try bool) { val := s.network.Validators[0] - proposers := []string{s.permanentMember.String()} + proposers := []string{s.bytesToString(s.permanentMember)} proposersBz, err := json.Marshal(&proposers) s.Require().NoError(err) @@ -174,27 +190,16 @@ func (s *IntegrationTestSuite) submitProposal(msg sdk.Msg, try bool) uint64 { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) s.Require().Zero(res.Code, out.String()) - events := res.Logs[0].Events - proposalEvent, _ := sdk.TypedEventToEvent(&foundation.EventSubmitProposal{}) - for _, e := range events { - if e.Type == proposalEvent.Type { - var proposal foundation.Proposal - err := val.ClientCtx.Codec.UnmarshalJSON([]byte(e.Attributes[0].Value), &proposal) - s.Require().NoError(err) - - return proposal.Id - } - } - panic("You cannot reach here") + s.Require().NoError(s.network.WaitForNextBlock()) } -func (s *IntegrationTestSuite) vote(proposalID uint64, voters []sdk.AccAddress) { +func (s *E2ETestSuite) vote(proposalID uint64, voters []sdk.AccAddress) { val := s.network.Validators[0] for _, voter := range voters { args := append([]string{ fmt.Sprint(proposalID), - voter.String(), + s.bytesToString(voter), foundation.VOTE_OPTION_YES.String(), "test vote", }, commonArgs...) @@ -205,9 +210,11 @@ func (s *IntegrationTestSuite) vote(proposalID uint64, voters []sdk.AccAddress) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) s.Require().Zero(res.Code, out.String()) } + + s.Require().NoError(s.network.WaitForNextBlock()) } -func (s *IntegrationTestSuite) msgToString(msg sdk.Msg) string { +func (s *E2ETestSuite) msgToString(msg sdk.Msg) string { anyJSON, err := s.cfg.Codec.MarshalInterfaceJSON(msg) s.Require().NoError(err) @@ -219,7 +226,7 @@ func (s *IntegrationTestSuite) msgToString(msg sdk.Msg) string { } // creates an account -func (s *IntegrationTestSuite) createMnemonic(uid string) (string, sdk.AccAddress) { +func (s *E2ETestSuite) createMnemonic(uid string) (string, sdk.AccAddress) { cstore := keyring.NewInMemory(s.cfg.Codec) info, mnemonic, err := cstore.NewMnemonic(uid, keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) s.Require().NoError(err) @@ -231,7 +238,7 @@ func (s *IntegrationTestSuite) createMnemonic(uid string) (string, sdk.AccAddres } // creates an account and send some coins to it for the future transactions. -func (s *IntegrationTestSuite) createAccount(uid, mnemonic string) { +func (s *E2ETestSuite) createAccount(uid, mnemonic string) { val := s.network.Validators[0] info, err := val.ClientCtx.Keyring.NewAccount(uid, mnemonic, keyring.DefaultBIP39Passphrase, sdk.FullFundraiserPath, hd.Secp256k1) s.Require().NoError(err) @@ -241,10 +248,10 @@ func (s *IntegrationTestSuite) createAccount(uid, mnemonic string) { fee := sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1000))) args := append([]string{ - val.Address.String(), - addr.String(), + s.bytesToString(val.Address), + s.bytesToString(addr), fee.String(), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(val.Address)), }, commonArgs...) out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, bankcli.NewSendTxCmd(s.addressCodec), args) s.Require().NoError(err) @@ -252,4 +259,6 @@ func (s *IntegrationTestSuite) createAccount(uid, mnemonic string) { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) s.Require().Zero(res.Code, out.String()) + + s.Require().NoError(s.network.WaitForNextBlock()) } diff --git a/x/foundation/client/testutil/tx.go b/tests/e2e/foundation/tx.go similarity index 78% rename from x/foundation/client/testutil/tx.go rename to tests/e2e/foundation/tx.go index fe44e09dd0..4a90845de8 100644 --- a/x/foundation/client/testutil/tx.go +++ b/tests/e2e/foundation/tx.go @@ -1,4 +1,4 @@ -package testutil +package foundation import ( "fmt" @@ -8,7 +8,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" @@ -16,10 +15,10 @@ import ( "github.com/Finschia/finschia-sdk/x/foundation/client/cli" ) -func (s *IntegrationTestSuite) TestNewTxCmdFundTreasury() { +func (s *E2ETestSuite) TestNewTxCmdFundTreasury() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(val.Address)), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), @@ -31,14 +30,14 @@ func (s *IntegrationTestSuite) TestNewTxCmdFundTreasury() { }{ "valid transaction": { []string{ - val.Address.String(), + s.bytesToString(val.Address), sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), }, true, }, "wrong number of args": { []string{ - val.Address.String(), + s.bytesToString(val.Address), sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), "extra", }, @@ -61,11 +60,13 @@ func (s *IntegrationTestSuite) TestNewTxCmdFundTreasury() { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) s.Require().Zero(res.Code, out) + + s.Require().NoError(s.network.WaitForNextBlock()) }) } } -func (s *IntegrationTestSuite) TestNewTxCmdWithdrawFromTreasury() { +func (s *E2ETestSuite) TestNewTxCmdWithdrawFromTreasury() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s", flags.FlagGenerateOnly), @@ -77,16 +78,16 @@ func (s *IntegrationTestSuite) TestNewTxCmdWithdrawFromTreasury() { }{ "valid transaction": { []string{ - s.authority.String(), - s.stranger.String(), + s.bytesToString(s.authority), + s.bytesToString(s.stranger), sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), }, true, }, "wrong number of args": { []string{ - s.authority.String(), - s.stranger.String(), + s.bytesToString(s.authority), + s.bytesToString(s.stranger), sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.OneInt())).String(), "extra", }, @@ -112,7 +113,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdWithdrawFromTreasury() { } } -func (s *IntegrationTestSuite) TestNewTxCmdUpdateMembers() { +func (s *E2ETestSuite) TestNewTxCmdUpdateMembers() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s", flags.FlagGenerateOnly), @@ -125,15 +126,15 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateMembers() { }{ "valid transaction": { []string{ - s.authority.String(), - fmt.Sprintf(updates, s.comingMember), + s.bytesToString(s.authority), + fmt.Sprintf(updates, s.bytesToString(s.comingMember)), }, true, }, "wrong number of args": { []string{ - s.authority.String(), - fmt.Sprintf(updates, s.comingMember), + s.bytesToString(s.authority), + fmt.Sprintf(updates, s.bytesToString(s.comingMember)), "extra", }, false, @@ -158,7 +159,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateMembers() { } } -func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { +func (s *E2ETestSuite) TestNewTxCmdUpdateDecisionPolicy() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s", flags.FlagGenerateOnly), @@ -175,7 +176,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { }{ "valid transaction": { []string{ - s.authority.String(), + s.bytesToString(s.authority), doMarshal(&foundation.ThresholdDecisionPolicy{ Threshold: math.LegacyNewDec(10), Windows: &foundation.DecisionPolicyWindows{ @@ -187,7 +188,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { }, "wrong number of args": { []string{ - s.authority.String(), + s.bytesToString(s.authority), doMarshal(&foundation.ThresholdDecisionPolicy{ Threshold: math.LegacyNewDec(10), Windows: &foundation.DecisionPolicyWindows{ @@ -218,10 +219,10 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateDecisionPolicy() { } } -func (s *IntegrationTestSuite) TestNewTxCmdSubmitProposal() { +func (s *E2ETestSuite) TestNewTxCmdSubmitProposal() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(s.permanentMember)), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), @@ -235,16 +236,24 @@ func (s *IntegrationTestSuite) TestNewTxCmdSubmitProposal() { "valid transaction": { []string{ "test proposal", - fmt.Sprintf(proposers, s.permanentMember), - s.msgToString(testdata.NewTestMsg()), + fmt.Sprintf(proposers, s.bytesToString(s.permanentMember)), + s.msgToString(&foundation.MsgWithdrawFromTreasury{ + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(123))), + }), }, true, }, "wrong number of args": { []string{ "test proposal", - fmt.Sprintf(proposers, s.permanentMember), - s.msgToString(testdata.NewTestMsg()), + fmt.Sprintf(proposers, s.bytesToString(s.permanentMember)), + s.msgToString(&foundation.MsgWithdrawFromTreasury{ + Authority: s.bytesToString(s.authority), + To: s.bytesToString(s.stranger), + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(123))), + }), "extra", }, false, @@ -266,35 +275,37 @@ func (s *IntegrationTestSuite) TestNewTxCmdSubmitProposal() { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) s.Require().Zero(res.Code, out) + + s.Require().NoError(s.network.WaitForNextBlock()) }) } } -func (s *IntegrationTestSuite) TestNewTxCmdWithdrawProposal() { +func (s *E2ETestSuite) TestNewTxCmdWithdrawProposal() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(s.permanentMember)), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } - id := s.submitProposal(testdata.NewTestMsg(s.authority), false) + proposalID := 2 testCases := map[string]struct { args []string valid bool }{ "valid transaction": { []string{ - fmt.Sprint(id), - s.permanentMember.String(), + fmt.Sprint(proposalID), + s.bytesToString(s.permanentMember), }, true, }, "wrong number of args": { []string{ - fmt.Sprint(id), - s.permanentMember.String(), + fmt.Sprint(proposalID), + s.bytesToString(s.permanentMember), "extra", }, false, @@ -316,28 +327,30 @@ func (s *IntegrationTestSuite) TestNewTxCmdWithdrawProposal() { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) s.Require().Zero(res.Code, out) + + s.Require().NoError(s.network.WaitForNextBlock()) }) } } -func (s *IntegrationTestSuite) TestNewTxCmdVote() { +func (s *E2ETestSuite) TestNewTxCmdVote() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(s.permanentMember)), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), } - id := s.submitProposal(testdata.NewTestMsg(s.authority), false) + proposalID := 3 testCases := map[string]struct { args []string valid bool }{ "valid transaction": { []string{ - fmt.Sprint(id), - s.permanentMember.String(), + fmt.Sprint(proposalID), + s.bytesToString(s.permanentMember), "VOTE_OPTION_YES", "test vote", }, @@ -345,8 +358,8 @@ func (s *IntegrationTestSuite) TestNewTxCmdVote() { }, "wrong number of args": { []string{ - fmt.Sprint(id), - s.permanentMember.String(), + fmt.Sprint(proposalID), + s.bytesToString(s.permanentMember), "VOTE_OPTION_YES", "test vote", "extra", @@ -370,14 +383,16 @@ func (s *IntegrationTestSuite) TestNewTxCmdVote() { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) s.Require().Zero(res.Code, out) + + s.Require().NoError(s.network.WaitForNextBlock()) }) } } -func (s *IntegrationTestSuite) TestNewTxCmdExec() { +func (s *E2ETestSuite) TestNewTxCmdExec() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, s.permanentMember), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(s.permanentMember)), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), @@ -390,14 +405,14 @@ func (s *IntegrationTestSuite) TestNewTxCmdExec() { "valid transaction": { []string{ fmt.Sprintf("%d", s.proposalID), - s.permanentMember.String(), + s.bytesToString(s.permanentMember), }, true, }, "wrong number of args": { []string{ fmt.Sprintf("%d", s.proposalID), - s.permanentMember.String(), + s.bytesToString(s.permanentMember), "extra", }, false, @@ -419,11 +434,13 @@ func (s *IntegrationTestSuite) TestNewTxCmdExec() { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) s.Require().Zero(res.Code, out) + + s.Require().NoError(s.network.WaitForNextBlock()) }) } } -func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { +func (s *E2ETestSuite) TestNewTxCmdUpdateCensorship() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s", flags.FlagGenerateOnly), @@ -435,7 +452,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { }{ "valid transaction": { []string{ - s.authority.String(), + s.bytesToString(s.authority), foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), foundation.CensorshipAuthorityGovernance.String(), }, @@ -443,7 +460,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { }, "valid abbreviation": { []string{ - s.authority.String(), + s.bytesToString(s.authority), foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), "governance", }, @@ -451,7 +468,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { }, "wrong number of args": { []string{ - s.authority.String(), + s.bytesToString(s.authority), foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), foundation.CensorshipAuthorityGovernance.String(), "extra", @@ -460,7 +477,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { }, "invalid new authority": { []string{ - s.authority.String(), + s.bytesToString(s.authority), foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), "invalid-new-authority", }, @@ -486,10 +503,10 @@ func (s *IntegrationTestSuite) TestNewTxCmdUpdateCensorship() { } } -func (s *IntegrationTestSuite) TestNewTxCmdLeaveFoundation() { +func (s *E2ETestSuite) TestNewTxCmdLeaveFoundation() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, s.leavingMember), + fmt.Sprintf("--%s=%s", flags.FlagFrom, s.bytesToString(s.leavingMember)), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))), @@ -501,13 +518,13 @@ func (s *IntegrationTestSuite) TestNewTxCmdLeaveFoundation() { }{ "valid transaction": { []string{ - s.leavingMember.String(), + s.bytesToString(s.leavingMember), }, true, }, "wrong number of args": { []string{ - s.leavingMember.String(), + s.bytesToString(s.leavingMember), "extra", }, false, @@ -529,11 +546,13 @@ func (s *IntegrationTestSuite) TestNewTxCmdLeaveFoundation() { var res sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out) s.Require().Zero(res.Code, out) + + s.Require().NoError(s.network.WaitForNextBlock()) }) } } -func (s *IntegrationTestSuite) TestNewTxCmdGrant() { +func (s *E2ETestSuite) TestNewTxCmdGrant() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s", flags.FlagGenerateOnly), @@ -550,16 +569,16 @@ func (s *IntegrationTestSuite) TestNewTxCmdGrant() { }{ "valid transaction": { []string{ - s.authority.String(), - s.comingMember.String(), + s.bytesToString(s.authority), + s.bytesToString(s.comingMember), doMarshal(&foundation.ReceiveFromTreasuryAuthorization{}), }, true, }, "wrong number of args": { []string{ - s.authority.String(), - s.comingMember.String(), + s.bytesToString(s.authority), + s.bytesToString(s.comingMember), doMarshal(&foundation.ReceiveFromTreasuryAuthorization{}), "extra", }, @@ -585,7 +604,7 @@ func (s *IntegrationTestSuite) TestNewTxCmdGrant() { } } -func (s *IntegrationTestSuite) TestNewTxCmdRevoke() { +func (s *E2ETestSuite) TestNewTxCmdRevoke() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s", flags.FlagGenerateOnly), @@ -597,16 +616,16 @@ func (s *IntegrationTestSuite) TestNewTxCmdRevoke() { }{ "valid transaction": { []string{ - s.authority.String(), - s.leavingMember.String(), + s.bytesToString(s.authority), + s.bytesToString(s.leavingMember), foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), }, true, }, "wrong number of args": { []string{ - s.authority.String(), - s.leavingMember.String(), + s.bytesToString(s.authority), + s.bytesToString(s.leavingMember), foundation.ReceiveFromTreasuryAuthorization{}.MsgTypeURL(), "extra", }, diff --git a/tests/go.mod b/tests/go.mod new file mode 100644 index 0000000000..419d76cd06 --- /dev/null +++ b/tests/go.mod @@ -0,0 +1,221 @@ +module github.com/Finschia/finschia-sdk/tests + +go 1.21 + +require ( + cosmossdk.io/api v0.7.2 // indirect + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.0 // indirect + cosmossdk.io/log v1.2.1 // indirect + cosmossdk.io/math v1.2.0 + cosmossdk.io/store v1.0.1 // indirect + cosmossdk.io/x/evidence v0.1.0 // indirect + cosmossdk.io/x/feegrant v0.1.0 // indirect + cosmossdk.io/x/nft v0.1.0 // indirect + cosmossdk.io/x/tx v0.12.0 // indirect + cosmossdk.io/x/upgrade v0.1.1 // indirect + github.com/cometbft/cometbft v0.38.2 + github.com/cosmos/cosmos-db v1.0.0 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + // this version is not used as it is always replaced by the latest Cosmos SDK version + github.com/cosmos/cosmos-sdk v0.51.0 + github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect + github.com/stretchr/testify v1.8.4 + google.golang.org/grpc v1.59.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect + gotest.tools/v3 v3.5.1 // indirect + pgregory.net/rapid v1.1.0 // indirect +) + +require ( + github.com/Finschia/finschia-sdk/simapp v0.0.0-00010101000000-000000000000 + github.com/Finschia/finschia-sdk/x/foundation v0.0.0-00010101000000-000000000000 + github.com/gogo/protobuf v1.3.2 +) + +require ( + cloud.google.com/go v0.110.8 // indirect + cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.3 // indirect + cloud.google.com/go/storage v1.30.1 // indirect + cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/circuit v0.1.0 // indirect + filippo.io/edwards25519 v1.0.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect + github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/emicklei/dot v1.6.0 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/golang/glog v1.2.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/google/s2a-go v0.1.4 // indirect + github.com/google/uuid v1.3.1 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-getter v1.7.3 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.2 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.7 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.31.0 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.16.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.8 // indirect + go.opencensus.io v0.24.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.128.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + nhooyr.io/websocket v1.8.6 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) + +// Here are the short-lived replace from the SimApp +// Replace here are pending PRs, or version to be tagged +// replace ( +// +// ) + +// Below are the long-lived replace for tests. +replace ( + github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + // We always want to test against the latest version of the SDK. + github.com/Finschia/finschia-sdk => ../. + // We always want to test against the latest version of the simapp. + github.com/Finschia/finschia-sdk/simapp => ../simapp + // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. + // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 +) + +replace ( + github.com/cometbft/cometbft => github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d + github.com/cosmos/cosmos-sdk => github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 +) + +// transient in this PR +replace github.com/Finschia/finschia-sdk/x/foundation => ./../x/foundation diff --git a/tests/go.sum b/tests/go.sum new file mode 100644 index 0000000000..fc07295a21 --- /dev/null +++ b/tests/go.sum @@ -0,0 +1,1739 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= +cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/store v1.0.1 h1:XBDhCqlL+2MUgE8CHWwndKVJ4beX+TyaPIjB5SV62dM= +cosmossdk.io/store v1.0.1/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= +cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= +cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= +cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= +cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= +cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= +cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= +cosmossdk.io/x/tx v0.12.0 h1:Ry2btjQdrfrje9qZ3iZeZSmDArjgxUJMMcLMrX4wj5U= +cosmossdk.io/x/tx v0.12.0/go.mod h1:qTth2coAGkwCwOCjqQ8EAQg+9udXNRzcnSbMgGKGEI0= +cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= +cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d h1:7x3LqhrO4lXTt3kh0eCwSzGAE+sUn6tjhKNfGOE/nc8= +github.com/Finschia/cometbft v0.0.0-20231127181424-2aacfbe9832d/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg= +github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267 h1:lm4mGuo+arhc/GrVm8hjGE3CCcfSQEvxI+uZODfEhQY= +github.com/Finschia/cosmos-sdk v0.0.0-20231211060251-d8fb76d4c267/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= +github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c h1:udPyEWzmxkmmXK2btB/rWeApcMsjcFZl2B59EYxOdss= +github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c/go.mod h1:rYRCm6V5xeW7sN5yLECAzIT7IF3pyBK6Rca9pEGEOAM= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 h1:g+Y6IAf28JinY3zNdXwpw71SBGhLEb72kGQgiR5XKZM= +github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= +github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= +github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= +github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= +github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= +github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= +github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= +github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= +github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+OkstIrNiMjGpEIyhx8f6W7s4= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= +github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.2 h1:ErEYO2f//CjKsUDw4SmLzelsK6L3ZmOAR/4P9iS7ruY= +github.com/hashicorp/go-metrics v0.5.2/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= +github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= +github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/foundation/client/testutil/cli_test.go b/x/foundation/client/testutil/cli_test.go deleted file mode 100644 index 5b3ef61c5a..0000000000 --- a/x/foundation/client/testutil/cli_test.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build norace -// +build norace - -package testutil - -import ( - "testing" - - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/testutil/network" -) - -func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() - cfg.NumValidators = 1 - suite.Run(t, NewIntegrationTestSuite(cfg)) -} From 06cf8383c95b77193c65827316091beaa303264e Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Thu, 11 Jan 2024 09:11:53 +0000 Subject: [PATCH 15/26] Update mocks --- .../testutil/expected_keepers_mocks.go | 53 ------------------- 1 file changed, 53 deletions(-) diff --git a/x/foundation/testutil/expected_keepers_mocks.go b/x/foundation/testutil/expected_keepers_mocks.go index d633f55dcb..3fc7dd9370 100644 --- a/x/foundation/testutil/expected_keepers_mocks.go +++ b/x/foundation/testutil/expected_keepers_mocks.go @@ -9,7 +9,6 @@ import ( reflect "reflect" types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/params/types" gomock "github.com/golang/mock/gomock" ) @@ -114,55 +113,3 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } - -// MockParamsKeeper is a mock of ParamsKeeper interface. -type MockParamsKeeper struct { - ctrl *gomock.Controller - recorder *MockParamsKeeperMockRecorder -} - -// MockParamsKeeperMockRecorder is the mock recorder for MockParamsKeeper. -type MockParamsKeeperMockRecorder struct { - mock *MockParamsKeeper -} - -// NewMockParamsKeeper creates a new mock instance. -func NewMockParamsKeeper(ctrl *gomock.Controller) *MockParamsKeeper { - mock := &MockParamsKeeper{ctrl: ctrl} - mock.recorder = &MockParamsKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockParamsKeeper) EXPECT() *MockParamsKeeperMockRecorder { - return m.recorder -} - -// GetSubspace mocks base method. -func (m *MockParamsKeeper) GetSubspace(s string) (types0.Subspace, bool) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSubspace", s) - ret0, _ := ret[0].(types0.Subspace) - ret1, _ := ret[1].(bool) - return ret0, ret1 -} - -// GetSubspace indicates an expected call of GetSubspace. -func (mr *MockParamsKeeperMockRecorder) GetSubspace(s interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubspace", reflect.TypeOf((*MockParamsKeeper)(nil).GetSubspace), s) -} - -// Subspace mocks base method. -func (m *MockParamsKeeper) Subspace(s string) types0.Subspace { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Subspace", s) - ret0, _ := ret[0].(types0.Subspace) - return ret0 -} - -// Subspace indicates an expected call of Subspace. -func (mr *MockParamsKeeperMockRecorder) Subspace(s interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subspace", reflect.TypeOf((*MockParamsKeeper)(nil).Subspace), s) -} From ba6bd4960eb5f2d3fec214ac51868ea73a7a7e42 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 24 Jan 2024 03:48:27 +0000 Subject: [PATCH 16/26] Gosec --- x/foundation/keeper/internal/censorship.go | 16 +++++++++++---- x/foundation/keeper/internal/member.go | 12 ++++++++--- .../keeper/internal/migrations/v2/store.go | 4 +++- x/foundation/keeper/internal/proposal.go | 20 ++++++++++++++----- x/foundation/keeper/internal/treasury.go | 4 +++- x/foundation/keeper/internal/vote.go | 8 ++++++-- 6 files changed, 48 insertions(+), 16 deletions(-) diff --git a/x/foundation/keeper/internal/censorship.go b/x/foundation/keeper/internal/censorship.go index 23b212695c..240836f5ed 100644 --- a/x/foundation/keeper/internal/censorship.go +++ b/x/foundation/keeper/internal/censorship.go @@ -56,12 +56,16 @@ func (k Keeper) SetCensorship(ctx sdk.Context, censorship foundation.Censorship) key := censorshipKey(censorship.MsgTypeUrl) if censorship.Authority == foundation.CensorshipAuthorityUnspecified { - store.Delete(key) + if err := store.Delete(key); err != nil { + panic(err) + } return } bz := k.cdc.MustMarshal(&censorship) - store.Set(key, bz) + if err := store.Set(key, bz); err != nil { + panic(err) + } } func (k Keeper) iterateCensorships(ctx sdk.Context, fn func(censorship foundation.Censorship) (stop bool)) { @@ -186,13 +190,17 @@ func (k Keeper) setAuthorization(ctx sdk.Context, grantee sdk.AccAddress, author if err != nil { panic(err) } - store.Set(key, bz) + if err := store.Set(key, bz); err != nil { + panic(err) + } } func (k Keeper) deleteAuthorization(ctx sdk.Context, grantee sdk.AccAddress, msgTypeURL string) { store := k.storeService.OpenKVStore(ctx) key := grantKey(grantee, msgTypeURL) - store.Delete(key) + if err := store.Delete(key); err != nil { + panic(err) + } } func (k Keeper) Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error { diff --git a/x/foundation/keeper/internal/member.go b/x/foundation/keeper/internal/member.go index 3066fa23c2..b669952608 100644 --- a/x/foundation/keeper/internal/member.go +++ b/x/foundation/keeper/internal/member.go @@ -57,7 +57,9 @@ func (k Keeper) GetFoundationInfo(ctx sdk.Context) foundation.FoundationInfo { func (k Keeper) SetFoundationInfo(ctx sdk.Context, info foundation.FoundationInfo) { store := k.storeService.OpenKVStore(ctx) bz := k.cdc.MustMarshal(&info) - store.Set(foundationInfoKey, bz) + if err := store.Set(foundationInfoKey, bz); err != nil { + panic(err) + } } func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.MemberRequest) error { @@ -137,13 +139,17 @@ func (k Keeper) SetMember(ctx sdk.Context, member foundation.Member) { key := memberKey(addr) bz := k.cdc.MustMarshal(&member) - store.Set(key, bz) + if err := store.Set(key, bz); err != nil { + panic(err) + } } func (k Keeper) deleteMember(ctx sdk.Context, address sdk.AccAddress) { store := k.storeService.OpenKVStore(ctx) key := memberKey(address) - store.Delete(key) + if err := store.Delete(key); err != nil { + panic(err) + } } func (k Keeper) iterateMembers(ctx sdk.Context, fn func(member foundation.Member) (stop bool)) { diff --git a/x/foundation/keeper/internal/migrations/v2/store.go b/x/foundation/keeper/internal/migrations/v2/store.go index 031e151f87..8f7c512fde 100644 --- a/x/foundation/keeper/internal/migrations/v2/store.go +++ b/x/foundation/keeper/internal/migrations/v2/store.go @@ -31,7 +31,9 @@ func migrateParams(ctx sdk.Context, store store.KVStore, cdc codec.BinaryCodec, if bz == nil { return fmt.Errorf("params not found") } - store.Delete(ParamsKey) + if err := store.Delete(ParamsKey); err != nil { + return err + } var params foundation.Params if err := cdc.Unmarshal(bz, ¶ms); err != nil { diff --git a/x/foundation/keeper/internal/proposal.go b/x/foundation/keeper/internal/proposal.go index 3d3d342f4e..254360e427 100644 --- a/x/foundation/keeper/internal/proposal.go +++ b/x/foundation/keeper/internal/proposal.go @@ -33,7 +33,9 @@ func (k Keeper) getPreviousProposalID(ctx sdk.Context) uint64 { func (k Keeper) setPreviousProposalID(ctx sdk.Context, id uint64) { store := k.storeService.OpenKVStore(ctx) - store.Set(previousProposalIDKey, Uint64ToBytes(id)) + if err := store.Set(previousProposalIDKey, Uint64ToBytes(id)); err != nil { + panic(err) + } } func (k Keeper) SubmitProposal(ctx sdk.Context, proposers []string, metadata string, msgs []sdk.Msg) (*uint64, error) { @@ -230,25 +232,33 @@ func (k Keeper) setProposal(ctx sdk.Context, proposal foundation.Proposal) { key := proposalKey(proposal.Id) bz := k.cdc.MustMarshal(&proposal) - store.Set(key, bz) + if err := store.Set(key, bz); err != nil { + panic(err) + } } func (k Keeper) deleteProposal(ctx sdk.Context, proposalID uint64) { store := k.storeService.OpenKVStore(ctx) key := proposalKey(proposalID) - store.Delete(key) + if err := store.Delete(key); err != nil { + panic(err) + } } func (k Keeper) addProposalToVPEndQueue(ctx sdk.Context, proposal foundation.Proposal) { store := k.storeService.OpenKVStore(ctx) key := proposalByVPEndKey(proposal.VotingPeriodEnd, proposal.Id) - store.Set(key, []byte{}) + if err := store.Set(key, []byte{}); err != nil { + panic(err) + } } func (k Keeper) removeProposalFromVPEndQueue(ctx sdk.Context, proposal foundation.Proposal) { store := k.storeService.OpenKVStore(ctx) key := proposalByVPEndKey(proposal.VotingPeriodEnd, proposal.Id) - store.Delete(key) + if err := store.Delete(key); err != nil { + panic(err) + } } func validateActorForProposal(address string, proposal foundation.Proposal) error { diff --git a/x/foundation/keeper/internal/treasury.go b/x/foundation/keeper/internal/treasury.go index 18c0508fac..22928d7e44 100644 --- a/x/foundation/keeper/internal/treasury.go +++ b/x/foundation/keeper/internal/treasury.go @@ -75,5 +75,7 @@ func (k Keeper) SetPool(ctx sdk.Context, pool foundation.Pool) { store := k.storeService.OpenKVStore(ctx) key := poolKey - store.Set(key, bz) + if err := store.Set(key, bz); err != nil { + panic(err) + } } diff --git a/x/foundation/keeper/internal/vote.go b/x/foundation/keeper/internal/vote.go index cc3296a448..804b9dbcd2 100644 --- a/x/foundation/keeper/internal/vote.go +++ b/x/foundation/keeper/internal/vote.go @@ -83,7 +83,9 @@ func (k Keeper) setVote(ctx sdk.Context, vote foundation.Vote) { key := voteKey(vote.ProposalId, voter) bz := k.cdc.MustMarshal(&vote) - store.Set(key, bz) + if err := store.Set(key, bz); err != nil { + panic(err) + } } func (k Keeper) iterateVotes(ctx sdk.Context, proposalID uint64, fn func(vote foundation.Vote) (stop bool)) { @@ -127,6 +129,8 @@ func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) { store := k.storeService.OpenKVStore(ctx) for _, key := range keys { - store.Delete(key) + if err := store.Delete(key); err != nil { + panic(err) + } } } From 32fcdc60dfed301d03faaeba435368dcb9a613e2 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 24 Jan 2024 04:31:53 +0000 Subject: [PATCH 17/26] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 640b315f5b..c8d2b6cdc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased](https://github.com/Finschia/finschia-sdk/compare/v0.48.0...HEAD) ### Features +* (x/foundation) [\#1198](https://github.com/Finschia/finschia-sdk/pull/1198) update x/foundation to use Finschia/cosmos-sdk * (all) [\#1205](https://github.com/Finschia/finschia-sdk/pull/1205) delegate native logics to Finschia/cosmos-sdk * (consensus) [\#1178](https://github.com/Finschia/finschia-sdk/pull/1178) change the consensus from Ostracon to Tendermint v0.34.24 From 5b4b89477e50d1d22b93e7265cdcafb26525ffcf Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 24 Jan 2024 05:50:23 +0000 Subject: [PATCH 18/26] Fix test workflow --- .github/workflows/test.yml | 73 +++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d59ce23e30..6cf86f20cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,40 +113,41 @@ jobs: # name: "${{ github.sha }}-integration-coverage" # path: ./tests/integration-profile.out - # test-e2e: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/setup-go@v4 - # with: - # go-version: "1.21" - # check-latest: true - # cache: true - # cache-dependency-path: go.sum - # - uses: technote-space/get-diff-action@v6.1.2 - # id: git_diff - # with: - # PATTERNS: | - # **/*.go - # go.mod - # go.sum - # **/go.mod - # **/go.sum - # **/Makefile - # Makefile - # - name: e2e tests - # if: env.GIT_DIFF - # run: | - # make test-e2e-cov - # - uses: actions/upload-artifact@v3 - # if: env.GIT_DIFF - # with: - # name: "${{ github.sha }}-e2e-coverage" - # path: ./tests/e2e-profile.out + test-e2e: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.21" + check-latest: true + cache: true + cache-dependency-path: go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + **/*.go + go.mod + go.sum + **/go.mod + **/go.sum + **/Makefile + Makefile + - name: e2e tests + if: env.GIT_DIFF + run: | + make test-e2e-cov + - uses: actions/upload-artifact@v3 + if: env.GIT_DIFF + with: + name: "${{ github.sha }}-e2e-coverage" + path: ./tests/e2e-profile.out repo-analysis: runs-on: ubuntu-latest - needs: [tests, test-integration, test-e2e] + # needs: [tests, test-integration, test-e2e] + needs: [tests, test-e2e] steps: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 @@ -178,11 +179,11 @@ jobs: # if: env.GIT_DIFF # with: # name: "${{ github.sha }}-integration-coverage" - # - uses: actions/download-artifact@v3 - # if: env.GIT_DIFF - # with: - # name: "${{ github.sha }}-e2e-coverage" - # continue-on-error: true + - uses: actions/download-artifact@v3 + if: env.GIT_DIFF + with: + name: "${{ github.sha }}-e2e-coverage" + continue-on-error: true - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }} uses: SonarSource/sonarcloud-github-action@master From 840818bfaf0487026d1f2526650ae2f3e3c8fc55 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 24 Jan 2024 06:01:35 +0000 Subject: [PATCH 19/26] Fix protobuf break checking workflow --- .github/workflows/proto.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 1c997e8a65..14db6d8b62 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -28,4 +28,4 @@ jobs: - uses: bufbuild/buf-breaking-action@v1 with: input: "proto" - against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto" + against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},subdir=proto" From 0e1c38bcdd348b61f2128bcc2d6e4d8bfd43b70a Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Fri, 26 Jan 2024 04:46:26 +0000 Subject: [PATCH 20/26] Stop using interface for keeper --- x/foundation/keeper/exported.go | 41 +++++++++++---------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go index 7916b7cf4e..9bbd3abbeb 100644 --- a/x/foundation/keeper/exported.go +++ b/x/foundation/keeper/exported.go @@ -13,15 +13,7 @@ import ( "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" ) -type Keeper interface { - GetAuthority() string - Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error - - InitGenesis(ctx sdk.Context, gs *foundation.GenesisState) error - ExportGenesis(ctx sdk.Context) *foundation.GenesisState -} - -type keeper struct { +type Keeper struct { impl internal.Keeper } @@ -36,7 +28,7 @@ func NewKeeper( authority string, subspace paramstypes.Subspace, ) Keeper { - return &keeper{ + return Keeper{ impl: internal.NewKeeper( cdc, storeService, @@ -52,55 +44,48 @@ func NewKeeper( } // GetAuthority returns the x/foundation module's authority. -func (k keeper) GetAuthority() string { +func (k Keeper) GetAuthority() string { return k.impl.GetAuthority() } -func (k keeper) Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error { +func (k Keeper) Accept(ctx sdk.Context, grantee sdk.AccAddress, msg sdk.Msg) error { return k.impl.Accept(ctx, grantee, msg) } -func (k keeper) InitGenesis(ctx sdk.Context, gs *foundation.GenesisState) error { +func (k Keeper) InitGenesis(ctx sdk.Context, gs *foundation.GenesisState) error { return k.impl.InitGenesis(ctx, gs) } -func (k keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState { +func (k Keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState { return k.impl.ExportGenesis(ctx) } func NewMsgServer(k Keeper) foundation.MsgServer { - impl := k.(*keeper).impl - return internal.NewMsgServer(impl) + return internal.NewMsgServer(k.impl) } func NewQueryServer(k Keeper) foundation.QueryServer { - impl := k.(*keeper).impl - return internal.NewQueryServer(impl) + return internal.NewQueryServer(k.impl) } func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { - impl := k.(*keeper).impl - internal.RegisterInvariants(ir, impl) + internal.RegisterInvariants(ir, k.impl) } func BeginBlocker(ctx sdk.Context, k Keeper) error { - impl := k.(*keeper).impl - return internal.BeginBlocker(ctx, impl) + return internal.BeginBlocker(ctx, k.impl) } func EndBlocker(ctx sdk.Context, k Keeper) error { - impl := k.(*keeper).impl - return internal.EndBlocker(ctx, impl) + return internal.EndBlocker(ctx, k.impl) } func NewFoundationProposalsHandler(k Keeper) govtypes.Handler { - impl := k.(*keeper).impl - return internal.NewFoundationProposalsHandler(impl) + return internal.NewFoundationProposalsHandler(k.impl) } type Migrator = internal.Migrator func NewMigrator(k Keeper) Migrator { - impl := k.(*keeper).impl - return internal.NewMigrator(impl) + return internal.NewMigrator(k.impl) } From 87cbf13b9f67df13628172dfd81ef32d6b30e189 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Fri, 26 Jan 2024 05:56:58 +0000 Subject: [PATCH 21/26] Remove GetSignBytes --- x/foundation/codec/cdc.go | 18 ----------- x/foundation/msgs.go | 67 --------------------------------------- x/foundation/msgs_test.go | 2 +- 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 x/foundation/codec/cdc.go diff --git a/x/foundation/codec/cdc.go b/x/foundation/codec/cdc.go deleted file mode 100644 index 520e435afd..0000000000 --- a/x/foundation/codec/cdc.go +++ /dev/null @@ -1,18 +0,0 @@ -package codec - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var ( - Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(Amino) -) - -func init() { - cryptocodec.RegisterCrypto(Amino) - codec.RegisterEvidences(Amino) - sdk.RegisterLegacyAminoCodec(Amino) -} diff --git a/x/foundation/msgs.go b/x/foundation/msgs.go index a75500d0de..74ff7259d6 100644 --- a/x/foundation/msgs.go +++ b/x/foundation/msgs.go @@ -6,35 +6,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/Finschia/finschia-sdk/x/foundation/codec" ) -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgFundTreasury) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgWithdrawFromTreasury) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgUpdateMembers) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgUpdateDecisionPolicy) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgUpdateDecisionPolicy) GetDecisionPolicy() DecisionPolicy { if m.DecisionPolicy == nil { return nil @@ -88,36 +61,6 @@ func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err return UnpackInterfaces(unpacker, m.Messages) } -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgSubmitProposal) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgWithdrawProposal) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgVote) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgExec) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgLeaveFoundation) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgUpdateCensorship) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgGrant) GetAuthorization() Authorization { if m.Authorization == nil { return nil @@ -144,13 +87,3 @@ func (m MsgGrant) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var authorization Authorization return unpacker.UnpackAny(m.Authorization, &authorization) } - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgGrant) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} - -// GetSignBytes implements the LegacyMsg.GetSignBytes method. -func (m MsgRevoke) GetSignBytes() []byte { - return sdk.MustSortJSON(codec.ModuleCdc.MustMarshalJSON(&m)) -} diff --git a/x/foundation/msgs_test.go b/x/foundation/msgs_test.go index 0c0e0205e3..4d5a902110 100644 --- a/x/foundation/msgs_test.go +++ b/x/foundation/msgs_test.go @@ -89,7 +89,7 @@ func TestAminoJSON(t *testing.T) { } testCases := map[string]struct { - msg legacytx.LegacyMsg + msg sdk.Msg expected string }{ "MsgFundTreasury": { From cdd466938b43ef1accfea313742c8b4a726f7a52 Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Fri, 26 Jan 2024 09:59:05 +0900 Subject: [PATCH 22/26] ci: downgrade pr labeler to v4 because of broken version(v5 and above) --- .github/workflows/pr_labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 885d8b47db..292508d34c 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write # for actions/labeler to add labels to PRs runs-on: ubuntu-latest steps: - - uses: actions/labeler@main + - uses: actions/labeler@v4 with: configuration-path: .github/pr_labeler.yml repo-token: "${{ secrets.GITHUB_TOKEN }}" From a8f8c332aaafa3c938281301710faa0e39ce7479 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 31 Jan 2024 06:54:49 +0000 Subject: [PATCH 23/26] Remove legacy simapp --- simapp/app.go | 796 ---------------------------------------- simapp/simd/cmd/root.go | 113 ------ 2 files changed, 909 deletions(-) delete mode 100644 simapp/app.go delete mode 100644 simapp/simd/cmd/root.go diff --git a/simapp/app.go b/simapp/app.go deleted file mode 100644 index 68654666b0..0000000000 --- a/simapp/app.go +++ /dev/null @@ -1,796 +0,0 @@ -//go:build app_v1 - -package simapp - -import ( - "encoding/json" - "fmt" - "io" - "os" - "path/filepath" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" - "cosmossdk.io/client/v2/autocli" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/circuit" - circuitkeeper "cosmossdk.io/x/circuit/keeper" - circuittypes "cosmossdk.io/x/circuit/types" - "cosmossdk.io/x/evidence" - evidencekeeper "cosmossdk.io/x/evidence/keeper" - evidencetypes "cosmossdk.io/x/evidence/types" - "cosmossdk.io/x/feegrant" - feegrantkeeper "cosmossdk.io/x/feegrant/keeper" - feegrantmodule "cosmossdk.io/x/feegrant/module" - "cosmossdk.io/x/nft" - nftkeeper "cosmossdk.io/x/nft/keeper" - nftmodule "cosmossdk.io/x/nft/module" - "cosmossdk.io/x/tx/signing" - "cosmossdk.io/x/upgrade" - upgradekeeper "cosmossdk.io/x/upgrade/keeper" - upgradetypes "cosmossdk.io/x/upgrade/types" - abci "github.com/cometbft/cometbft/abci/types" - dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/gogoproto/proto" - "github.com/spf13/cast" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/runtime" - runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" - "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/api" - "github.com/cosmos/cosmos-sdk/server/config" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/std" - testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/types/msgservice" - sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - "github.com/cosmos/cosmos-sdk/x/auth/posthandler" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensus "github.com/cosmos/cosmos-sdk/x/consensus" - consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/cosmos-sdk/x/gov" - govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/cosmos-sdk/x/group" - groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" - groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" - "github.com/cosmos/cosmos-sdk/x/mint" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -const appName = "SimApp" - -var ( - // DefaultNodeHome default home directories for the application daemon - DefaultNodeHome string - - // module account permissions - maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - nft.ModuleName: nil, - } -) - -var ( - _ runtime.AppI = (*SimApp)(nil) - _ servertypes.Application = (*SimApp)(nil) -) - -// SimApp extends an ABCI application, but with most of its parameters exported. -// They are exported for convenience in creating helper functions, as object -// capabilities aren't needed for testing. -type SimApp struct { - *baseapp.BaseApp - legacyAmino *codec.LegacyAmino - appCodec codec.Codec - txConfig client.TxConfig - interfaceRegistry types.InterfaceRegistry - - // keys to access the substores - keys map[string]*storetypes.KVStoreKey - tkeys map[string]*storetypes.TransientStoreKey - - // keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.BaseKeeper - StakingKeeper *stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper *crisiskeeper.Keeper - UpgradeKeeper *upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - AuthzKeeper authzkeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - GroupKeeper groupkeeper.Keeper - NFTKeeper nftkeeper.Keeper - ConsensusParamsKeeper consensusparamkeeper.Keeper - CircuitKeeper circuitkeeper.Keeper - - // the module manager - ModuleManager *module.Manager - BasicModuleManager module.BasicManager - - // simulation manager - sm *module.SimulationManager - - // module configurator - configurator module.Configurator -} - -func init() { - userHomeDir, err := os.UserHomeDir() - if err != nil { - panic(err) - } - - DefaultNodeHome = filepath.Join(userHomeDir, ".simapp") -} - -// NewSimApp returns a reference to an initialized SimApp. -func NewSimApp( - logger log.Logger, - db dbm.DB, - traceStore io.Writer, - loadLatest bool, - appOpts servertypes.AppOptions, - baseAppOptions ...func(*baseapp.BaseApp), -) *SimApp { - interfaceRegistry, _ := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ - ProtoFiles: proto.HybridResolver, - SigningOptions: signing.Options{ - AddressCodec: address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), - }, - ValidatorAddressCodec: address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), - }, - }, - }) - appCodec := codec.NewProtoCodec(interfaceRegistry) - legacyAmino := codec.NewLegacyAmino() - txConfig := tx.NewTxConfig(appCodec, tx.DefaultSignModes) - - std.RegisterLegacyAminoCodec(legacyAmino) - std.RegisterInterfaces(interfaceRegistry) - - // Below we could construct and set an application specific mempool and - // ABCI 1.0 PrepareProposal and ProcessProposal handlers. These defaults are - // already set in the SDK's BaseApp, this shows an example of how to override - // them. - // - // Example: - // - // bApp := baseapp.NewBaseApp(...) - // nonceMempool := mempool.NewSenderNonceMempool() - // abciPropHandler := NewDefaultProposalHandler(nonceMempool, bApp) - // - // bApp.SetMempool(nonceMempool) - // bApp.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) - // bApp.SetProcessProposal(abciPropHandler.ProcessProposalHandler()) - // - // Alternatively, you can construct BaseApp options, append those to - // baseAppOptions and pass them to NewBaseApp. - // - // Example: - // - // prepareOpt = func(app *baseapp.BaseApp) { - // abciPropHandler := baseapp.NewDefaultProposalHandler(nonceMempool, app) - // app.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) - // } - // baseAppOptions = append(baseAppOptions, prepareOpt) - - // create and set dummy vote extension handler - voteExtOp := func(bApp *baseapp.BaseApp) { - voteExtHandler := NewVoteExtensionHandler() - voteExtHandler.SetHandlers(bApp) - } - baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution()) - - bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) - bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetVersion(version.Version) - bApp.SetInterfaceRegistry(interfaceRegistry) - bApp.SetTxEncoder(txConfig.TxEncoder()) - - keys := storetypes.NewKVStoreKeys( - authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey, - minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, paramstypes.StoreKey, consensusparamtypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, - evidencetypes.StoreKey, circuittypes.StoreKey, - authzkeeper.StoreKey, nftkeeper.StoreKey, group.StoreKey, - ) - - // register streaming services - if err := bApp.RegisterStreamingServices(appOpts, keys); err != nil { - panic(err) - } - - tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) - app := &SimApp{ - BaseApp: bApp, - legacyAmino: legacyAmino, - appCodec: appCodec, - txConfig: txConfig, - interfaceRegistry: interfaceRegistry, - keys: keys, - tkeys: tkeys, - } - - app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) - - // set the BaseApp's parameter store - app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String(), runtime.EventService{}) - bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) - - // add keepers - app.AccountKeeper = authkeeper.NewAccountKeeper(appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, - runtime.NewKVStoreService(keys[banktypes.StoreKey]), - app.AccountKeeper, - BlockedAddresses(), - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - logger, - ) - - // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) - enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) - txConfigOpts := tx.ConfigOptions{ - EnabledSignModes: enabledSignModes, - TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), - } - txConfig, err := tx.NewTxConfigWithOptions( - appCodec, - txConfigOpts, - ) - if err != nil { - panic(err) - } - app.txConfig = txConfig - - app.StakingKeeper = stakingkeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), - ) - app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[minttypes.StoreKey]), app.StakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[distrtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - app.SlashingKeeper = slashingkeeper.NewKeeper( - appCodec, legacyAmino, runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) - app.CrisisKeeper = crisiskeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, - app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.AccountKeeper.AddressCodec()) - - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper) - - // register the staking hooks - // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), - ) - - app.CircuitKeeper = circuitkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[circuittypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.AccountKeeper.AddressCodec()) - app.BaseApp.SetCircuitBreaker(&app.CircuitKeeper) - - app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), appCodec, app.MsgServiceRouter(), app.AccountKeeper) - - groupConfig := group.DefaultConfig() - /* - Example of setting group params: - groupConfig.MaxMetadataLen = 1000 - */ - app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper, groupConfig) - - // get skipUpgradeHeights from the app options - skipUpgradeHeights := map[int64]bool{} - for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { - skipUpgradeHeights[int64(h)] = true - } - homePath := cast.ToString(appOpts.Get(flags.FlagHome)) - // set the governance module account as the authority for conducting upgrades - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, runtime.NewKVStoreService(keys[upgradetypes.StoreKey]), appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - // Register the proposal types - // Deprecated: Avoid adding new handlers, instead use the new proposal flow - // by granting the governance module the right to execute the message. - // See: https://docs.cosmos.network/main/modules/gov#proposal-messages - govRouter := govv1beta1.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) - govConfig := govtypes.DefaultConfig() - /* - Example of setting gov params: - govConfig.MaxMetadataLen = 10000 - */ - govKeeper := govkeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[govtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, - app.StakingKeeper, app.DistrKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - // Set legacy router for backwards compatibility with gov v1beta1 - govKeeper.SetLegacyRouter(govRouter) - - app.GovKeeper = *govKeeper.SetHooks( - govtypes.NewMultiGovHooks( - // register the governance hooks - ), - ) - - app.NFTKeeper = nftkeeper.NewKeeper(runtime.NewKVStoreService(keys[nftkeeper.StoreKey]), appCodec, app.AccountKeeper, app.BankKeeper) - - // create evidence keeper with router - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), app.StakingKeeper, app.SlashingKeeper, app.AccountKeeper.AddressCodec(), runtime.ProvideCometInfoService(), - ) - // If evidence needs to be handled for the app, set routes in router here and seal - app.EvidenceKeeper = *evidenceKeeper - - /**** Module Options ****/ - - // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment - // we prefer to be more strict in what arguments the modules expect. - skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) - - // NOTE: Any module instantiated in the module manager that is later modified - // must be passed by reference here. - app.ModuleManager = module.NewManager( - genutil.NewAppModule( - app.AccountKeeper, app.StakingKeeper, app, - txConfig, - ), - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), - vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), - crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), - upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), - evidence.NewAppModule(app.EvidenceKeeper), - params.NewAppModule(app.ParamsKeeper), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), - circuit.NewAppModule(appCodec, app.CircuitKeeper), - ) - - // BasicModuleManager defines the module BasicManager is in charge of setting up basic, - // non-dependant module elements, such as codec registration and genesis verification. - // By default it is composed of all the module from the module manager. - // Additionally, app module basics can be overwritten by passing them as argument. - app.BasicModuleManager = module.NewBasicManagerFromManager( - app.ModuleManager, - map[string]module.AppModuleBasic{ - genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - govtypes.ModuleName: gov.NewAppModuleBasic( - []govclient.ProposalHandler{ - paramsclient.ProposalHandler, - }, - ), - }) - app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino) - app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) - - // NOTE: upgrade module is required to be prioritized - app.ModuleManager.SetOrderPreBlockers( - upgradetypes.ModuleName, - ) - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - app.ModuleManager.SetOrderBeginBlockers( - minttypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - evidencetypes.ModuleName, - stakingtypes.ModuleName, - genutiltypes.ModuleName, - authz.ModuleName, - ) - app.ModuleManager.SetOrderEndBlockers( - crisistypes.ModuleName, - govtypes.ModuleName, - stakingtypes.ModuleName, - genutiltypes.ModuleName, - feegrant.ModuleName, - group.ModuleName, - ) - - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: The genutils module must also occur after auth so that it can access the params from auth. - genesisModuleOrder := []string{ - authtypes.ModuleName, banktypes.ModuleName, - distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, - minttypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, - feegrant.ModuleName, nft.ModuleName, group.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, - vestingtypes.ModuleName, consensusparamtypes.ModuleName, circuittypes.ModuleName, - } - app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) - app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) - - // Uncomment if you want to set a custom migration order here. - // app.ModuleManager.SetOrderMigrations(custom order) - - app.ModuleManager.RegisterInvariants(app.CrisisKeeper) - app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - err = app.ModuleManager.RegisterServices(app.configurator) - if err != nil { - panic(err) - } - - // RegisterUpgradeHandlers is used for registering any on-chain upgrades. - // Make sure it's called after `app.ModuleManager` and `app.configurator` are set. - app.RegisterUpgradeHandlers() - - autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules)) - - reflectionSvc, err := runtimeservices.NewReflectionService() - if err != nil { - panic(err) - } - reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) - - // add test gRPC service for testing gRPC queries in isolation - testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{}) - - // create the simulation manager and define the order of the modules for deterministic simulations - // - // NOTE: this is not required apps that don't use the simulator for fuzz testing - // transactions - overrideModules := map[string]module.AppModuleSimulation{ - authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), - } - app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) - - app.sm.RegisterStoreDecoders() - - // initialize stores - app.MountKVStores(keys) - app.MountTransientStores(tkeys) - - // initialize BaseApp - app.SetInitChainer(app.InitChainer) - app.SetPreBlocker(app.PreBlocker) - app.SetBeginBlocker(app.BeginBlocker) - app.SetEndBlocker(app.EndBlocker) - app.setAnteHandler(txConfig) - - // In v0.46, the SDK introduces _postHandlers_. PostHandlers are like - // antehandlers, but are run _after_ the `runMsgs` execution. They are also - // defined as a chain, and have the same signature as antehandlers. - // - // In baseapp, postHandlers are run in the same store branch as `runMsgs`, - // meaning that both `runMsgs` and `postHandler` state will be committed if - // both are successful, and both will be reverted if any of the two fails. - // - // The SDK exposes a default postHandlers chain - // - // Please note that changing any of the anteHandler or postHandler chain is - // likely to be a state-machine breaking change, which needs a coordinated - // upgrade. - app.setPostHandler() - - // At startup, after all modules have been registered, check that all prot - // annotations are correct. - protoFiles, err := proto.MergedRegistry() - if err != nil { - panic(err) - } - err = msgservice.ValidateProtoAnnotations(protoFiles) - if err != nil { - // Once we switch to using protoreflect-based antehandlers, we might - // want to panic here instead of logging a warning. - fmt.Fprintln(os.Stderr, err.Error()) - } - - if loadLatest { - if err := app.LoadLatestVersion(); err != nil { - panic(fmt.Errorf("error loading last version: %w", err)) - } - } - - return app -} - -func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { - anteHandler, err := NewAnteHandler( - HandlerOptions{ - ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: txConfig.SignModeHandler(), - FeegrantKeeper: app.FeeGrantKeeper, - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - &app.CircuitKeeper, - }, - ) - if err != nil { - panic(err) - } - - // Set the AnteHandler for the app - app.SetAnteHandler(anteHandler) -} - -func (app *SimApp) setPostHandler() { - postHandler, err := posthandler.NewPostHandler( - posthandler.HandlerOptions{}, - ) - if err != nil { - panic(err) - } - - app.SetPostHandler(postHandler) -} - -// Name returns the name of the App -func (app *SimApp) Name() string { return app.BaseApp.Name() } - -// PreBlocker application updates every pre block -func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { - return app.ModuleManager.PreBlock(ctx) -} - -// BeginBlocker application updates every begin block -func (app *SimApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { - return app.ModuleManager.BeginBlock(ctx) -} - -// EndBlocker application updates every end block -func (app *SimApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { - return app.ModuleManager.EndBlock(ctx) -} - -func (a *SimApp) Configurator() module.Configurator { - return a.configurator -} - -// InitChainer application update at chain initialization -func (app *SimApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { - var genesisState GenesisState - if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) - } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) - return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) -} - -// LoadHeight loads a particular height -func (app *SimApp) LoadHeight(height int64) error { - return app.LoadVersion(height) -} - -// LegacyAmino returns SimApp's amino codec. -// -// NOTE: This is solely to be used for testing purposes as it may be desirable -// for modules to register their own custom testing types. -func (app *SimApp) LegacyAmino() *codec.LegacyAmino { - return app.legacyAmino -} - -// AppCodec returns SimApp's app codec. -// -// NOTE: This is solely to be used for testing purposes as it may be desirable -// for modules to register their own custom testing types. -func (app *SimApp) AppCodec() codec.Codec { - return app.appCodec -} - -// InterfaceRegistry returns SimApp's InterfaceRegistry -func (app *SimApp) InterfaceRegistry() types.InterfaceRegistry { - return app.interfaceRegistry -} - -// TxConfig returns SimApp's TxConfig -func (app *SimApp) TxConfig() client.TxConfig { - return app.txConfig -} - -// AutoCliOpts returns the autocli options for the app. -func (app *SimApp) AutoCliOpts() autocli.AppOptions { - modules := make(map[string]appmodule.AppModule, 0) - for _, m := range app.ModuleManager.Modules { - if moduleWithName, ok := m.(module.HasName); ok { - moduleName := moduleWithName.Name() - if appModule, ok := moduleWithName.(appmodule.AppModule); ok { - modules[moduleName] = appModule - } - } - } - - return autocli.AppOptions{ - Modules: modules, - ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.ModuleManager.Modules), - AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), - ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), - ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), - } -} - -// DefaultGenesis returns a default genesis from the registered AppModuleBasic's. -func (a *SimApp) DefaultGenesis() map[string]json.RawMessage { - return a.BasicModuleManager.DefaultGenesis(a.appCodec) -} - -// GetKey returns the KVStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey { - return app.keys[storeKey] -} - -// GetStoreKeys returns all the stored store keys. -func (app *SimApp) GetStoreKeys() []storetypes.StoreKey { - keys := make([]storetypes.StoreKey, len(app.keys)) - for _, key := range app.keys { - keys = append(keys, key) - } - - return keys -} - -// GetSubspace returns a param subspace for a given module name. -// -// NOTE: This is solely to be used for testing purposes. -func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (app *SimApp) SimulationManager() *module.SimulationManager { - return app.sm -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { - clientCtx := apiSvr.ClientCtx - // Register new tx routes from grpc-gateway. - authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // Register new CometBFT queries routes from grpc-gateway. - cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // Register node gRPC service for grpc-gateway. - nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // Register grpc-gateway routes for all modules. - app.BasicModuleManager.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // register swagger API from root so that other applications can override easily - if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { - panic(err) - } -} - -// RegisterTxService implements the Application.RegisterTxService method. -func (app *SimApp) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) -} - -// RegisterTendermintService implements the Application.RegisterTendermintService method. -func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { - cmtApp := server.NewCometABCIWrapper(app) - cmtservice.RegisterTendermintService( - clientCtx, - app.BaseApp.GRPCQueryRouter(), - app.interfaceRegistry, - cmtApp.Query, - ) -} - -func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Config) { - nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg) -} - -// GetMaccPerms returns a copy of the module account permissions -// -// NOTE: This is solely to be used for testing purposes. -func GetMaccPerms() map[string][]string { - dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } - - return dupMaccPerms -} - -// BlockedAddresses returns all the app's blocked account addresses. -func BlockedAddresses() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range GetMaccPerms() { - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - // allow the following addresses to receive funds - delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - return modAccAddrs -} - -// initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { - paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) - - paramsKeeper.Subspace(authtypes.ModuleName) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName) - paramsKeeper.Subspace(crisistypes.ModuleName) - - return paramsKeeper -} diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go deleted file mode 100644 index 42876588fd..0000000000 --- a/simapp/simd/cmd/root.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build app_v1 - -package cmd - -import ( - "os" - - "cosmossdk.io/log" - dbm "github.com/cosmos/cosmos-db" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/config" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/server" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/tx" - txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/Finschia/finschia-sdk/simapp" - "github.com/Finschia/finschia-sdk/simapp/params" -) - -// NewRootCmd creates a new root command for simd. It is called once in the -// main function. -func NewRootCmd() *cobra.Command { - // we "pre"-instantiate the application for getting the injected/configured encoding configuration - // note, this is not necessary when using app wiring, as depinject can be directly used (see root_v2.go) - tempApp := simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(tempDir())) - encodingConfig := params.EncodingConfig{ - InterfaceRegistry: tempApp.InterfaceRegistry(), - Codec: tempApp.AppCodec(), - TxConfig: tempApp.TxConfig(), - Amino: tempApp.LegacyAmino(), - } - - initClientCtx := client.Context{}. - WithCodec(encodingConfig.Codec). - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithInput(os.Stdin). - WithAccountRetriever(types.AccountRetriever{}). - WithHomeDir(simapp.DefaultNodeHome). - WithViper("") // In simapp, we don't use any prefix for env variables. - - rootCmd := &cobra.Command{ - Use: "simd", - Short: "simulation app", - SilenceErrors: true, - PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { - // set the default command outputs - cmd.SetOut(cmd.OutOrStdout()) - cmd.SetErr(cmd.ErrOrStderr()) - - initClientCtx = initClientCtx.WithCmdContext(cmd.Context()) - initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags()) - if err != nil { - return err - } - - initClientCtx, err = config.ReadFromClientConfig(initClientCtx) - if err != nil { - return err - } - - // This needs to go after ReadFromClientConfig, as that function - // sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode - // is only available if the client is online. - if !initClientCtx.Offline { - enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) - txConfigOpts := tx.ConfigOptions{ - EnabledSignModes: enabledSignModes, - TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), - } - txConfig, err := tx.NewTxConfigWithOptions( - initClientCtx.Codec, - txConfigOpts, - ) - if err != nil { - return err - } - - initClientCtx = initClientCtx.WithTxConfig(txConfig) - } - - if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { - return err - } - - customAppTemplate, customAppConfig := initAppConfig() - customCMTConfig := initCometBFTConfig() - - return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customCMTConfig) - }, - } - - initRootCmd(rootCmd, encodingConfig.TxConfig, encodingConfig.InterfaceRegistry, encodingConfig.Codec, tempApp.BasicModuleManager) - - // add keyring to autocli opts - autoCliOpts := tempApp.AutoCliOpts() - initClientCtx, _ = config.ReadFromClientConfig(initClientCtx) - autoCliOpts.Keyring, _ = keyring.NewAutoCLIKeyring(initClientCtx.Keyring) - autoCliOpts.ClientCtx = initClientCtx - - if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { - panic(err) - } - - return rootCmd -} From ce6b7c66b3e8917b11e7e44d45f7c2cddffe8879 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 31 Jan 2024 06:57:38 +0000 Subject: [PATCH 24/26] Update x/foundation/README.md Co-authored-by: Shogo Hyodo --- x/foundation/README.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/x/foundation/README.md b/x/foundation/README.md index 9e972d3ced..9f6073adf2 100644 --- a/x/foundation/README.md +++ b/x/foundation/README.md @@ -1,9 +1,6 @@ - +--- +sidebar_position: 1 +--- # `x/foundation` From db4661b991dda773d795641088fce37963b8c419 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 31 Jan 2024 07:00:42 +0000 Subject: [PATCH 25/26] Remove testing legacy simapp --- .github/workflows/build.yml | 3 --- .github/workflows/test.yml | 5 ----- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4face0733e..0e5806198c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,3 @@ jobs: - name: Build if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make build - - name: Build Legacy - if: env.GIT_DIFF - run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=legacy make build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cf86f20cc..aa638b80f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -277,11 +277,6 @@ jobs: run: | cd simapp go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... - - name: tests simapp v1 - if: env.GIT_DIFF - run: | - cd simapp - go test -mod=readonly -timeout 30m -tags='app_v1 norace ledger test_ledger_mock rocksdb_build' ./... - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} uses: SonarSource/sonarcloud-github-action@master From d9758c5a86ca349ee104d93be533b934cad51360 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 31 Jan 2024 07:01:55 +0000 Subject: [PATCH 26/26] go mod tidy simapp --- simapp/go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simapp/go.mod b/simapp/go.mod index f1ff370697..49fd24f7b1 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -16,7 +16,7 @@ require ( cosmossdk.io/x/evidence v0.1.0 cosmossdk.io/x/feegrant v0.1.0 cosmossdk.io/x/nft v0.1.0 - cosmossdk.io/x/tx v0.12.0 + cosmossdk.io/x/tx v0.12.0 // indirect cosmossdk.io/x/upgrade v0.1.1 github.com/Finschia/finschia-sdk/api v0.0.0-20231227090232-78fde403b78c github.com/Finschia/finschia-sdk/x/foundation v0.0.0-00010101000000-000000000000 @@ -26,7 +26,7 @@ require ( github.com/cosmos/cosmos-sdk v0.50.2 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/spf13/cast v1.5.1 + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.16.0