diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58b5a7f543..c2c8733a6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Removed
### Breaking Changes
+* (x/foundation) [\#999](https://github.com/Finschia/finschia-sdk/pull/999) migrate x/foundation FoundationTax into x/params
### Build, CI
diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md
index 2b46d35a63..fa8b6ea5c6 100644
--- a/docs/core/proto-docs.md
+++ b/docs/core/proto-docs.md
@@ -790,7 +790,6 @@
- [EventUpdateCensorship](#lbm.foundation.v1.EventUpdateCensorship)
- [EventUpdateDecisionPolicy](#lbm.foundation.v1.EventUpdateDecisionPolicy)
- [EventUpdateMembers](#lbm.foundation.v1.EventUpdateMembers)
- - [EventUpdateParams](#lbm.foundation.v1.EventUpdateParams)
- [EventVote](#lbm.foundation.v1.EventVote)
- [EventWithdrawFromTreasury](#lbm.foundation.v1.EventWithdrawFromTreasury)
- [EventWithdrawProposal](#lbm.foundation.v1.EventWithdrawProposal)
@@ -846,8 +845,6 @@
- [MsgUpdateDecisionPolicyResponse](#lbm.foundation.v1.MsgUpdateDecisionPolicyResponse)
- [MsgUpdateMembers](#lbm.foundation.v1.MsgUpdateMembers)
- [MsgUpdateMembersResponse](#lbm.foundation.v1.MsgUpdateMembersResponse)
- - [MsgUpdateParams](#lbm.foundation.v1.MsgUpdateParams)
- - [MsgUpdateParamsResponse](#lbm.foundation.v1.MsgUpdateParamsResponse)
- [MsgVote](#lbm.foundation.v1.MsgVote)
- [MsgVoteResponse](#lbm.foundation.v1.MsgVoteResponse)
- [MsgWithdrawFromTreasury](#lbm.foundation.v1.MsgWithdrawFromTreasury)
@@ -11827,21 +11824,6 @@ EventUpdateMembers is an event emitted when the members have been updated.
-
-
-### EventUpdateParams
-EventUpdateParams is emitted after updating foundation parameters.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| `params` | [Params](#lbm.foundation.v1.Params) | | |
-
-
-
-
-
-
### EventVote
@@ -12595,34 +12577,6 @@ MsgUpdateMembersResponse is the Msg/UpdateMembers response type.
-
-
-### MsgUpdateParams
-MsgUpdateParams is the Msg/UpdateParams request type.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| `authority` | [string](#string) | | authority is the address of the privileged account. |
-| `params` | [Params](#lbm.foundation.v1.Params) | | params defines the x/foundation parameters to update.
-
-NOTE: All parameters must be supplied. |
-
-
-
-
-
-
-
-
-### MsgUpdateParamsResponse
-MsgUpdateParamsResponse is the Msg/UpdateParams response type.
-
-
-
-
-
-
### MsgVote
@@ -12730,7 +12684,6 @@ Msg defines the foundation Msg service.
| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
-| `UpdateParams` | [MsgUpdateParams](#lbm.foundation.v1.MsgUpdateParams) | [MsgUpdateParamsResponse](#lbm.foundation.v1.MsgUpdateParamsResponse) | UpdateParams defines an operation for updating the x/foundation module parameters. | |
| `FundTreasury` | [MsgFundTreasury](#lbm.foundation.v1.MsgFundTreasury) | [MsgFundTreasuryResponse](#lbm.foundation.v1.MsgFundTreasuryResponse) | FundTreasury defines a method to fund the treasury. | |
| `WithdrawFromTreasury` | [MsgWithdrawFromTreasury](#lbm.foundation.v1.MsgWithdrawFromTreasury) | [MsgWithdrawFromTreasuryResponse](#lbm.foundation.v1.MsgWithdrawFromTreasuryResponse) | WithdrawFromTreasury defines a method to withdraw coins from the treasury. | |
| `UpdateMembers` | [MsgUpdateMembers](#lbm.foundation.v1.MsgUpdateMembers) | [MsgUpdateMembersResponse](#lbm.foundation.v1.MsgUpdateMembersResponse) | UpdateMembers updates the foundation members. | |
diff --git a/proto/lbm/foundation/v1/event.proto b/proto/lbm/foundation/v1/event.proto
index 7b1eff4bc2..562d919687 100644
--- a/proto/lbm/foundation/v1/event.proto
+++ b/proto/lbm/foundation/v1/event.proto
@@ -11,11 +11,6 @@ import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";
import "lbm/foundation/v1/foundation.proto";
-// EventUpdateParams is emitted after updating foundation parameters.
-message EventUpdateParams {
- Params params = 1 [(gogoproto.nullable) = false];
-}
-
// EventFundTreasury is an event emitted when one funds the treasury.
message EventFundTreasury {
string from = 1;
diff --git a/proto/lbm/foundation/v1/tx.proto b/proto/lbm/foundation/v1/tx.proto
index 509ebf5fb9..35483b95d9 100644
--- a/proto/lbm/foundation/v1/tx.proto
+++ b/proto/lbm/foundation/v1/tx.proto
@@ -15,10 +15,6 @@ option (gogoproto.goproto_getters_all) = false;
// Msg defines the foundation Msg service.
service Msg {
- // UpdateParams defines an operation for updating the x/foundation module
- // parameters.
- rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
-
// FundTreasury defines a method to fund the treasury.
rpc FundTreasury(MsgFundTreasury) returns (MsgFundTreasuryResponse);
@@ -59,20 +55,6 @@ service Msg {
rpc Revoke(MsgRevoke) returns (MsgRevokeResponse);
}
-// MsgUpdateParams is the Msg/UpdateParams request type.
-message MsgUpdateParams {
- // authority is the address of the privileged account.
- string authority = 1;
-
- // params defines the x/foundation parameters to update.
- //
- // NOTE: All parameters must be supplied.
- Params params = 2 [(gogoproto.nullable) = false];
-}
-
-// MsgUpdateParamsResponse is the Msg/UpdateParams response type.
-message MsgUpdateParamsResponse {}
-
// MsgFundTreasury is the Msg/FundTreasury request type.
message MsgFundTreasury {
string from = 1;
diff --git a/simapp/app.go b/simapp/app.go
index 7fb5602fb3..89743598eb 100644
--- a/simapp/app.go
+++ b/simapp/app.go
@@ -316,7 +316,7 @@ func NewSimApp(
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp)
foundationConfig := foundation.DefaultConfig()
- app.FoundationKeeper = foundationkeeper.NewKeeper(appCodec, keys[foundation.StoreKey], app.BaseApp.MsgServiceRouter(), app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, foundationConfig, foundation.DefaultAuthority().String())
+ app.FoundationKeeper = foundationkeeper.NewKeeper(appCodec, keys[foundation.StoreKey], app.BaseApp.MsgServiceRouter(), app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, foundationConfig, foundation.DefaultAuthority().String(), app.GetSubspace(foundation.ModuleName))
app.ClassKeeper = classkeeper.NewKeeper(appCodec, keys[class.StoreKey])
app.TokenKeeper = tokenkeeper.NewKeeper(appCodec, keys[token.StoreKey], app.ClassKeeper)
@@ -712,6 +712,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
+ paramsKeeper.Subspace(foundation.ModuleName)
return paramsKeeper
}
diff --git a/x/foundation/README.md b/x/foundation/README.md
index a5a17b735a..62c4bacfe5 100644
--- a/x/foundation/README.md
+++ b/x/foundation/README.md
@@ -17,9 +17,9 @@ back these foundation-specific functionalities.
## Contents
* [Concepts](#concepts)
+* [Parameters](#parameters)
* [State](#state)
* [Msg Service](#msg-service)
- * [Msg/UpdateParams](#msgupdateparams)
* [Msg/UpdateDecisionPolicy](#msgupdatedecisionpolicy)
* [Msg/UpdateMembers](#msgupdatemembers)
* [Msg/LeaveFoundation](#msgleavefoundation)
@@ -33,7 +33,6 @@ back these foundation-specific functionalities.
* [Msg/FundTreasury](#msgfundtreasury)
* [Msg/WithdrawFromTreasury](#msgwithdrawfromtreasury)
* [Events](#events)
- * [EventUpdateFoundationParams](#eventupdatefoundationparams)
* [EventUpdateDecisionPolicy](#eventupdatedecisionpolicy)
* [EventUpdateMembers](#eventupdatedmembers)
* [EventLeaveFoundation](#eventleavefoundation)
@@ -269,19 +268,15 @@ The foundation can withdraw coins from the treasury. The recipient must have
the corresponding authorization (`ReceiveFromTreasuryAuthorization`) prior to
sending the message `Msg/WithdrawFromTreasury`.
-**Note:** After setting the tax rate to zero, you cannot set it to a non-zero
-value again (irreversible), which means you must set it to a non-zero value in
-the genesis to make it work.
+# Parameters
-# State
-
-## Params
+## FoundationTax
-* Params: `0x00 -> PropocolBuffer(Params)`.
+The value of `FoundationTax` is the foundation tax rate.
-### FoundationTax
+* FoundationTax: `sdk.Dec`
-The value of `FoundationTax` is the foundation tax rate.
+# State
## FoundationInfo
@@ -350,17 +345,6 @@ Authorization) tuple.
# Msg Service
-## Msg/UpdateParams
-
-The `MsgUpdateParams` can be used to update the parameters of `foundation`.
-
-+++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L62-L71
-
-It's expected to fail if:
-
-* the authority is not the module's authority.
-* the parameters introduces any new foundation-specific features.
-
## Msg/UpdateDecisionPolicy
The `MsgUpdateDecisionPolicy` can be used to update the decision policy.
@@ -526,15 +510,6 @@ The message handling should fail if:
# Events
-## EventUpdateFoundationParams
-
-`EventUpdateFoundationParams` is an event emitted when the foundation
-parameters have been updated.
-
-| Attribute Key | Attribute Value |
-|---------------|-----------------|
-| params | {params} |
-
## EventUpdateDecisionPolicy
`EventUpdateDecisionPolicy` is an event emitted when the decision policy have
@@ -1010,25 +985,6 @@ simd tx foundation --help
you cannot broadcast the message directly. The use of those commands is to make
it easier to generate the messages by end users.
-#### update-params
-
-The `update-params` command allows users to update the foundation's parameters.
-
-```bash
-simd tx foundation update-params [authority] [params-json] [flags]
-```
-
-Example:
-
-```bash
-simd tx foundation update-params link1... \
- '{
- "foundation_tax": "0.1"
- }'
-```
-
-**Note:** The signer MUST be the module's authority.
-
#### update-members
The `update-members` command allows users to update the foundation's members.
diff --git a/x/foundation/client/cli/tx.go b/x/foundation/client/cli/tx.go
index dbb6c91dfb..bc4eddad12 100644
--- a/x/foundation/client/cli/tx.go
+++ b/x/foundation/client/cli/tx.go
@@ -34,15 +34,6 @@ func validateGenerateOnly(cmd *cobra.Command) error {
return nil
}
-func parseParams(codec codec.Codec, paramsJSON string) (*foundation.Params, error) {
- var params foundation.Params
- if err := codec.UnmarshalJSON([]byte(paramsJSON), ¶ms); err != nil {
- return nil, err
- }
-
- return ¶ms, nil
-}
-
func parseMemberRequests(codec codec.Codec, membersJSON string) ([]foundation.MemberRequest, error) {
var cliMembers []json.RawMessage
if err := json.Unmarshal([]byte(membersJSON), &cliMembers); err != nil {
@@ -141,7 +132,6 @@ func NewTxCmd() *cobra.Command {
}
txCmd.AddCommand(
- NewTxCmdUpdateParams(),
NewTxCmdFundTreasury(),
NewTxCmdWithdrawFromTreasury(),
NewTxCmdUpdateMembers(),
@@ -158,49 +148,6 @@ func NewTxCmd() *cobra.Command {
return txCmd
}
-func NewTxCmdUpdateParams() *cobra.Command {
- cmd := &cobra.Command{
- Use: "update-params [authority] [params-json]",
- Args: cobra.ExactArgs(2),
- Short: "Update params",
- Long: `Update x/foundation parameters.
-
-Example of the content of params-json:
-
-{
- "foundation_tax": "0.1"
-}
-`,
- 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
- }
-
- params, err := parseParams(clientCtx.Codec, args[1])
- if err != nil {
- return err
- }
-
- msg := foundation.MsgUpdateParams{
- Authority: args[0],
- Params: *params,
- }
- if err := msg.ValidateBasic(); err != nil {
- return err
- }
- return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
- },
- }
-
- flags.AddTxFlagsToCmd(cmd)
- return cmd
-}
-
func NewTxCmdFundTreasury() *cobra.Command {
cmd := &cobra.Command{
Use: "fund-treasury [from] [amount]",
diff --git a/x/foundation/client/testutil/tx.go b/x/foundation/client/testutil/tx.go
index ab498ba5f0..36f7169dc6 100644
--- a/x/foundation/client/testutil/tx.go
+++ b/x/foundation/client/testutil/tx.go
@@ -13,52 +13,6 @@ import (
"github.com/Finschia/finschia-sdk/x/foundation/client/cli"
)
-func (s *IntegrationTestSuite) TestNewTxCmdUpdateParams() {
- 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(),
- fmt.Sprintf(`{"foundation_tax": "%s"}`, sdk.ZeroDec()),
- },
- true,
- },
- "wrong number of args": {
- []string{
- s.authority.String(),
- fmt.Sprintf(`{"foundation_tax": "%s"}`, sdk.ZeroDec()),
- "extra",
- },
- false,
- },
- }
-
- for name, tc := range testCases {
- tc := tc
-
- s.Run(name, func() {
- cmd := cli.NewTxCmdUpdateParams()
- 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) TestNewTxCmdFundTreasury() {
val := s.network.Validators[0]
commonArgs := []string{
diff --git a/x/foundation/codec.go b/x/foundation/codec.go
index 2a0b02964c..9f6820a526 100644
--- a/x/foundation/codec.go
+++ b/x/foundation/codec.go
@@ -22,7 +22,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
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")
@@ -41,7 +40,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
- &MsgUpdateParams{},
&MsgFundTreasury{},
&MsgWithdrawFromTreasury{},
&MsgUpdateMembers{},
diff --git a/x/foundation/event.pb.go b/x/foundation/event.pb.go
index ef7a0a39eb..29d23d20e4 100644
--- a/x/foundation/event.pb.go
+++ b/x/foundation/event.pb.go
@@ -27,51 +27,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-// EventUpdateParams is emitted after updating foundation parameters.
-type EventUpdateParams struct {
- Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
-}
-
-func (m *EventUpdateParams) Reset() { *m = EventUpdateParams{} }
-func (m *EventUpdateParams) String() string { return proto.CompactTextString(m) }
-func (*EventUpdateParams) ProtoMessage() {}
-func (*EventUpdateParams) Descriptor() ([]byte, []int) {
- return fileDescriptor_2b66c645bbb34fbc, []int{0}
-}
-func (m *EventUpdateParams) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EventUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EventUpdateParams.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 *EventUpdateParams) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EventUpdateParams.Merge(m, src)
-}
-func (m *EventUpdateParams) XXX_Size() int {
- return m.Size()
-}
-func (m *EventUpdateParams) XXX_DiscardUnknown() {
- xxx_messageInfo_EventUpdateParams.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EventUpdateParams proto.InternalMessageInfo
-
-func (m *EventUpdateParams) GetParams() Params {
- if m != nil {
- return m.Params
- }
- return Params{}
-}
-
// 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"`
@@ -82,7 +37,7 @@ 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{1}
+ return fileDescriptor_2b66c645bbb34fbc, []int{0}
}
func (m *EventFundTreasury) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -135,7 +90,7 @@ func (m *EventWithdrawFromTreasury) Reset() { *m = EventWithdrawFromTrea
func (m *EventWithdrawFromTreasury) String() string { return proto.CompactTextString(m) }
func (*EventWithdrawFromTreasury) ProtoMessage() {}
func (*EventWithdrawFromTreasury) Descriptor() ([]byte, []int) {
- return fileDescriptor_2b66c645bbb34fbc, []int{2}
+ return fileDescriptor_2b66c645bbb34fbc, []int{1}
}
func (m *EventWithdrawFromTreasury) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -187,7 +142,7 @@ 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{3}
+ return fileDescriptor_2b66c645bbb34fbc, []int{2}
}
func (m *EventUpdateMembers) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -232,7 +187,7 @@ func (m *EventUpdateDecisionPolicy) Reset() { *m = EventUpdateDecisionPo
func (m *EventUpdateDecisionPolicy) String() string { return proto.CompactTextString(m) }
func (*EventUpdateDecisionPolicy) ProtoMessage() {}
func (*EventUpdateDecisionPolicy) Descriptor() ([]byte, []int) {
- return fileDescriptor_2b66c645bbb34fbc, []int{4}
+ return fileDescriptor_2b66c645bbb34fbc, []int{3}
}
func (m *EventUpdateDecisionPolicy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -271,7 +226,7 @@ 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{5}
+ return fileDescriptor_2b66c645bbb34fbc, []int{4}
}
func (m *EventSubmitProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -317,7 +272,7 @@ 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{6}
+ return fileDescriptor_2b66c645bbb34fbc, []int{5}
}
func (m *EventWithdrawProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -362,7 +317,7 @@ 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{7}
+ return fileDescriptor_2b66c645bbb34fbc, []int{6}
}
func (m *EventVote) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -412,7 +367,7 @@ 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{8}
+ return fileDescriptor_2b66c645bbb34fbc, []int{7}
}
func (m *EventExec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -472,7 +427,7 @@ 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{9}
+ return fileDescriptor_2b66c645bbb34fbc, []int{8}
}
func (m *EventLeaveFoundation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -517,7 +472,7 @@ 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{10}
+ return fileDescriptor_2b66c645bbb34fbc, []int{9}
}
func (m *EventUpdateCensorship) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -565,7 +520,7 @@ 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{11}
+ return fileDescriptor_2b66c645bbb34fbc, []int{10}
}
func (m *EventGrant) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -620,7 +575,7 @@ 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{12}
+ return fileDescriptor_2b66c645bbb34fbc, []int{11}
}
func (m *EventRevoke) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -664,7 +619,6 @@ func (m *EventRevoke) GetMsgTypeUrl() string {
}
func init() {
- proto.RegisterType((*EventUpdateParams)(nil), "lbm.foundation.v1.EventUpdateParams")
proto.RegisterType((*EventFundTreasury)(nil), "lbm.foundation.v1.EventFundTreasury")
proto.RegisterType((*EventWithdrawFromTreasury)(nil), "lbm.foundation.v1.EventWithdrawFromTreasury")
proto.RegisterType((*EventUpdateMembers)(nil), "lbm.foundation.v1.EventUpdateMembers")
@@ -682,87 +636,52 @@ func init() {
func init() { proto.RegisterFile("lbm/foundation/v1/event.proto", fileDescriptor_2b66c645bbb34fbc) }
var fileDescriptor_2b66c645bbb34fbc = []byte{
- // 744 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0xcf, 0x4f, 0xdb, 0x48,
- 0x14, 0x8e, 0x21, 0xca, 0x2e, 0xc3, 0x92, 0x15, 0xb3, 0xac, 0x1a, 0xa8, 0x70, 0x22, 0x9f, 0xa8,
- 0xd4, 0xd8, 0x0d, 0xad, 0xda, 0x0a, 0xa9, 0x95, 0x08, 0x25, 0x08, 0x09, 0x24, 0xea, 0x42, 0x2b,
- 0x55, 0x95, 0xa2, 0xb1, 0x3d, 0x71, 0x2c, 0x6c, 0x8f, 0x3b, 0x33, 0x76, 0x09, 0xd7, 0x5e, 0x7a,
- 0xe4, 0xd0, 0x73, 0xd5, 0x73, 0xcf, 0xfc, 0x11, 0x88, 0x13, 0xc7, 0x9e, 0xda, 0x0a, 0xfe, 0x91,
- 0x6a, 0xc6, 0x93, 0x90, 0x88, 0x14, 0x7a, 0xea, 0xed, 0xbd, 0x79, 0xef, 0xfb, 0xde, 0xf7, 0x7e,
- 0x0c, 0x58, 0x0c, 0x9d, 0xc8, 0xea, 0x90, 0x34, 0xf6, 0x10, 0x0f, 0x48, 0x6c, 0x65, 0x0d, 0x0b,
- 0x67, 0x38, 0xe6, 0x66, 0x42, 0x09, 0x27, 0x70, 0x36, 0x74, 0x22, 0xf3, 0x32, 0x6c, 0x66, 0x8d,
- 0x85, 0x39, 0x9f, 0xf8, 0x44, 0x46, 0x2d, 0x61, 0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x7e, 0x69, 0x3b, 0xa5, 0xa1, 0xd4, 0x37, 0x65, 0x83, 0x88,
- 0xf9, 0xbb, 0xbd, 0x04, 0xef, 0xd1, 0xb0, 0xb9, 0x71, 0x72, 0xae, 0x6b, 0x67, 0xe7, 0xba, 0xf6,
- 0xe3, 0x5c, 0xd7, 0x8e, 0x2e, 0xf4, 0xc2, 0xd9, 0x85, 0x5e, 0xf8, 0x7a, 0xa1, 0x17, 0x5e, 0xd7,
- 0x7f, 0x43, 0xeb, 0xe5, 0x50, 0x9d, 0x92, 0x6c, 0xf6, 0xfe, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff,
- 0xd4, 0x73, 0x42, 0xfd, 0x38, 0x06, 0x00, 0x00,
-}
-
-func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EventUpdateParams) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EventUpdateParams) 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 = encodeVarintEvent(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
+ // 720 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0xc1, 0x4f, 0x13, 0x4f,
+ 0x14, 0xc7, 0xbb, 0xd0, 0xf0, 0xfb, 0x31, 0x95, 0x1a, 0x56, 0x8c, 0x05, 0x43, 0xdb, 0xec, 0x09,
+ 0x13, 0xbb, 0x6b, 0xd1, 0x18, 0x43, 0xa2, 0x09, 0x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 0x4b, 0x28, 0xcf, 0x24, 0x6a, 0x1e, 0xe7, 0x64, 0xc6, 0x17, 0x0d, 0x21, 0x69, 0xbf, 0xc6, 0x70,
+ 0x24, 0x32, 0x0c, 0x3f, 0x0b, 0x08, 0x19, 0x60, 0xa8, 0x54, 0x4f, 0xd1, 0x14, 0x4e, 0x44, 0x0f,
+ 0x18, 0xdd, 0x93, 0xce, 0x72, 0x2c, 0x7f, 0x7a, 0x65, 0x4b, 0x47, 0x07, 0x8d, 0xc7, 0xd7, 0x7e,
+ 0xa8, 0x5d, 0x2b, 0x73, 0xdc, 0x33, 0x97, 0xcf, 0xfb, 0xda, 0xa3, 0x6d, 0x8c, 0x75, 0x54, 0x92,
+ 0x7c, 0x36, 0x49, 0x61, 0x87, 0x5c, 0x01, 0x58, 0x47, 0x37, 0x42, 0xee, 0x77, 0xb2, 0x5f, 0xda,
+ 0x49, 0x58, 0x20, 0xf9, 0x26, 0x6d, 0x14, 0x72, 0x7f, 0xab, 0x1f, 0x93, 0x6d, 0x16, 0xb4, 0xd6,
+ 0x0e, 0x4f, 0xaa, 0xda, 0xf1, 0x49, 0x55, 0xfb, 0x75, 0x52, 0xd5, 0xf6, 0x4f, 0xab, 0x85, 0xe3,
+ 0xd3, 0x6a, 0xe1, 0xfb, 0x69, 0xb5, 0xf0, 0xb6, 0xf1, 0x17, 0xac, 0x67, 0x43, 0x75, 0x26, 0xe4,
+ 0x61, 0x1f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x6e, 0x65, 0xdb, 0xea, 0x05, 0x00, 0x00,
}
func (m *EventFundTreasury) Marshal() (dAtA []byte, err error) {
@@ -1212,17 +1131,6 @@ func encodeVarintEvent(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
-func (m *EventUpdateParams) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.Params.Size()
- n += 1 + l + sovEvent(uint64(l))
- return n
-}
-
func (m *EventFundTreasury) Size() (n int) {
if m == nil {
return 0
@@ -1406,89 +1314,6 @@ func sovEvent(x uint64) (n int) {
func sozEvent(x uint64) (n int) {
return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
-func (m *EventUpdateParams) Unmarshal(dAtA []byte) 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: EventUpdateParams: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EventUpdateParams: 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 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.Params.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 *EventFundTreasury) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
diff --git a/x/foundation/foundation.go b/x/foundation/foundation.go
index a09cc7dfcb..4eb6013152 100644
--- a/x/foundation/foundation.go
+++ b/x/foundation/foundation.go
@@ -10,6 +10,7 @@ import (
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 {
@@ -72,13 +73,31 @@ func (c Censorship) ValidateBasic() error {
}
func (p Params) ValidateBasic() error {
- if err := validateRatio(p.FoundationTax, "tax rate"); err != nil {
+ 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)
diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go
index e78321c570..9d7f64bc8b 100644
--- a/x/foundation/keeper/exported.go
+++ b/x/foundation/keeper/exported.go
@@ -7,6 +7,7 @@ import (
"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 {
@@ -30,6 +31,7 @@ func NewKeeper(
feeCollectorName string,
config foundation.Config,
authority string,
+ paramspace paramtypes.Subspace,
) Keeper {
return &keeper{
impl: internal.NewKeeper(
@@ -41,6 +43,7 @@ func NewKeeper(
feeCollectorName,
config,
authority,
+ paramspace,
),
}
}
@@ -91,3 +94,10 @@ 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_test.go b/x/foundation/keeper/internal/abci_test.go
index eb50713944..3691118e47 100644
--- a/x/foundation/keeper/internal/abci_test.go
+++ b/x/foundation/keeper/internal/abci_test.go
@@ -24,12 +24,11 @@ func (s *KeeperTestSuite) TestBeginBlocker() {
s.Run(name, func() {
ctx, _ := s.ctx.CacheContext()
- s.impl.SetParams(ctx, foundation.Params{
- FoundationTax: tc.taxRatio,
- })
-
// collect
testing := func() {
+ s.impl.SetParams(ctx, foundation.Params{
+ FoundationTax: tc.taxRatio,
+ })
internal.BeginBlocker(ctx, s.impl)
}
if !tc.valid {
diff --git a/x/foundation/keeper/internal/grpc_query_test.go b/x/foundation/keeper/internal/grpc_query_test.go
index 3a639a437b..6ec785604c 100644
--- a/x/foundation/keeper/internal/grpc_query_test.go
+++ b/x/foundation/keeper/internal/grpc_query_test.go
@@ -44,6 +44,7 @@ func (s *FoundationTestSuite) SetupTest() {
authtypes.FeeCollectorName,
foundation.DefaultConfig(),
foundation.DefaultAuthority().String(),
+ s.app.GetSubspace(foundation.ModuleName),
)
}
diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go
index 1f5229019c..cbde14b5a3 100644
--- a/x/foundation/keeper/internal/keeper.go
+++ b/x/foundation/keeper/internal/keeper.go
@@ -7,6 +7,7 @@ import (
"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
@@ -35,6 +36,8 @@ type Keeper struct {
//
// Typically, this should be the x/foundation module account.
authority string
+
+ paramSpace paramtypes.Subspace
}
func NewKeeper(
@@ -46,6 +49,7 @@ func NewKeeper(
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")
@@ -56,6 +60,11 @@ func NewKeeper(
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,
@@ -65,6 +74,7 @@ func NewKeeper(
feeCollectorName: feeCollectorName,
config: config,
authority: authority,
+ paramSpace: paramSpace,
}
}
diff --git a/x/foundation/keeper/internal/keeper_test.go b/x/foundation/keeper/internal/keeper_test.go
index 9d40dde352..0d40340d6d 100644
--- a/x/foundation/keeper/internal/keeper_test.go
+++ b/x/foundation/keeper/internal/keeper_test.go
@@ -101,6 +101,7 @@ func (s *KeeperTestSuite) SetupTest() {
authtypes.FeeCollectorName,
foundation.DefaultConfig(),
foundation.DefaultAuthority().String(),
+ app.GetSubspace(foundation.ModuleName),
)
s.queryServer = keeper.NewQueryServer(s.keeper)
@@ -275,7 +276,7 @@ func TestNewKeeper(t *testing.T) {
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())
+ 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 {
diff --git a/x/foundation/keeper/internal/keys.go b/x/foundation/keeper/internal/keys.go
index 77846632bd..c7e098a0e1 100644
--- a/x/foundation/keeper/internal/keys.go
+++ b/x/foundation/keeper/internal/keys.go
@@ -10,7 +10,8 @@ import (
// Keys for foundation store
// Items are stored with the following key: values
var (
- paramsKey = []byte{0x00}
+ // reserved for the future usage (cosmos-sdk v0.47)
+ // paramsKey = []byte{0x00}
foundationInfoKey = []byte{0x01}
memberKeyPrefix = []byte{0x10}
diff --git a/x/foundation/keeper/internal/migrations.go b/x/foundation/keeper/internal/migrations.go
index b42973d7ff..ae5a9fc138 100644
--- a/x/foundation/keeper/internal/migrations.go
+++ b/x/foundation/keeper/internal/migrations.go
@@ -2,6 +2,9 @@ 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.
@@ -14,7 +17,16 @@ func NewMigrator(keeper Keeper) Migrator {
return Migrator{keeper: keeper}
}
-// Migrate1to2 migrates from version 1 to 2.
-func (m Migrator) Migrate1to2(ctx sdk.Context) error {
+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..ef1e1de520
--- /dev/null
+++ b/x/foundation/keeper/internal/migrations/v2/keys.go
@@ -0,0 +1,5 @@
+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..c55cb6d631
--- /dev/null
+++ b/x/foundation/keeper/internal/migrations/v2/store_test.go
@@ -0,0 +1,87 @@
+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
index 91811794bd..c6b7e0c878 100644
--- a/x/foundation/keeper/internal/msg_server.go
+++ b/x/foundation/keeper/internal/msg_server.go
@@ -24,26 +24,6 @@ func NewMsgServer(keeper Keeper) foundation.MsgServer {
var _ foundation.MsgServer = msgServer{}
-func (s msgServer) UpdateParams(c context.Context, req *foundation.MsgUpdateParams) (*foundation.MsgUpdateParamsResponse, error) {
- ctx := sdk.UnwrapSDKContext(c)
-
- if err := s.keeper.validateAuthority(req.Authority); err != nil {
- return nil, err
- }
-
- if err := s.keeper.UpdateParams(ctx, req.Params); err != nil {
- return nil, err
- }
-
- if err := ctx.EventManager().EmitTypedEvent(&foundation.EventUpdateParams{
- Params: req.Params,
- }); err != nil {
- panic(err)
- }
-
- return &foundation.MsgUpdateParamsResponse{}, nil
-}
-
// 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)
diff --git a/x/foundation/keeper/internal/msg_server_test.go b/x/foundation/keeper/internal/msg_server_test.go
index b8176e403b..ed52e3db30 100644
--- a/x/foundation/keeper/internal/msg_server_test.go
+++ b/x/foundation/keeper/internal/msg_server_test.go
@@ -10,64 +10,6 @@ import (
"github.com/Finschia/finschia-sdk/x/foundation"
)
-func (s *KeeperTestSuite) TestMsgUpdateParams() {
- testCases := map[string]struct {
- malleate func(ctx sdk.Context)
- authority sdk.AccAddress
- params foundation.Params
- valid bool
- events sdk.Events
- }{
- "valid request": {
- authority: s.authority,
- params: foundation.DefaultParams(),
- valid: true,
- events: sdk.Events{sdk.Event{Type: "lbm.foundation.v1.EventUpdateParams", Attributes: []abci.EventAttribute{{Key: []uint8{0x70, 0x61, 0x72, 0x61, 0x6d, 0x73}, Value: []uint8{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}, Index: false}}}},
- },
- "invalid authority": {
- authority: s.stranger,
- params: foundation.DefaultParams(),
- },
- "enabling foundation tax": {
- malleate: func(ctx sdk.Context) {
- s.impl.SetParams(ctx, foundation.Params{
- FoundationTax: sdk.ZeroDec(),
- })
- },
- authority: s.authority,
- params: foundation.Params{
- FoundationTax: sdk.OneDec(),
- },
- },
- }
-
- for name, tc := range testCases {
- s.Run(name, func() {
- ctx, _ := s.ctx.CacheContext()
- if tc.malleate != nil {
- tc.malleate(ctx)
- }
-
- req := &foundation.MsgUpdateParams{
- Authority: tc.authority.String(),
- Params: tc.params,
- }
- res, err := s.msgServer.UpdateParams(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) TestMsgFundTreasury() {
testCases := map[string]struct {
amount sdk.Int
diff --git a/x/foundation/keeper/internal/params.go b/x/foundation/keeper/internal/params.go
index 5382e40358..5faad0e826 100644
--- a/x/foundation/keeper/internal/params.go
+++ b/x/foundation/keeper/internal/params.go
@@ -2,39 +2,19 @@ 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) GetParams(ctx sdk.Context) foundation.Params {
- store := ctx.KVStore(k.storeKey)
- key := paramsKey
- bz := store.Get(key)
-
var params foundation.Params
- k.cdc.MustUnmarshal(bz, ¶ms)
+ k.paramSpace.GetParamSet(ctx, ¶ms)
return params
}
-func (k Keeper) UpdateParams(ctx sdk.Context, params foundation.Params) error {
- // not allowed to set the tax, if it has been already disabled
- if k.GetFoundationTax(ctx).IsZero() && !params.FoundationTax.IsZero() {
- return sdkerrors.ErrInvalidRequest.Wrap("foundation tax has been already disabled")
- }
-
- k.SetParams(ctx, params)
-
- return nil
-}
-
func (k Keeper) SetParams(ctx sdk.Context, params foundation.Params) {
- bz := k.cdc.MustMarshal(¶ms)
-
- store := ctx.KVStore(k.storeKey)
- key := paramsKey
- store.Set(key, bz)
+ k.paramSpace.SetParamSet(ctx, ¶ms)
}
// aliases
diff --git a/x/foundation/keeper/internal/params_test.go b/x/foundation/keeper/internal/params_test.go
deleted file mode 100644
index ec5203851a..0000000000
--- a/x/foundation/keeper/internal/params_test.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package internal_test
-
-import (
- sdk "github.com/Finschia/finschia-sdk/types"
- "github.com/Finschia/finschia-sdk/x/foundation"
-)
-
-func (s *KeeperTestSuite) TestUpdateParams() {
- ctx, _ := s.ctx.CacheContext()
-
- s.impl.SetParams(ctx, foundation.Params{
- FoundationTax: sdk.OneDec(),
- })
-
- // test update params
- // 1. remove the features
- // a. foundation tax
- removingParams := foundation.Params{
- FoundationTax: sdk.ZeroDec(),
- }
- s.Require().NoError(removingParams.ValidateBasic())
- err := s.impl.UpdateParams(ctx, removingParams)
- s.Require().NoError(err)
-
- // check params
- s.Require().Equal(removingParams, s.impl.GetParams(ctx))
- s.Require().Equal(removingParams.FoundationTax, s.impl.GetFoundationTax(ctx))
-
- // 2. re-enable the features, which must fail
- // a. foundation tax
- taxParams := foundation.Params{
- FoundationTax: sdk.OneDec(),
- }
- s.Require().NoError(taxParams.ValidateBasic())
- err = s.impl.UpdateParams(ctx, taxParams)
- s.Require().Error(err)
-}
diff --git a/x/foundation/keeper/internal/proposal_test.go b/x/foundation/keeper/internal/proposal_test.go
index 2c53adc9c0..045bb58105 100644
--- a/x/foundation/keeper/internal/proposal_test.go
+++ b/x/foundation/keeper/internal/proposal_test.go
@@ -98,6 +98,7 @@ func TestAbortProposal(t *testing.T) {
authtypes.FeeCollectorName,
foundation.DefaultConfig(),
foundation.DefaultAuthority().String(),
+ app.GetSubspace(foundation.ModuleName),
)
createAddress := func() sdk.AccAddress {
diff --git a/x/foundation/keeper/internal/treasury_test.go b/x/foundation/keeper/internal/treasury_test.go
index b5d7657b28..eed0b332b7 100644
--- a/x/foundation/keeper/internal/treasury_test.go
+++ b/x/foundation/keeper/internal/treasury_test.go
@@ -40,11 +40,6 @@ func (s *KeeperTestSuite) TestCollectFoundationTax() {
tax: sdk.ZeroInt(),
valid: true,
},
- "send fails": {
- fee: fees[0].Amount,
- taxRatio: sdk.MustNewDecFromStr("1.00000001"),
- tax: sdk.NewInt(987654330),
- },
} {
s.Run(name, func() {
ctx, _ := ctx.CacheContext()
diff --git a/x/foundation/keys.go b/x/foundation/keys.go
index 25c7c807e4..65c1e4ee9d 100644
--- a/x/foundation/keys.go
+++ b/x/foundation/keys.go
@@ -12,3 +12,8 @@ const (
TreasuryName = "treasury"
)
+
+// params
+const (
+ ParamKeyFoundationTax = "FoundationTax"
+)
diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go
index 67156fa694..801dfc4901 100644
--- a/x/foundation/module/module.go
+++ b/x/foundation/module/module.go
@@ -20,6 +20,10 @@ import (
"github.com/Finschia/finschia-sdk/x/foundation/keeper"
)
+const (
+ consensusVersion uint64 = 2
+)
+
var (
_ module.AppModule = AppModule{}
_ module.AppModuleBasic = AppModuleBasic{}
@@ -112,6 +116,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd
func (am AppModule) RegisterServices(cfg module.Configurator) {
foundation.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServer(am.keeper))
foundation.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper))
+ keeper.NewMigrator(am.keeper).Register(cfg.RegisterMigration)
}
// InitGenesis performs genesis initialization for the foundation module. It returns
@@ -133,7 +138,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
}
// ConsensusVersion implements AppModule/ConsensusVersion.
-func (AppModule) ConsensusVersion() uint64 { return 1 }
+func (AppModule) ConsensusVersion() uint64 { return consensusVersion }
// BeginBlock performs a no-op.
func (am AppModule) BeginBlock(ctx sdk.Context, _ ocabci.RequestBeginBlock) {
diff --git a/x/foundation/msgs.go b/x/foundation/msgs.go
index 6803e19825..21495bd182 100644
--- a/x/foundation/msgs.go
+++ b/x/foundation/msgs.go
@@ -9,42 +9,6 @@ import (
"github.com/Finschia/finschia-sdk/x/foundation/codec"
)
-var _ sdk.Msg = (*MsgUpdateParams)(nil)
-
-// ValidateBasic implements Msg.
-func (m MsgUpdateParams) ValidateBasic() error {
- if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil {
- return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", m.Authority)
- }
-
- if err := m.Params.ValidateBasic(); err != nil {
- return err
- }
-
- return nil
-}
-
-// 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.
diff --git a/x/foundation/msgs_test.go b/x/foundation/msgs_test.go
index d2020e3a06..fd296701d8 100644
--- a/x/foundation/msgs_test.go
+++ b/x/foundation/msgs_test.go
@@ -14,54 +14,6 @@ import (
"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
- }{
- "valid msg": {
- authority: addrs[0],
- params: foundation.Params{
- FoundationTax: sdk.ZeroDec(),
- },
- valid: true,
- },
- "invalid authority": {
- params: foundation.Params{
- FoundationTax: sdk.ZeroDec(),
- },
- },
- "invalid params": {
- authority: addrs[0],
- params: foundation.Params{},
- },
- }
-
- 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()
- if !tc.valid {
- require.Error(t, err)
- return
- }
- require.NoError(t, err)
-
- require.Equal(t, []sdk.AccAddress{tc.authority}, msg.GetSigners())
- })
- }
-}
-
func TestMsgFundTreasury(t *testing.T) {
addrs := make([]sdk.AccAddress, 1)
for i := range addrs {
@@ -729,13 +681,6 @@ func TestMsgSubmitProposalAminoJSON(t *testing.T) {
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(),
diff --git a/x/foundation/tx.pb.go b/x/foundation/tx.pb.go
index 2366d7fc8b..d3f12becae 100644
--- a/x/foundation/tx.pb.go
+++ b/x/foundation/tx.pb.go
@@ -64,86 +64,6 @@ func (Exec) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5ec2105611cae3ff, []int{0}
}
-// MsgUpdateParams is the Msg/UpdateParams request type.
-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{0}
-}
-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{1}
-}
-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
-
// MsgFundTreasury is the Msg/FundTreasury request type.
type MsgFundTreasury struct {
From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
@@ -154,7 +74,7 @@ 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{2}
+ return fileDescriptor_5ec2105611cae3ff, []int{0}
}
func (m *MsgFundTreasury) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -191,7 +111,7 @@ 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{3}
+ return fileDescriptor_5ec2105611cae3ff, []int{1}
}
func (m *MsgFundTreasuryResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -232,7 +152,7 @@ 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{4}
+ return fileDescriptor_5ec2105611cae3ff, []int{2}
}
func (m *MsgWithdrawFromTreasury) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -269,7 +189,7 @@ func (m *MsgWithdrawFromTreasuryResponse) Reset() { *m = MsgWithdrawFrom
func (m *MsgWithdrawFromTreasuryResponse) String() string { return proto.CompactTextString(m) }
func (*MsgWithdrawFromTreasuryResponse) ProtoMessage() {}
func (*MsgWithdrawFromTreasuryResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{5}
+ return fileDescriptor_5ec2105611cae3ff, []int{3}
}
func (m *MsgWithdrawFromTreasuryResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -311,7 +231,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{4}
}
func (m *MsgUpdateMembers) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -348,7 +268,7 @@ func (m *MsgUpdateMembersResponse) Reset() { *m = MsgUpdateMembersRespon
func (m *MsgUpdateMembersResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateMembersResponse) ProtoMessage() {}
func (*MsgUpdateMembersResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{7}
+ return fileDescriptor_5ec2105611cae3ff, []int{5}
}
func (m *MsgUpdateMembersResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -389,7 +309,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{6}
}
func (m *MsgUpdateDecisionPolicy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -426,7 +346,7 @@ func (m *MsgUpdateDecisionPolicyResponse) Reset() { *m = MsgUpdateDecisi
func (m *MsgUpdateDecisionPolicyResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateDecisionPolicyResponse) ProtoMessage() {}
func (*MsgUpdateDecisionPolicyResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{9}
+ return fileDescriptor_5ec2105611cae3ff, []int{7}
}
func (m *MsgUpdateDecisionPolicyResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -474,7 +394,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{8}
}
func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -513,7 +433,7 @@ func (m *MsgSubmitProposalResponse) Reset() { *m = MsgSubmitProposalResp
func (m *MsgSubmitProposalResponse) String() string { return proto.CompactTextString(m) }
func (*MsgSubmitProposalResponse) ProtoMessage() {}
func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{11}
+ return fileDescriptor_5ec2105611cae3ff, []int{9}
}
func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -554,7 +474,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{10}
}
func (m *MsgWithdrawProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -591,7 +511,7 @@ func (m *MsgWithdrawProposalResponse) Reset() { *m = MsgWithdrawProposal
func (m *MsgWithdrawProposalResponse) String() string { return proto.CompactTextString(m) }
func (*MsgWithdrawProposalResponse) ProtoMessage() {}
func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{13}
+ return fileDescriptor_5ec2105611cae3ff, []int{11}
}
func (m *MsgWithdrawProposalResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -639,7 +559,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{12}
}
func (m *MsgVote) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -676,7 +596,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{13}
}
func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -717,7 +637,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{14}
}
func (m *MsgExec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -754,7 +674,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{15}
}
func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -793,7 +713,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{16}
}
func (m *MsgLeaveFoundation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -830,7 +750,7 @@ func (m *MsgLeaveFoundationResponse) Reset() { *m = MsgLeaveFoundationRe
func (m *MsgLeaveFoundationResponse) String() string { return proto.CompactTextString(m) }
func (*MsgLeaveFoundationResponse) ProtoMessage() {}
func (*MsgLeaveFoundationResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{19}
+ return fileDescriptor_5ec2105611cae3ff, []int{17}
}
func (m *MsgLeaveFoundationResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -871,7 +791,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{18}
}
func (m *MsgUpdateCensorship) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -908,7 +828,7 @@ func (m *MsgUpdateCensorshipResponse) Reset() { *m = MsgUpdateCensorship
func (m *MsgUpdateCensorshipResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateCensorshipResponse) ProtoMessage() {}
func (*MsgUpdateCensorshipResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ec2105611cae3ff, []int{21}
+ return fileDescriptor_5ec2105611cae3ff, []int{19}
}
func (m *MsgUpdateCensorshipResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -950,7 +870,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{20}
}
func (m *MsgGrant) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -987,7 +907,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{21}
}
func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1028,7 +948,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{22}
}
func (m *MsgRevoke) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1065,7 +985,7 @@ 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}
+ return fileDescriptor_5ec2105611cae3ff, []int{23}
}
func (m *MsgRevokeResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1096,8 +1016,6 @@ var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo
func init() {
proto.RegisterEnum("lbm.foundation.v1.Exec", Exec_name, Exec_value)
- proto.RegisterType((*MsgUpdateParams)(nil), "lbm.foundation.v1.MsgUpdateParams")
- proto.RegisterType((*MsgUpdateParamsResponse)(nil), "lbm.foundation.v1.MsgUpdateParamsResponse")
proto.RegisterType((*MsgFundTreasury)(nil), "lbm.foundation.v1.MsgFundTreasury")
proto.RegisterType((*MsgFundTreasuryResponse)(nil), "lbm.foundation.v1.MsgFundTreasuryResponse")
proto.RegisterType((*MsgWithdrawFromTreasury)(nil), "lbm.foundation.v1.MsgWithdrawFromTreasury")
@@ -1127,80 +1045,77 @@ func init() {
func init() { proto.RegisterFile("lbm/foundation/v1/tx.proto", fileDescriptor_5ec2105611cae3ff) }
var fileDescriptor_5ec2105611cae3ff = []byte{
- // 1166 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x73, 0xdb, 0x44,
- 0x14, 0xb6, 0x12, 0xd7, 0x89, 0x5f, 0x13, 0x27, 0xd9, 0x66, 0xa8, 0xa3, 0xb6, 0x8e, 0x51, 0x4b,
- 0x27, 0x93, 0x36, 0x12, 0x09, 0x30, 0x1c, 0x60, 0x86, 0x69, 0xd2, 0x98, 0xc9, 0x4c, 0x4d, 0x83,
- 0x9a, 0xf0, 0xeb, 0x50, 0x8f, 0x6c, 0x6d, 0x64, 0x51, 0x4b, 0x2b, 0xb4, 0xb2, 0x89, 0xe1, 0xc0,
- 0x9d, 0x03, 0xc3, 0x9f, 0xc1, 0x30, 0x1c, 0x38, 0xf4, 0x0e, 0xc7, 0x4c, 0x4f, 0x3d, 0x72, 0xe2,
- 0x47, 0x72, 0xe1, 0xcf, 0x60, 0xb4, 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d, 0x29, 0xfc, 0x78, 0x51, 0x29, 0x9c, 0x5f, 0x54,
+ 0xa4, 0x97, 0x17, 0x15, 0xe9, 0xaf, 0x8b, 0x8a, 0xf4, 0xc3, 0x65, 0xa5, 0xf0, 0xf2, 0xb2, 0x52,
+ 0xf8, 0xfd, 0xb2, 0x52, 0xf8, 0x74, 0xfb, 0x5f, 0x0d, 0xed, 0xe6, 0x0c, 0x9b, 0xfa, 0x6f, 0xfc,
+ 0x13, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x03, 0x03, 0x8d, 0x62, 0x0d, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1215,9 +1130,6 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MsgClient interface {
- // UpdateParams defines an operation for updating the x/foundation module
- // parameters.
- UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// 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.
@@ -1255,15 +1167,6 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient {
return &msgClient{cc}
}
-func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
- out := new(MsgUpdateParamsResponse)
- err := c.cc.Invoke(ctx, "/lbm.foundation.v1.Msg/UpdateParams", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
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...)
@@ -1374,9 +1277,6 @@ func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.Call
// MsgServer is the server API for Msg service.
type MsgServer interface {
- // UpdateParams defines an operation for updating the x/foundation module
- // parameters.
- UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// FundTreasury defines a method to fund the treasury.
FundTreasury(context.Context, *MsgFundTreasury) (*MsgFundTreasuryResponse, error)
// WithdrawFromTreasury defines a method to withdraw coins from the treasury.
@@ -1410,9 +1310,6 @@ type MsgServer interface {
type UnimplementedMsgServer struct {
}
-func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
-}
func (*UnimplementedMsgServer) FundTreasury(ctx context.Context, req *MsgFundTreasury) (*MsgFundTreasuryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FundTreasury not implemented")
}
@@ -1454,24 +1351,6 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
}
-func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MsgUpdateParams)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(MsgServer).UpdateParams(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/lbm.foundation.v1.Msg/UpdateParams",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
- }
- return interceptor(ctx, in, info, handler)
-}
-
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 {
@@ -1692,10 +1571,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "lbm.foundation.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
- {
- MethodName: "UpdateParams",
- Handler: _Msg_UpdateParams_Handler,
- },
{
MethodName: "FundTreasury",
Handler: _Msg_FundTreasury_Handler,
@@ -1749,69 +1624,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
Metadata: "lbm/foundation/v1/tx.proto",
}
-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 *MsgFundTreasury) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -2628,30 +2440,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
-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 *MsgFundTreasury) Size() (n int) {
if m == nil {
return 0
@@ -3003,171 +2791,6 @@ func sovTx(x uint64) (n int) {
func sozTx(x uint64) (n int) {
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
-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 *MsgFundTreasury) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0