diff --git a/app/app.go b/app/app.go index a83973bd..a1c95648 100644 --- a/app/app.go +++ b/app/app.go @@ -58,10 +58,10 @@ import ( v8_1 "github.com/classic-terra/core/v3/app/upgrades/v8_1" v8_2 "github.com/classic-terra/core/v3/app/upgrades/v8_2" v8_3 "github.com/classic-terra/core/v3/app/upgrades/v8_3" - v8_4 "github.com/classic-terra/core/v3/app/upgrades/v8_4" // v9 had been used by tax2gas and has to be skipped v10 "github.com/classic-terra/core/v3/app/upgrades/v10" + v10_1 "github.com/classic-terra/core/v3/app/upgrades/v10_1" customante "github.com/classic-terra/core/v3/custom/auth/ante" custompost "github.com/classic-terra/core/v3/custom/auth/post" @@ -95,7 +95,7 @@ var ( v8_1.Upgrade, v8_2.Upgrade, v8_3.Upgrade, - v8_4.Upgrade, + v10_1.Upgrade, v10.Upgrade, } diff --git a/app/upgrades/v8_4/constants.go b/app/upgrades/v10_1/constants.go similarity index 62% rename from app/upgrades/v8_4/constants.go rename to app/upgrades/v10_1/constants.go index 980f6fef..60e40cc7 100644 --- a/app/upgrades/v8_4/constants.go +++ b/app/upgrades/v10_1/constants.go @@ -1,13 +1,13 @@ //nolint:revive -package v8_4 +package v10_1 import ( "github.com/classic-terra/core/v3/app/upgrades" ) -const UpgradeName = "v8_4" +const UpgradeName = "v10_1" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, - CreateUpgradeHandler: CreateV84UpgradeHandler, + CreateUpgradeHandler: CreateV101UpgradeHandler, } diff --git a/app/upgrades/v8_4/upgrades.go b/app/upgrades/v10_1/upgrades.go similarity index 92% rename from app/upgrades/v8_4/upgrades.go rename to app/upgrades/v10_1/upgrades.go index bc7d162a..e4163131 100644 --- a/app/upgrades/v8_4/upgrades.go +++ b/app/upgrades/v10_1/upgrades.go @@ -1,5 +1,5 @@ //nolint:revive -package v8_4 +package v10_1 import ( "github.com/classic-terra/core/v3/app/keepers" @@ -9,7 +9,7 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) -func CreateV84UpgradeHandler( +func CreateV101UpgradeHandler( mm *module.Manager, cfg module.Configurator, _ upgrades.BaseAppParamManager, diff --git a/cmd/terrad/testnet.go b/cmd/terrad/testnet.go index f8e7d6b5..3d6f9201 100644 --- a/cmd/terrad/testnet.go +++ b/cmd/terrad/testnet.go @@ -11,7 +11,7 @@ import ( "path/filepath" "time" - govv2lunc1 "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + govv2custom "github.com/classic-terra/core/v3/custom/gov/types/v2custom" tmconfig "github.com/cometbft/cometbft/config" tmos "github.com/cometbft/cometbft/libs/os" tmrand "github.com/cometbft/cometbft/libs/rand" @@ -309,7 +309,7 @@ func initGenFiles( appGenState[banktypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&bankGenState) // set gov in the genesis state - var govGenState govv2lunc1.GenesisState + var govGenState govv2custom.GenesisState clientCtx.Codec.MustUnmarshalJSON(appGenState[govtypes.ModuleName], &govGenState) votingPeriod := time.Minute * 3 govGenState.Params.VotingPeriod = &votingPeriod diff --git a/custom/auth/ante/min_initial_deposit.go b/custom/auth/ante/min_initial_deposit.go index cdf27825..7b32902f 100644 --- a/custom/auth/ante/min_initial_deposit.go +++ b/custom/auth/ante/min_initial_deposit.go @@ -50,10 +50,10 @@ func HandleCheckMinInitialDeposit(ctx sdk.Context, msg sdk.Msg, govKeeper custom } // set offset price change 3% offsetPrice := sdk.NewDecWithPrec(97, 2) - minLuncAmount, err := govKeeper.GetMinimumDepositBaseUusd(ctx) + minUlunaAmount, err := govKeeper.GetMinimumDepositBaseUstc(ctx) minInitialDepositRatio := treasuryKeeper.GetMinInitialDepositRatio(ctx) - if err == nil && minLuncAmount.GT(sdk.ZeroInt()) { - requiredDeposit := sdk.NewDecFromInt(minLuncAmount).Mul(minInitialDepositRatio).Mul(offsetPrice).TruncateInt() + if err == nil && minUlunaAmount.GT(sdk.ZeroInt()) { + requiredDeposit := sdk.NewDecFromInt(minUlunaAmount).Mul(minInitialDepositRatio).Mul(offsetPrice).TruncateInt() requiredDepositCoins := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, requiredDeposit)) if initialDepositCoins.IsAllLT(requiredDepositCoins) { return fmt.Errorf("not enough initial deposit provided. Expected %q; got %q", requiredDepositCoins, initialDepositCoins) diff --git a/custom/auth/ante/min_initial_deposit_test.go b/custom/auth/ante/min_initial_deposit_test.go index 6810cfcd..f4ad0e46 100644 --- a/custom/auth/ante/min_initial_deposit_test.go +++ b/custom/auth/ante/min_initial_deposit_test.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/classic-terra/core/v3/custom/auth/ante" - govv2lunc1 "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + govv2custom "github.com/classic-terra/core/v3/custom/gov/types/v2custom" core "github.com/classic-terra/core/v3/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -25,13 +25,13 @@ func (suite *AnteTestSuite) TestMinInitialDepositRatioDefault() { suite.app.OracleKeeper.SetLunaExchangeRate(suite.ctx, core.MicroUSDDenom, lunaPriceInUSD) // set required deposit to uluna - suite.app.GovKeeper.SetParams(suite.ctx, govv2lunc1.DefaultParams()) + suite.app.GovKeeper.SetParams(suite.ctx, govv2custom.DefaultParams()) govparams := suite.app.GovKeeper.GetParams(suite.ctx) govparams.MinUusdDeposit = sdk.NewCoin(core.MicroUSDDenom, sdk.NewInt(500_000_000)) suite.app.GovKeeper.SetParams(suite.ctx, govparams) - price, _ := suite.app.GovKeeper.GetMinimumDepositBaseUusd(suite.ctx) - fmt.Printf("\n GetMinimumDepositBaseUusd %s", price.String()) + price, _ := suite.app.GovKeeper.GetMinimumDepositBaseUstc(suite.ctx) + fmt.Printf("\n GetMinimumDepositBaseUstc %s", price.String()) // set initial deposit ratio to 0.0 ratio := sdk.ZeroDec() @@ -85,13 +85,13 @@ func (suite *AnteTestSuite) TestMinInitialDepositRatioWithSufficientDeposit() { suite.app.OracleKeeper.SetLunaExchangeRate(suite.ctx, core.MicroUSDDenom, lunaPriceInUSD) // set required deposit to uluna - suite.app.GovKeeper.SetParams(suite.ctx, govv2lunc1.DefaultParams()) + suite.app.GovKeeper.SetParams(suite.ctx, govv2custom.DefaultParams()) govparams := suite.app.GovKeeper.GetParams(suite.ctx) govparams.MinUusdDeposit = sdk.NewCoin(core.MicroUSDDenom, sdk.NewInt(500_000_000)) suite.app.GovKeeper.SetParams(suite.ctx, govparams) - price, _ := suite.app.GovKeeper.GetMinimumDepositBaseUusd(suite.ctx) - fmt.Printf("\n GetMinimumDepositBaseUusd %s", price.String()) + price, _ := suite.app.GovKeeper.GetMinimumDepositBaseUstc(suite.ctx) + fmt.Printf("\n GetMinimumDepositBaseUstc %s", price.String()) // set initial deposit ratio to 0.2 ratio := sdk.NewDecWithPrec(2, 1) @@ -151,13 +151,13 @@ func (suite *AnteTestSuite) TestMinInitialDepositRatioWithInsufficientDeposit() suite.app.OracleKeeper.SetLunaExchangeRate(suite.ctx, core.MicroUSDDenom, lunaPriceInUSD) // set required deposit to uluna - suite.app.GovKeeper.SetParams(suite.ctx, govv2lunc1.DefaultParams()) + suite.app.GovKeeper.SetParams(suite.ctx, govv2custom.DefaultParams()) govparams := suite.app.GovKeeper.GetParams(suite.ctx) govparams.MinUusdDeposit = sdk.NewCoin(core.MicroUSDDenom, sdk.NewInt(500_000_000)) suite.app.GovKeeper.SetParams(suite.ctx, govparams) - price, _ := suite.app.GovKeeper.GetMinimumDepositBaseUusd(suite.ctx) - fmt.Printf("\n GetMinimumDepositBaseUusd %s", price.String()) + price, _ := suite.app.GovKeeper.GetMinimumDepositBaseUstc(suite.ctx) + fmt.Printf("\n GetMinimumDepositBaseUstc %s", price.String()) // set initial deposit ratio to 0.2 ratio := sdk.NewDecWithPrec(2, 1) diff --git a/custom/distribution/types/codec.go b/custom/distribution/types/codec.go index 0e2e8ba5..7fe9dfcf 100644 --- a/custom/distribution/types/codec.go +++ b/custom/distribution/types/codec.go @@ -6,7 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + govtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" ) // RegisterLegacyAminoCodec registers the necessary x/distribution interfaces and concrete types diff --git a/custom/gov/README.md b/custom/gov/README.md index b56a5922..e1cdda5f 100644 --- a/custom/gov/README.md +++ b/custom/gov/README.md @@ -33,24 +33,24 @@ module uses the `MsgServiceRouter` to check that these messages are correctly co and have a respective path to execute on but do not perform a full validity check. ### Deposit -To prevent spam, proposals must be submitted with a deposit in the coins defined by the equation `luncMinDepositAmountBasedOnUusd` = `MinUusdDeposit` / real-time price of LUNC at the time of proposal submission. +To prevent spam, proposals must be submitted with a deposit in the coins defined by the equation `luncMinDepositAmountBasedOnUstc` = `MinUusdDeposit` / real-time price of LUNC at the time of proposal submission. ```keeper reference github.com/classic-terra/core/v3/custom/gov/keeper/proposal.go#L136-L149 ``` -The value of `luncMinDepositAmountBasedOnUusd` will be stored in KVStores, using a key defined as `UUSDMinKeyPrefix|proposalID`, where the proposal ID is appended to the prefix, represented as a single byte. +The value of `luncMinDepositAmountBasedOnUstc` will be stored in KVStores, using a key defined as `USTCMinKeyPrefix|proposalID`, where the proposal ID is appended to the prefix, represented as a single byte. ```types reference github.com/classic-terra/core/v3/custom/gov/types/keys.go#L20-L22 ``` When a proposal is submitted, it has to be accompanied with a deposit that must be -strictly positive, but can be inferior to `luncMinDepositAmountBasedOnUusd`. The submitter doesn't need +strictly positive, but can be inferior to `luncMinDepositAmountBasedOnUstc`. The submitter doesn't need to pay for the entire deposit on their own. The newly created proposal is stored in -an *inactive proposal queue* and stays there until its deposit passes the `luncMinDepositAmountBasedOnUusd`. +an *inactive proposal queue* and stays there until its deposit passes the `luncMinDepositAmountBasedOnUstc`. Other token holders can increase the proposal's deposit by sending a `Deposit` -transaction. If a proposal doesn't pass the `luncMinDepositAmountBasedOnUusd` before the deposit end time +transaction. If a proposal doesn't pass the `luncMinDepositAmountBasedOnUstc` before the deposit end time (the time when deposits are no longer accepted), the proposal will be destroyed: the proposal will be removed from state and the deposit will be burned (see x/gov `EndBlocker`). -When a proposal deposit passes the `luncMinDepositAmountBasedOnUusd` threshold (even during the proposal +When a proposal deposit passes the `luncMinDepositAmountBasedOnUstc` threshold (even during the proposal submission) before the deposit end time, the proposal will be moved into the *active proposal queue* and the voting period will begin. @@ -73,7 +73,7 @@ according to the final tally of the proposal: #### Voting period -Once a proposal reaches `luncMinDepositAmountBasedOnUusd`, it immediately enters `Voting period`. We +Once a proposal reaches `luncMinDepositAmountBasedOnUstc`, it immediately enters `Voting period`. We define `Voting period` as the interval between the moment the vote opens and the moment the vote closes. `Voting period` should always be shorter than `Unbonding period` to prevent double voting. The initial value of @@ -94,7 +94,7 @@ We will use one KVStore `Governance` to store five mappings: x/gov params. * A mapping from `VotingPeriodProposalKeyPrefix|proposalID` to a single byte. This allows us to know if a proposal is in the voting period or not with very low gas cost. -* A mapping from `UUSDMinKeyPrefix|proposalID` to a single byte. This allows us to determine the minimum amount of LUNC that a specific proposal must deposit to pass the deposit phase. +* A mapping from `USTCMinKeyPrefix|proposalID` to a single byte. This allows us to determine the minimum amount of LUNC that a specific proposal must deposit to pass the deposit phase. For pseudocode purposes, here are the two function we will use to read or write in stores: @@ -128,7 +128,7 @@ A user can query and interact with the `gov` module using the CLI. We have added two new commands ##### MinimalDeposit -The `MinimalDeposit` command enables users to query the minimum LUNC deposit required for a specific proposal, calculated based on the UUSD value. +The `MinimalDeposit` command enables users to query the minimum LUNC deposit required for a specific proposal, calculated based on the USTC value. ```bash diff --git a/custom/gov/client/cli/query.go b/custom/gov/client/cli/query.go index 0b4c1ea5..4dd81fc4 100644 --- a/custom/gov/client/cli/query.go +++ b/custom/gov/client/cli/query.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" - v2lunc1types "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + v2customtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" @@ -65,7 +65,7 @@ $ %s query gov min-deposit 1 if err != nil { return err } - queryClient := v2lunc1types.NewQueryClient(clientCtx) + queryClient := v2customtypes.NewQueryClient(clientCtx) // validate that the proposal id is a uint proposalID, err := strconv.ParseUint(args[0], 10, 64) @@ -74,9 +74,9 @@ $ %s query gov min-deposit 1 } // Query the proposal - res, err := queryClient.ProposalMinimalLUNCByUusd( + res, err := queryClient.ProposalMinimalLUNCByUstc( cmd.Context(), - &v2lunc1types.QueryProposalRequest{ProposalId: proposalID}, + &v2customtypes.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { return err @@ -102,11 +102,11 @@ func GetCmdQueryCustomParams() *cobra.Command { if err != nil { return err } - queryClient := v2lunc1types.NewQueryClient(clientCtx) + queryClient := v2customtypes.NewQueryClient(clientCtx) // Query the proposal res, err := queryClient.Params( cmd.Context(), - &v2lunc1types.QueryParamsRequest{}, + &v2customtypes.QueryParamsRequest{}, ) if err != nil { return err diff --git a/custom/gov/client/cli/query_test.go b/custom/gov/client/cli/query_test.go index fefe9155..4b29d904 100644 --- a/custom/gov/client/cli/query_test.go +++ b/custom/gov/client/cli/query_test.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - v2lunc1cli "github.com/classic-terra/core/v3/custom/gov/client/cli" + v2customcli "github.com/classic-terra/core/v3/custom/gov/client/cli" ) func (s *CLITestSuite) TestGetCmdQueryMinimalDeposit() { @@ -33,7 +33,7 @@ func (s *CLITestSuite) TestGetCmdQueryMinimalDeposit() { tc := tc s.Run(tc.name, func() { - cmd := v2lunc1cli.GetCmdQueryMinimalDeposit() + cmd := v2customcli.GetCmdQueryMinimalDeposit() cmd.SetArgs(tc.args) s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) }) diff --git a/custom/gov/genesis.go b/custom/gov/genesis.go index e0f5d1ca..0d4808bf 100644 --- a/custom/gov/genesis.go +++ b/custom/gov/genesis.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/classic-terra/core/v3/custom/gov/keeper" - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -12,7 +12,7 @@ import ( ) // InitGenesis - store genesis parameters -func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v2lunc1.GenesisState) { +func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v2custom.GenesisState) { k.SetProposalID(ctx, data.StartingProposalId) k.SetParams(ctx, *data.Params) @@ -55,7 +55,7 @@ func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k } // ExportGenesis - output genesis parameters -func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v2lunc1.GenesisState { +func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v2custom.GenesisState { startingProposalID, _ := k.GetProposalID(ctx) proposals := k.GetProposals(ctx) params := k.GetParams(ctx) @@ -70,7 +70,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v2lunc1.GenesisState { proposalsVotes = append(proposalsVotes, votes...) } - return &v2lunc1.GenesisState{ + return &v2custom.GenesisState{ StartingProposalId: startingProposalID, Deposits: proposalsDeposits, Votes: proposalsVotes, diff --git a/custom/gov/keeper/deposit.go b/custom/gov/keeper/deposit.go index 39a79e45..8920de70 100644 --- a/custom/gov/keeper/deposit.go +++ b/custom/gov/keeper/deposit.go @@ -38,7 +38,7 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd // HandleCheckLimitDeposit minDeposit := keeper.GetParams(ctx).MinDeposit - requiredAmount := keeper.GetDepositLimitBaseUusd(ctx, proposalID) + requiredAmount := keeper.GetDepositLimitBaseUstc(ctx, proposalID) if requiredAmount.IsZero() { requiredAmount = minDeposit[0].Amount } @@ -93,7 +93,7 @@ func (keeper Keeper) validateInitialDeposit(ctx sdk.Context, initialDeposit sdk. if minInitialDepositRatio.IsZero() { return nil } - totalLuncDeposit, err := keeper.GetMinimumDepositBaseUusd(ctx) + totalLuncDeposit, err := keeper.GetMinimumDepositBaseUstc(ctx) luncCoin := sdk.NewCoin(params.MinDeposit[0].Denom, totalLuncDeposit) minDepositCoins := params.MinDeposit minDepositCoins[0] = luncCoin diff --git a/custom/gov/keeper/deposit_test.go b/custom/gov/keeper/deposit_test.go index 79663a74..1d1e4a30 100644 --- a/custom/gov/keeper/deposit_test.go +++ b/custom/gov/keeper/deposit_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" core "github.com/classic-terra/core/v3/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/stretchr/testify/require" @@ -156,11 +156,11 @@ func TestValidateInitialDeposit(t *testing.T) { govKeeper := input.GovKeeper ctx := input.Ctx input.OracleKeeper.SetLunaExchangeRate(ctx, core.MicroUSDDenom, sdk.NewDec(1)) - minLuncDeposit, err := input.GovKeeper.GetMinimumDepositBaseUusd(ctx) + minUlunaAmount, err := input.GovKeeper.GetMinimumDepositBaseUstc(ctx) require.NoError(t, err) // setup deposit value when test - meetsDepositValue := minLuncDeposit.Mul(sdk.NewInt(baseDepositTestPercent)).Quo(sdk.NewInt(100)) + meetsDepositValue := minUlunaAmount.Mul(sdk.NewInt(baseDepositTestPercent)).Quo(sdk.NewInt(100)) testcases := map[string]struct { minDeposit sdk.Coins @@ -189,12 +189,12 @@ func TestValidateInitialDeposit(t *testing.T) { "min deposit * initial percent == initial deposit (non-base values and denom): success": { minDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(56912))), minInitialDepositPercent: 50, - initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, minLuncDeposit.Mul(sdk.NewInt(50)).Quo(sdk.NewInt(100)).Add(sdk.NewInt(10)))), + initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, minUlunaAmount.Mul(sdk.NewInt(50)).Quo(sdk.NewInt(100)).Add(sdk.NewInt(10)))), }, "min deposit * initial percent == initial deposit but different denoms: error": { minDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseUSDDepositTestAmount))), minInitialDepositPercent: baseDepositTestPercent, - initialDeposit: sdk.NewCoins(sdk.NewCoin("uosmo", minLuncDeposit)), + initialDeposit: sdk.NewCoins(sdk.NewCoin("uosmo", minUlunaAmount)), expectError: true, }, "min deposit * initial percent == initial deposit (multiple coins): success": { @@ -203,7 +203,7 @@ func TestValidateInitialDeposit(t *testing.T) { sdk.NewCoin("uosmo", sdk.NewInt(baseUSDDepositTestAmount*2))), minInitialDepositPercent: baseDepositTestPercent, initialDeposit: sdk.NewCoins( - sdk.NewCoin(sdk.DefaultBondDenom, minLuncDeposit), + sdk.NewCoin(sdk.DefaultBondDenom, minUlunaAmount), sdk.NewCoin("uosmo", sdk.NewInt(baseUSDDepositTestAmount*2*baseDepositTestPercent/100)), ), }, @@ -213,7 +213,7 @@ func TestValidateInitialDeposit(t *testing.T) { sdk.NewCoin("uosmo", sdk.NewInt(baseUSDDepositTestAmount*3))), minInitialDepositPercent: baseDepositTestPercent, initialDeposit: sdk.NewCoins( - sdk.NewCoin(sdk.DefaultBondDenom, minLuncDeposit), + sdk.NewCoin(sdk.DefaultBondDenom, minUlunaAmount), sdk.NewCoin("uosmo", sdk.NewInt(baseUSDDepositTestAmount*2*baseDepositTestPercent/100-1)), ), @@ -224,20 +224,20 @@ func TestValidateInitialDeposit(t *testing.T) { sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseUSDDepositTestAmount))), minInitialDepositPercent: baseDepositTestPercent, initialDeposit: sdk.NewCoins( - sdk.NewCoin(sdk.DefaultBondDenom, minLuncDeposit), + sdk.NewCoin(sdk.DefaultBondDenom, minUlunaAmount), sdk.NewCoin("uosmo", sdk.NewInt(baseUSDDepositTestAmount*baseDepositTestPercent/100-1)), ), }, "0 initial percent: success": { minDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseUSDDepositTestAmount))), minInitialDepositPercent: 0, - initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, minLuncDeposit)), + initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, minUlunaAmount)), }, } for name, tc := range testcases { t.Run(name, func(t *testing.T) { - params := v2lunc1.DefaultParams() + params := v2custom.DefaultParams() params.MinDeposit = tc.minDeposit params.MinInitialDepositRatio = sdk.NewDec(tc.minInitialDepositPercent).Quo(sdk.NewDec(100)).String() govKeeper.SetParams(ctx, params) diff --git a/custom/gov/keeper/grpc_query.go b/custom/gov/keeper/grpc_query.go index 2a80bad4..75663f64 100644 --- a/custom/gov/keeper/grpc_query.go +++ b/custom/gov/keeper/grpc_query.go @@ -3,16 +3,16 @@ package keeper import ( "context" - v2lunc1 "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + v2custom "github.com/classic-terra/core/v3/custom/gov/types/v2custom" core "github.com/classic-terra/core/v3/types" sdk "github.com/cosmos/cosmos-sdk/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) -var _ v2lunc1.QueryServer = queryServer{} +var _ v2custom.QueryServer = queryServer{} -func NewQueryServerImpl(k Keeper) v2lunc1.QueryServer { +func NewQueryServerImpl(k Keeper) v2custom.QueryServer { return queryServer{ k: k, govQueryServer: govkeeper.NewLegacyQueryServer(k.Keeper), @@ -25,17 +25,17 @@ type queryServer struct { } // Params returns params of the mint module. -func (q queryServer) Params(ctx context.Context, _ *v2lunc1.QueryParamsRequest) (*v2lunc1.QueryParamsResponse, error) { +func (q queryServer) Params(ctx context.Context, _ *v2custom.QueryParamsRequest) (*v2custom.QueryParamsResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) params := q.k.GetParams(sdkCtx) - return &v2lunc1.QueryParamsResponse{Params: params}, nil + return &v2custom.QueryParamsResponse{Params: params}, nil } -// ProposalMinimalLUNCByUusd returns min Usd amount proposal needs to deposit -func (q queryServer) ProposalMinimalLUNCByUusd(ctx context.Context, req *v2lunc1.QueryProposalRequest) (*v2lunc1.QueryMinimalDepositProposalResponse, error) { +// ProposalMinimalLUNCByUstc returns min Usd amount proposal needs to deposit +func (q queryServer) ProposalMinimalLUNCByUstc(ctx context.Context, req *v2custom.QueryProposalRequest) (*v2custom.QueryMinimalDepositProposalResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) - depositAmount := q.k.GetDepositLimitBaseUusd(sdkCtx, req.ProposalId) + depositAmount := q.k.GetDepositLimitBaseUstc(sdkCtx, req.ProposalId) coin := sdk.NewCoin(core.MicroLunaDenom, depositAmount) // if no min deposit amount by uusd exists, return default min deposit amount @@ -43,5 +43,5 @@ func (q queryServer) ProposalMinimalLUNCByUusd(ctx context.Context, req *v2lunc1 coin = q.k.GetParams(sdkCtx).MinDeposit[0] } - return &v2lunc1.QueryMinimalDepositProposalResponse{MinimalDeposit: coin}, nil + return &v2custom.QueryMinimalDepositProposalResponse{MinimalDeposit: coin}, nil } diff --git a/custom/gov/keeper/grpc_query_test.go b/custom/gov/keeper/grpc_query_test.go index 9812c36e..7a97816d 100644 --- a/custom/gov/keeper/grpc_query_test.go +++ b/custom/gov/keeper/grpc_query_test.go @@ -5,20 +5,20 @@ import ( "fmt" "testing" - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" // Adjust the import path as necessary + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" // Adjust the import path as necessary sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) -// MockQueryServer is a mock implementation of the v2lunc1.QueryServer interface +// MockQueryServer is a mock implementation of the v2custom.QueryServer interface type MockQueryServer struct { // You can store any state needed for the mock here - ProposalResponse *v2lunc1.QueryMinimalDepositProposalResponse + ProposalResponse *v2custom.QueryMinimalDepositProposalResponse Err error } -// ProposalMinimalLUNCByUusd implements the v2lunc1.QueryServer interface -func (m *MockQueryServer) ProposalMinimalLUNCByUusd(_ context.Context, _ *v2lunc1.QueryProposalRequest) (*v2lunc1.QueryMinimalDepositProposalResponse, error) { +// ProposalMinimalLUNCByUstc implements the v2custom.QueryServer interface +func (m *MockQueryServer) ProposalMinimalLUNCByUstc(_ context.Context, _ *v2custom.QueryProposalRequest) (*v2custom.QueryMinimalDepositProposalResponse, error) { if m.Err != nil { return nil, m.Err } @@ -28,7 +28,7 @@ func (m *MockQueryServer) ProposalMinimalLUNCByUusd(_ context.Context, _ *v2lunc // Test your keeper logic with the mock func TestKeeperWithMockQueryServer(t *testing.T) { mockQueryServer := &MockQueryServer{ - ProposalResponse: &v2lunc1.QueryMinimalDepositProposalResponse{ + ProposalResponse: &v2custom.QueryMinimalDepositProposalResponse{ // MinimalDeposit: sdk.Coin{sdk.NewCoin("uusd", sdk.NewInt(1000))}, MinimalDeposit: sdk.NewCoin("uusd", sdk.NewInt(1000)), }, @@ -37,8 +37,8 @@ func TestKeeperWithMockQueryServer(t *testing.T) { // Create your context and other setup logic as needed t.Run("successful query", func(t *testing.T) { - req := &v2lunc1.QueryProposalRequest{ProposalId: 1} - res, err := mockQueryServer.ProposalMinimalLUNCByUusd(context.Background(), req) + req := &v2custom.QueryProposalRequest{ProposalId: 1} + res, err := mockQueryServer.ProposalMinimalLUNCByUstc(context.Background(), req) require.NoError(t, err) require.NotNil(t, res) require.Equal(t, sdk.NewInt(1000), res.MinimalDeposit.Amount) @@ -46,8 +46,8 @@ func TestKeeperWithMockQueryServer(t *testing.T) { t.Run("error when querying proposal", func(t *testing.T) { mockQueryServer.Err = fmt.Errorf("proposal not found") - req := &v2lunc1.QueryProposalRequest{ProposalId: 1} - _, err := mockQueryServer.ProposalMinimalLUNCByUusd(context.Background(), req) + req := &v2custom.QueryProposalRequest{ProposalId: 1} + _, err := mockQueryServer.ProposalMinimalLUNCByUstc(context.Background(), req) require.Error(t, err) require.Equal(t, "proposal not found", err.Error()) }) diff --git a/custom/gov/keeper/keeper.go b/custom/gov/keeper/keeper.go index 2b88454f..05fa4245 100644 --- a/custom/gov/keeper/keeper.go +++ b/custom/gov/keeper/keeper.go @@ -2,7 +2,7 @@ package keeper import ( "cosmossdk.io/math" - v2lunc1types "github.com/classic-terra/core/v3/custom/gov/types" + v2customtypes "github.com/classic-terra/core/v3/custom/gov/types" core "github.com/classic-terra/core/v3/types" markettypes "github.com/classic-terra/core/v3/x/market/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -80,10 +80,10 @@ func (keeper *Keeper) SetHooks(gh types.GovHooks) *Keeper { return keeper } -// SetDepositLimitBaseUusd sets a limit deposit(Lunc) base on Uusd to store. -func (keeper Keeper) SetDepositLimitBaseUusd(ctx sdk.Context, proposalID uint64, amount math.Int) error { +// SetDepositLimitBaseUstc sets a limit deposit(Lunc) base on Ustc to store. +func (keeper Keeper) SetDepositLimitBaseUstc(ctx sdk.Context, proposalID uint64, amount math.Int) error { store := ctx.KVStore(keeper.storeKey) - key := v2lunc1types.TotalDepositKey(proposalID) + key := v2customtypes.TotalDepositKey(proposalID) bz, err := amount.Marshal() if err == nil { store.Set(key, bz) @@ -91,8 +91,8 @@ func (keeper Keeper) SetDepositLimitBaseUusd(ctx sdk.Context, proposalID uint64, return err } -// GetDepositLimitBaseUusd: calculate the minimum LUNC amount to deposit base on Uusd for the proposal -func (keeper Keeper) GetMinimumDepositBaseUusd(ctx sdk.Context) (math.Int, error) { +// GetDepositLimitBaseUstc: calculate the minimum LUNC amount to deposit base on Ustc for the proposal +func (keeper Keeper) GetMinimumDepositBaseUstc(ctx sdk.Context) (math.Int, error) { // Get exchange rate betweent Lunc/uusd from oracle // save it to store price, err := keeper.oracleKeeper.GetLunaExchangeRate(ctx, core.MicroUSDDenom) @@ -101,16 +101,16 @@ func (keeper Keeper) GetMinimumDepositBaseUusd(ctx sdk.Context) (math.Int, error return keeper.GetParams(ctx).MinDeposit[0].Amount, nil } - minUusdDeposit := keeper.GetParams(ctx).MinUusdDeposit - totalLuncDeposit := sdk.NewDecFromInt(minUusdDeposit.Amount).Quo(price).TruncateInt() + MinUusdDeposit := keeper.GetParams(ctx).MinUusdDeposit + totalUlunaDeposit := sdk.NewDecFromInt(MinUusdDeposit.Amount).Quo(price).TruncateInt() - return totalLuncDeposit, nil + return totalUlunaDeposit, nil } -// GetDepositLimitBaseUUSD gets the deposit limit (Lunc) for a specific proposal -func (keeper Keeper) GetDepositLimitBaseUusd(ctx sdk.Context, proposalID uint64) (depositLimit math.Int) { +// GetDepositLimitBaseUstc gets the deposit limit (Lunc) for a specific proposal +func (keeper Keeper) GetDepositLimitBaseUstc(ctx sdk.Context, proposalID uint64) (depositLimit math.Int) { store := ctx.KVStore(keeper.storeKey) - key := v2lunc1types.TotalDepositKey(proposalID) + key := v2customtypes.TotalDepositKey(proposalID) bz := store.Get(key) if bz == nil { return sdk.ZeroInt() diff --git a/custom/gov/keeper/msg_server.go b/custom/gov/keeper/msg_server.go index ac9435ac..ad6601da 100644 --- a/custom/gov/keeper/msg_server.go +++ b/custom/gov/keeper/msg_server.go @@ -5,7 +5,7 @@ import ( "fmt" "cosmossdk.io/errors" - v2lunc1 "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + v2custom "github.com/classic-terra/core/v3/custom/gov/types/v2custom" sdk "github.com/cosmos/cosmos-sdk/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -20,14 +20,14 @@ type msgServer struct { // NewMsgServerImpl returns an implementation of the gov MsgServer interface // for the provided Keeper. -func NewMsgServerImpl(keeper *Keeper) v2lunc1.MsgServer { +func NewMsgServerImpl(keeper *Keeper) v2custom.MsgServer { return &msgServer{ Keeper: keeper, v1MsgServer: govkeeper.NewMsgServerImpl(keeper.Keeper), } } -var _ v2lunc1.MsgServer = msgServer{} +var _ v2custom.MsgServer = msgServer{} // SubmitProposal implements the MsgServer.SubmitProposal method. func (k msgServer) SubmitProposal(goCtx context.Context, msg *govv1.MsgSubmitProposal) (*govv1.MsgSubmitProposalResponse, error) { @@ -119,7 +119,7 @@ func (k msgServer) VoteWeighted(goCtx context.Context, msg *govv1.MsgVoteWeighte return k.v1MsgServer.VoteWeighted(goCtx, msg) } -func (k msgServer) UpdateParams(goCtx context.Context, msg *v2lunc1.MsgUpdateParams) (*v2lunc1.MsgUpdateParamsResponse, error) { +func (k msgServer) UpdateParams(goCtx context.Context, msg *v2custom.MsgUpdateParams) (*v2custom.MsgUpdateParamsResponse, error) { if k.authority != msg.Authority { return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) } @@ -129,18 +129,18 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *v2lunc1.MsgUpdatePar return nil, err } - return &v2lunc1.MsgUpdateParamsResponse{}, nil + return &v2custom.MsgUpdateParamsResponse{}, nil } type legacyMsgServer struct { govAcct string - server v2lunc1.MsgServer + server v2custom.MsgServer } // NewLegacyMsgServerImpl returns an implementation of the v1beta1 legacy MsgServer interface. It wraps around // the current MsgServer -func NewLegacyMsgServerImpl(govAcct string, v2lunc1Server v2lunc1.MsgServer) govv1beta1.MsgServer { - return &legacyMsgServer{govAcct: govAcct, server: v2lunc1Server} +func NewLegacyMsgServerImpl(govAcct string, v2customServer v2custom.MsgServer) govv1beta1.MsgServer { + return &legacyMsgServer{govAcct: govAcct, server: v2customServer} } var _ govv1beta1.MsgServer = legacyMsgServer{} diff --git a/custom/gov/keeper/msg_server_test.go b/custom/gov/keeper/msg_server_test.go index 66588ac7..786ea6e8 100644 --- a/custom/gov/keeper/msg_server_test.go +++ b/custom/gov/keeper/msg_server_test.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - v2lunc1types "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + v2customtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" core "github.com/classic-terra/core/v3/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -193,7 +193,7 @@ func TestVoteReq(t *testing.T) { require.NoError(t, err) require.NotNil(t, res.ProposalId) proposalID := res.ProposalId - requiredAmount := govKeeper.GetDepositLimitBaseUusd(ctx, proposalID) + requiredAmount := govKeeper.GetDepositLimitBaseUstc(ctx, proposalID) cases := map[string]struct { preRun func() uint64 @@ -337,7 +337,7 @@ func TestVoteWeightedReq(t *testing.T) { require.NoError(t, err) require.NotNil(t, res.ProposalId) proposalID := res.ProposalId - // requiredAmount := suite.govKeeper.GetDepositLimitBaseUusd(suite.ctx, proposalId).TruncateInt() + // requiredAmount := suite.govKeeper.GetDepositLimitBaseUstc(suite.ctx, proposalId).TruncateInt() cases := map[string]struct { preRun func() uint64 @@ -536,18 +536,18 @@ func TestMsgUpdateParams(t *testing.T) { ctx := input.Ctx govKeeper := input.GovKeeper authority := govKeeper.GetAuthority() - params := v2lunc1types.DefaultParams() + params := v2customtypes.DefaultParams() govMsgSvr := NewMsgServerImpl(input.GovKeeper) testCases := []struct { name string - input func() *v2lunc1types.MsgUpdateParams + input func() *v2customtypes.MsgUpdateParams expErr bool expErrMsg string }{ { name: "valid", - input: func() *v2lunc1types.MsgUpdateParams { - return &v2lunc1types.MsgUpdateParams{ + input: func() *v2customtypes.MsgUpdateParams { + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params, } @@ -556,8 +556,8 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid authority", - input: func() *v2lunc1types.MsgUpdateParams { - return &v2lunc1types.MsgUpdateParams{ + input: func() *v2customtypes.MsgUpdateParams { + return &v2customtypes.MsgUpdateParams{ Authority: "authority", Params: params, } @@ -567,11 +567,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid min deposit", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.MinDeposit = nil - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -581,14 +581,14 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "negative deposit", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.MinDeposit = sdk.Coins{{ Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(-100), }} - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -598,11 +598,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid max deposit period", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.MaxDepositPeriod = nil - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -612,12 +612,12 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "zero max deposit period", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params duration := time.Duration(0) params1.MaxDepositPeriod = &duration - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -627,11 +627,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid quorum", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.Quorum = testQuorumABC - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -641,11 +641,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "negative quorum", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.Quorum = testQuorumNeg01 - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -655,11 +655,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "quorum > 1", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.Quorum = "2" - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -669,11 +669,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid threshold", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.Threshold = testQuorumABC - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -683,11 +683,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "negative threshold", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.Threshold = testQuorumNeg01 - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -697,11 +697,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "threshold > 1", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.Threshold = "2" - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -711,11 +711,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid veto threshold", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.VetoThreshold = testQuorumABC - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -725,11 +725,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "negative veto threshold", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.VetoThreshold = testQuorumNeg01 - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -739,11 +739,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "veto threshold > 1", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.VetoThreshold = "2" - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -753,11 +753,11 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "invalid voting period", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params params1.VotingPeriod = nil - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -767,12 +767,12 @@ func TestMsgUpdateParams(t *testing.T) { }, { name: "zero voting period", - input: func() *v2lunc1types.MsgUpdateParams { + input: func() *v2customtypes.MsgUpdateParams { params1 := params duration := time.Duration(0) params1.VotingPeriod = &duration - return &v2lunc1types.MsgUpdateParams{ + return &v2customtypes.MsgUpdateParams{ Authority: authority, Params: params1, } @@ -786,7 +786,7 @@ func TestMsgUpdateParams(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { msg := tc.input() - exec := func(updateParams *v2lunc1types.MsgUpdateParams) error { + exec := func(updateParams *v2customtypes.MsgUpdateParams) error { if err := msg.ValidateBasic(); err != nil { return err } @@ -820,7 +820,7 @@ func TestSubmitProposal_InitialDeposit(t *testing.T) { input.OracleKeeper.SetLunaExchangeRate(ctx, core.MicroUSDDenom, sdk.NewDecWithPrec(2, 1)) _, _, addr := testdata.KeyTestPubAddr() - minLuncDeposit, err := input.GovKeeper.GetMinimumDepositBaseUusd(ctx) + minLuncDeposit, err := input.GovKeeper.GetMinimumDepositBaseUstc(ctx) require.NoError(t, err) // setup deposit value when test @@ -883,7 +883,7 @@ func TestSubmitProposal_InitialDeposit(t *testing.T) { FundAccount(input, addr, tc.minDeposit) govMsgSvr := NewMsgServerImpl(input.GovKeeper) - params := v2lunc1types.DefaultParams() + params := v2customtypes.DefaultParams() params.MinInitialDepositRatio = tc.minInitialDepositRatio.String() msg, err := v1.NewMsgSubmitProposal(msgs, tc.initialDeposit, addr.String(), "test", "Proposal", "description of proposal") @@ -911,7 +911,7 @@ func TestLegacyMsgSubmitProposal(t *testing.T) { _, _, addr := testdata.KeyTestPubAddr() proposer := addr - coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(500_000_000))) // 500 UUSD + coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(500_000_000))) // 500 USTC input.OracleKeeper.SetLunaExchangeRate(ctx, core.MicroUSDDenom, sdk.OneDec()) initialDeposit := coins @@ -978,7 +978,7 @@ func TestLegacyMsgVote(t *testing.T) { _, _, addr := testdata.KeyTestPubAddr() proposer := addr - coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(500_000_000))) // 500 UUSD + coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(500_000_000))) // 500 USTC input.OracleKeeper.SetLunaExchangeRate(ctx, core.MicroUSDDenom, sdk.OneDec()) FundAccount(input, addr, coins) diff --git a/custom/gov/keeper/params.go b/custom/gov/keeper/params.go index cdd582c3..2fffb830 100644 --- a/custom/gov/keeper/params.go +++ b/custom/gov/keeper/params.go @@ -1,13 +1,13 @@ package keeper import ( - v2lunc1types "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + v2customtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) // SetParams sets the gov module's parameters. -func (k Keeper) SetParams(ctx sdk.Context, params v2lunc1types.Params) error { +func (k Keeper) SetParams(ctx sdk.Context, params v2customtypes.Params) error { store := ctx.KVStore(k.storeKey) bz, err := k.cdc.Marshal(¶ms) if err != nil { @@ -19,7 +19,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params v2lunc1types.Params) error { } // GetParams gets the gov module's parameters. -func (k Keeper) GetParams(clientCtx sdk.Context) (params v2lunc1types.Params) { +func (k Keeper) GetParams(clientCtx sdk.Context) (params v2customtypes.Params) { store := clientCtx.KVStore(k.storeKey) bz := store.Get(govtypes.ParamsKey) if bz == nil { diff --git a/custom/gov/keeper/proposal.go b/custom/gov/keeper/proposal.go index 5de652ed..249322ca 100644 --- a/custom/gov/keeper/proposal.go +++ b/custom/gov/keeper/proposal.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - v2lunc1types "github.com/classic-terra/core/v3/custom/gov/types" + v2customtypes "github.com/classic-terra/core/v3/custom/gov/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -94,14 +94,14 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat keeper.InsertInactiveProposalQueue(ctx, proposalID, *proposal.DepositEndTime) keeper.SetProposalID(ctx, proposalID+1) - totalLuncDeposit, err := keeper.GetMinimumDepositBaseUusd(ctx) + totalUlunaDeposit, err := keeper.GetMinimumDepositBaseUstc(ctx) if err != nil { - return v1.Proposal{}, sdkerrors.Wrap(v2lunc1types.ErrQueryExchangeRateUusdFail, err.Error()) + return v1.Proposal{}, sdkerrors.Wrap(v2customtypes.ErrQueryExchangeRateUstcFail, err.Error()) } - err = keeper.SetDepositLimitBaseUusd(ctx, proposalID, totalLuncDeposit) + err = keeper.SetDepositLimitBaseUstc(ctx, proposalID, totalUlunaDeposit) if err != nil { - return v1.Proposal{}, sdkerrors.Wrap(v2lunc1types.ErrQueryExchangeRateUusdFail, err.Error()) + return v1.Proposal{}, sdkerrors.Wrap(v2customtypes.ErrQueryExchangeRateUstcFail, err.Error()) } // called right after a proposal is submitted diff --git a/custom/gov/keeper/proposal_test.go b/custom/gov/keeper/proposal_test.go index 29f7b37b..1d47b100 100644 --- a/custom/gov/keeper/proposal_test.go +++ b/custom/gov/keeper/proposal_test.go @@ -40,7 +40,7 @@ func TestGetSetProposal(t *testing.T) { lunaPriceInUSD := sdk.MustNewDecFromStr("0.10008905") oracleKeeper.SetLunaExchangeRate(ctx, core.MicroUSDDenom, lunaPriceInUSD) - totalLuncMinDeposit, err := govKeeper.GetMinimumDepositBaseUusd(ctx) + totalLuncMinDeposit, err := govKeeper.GetMinimumDepositBaseUstc(ctx) require.NoError(t, err) proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r")) @@ -53,7 +53,7 @@ func TestGetSetProposal(t *testing.T) { require.Equal(t, proposal, gotProposal) // Get min luna amount by uusd - minLunaAmount := govKeeper.GetDepositLimitBaseUusd(ctx, proposalID) + minLunaAmount := govKeeper.GetDepositLimitBaseUstc(ctx, proposalID) fmt.Printf("minLunaAmount %s\n", minLunaAmount) require.Equal(t, totalLuncMinDeposit, minLunaAmount) } diff --git a/custom/gov/keeper/test_utils.go b/custom/gov/keeper/test_utils.go index 372b0ac6..f79f96a2 100644 --- a/custom/gov/keeper/test_utils.go +++ b/custom/gov/keeper/test_utils.go @@ -12,7 +12,7 @@ import ( customauth "github.com/classic-terra/core/v3/custom/auth" custombank "github.com/classic-terra/core/v3/custom/bank" customdistr "github.com/classic-terra/core/v3/custom/distribution" - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" customparams "github.com/classic-terra/core/v3/custom/params" customstaking "github.com/classic-terra/core/v3/custom/staking" core "github.com/classic-terra/core/v3/types" @@ -83,8 +83,8 @@ func MakeEncodingConfig(_ *testing.T) simparams.EncodingConfig { ModuleBasics.RegisterInterfaces(interfaceRegistry) v1beta1.RegisterLegacyAminoCodec(amino) v1beta1.RegisterInterfaces(interfaceRegistry) - v2lunc1.RegisterLegacyAminoCodec(amino) - v2lunc1.RegisterInterfaces(interfaceRegistry) + v2custom.RegisterLegacyAminoCodec(amino) + v2custom.RegisterInterfaces(interfaceRegistry) markettypes.RegisterLegacyAminoCodec(amino) markettypes.RegisterInterfaces(interfaceRegistry) @@ -278,7 +278,7 @@ func CreateTestInput(t *testing.T) TestInput { govRouter.AddRoute(govtypes.RouterKey, v1beta1.ProposalHandler) govKeeper.SetLegacyRouter(govRouter) govKeeper.Keeper.SetParams(ctx, v1.DefaultParams()) - govKeeper.SetParams(ctx, v2lunc1.DefaultParams()) + govKeeper.SetParams(ctx, v2custom.DefaultParams()) // govparamsv2 := govKeeper.GetParams(ctx) // govparamsv2.MinDeposit = sdk.NewCoins( @@ -296,7 +296,7 @@ func CreateTestInput(t *testing.T) TestInput { msr.SetInterfaceRegistry(encodingConfig.InterfaceRegistry) msgServer := NewMsgServerImpl(govKeeper) v1beta1.RegisterMsgServer(msr, NewLegacyMsgServerImpl(accountKeeper.GetModuleAddress(govtypes.ModuleName).String(), msgServer)) - v2lunc1.RegisterMsgServer(msr, msgServer) + v2custom.RegisterMsgServer(msr, msgServer) banktypes.RegisterMsgServer(msr, nil) // return TestInput{ctx, legacyAmino, accountKeeper, bankKeeper, oracleKeeper, stakingKeeper, govKeeper} diff --git a/custom/gov/migrations/v5/store.go b/custom/gov/migrations/v5/store.go index f9ef3395..c08c5972 100644 --- a/custom/gov/migrations/v5/store.go +++ b/custom/gov/migrations/v5/store.go @@ -1,7 +1,7 @@ package v5 import ( - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,8 +23,8 @@ func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Bina return err } - defaultParams := v2lunc1.DefaultParams() - newParams := v2lunc1.NewParams( + defaultParams := v2custom.DefaultParams() + newParams := v2custom.NewParams( params.MinDeposit, *params.MaxDepositPeriod, *params.VotingPeriod, diff --git a/custom/gov/migrations/v5/store_test.go b/custom/gov/migrations/v5/store_test.go index e322811d..03593cbb 100644 --- a/custom/gov/migrations/v5/store_test.go +++ b/custom/gov/migrations/v5/store_test.go @@ -5,7 +5,7 @@ import ( "time" v5 "github.com/classic-terra/core/v3/custom/gov/migrations/v5" - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank" @@ -70,7 +70,7 @@ func TestMigrateStore(t *testing.T) { // Fetch the params after migration bz = store.Get(govtypes.ParamsKey) - var newParams v2lunc1.Params + var newParams v2custom.Params require.NoError(t, cdc.Unmarshal(bz, &newParams)) t.Logf("params2: %v", newParams) @@ -86,6 +86,6 @@ func TestMigrateStore(t *testing.T) { require.Equal(t, oldParams.BurnVoteQuorum, newParams.BurnVoteQuorum) require.Equal(t, oldParams.BurnVoteVeto, newParams.BurnVoteVeto) - // Check any new fields from the `v2lunc1.Params` - require.Equal(t, v2lunc1.DefaultParams().MinUusdDeposit, newParams.MinUusdDeposit) + // Check any new fields from the `v2custom.Params` + require.Equal(t, v2custom.DefaultParams().MinUusdDeposit, newParams.MinUusdDeposit) } diff --git a/custom/gov/module.go b/custom/gov/module.go index b9810d38..c15305bd 100644 --- a/custom/gov/module.go +++ b/custom/gov/module.go @@ -28,7 +28,7 @@ import ( customcli "github.com/classic-terra/core/v3/custom/gov/client/cli" "github.com/classic-terra/core/v3/custom/gov/keeper" - "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + "github.com/classic-terra/core/v3/custom/gov/types/v2custom" core "github.com/classic-terra/core/v3/types" markettypes "github.com/classic-terra/core/v3/x/market/types" ) @@ -78,20 +78,20 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { // RegisterLegacyAminoCodec registers the gov module's types for the given codec. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { v1beta1.RegisterLegacyAminoCodec(cdc) - v2lunc1.RegisterLegacyAminoCodec(cdc) + v2custom.RegisterLegacyAminoCodec(cdc) } // RegisterInterfaces implements InterfaceModule.RegisterInterfaces func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { v1beta1.RegisterInterfaces(registry) - v2lunc1.RegisterInterfaces(registry) + v2custom.RegisterInterfaces(registry) } // DefaultGenesis returns default genesis state as raw bytes for the gov // module. func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // customize to set default genesis state deposit denom to uluna - defaultGenesisState := v2lunc1.DefaultGenesisState() + defaultGenesisState := v2custom.DefaultGenesisState() defaultGenesisState.Params.MinDeposit[0].Denom = core.MicroLunaDenom return cdc.MustMarshalJSON(defaultGenesisState) @@ -99,12 +99,12 @@ func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // ValidateGenesis performs genesis state validation for the gov module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { - var data v2lunc1.GenesisState + var data v2custom.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", govtypes.ModuleName, err) } - return v2lunc1.ValidateGenesis(&data) + return v2custom.ValidateGenesis(&data) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. @@ -155,10 +155,10 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { func (am AppModule) RegisterServices(cfg module.Configurator) { msgServer := keeper.NewMsgServerImpl(&am.keeper) v1beta1.RegisterMsgServer(cfg.MsgServer(), keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(govtypes.ModuleName).String(), msgServer)) - v2lunc1.RegisterMsgServer(cfg.MsgServer(), msgServer) + v2custom.RegisterMsgServer(cfg.MsgServer(), msgServer) queryServer := keeper.NewQueryServerImpl(am.keeper) - v2lunc1.RegisterQueryServer(cfg.QueryServer(), queryServer) + v2custom.RegisterQueryServer(cfg.QueryServer(), queryServer) legacyQueryServer := govkeeper.NewLegacyQueryServer(am.keeper.Keeper) v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) @@ -186,7 +186,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the gov module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - var genesisState v2lunc1.GenesisState + var genesisState v2custom.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.accountKeeper, am.bankKeeper, &am.keeper, &genesisState) return []abci.ValidatorUpdate{} diff --git a/custom/gov/types/errors.go b/custom/gov/types/errors.go index a084976b..bac26452 100644 --- a/custom/gov/types/errors.go +++ b/custom/gov/types/errors.go @@ -7,5 +7,5 @@ import ( // x/gov module sentinel errors var ( - ErrQueryExchangeRateUusdFail = sdkerrors.Register(govtypes.ModuleName, 17, "Get exchange rate lunc-uusd from oracle failed") + ErrQueryExchangeRateUstcFail = sdkerrors.Register(govtypes.ModuleName, 17, "Get exchange rate lunc-uusd from oracle failed") ) diff --git a/custom/gov/types/keys.go b/custom/gov/types/keys.go index 4dd72c4a..94b0b923 100644 --- a/custom/gov/types/keys.go +++ b/custom/gov/types/keys.go @@ -5,8 +5,8 @@ import "encoding/binary" // Keys for governance store // Items are stored with the following key: values var ( - // Minimum UUSD amount prefix - UUSDMinKeyPrefix = []byte{0x40} + // Minimum USTC amount prefix + USTCMinKeyPrefix = []byte{0x40} ) // GetProposalIDBytes returns the byte representation of the proposalID @@ -18,5 +18,5 @@ func GetProposalIDBytes(proposalID uint64) (proposalIDBz []byte) { // TotalDepositKey of the specific total amount to deposit based on the proposalID from the store func TotalDepositKey(proposalID uint64) []byte { - return append(UUSDMinKeyPrefix, GetProposalIDBytes(proposalID)...) + return append(USTCMinKeyPrefix, GetProposalIDBytes(proposalID)...) } diff --git a/custom/gov/types/v2lunc1/codec.go b/custom/gov/types/v2custom/codec.go similarity index 99% rename from custom/gov/types/v2lunc1/codec.go rename to custom/gov/types/v2custom/codec.go index c0be11bd..315ca1a9 100644 --- a/custom/gov/types/v2lunc1/codec.go +++ b/custom/gov/types/v2custom/codec.go @@ -1,4 +1,4 @@ -package v2lunc1 +package v2custom import ( "github.com/cosmos/cosmos-sdk/codec" diff --git a/custom/gov/types/v2lunc1/genesis.go b/custom/gov/types/v2custom/genesis.go similarity index 99% rename from custom/gov/types/v2lunc1/genesis.go rename to custom/gov/types/v2custom/genesis.go index d11f7d80..fe77ff0b 100644 --- a/custom/gov/types/v2lunc1/genesis.go +++ b/custom/gov/types/v2custom/genesis.go @@ -1,4 +1,4 @@ -package v2lunc1 +package v2custom import ( "errors" diff --git a/custom/gov/types/v2lunc1/genesis.pb.go b/custom/gov/types/v2custom/genesis.pb.go similarity index 84% rename from custom/gov/types/v2lunc1/genesis.pb.go rename to custom/gov/types/v2custom/genesis.pb.go index abd53cc3..828c617c 100644 --- a/custom/gov/types/v2lunc1/genesis.pb.go +++ b/custom/gov/types/v2custom/genesis.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/gov/v2lunc1/genesis.proto +// source: terra/gov/v2custom/genesis.proto -package v2lunc1 +package v2custom import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - _ "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" @@ -56,7 +52,7 @@ 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_a6436cbb1ac17fc7, []int{0} + return fileDescriptor_19555697d819f2a4, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -145,41 +141,37 @@ func (m *GenesisState) GetParams() *Params { } func init() { - proto.RegisterType((*GenesisState)(nil), "terra.gov.v2lunc1.GenesisState") + proto.RegisterType((*GenesisState)(nil), "terra.gov.v2custom.GenesisState") } -func init() { proto.RegisterFile("terra/gov/v2lunc1/genesis.proto", fileDescriptor_a6436cbb1ac17fc7) } +func init() { proto.RegisterFile("terra/gov/v2custom/genesis.proto", fileDescriptor_19555697d819f2a4) } -var fileDescriptor_a6436cbb1ac17fc7 = []byte{ - // 440 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x6f, 0xd3, 0x30, - 0x14, 0xc6, 0x9b, 0x75, 0x2b, 0xc3, 0xed, 0x90, 0x30, 0x13, 0xcb, 0x3a, 0x14, 0x2a, 0x4e, 0xe5, - 0x40, 0x4c, 0x3a, 0x71, 0xe0, 0xc8, 0x34, 0x69, 0xe2, 0x36, 0x65, 0x88, 0x03, 0x97, 0xca, 0x49, - 0x8c, 0xb1, 0x94, 0xf6, 0x45, 0xf1, 0x8b, 0xa5, 0xfd, 0x17, 0xfc, 0x59, 0x1c, 0x77, 0x44, 0xe2, - 0x82, 0xda, 0x7f, 0x04, 0xd5, 0x76, 0x68, 0xd4, 0xf5, 0x16, 0xbf, 0xef, 0xf7, 0x7d, 0xfe, 0x62, - 0x3d, 0xf2, 0x1a, 0x45, 0x5d, 0x73, 0x26, 0xc1, 0x30, 0x33, 0x2b, 0x9b, 0x65, 0x9e, 0x30, 0x29, - 0x96, 0x42, 0x2b, 0x1d, 0x57, 0x35, 0x20, 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8f, 0x26, 0xc1, - 0x74, 0x38, 0x7b, 0xb5, 0xbf, 0xdb, 0xad, 0x65, 0xae, 0x0e, 0xc2, 0x20, 0x3d, 0x29, 0xba, 0x23, - 0x7a, 0x4d, 0x4e, 0x0c, 0xb8, 0xe7, 0x70, 0x39, 0x03, 0x9b, 0x73, 0xf1, 0xb8, 0xf2, 0xe6, 0x59, - 0xb6, 0x31, 0x23, 0xd3, 0x99, 0xd0, 0x4f, 0x64, 0x84, 0xbc, 0x2c, 0xef, 0xdb, 0x90, 0x27, 0x36, - 0x64, 0xbc, 0x13, 0xf2, 0x65, 0x83, 0x74, 0x32, 0x86, 0xb8, 0x1d, 0xd0, 0x84, 0x0c, 0xbc, 0xf9, - 0xd8, 0x9a, 0xcf, 0xe3, 0x47, 0x5b, 0x17, 0x3b, 0x34, 0xf5, 0xe0, 0xd5, 0xdd, 0xaf, 0x55, 0x14, - 0x3c, 0xac, 0xa2, 0xe0, 0xef, 0x2a, 0x0a, 0x7e, 0xae, 0xa3, 0xde, 0xc3, 0x3a, 0xea, 0xfd, 0x5e, - 0x47, 0xbd, 0x6f, 0x1f, 0xa5, 0xc2, 0x1f, 0x4d, 0x16, 0xe7, 0xb0, 0x60, 0x79, 0xc9, 0xb5, 0x56, - 0xf9, 0x3b, 0xb7, 0x40, 0x39, 0xd4, 0x82, 0x99, 0x4b, 0x96, 0x37, 0x1a, 0x61, 0x61, 0x37, 0x06, - 0xef, 0x2b, 0xa1, 0xdb, 0xad, 0xca, 0x06, 0x76, 0x73, 0x2e, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, - 0x70, 0x07, 0xb4, 0x0f, 0x16, 0x03, 0x00, 0x00, +var fileDescriptor_19555697d819f2a4 = []byte{ + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0x8e, 0xda, 0x40, + 0x18, 0xc4, 0x31, 0xff, 0x42, 0x16, 0x48, 0xb1, 0x89, 0x82, 0x45, 0x90, 0x65, 0xa5, 0x22, 0x45, + 0xec, 0x60, 0x94, 0x26, 0x5d, 0x10, 0x12, 0xba, 0x0e, 0xf9, 0xd0, 0x15, 0xd7, 0xa0, 0xc5, 0x5e, + 0xf9, 0x2c, 0xd9, 0x7c, 0x96, 0xbf, 0x65, 0x25, 0xde, 0xe2, 0x1e, 0xeb, 0x4a, 0xca, 0x2b, 0xae, + 0x38, 0xc1, 0x8b, 0x9c, 0xf0, 0xda, 0x18, 0x01, 0xed, 0x37, 0xbf, 0x99, 0x1d, 0xad, 0x86, 0x98, + 0x82, 0xa7, 0x29, 0xb3, 0x03, 0x90, 0xb6, 0x74, 0xbc, 0x0d, 0x0a, 0x88, 0xed, 0x80, 0xaf, 0x39, + 0x86, 0x68, 0x25, 0x29, 0x08, 0xa0, 0x34, 0x23, 0xac, 0x00, 0xa4, 0x55, 0x10, 0xfd, 0xc1, 0x2d, + 0x17, 0x48, 0xe5, 0xe8, 0xf7, 0x3c, 0xc0, 0x18, 0x50, 0xc9, 0xa3, 0x52, 0xf8, 0xf9, 0x56, 0x23, + 0x9d, 0x99, 0x0a, 0xbf, 0x17, 0x4c, 0x70, 0xfa, 0x87, 0x7c, 0x43, 0xc1, 0x52, 0x11, 0xae, 0x83, + 0x65, 0x92, 0x42, 0x02, 0xc8, 0xa2, 0x65, 0xe8, 0xeb, 0x9a, 0xa9, 0x0d, 0xeb, 0x2e, 0x2d, 0xb4, + 0x79, 0x2e, 0xdd, 0xf9, 0xd4, 0x21, 0x2d, 0x9f, 0x27, 0x80, 0xa1, 0x40, 0xbd, 0x6a, 0xd6, 0x86, + 0x6d, 0xe7, 0xbb, 0xa5, 0x9e, 0x53, 0x0d, 0x47, 0xd6, 0x54, 0xc9, 0xee, 0x89, 0xa3, 0xbf, 0x48, + 0x43, 0x82, 0xe0, 0xa8, 0xd7, 0x32, 0xc3, 0xd7, 0x0b, 0xc3, 0x03, 0x08, 0xee, 0x2a, 0x82, 0xfe, + 0x25, 0x9f, 0x8b, 0x1e, 0xa8, 0xd7, 0x33, 0xbc, 0x77, 0x81, 0x17, 0x65, 0xdc, 0x92, 0xa4, 0x33, + 0xf2, 0x25, 0x7f, 0x6d, 0x99, 0xb0, 0x94, 0xc5, 0xa8, 0x37, 0x4c, 0x6d, 0xd8, 0x76, 0x06, 0xb7, + 0xbb, 0xcd, 0x33, 0x66, 0x52, 0xd5, 0x35, 0xb7, 0xeb, 0x9f, 0x9f, 0xe8, 0x94, 0x74, 0x25, 0xa8, + 0xef, 0x50, 0x39, 0xcd, 0x2c, 0xe7, 0xc7, 0x75, 0xe5, 0xe3, 0xb7, 0x94, 0x31, 0x1d, 0x79, 0x76, + 0xa1, 0xff, 0x49, 0x47, 0xb0, 0x28, 0xda, 0x16, 0x21, 0x9f, 0xb2, 0x90, 0xfe, 0x45, 0xc8, 0xe2, + 0x88, 0x9c, 0x65, 0xb4, 0x45, 0x79, 0xa0, 0x0e, 0x69, 0xe6, 0xe6, 0x56, 0x6e, 0xbe, 0x9e, 0x81, + 0xa5, 0x58, 0x37, 0x27, 0x27, 0x8b, 0x97, 0xbd, 0xa1, 0xed, 0xf6, 0x86, 0xf6, 0xbe, 0x37, 0xb4, + 0xe7, 0x83, 0x51, 0xd9, 0x1d, 0x8c, 0xca, 0xeb, 0xc1, 0xa8, 0x3c, 0xfe, 0x0b, 0x42, 0xf1, 0xb4, + 0x59, 0x59, 0x1e, 0xc4, 0xb6, 0x17, 0x31, 0xc4, 0xd0, 0xfb, 0xad, 0x26, 0xe4, 0x41, 0xca, 0x6d, + 0x39, 0xb6, 0xcb, 0x11, 0xd9, 0x62, 0x9b, 0x70, 0x3c, 0xed, 0x6a, 0xd5, 0xcc, 0xb6, 0x33, 0xfe, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x47, 0x1d, 0xc5, 0x89, 0xaa, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/custom/gov/types/v2lunc1/genesis_test.go b/custom/gov/types/v2custom/genesis_test.go similarity index 61% rename from custom/gov/types/v2lunc1/genesis_test.go rename to custom/gov/types/v2custom/genesis_test.go index d2626396..53bdb0b1 100644 --- a/custom/gov/types/v2lunc1/genesis_test.go +++ b/custom/gov/types/v2custom/genesis_test.go @@ -1,100 +1,100 @@ -package v2lunc1_test +package v2custom_test import ( "testing" - v2lunc1types "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + v2customtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/stretchr/testify/require" ) func TestEmptyGenesis(t *testing.T) { - state1 := v2lunc1types.GenesisState{} + state1 := v2customtypes.GenesisState{} require.True(t, state1.Empty()) - state2 := v2lunc1types.DefaultGenesisState() + state2 := v2customtypes.DefaultGenesisState() require.False(t, state2.Empty()) } func TestValidateGenesis(t *testing.T) { - params := v2lunc1types.DefaultParams() + params := v2customtypes.DefaultParams() testCases := []struct { name string - genesisState func() *v2lunc1types.GenesisState + genesisState func() *v2customtypes.GenesisState expErrMsg string }{ { name: "valid", - genesisState: func() *v2lunc1types.GenesisState { - return v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params) + genesisState: func() *v2customtypes.GenesisState { + return v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params) }, }, { name: "invalid StartingProposalId", - genesisState: func() *v2lunc1types.GenesisState { - return v2lunc1types.NewGenesisState(0, params) + genesisState: func() *v2customtypes.GenesisState { + return v2customtypes.NewGenesisState(0, params) }, expErrMsg: "starting proposal id must be greater than 0", }, { name: "invalid min deposit", - genesisState: func() *v2lunc1types.GenesisState { + genesisState: func() *v2customtypes.GenesisState { params1 := params params1.MinDeposit = sdk.Coins{{ Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(-100), }} - return v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params1) + return v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params1) }, expErrMsg: "invalid minimum deposit", }, { name: "invalid max deposit period", - genesisState: func() *v2lunc1types.GenesisState { + genesisState: func() *v2customtypes.GenesisState { params1 := params params1.MaxDepositPeriod = nil - return v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params1) + return v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params1) }, expErrMsg: "maximum deposit period must not be nil", }, { name: "invalid quorum", - genesisState: func() *v2lunc1types.GenesisState { + genesisState: func() *v2customtypes.GenesisState { params1 := params params1.Quorum = "2" - return v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params1) + return v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params1) }, expErrMsg: "quorom too large", }, { name: "invalid threshold", - genesisState: func() *v2lunc1types.GenesisState { + genesisState: func() *v2customtypes.GenesisState { params1 := params params1.Threshold = "2" - return v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params1) + return v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params1) }, expErrMsg: "vote threshold too large", }, { name: "invalid veto threshold", - genesisState: func() *v2lunc1types.GenesisState { + genesisState: func() *v2customtypes.GenesisState { params1 := params params1.VetoThreshold = "2" - return v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params1) + return v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params1) }, expErrMsg: "veto threshold too large", }, { name: "duplicate proposals", - genesisState: func() *v2lunc1types.GenesisState { - state := v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params) + genesisState: func() *v2customtypes.GenesisState { + state := v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params) state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) @@ -104,8 +104,8 @@ func TestValidateGenesis(t *testing.T) { }, { name: "duplicate votes", - genesisState: func() *v2lunc1types.GenesisState { - state := v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params) + genesisState: func() *v2customtypes.GenesisState { + state := v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params) state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) state.Votes = append(state.Votes, &v1.Vote{ @@ -123,8 +123,8 @@ func TestValidateGenesis(t *testing.T) { }, { name: "duplicate deposits", - genesisState: func() *v2lunc1types.GenesisState { - state := v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params) + genesisState: func() *v2customtypes.GenesisState { + state := v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params) state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) state.Deposits = append(state.Deposits, &v1.Deposit{ @@ -142,8 +142,8 @@ func TestValidateGenesis(t *testing.T) { }, { name: "non-existent proposal id in votes", - genesisState: func() *v2lunc1types.GenesisState { - state := v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params) + genesisState: func() *v2customtypes.GenesisState { + state := v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params) state.Votes = append(state.Votes, &v1.Vote{ ProposalId: 1, @@ -156,8 +156,8 @@ func TestValidateGenesis(t *testing.T) { }, { name: "non-existent proposal id in deposits", - genesisState: func() *v2lunc1types.GenesisState { - state := v2lunc1types.NewGenesisState(v1.DefaultStartingProposalID, params) + genesisState: func() *v2customtypes.GenesisState { + state := v2customtypes.NewGenesisState(v1.DefaultStartingProposalID, params) state.Deposits = append(state.Deposits, &v1.Deposit{ ProposalId: 1, @@ -173,7 +173,7 @@ func TestValidateGenesis(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - err := v2lunc1types.ValidateGenesis(tc.genesisState()) + err := v2customtypes.ValidateGenesis(tc.genesisState()) if tc.expErrMsg != "" { require.Error(t, err) require.ErrorContains(t, err, tc.expErrMsg) diff --git a/custom/gov/types/v2lunc1/gov.pb.go b/custom/gov/types/v2custom/gov.pb.go similarity index 89% rename from custom/gov/types/v2lunc1/gov.pb.go rename to custom/gov/types/v2custom/gov.pb.go index eb8887c1..355c94a4 100644 --- a/custom/gov/types/v2lunc1/gov.pb.go +++ b/custom/gov/types/v2custom/gov.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/gov/v2lunc1/gov.proto +// source: terra/gov/v2custom/gov.proto -package v2lunc1 +package v2custom import ( fmt "fmt" @@ -68,7 +68,7 @@ func (x VoteOption) String() string { } func (VoteOption) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{0} + return fileDescriptor_de18f1a788afb560, []int{0} } // ProposalStatus enumerates the valid statuses of a proposal. @@ -117,13 +117,13 @@ func (x ProposalStatus) String() string { } func (ProposalStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{1} + return fileDescriptor_de18f1a788afb560, []int{1} } // WeightedVoteOption defines a unit of vote for vote split. type WeightedVoteOption struct { // option defines the valid vote options, it must not contain duplicate vote options. - Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=terra.gov.v2lunc1.VoteOption" json:"option,omitempty"` + Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=terra.gov.v2custom.VoteOption" json:"option,omitempty"` // weight is the vote weight associated with the vote option. Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` } @@ -132,7 +132,7 @@ func (m *WeightedVoteOption) Reset() { *m = WeightedVoteOption{} } func (m *WeightedVoteOption) String() string { return proto.CompactTextString(m) } func (*WeightedVoteOption) ProtoMessage() {} func (*WeightedVoteOption) Descriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{0} + return fileDescriptor_de18f1a788afb560, []int{0} } func (m *WeightedVoteOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ func (m *Deposit) Reset() { *m = Deposit{} } func (m *Deposit) String() string { return proto.CompactTextString(m) } func (*Deposit) ProtoMessage() {} func (*Deposit) Descriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{1} + return fileDescriptor_de18f1a788afb560, []int{1} } func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ type Proposal struct { // messages are the arbitrary messages to be executed if the proposal passes. Messages []*types1.Any `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` // status defines the proposal status. - Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=terra.gov.v2lunc1.ProposalStatus" json:"status,omitempty"` + Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=terra.gov.v2custom.ProposalStatus" json:"status,omitempty"` // final_tally_result is the final tally result of the proposal. When // querying a proposal via gRPC, this field is not populated until the // proposal's voting period has ended. @@ -292,7 +292,7 @@ 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_ec6805a6cb6c4923, []int{2} + return fileDescriptor_de18f1a788afb560, []int{2} } func (m *Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ 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_ec6805a6cb6c4923, []int{3} + return fileDescriptor_de18f1a788afb560, []int{3} } func (m *TallyResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -517,7 +517,7 @@ 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_ec6805a6cb6c4923, []int{4} + return fileDescriptor_de18f1a788afb560, []int{4} } func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -589,7 +589,7 @@ func (m *DepositParams) Reset() { *m = DepositParams{} } func (m *DepositParams) String() string { return proto.CompactTextString(m) } func (*DepositParams) ProtoMessage() {} func (*DepositParams) Descriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{5} + return fileDescriptor_de18f1a788afb560, []int{5} } func (m *DepositParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -644,7 +644,7 @@ func (m *VotingParams) Reset() { *m = VotingParams{} } func (m *VotingParams) String() string { return proto.CompactTextString(m) } func (*VotingParams) ProtoMessage() {} func (*VotingParams) Descriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{6} + return fileDescriptor_de18f1a788afb560, []int{6} } func (m *VotingParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -698,7 +698,7 @@ func (m *TallyParams) Reset() { *m = TallyParams{} } func (m *TallyParams) String() string { return proto.CompactTextString(m) } func (*TallyParams) ProtoMessage() {} func (*TallyParams) Descriptor() ([]byte, []int) { - return fileDescriptor_ec6805a6cb6c4923, []int{7} + return fileDescriptor_de18f1a788afb560, []int{7} } func (m *TallyParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -783,7 +783,7 @@ 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_ec6805a6cb6c4923, []int{8} + return fileDescriptor_de18f1a788afb560, []int{8} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -890,109 +890,109 @@ func (m *Params) GetMinUusdDeposit() types.Coin { } func init() { - proto.RegisterEnum("terra.gov.v2lunc1.VoteOption", VoteOption_name, VoteOption_value) - proto.RegisterEnum("terra.gov.v2lunc1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) - proto.RegisterType((*WeightedVoteOption)(nil), "terra.gov.v2lunc1.WeightedVoteOption") - proto.RegisterType((*Deposit)(nil), "terra.gov.v2lunc1.Deposit") - proto.RegisterType((*Proposal)(nil), "terra.gov.v2lunc1.Proposal") - proto.RegisterType((*TallyResult)(nil), "terra.gov.v2lunc1.TallyResult") - proto.RegisterType((*Vote)(nil), "terra.gov.v2lunc1.Vote") - proto.RegisterType((*DepositParams)(nil), "terra.gov.v2lunc1.DepositParams") - proto.RegisterType((*VotingParams)(nil), "terra.gov.v2lunc1.VotingParams") - proto.RegisterType((*TallyParams)(nil), "terra.gov.v2lunc1.TallyParams") - proto.RegisterType((*Params)(nil), "terra.gov.v2lunc1.Params") -} - -func init() { proto.RegisterFile("terra/gov/v2lunc1/gov.proto", fileDescriptor_ec6805a6cb6c4923) } - -var fileDescriptor_ec6805a6cb6c4923 = []byte{ - // 1371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0xda, 0x8e, 0xe3, 0xbc, 0xc4, 0xce, 0x32, 0xe4, 0x0b, 0x4b, 0x20, 0x4e, 0xf0, 0x97, - 0x2f, 0xca, 0x97, 0x82, 0x5d, 0x42, 0xa9, 0x44, 0x5b, 0xa9, 0x72, 0xe2, 0xa5, 0x2c, 0x4a, 0x63, - 0x77, 0x6d, 0x42, 0xe9, 0x65, 0x35, 0xf6, 0x0e, 0xce, 0x48, 0xde, 0x1d, 0x77, 0x67, 0x36, 0xe0, - 0x3f, 0xa1, 0x52, 0x0f, 0x1c, 0x7b, 0x6a, 0x7b, 0xec, 0xb1, 0x07, 0x4e, 0xfd, 0x0b, 0x38, 0x55, - 0x88, 0x4b, 0x7b, 0x29, 0xad, 0xe0, 0x50, 0x89, 0xbf, 0xa2, 0xda, 0xd9, 0x59, 0xdb, 0x71, 0x5c, - 0x25, 0x70, 0xb1, 0x76, 0xde, 0xfb, 0x7c, 0xde, 0x7b, 0xf3, 0x7e, 0xad, 0x17, 0xce, 0x0b, 0x12, - 0x04, 0xb8, 0xd2, 0x65, 0x07, 0x95, 0x83, 0xcd, 0x5e, 0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0x9a, 0x59, 0x39, 0x12, 0x7d, 0x2b, 0xe9, 0xc7, 0xad, 0xcc, 0x93, - 0x3f, 0xd7, 0x34, 0x1b, 0x62, 0x52, 0x24, 0x46, 0x77, 0x41, 0x57, 0x59, 0x76, 0x88, 0xef, 0xc6, - 0x76, 0xb2, 0x27, 0xb4, 0x53, 0x50, 0x4c, 0xd3, 0x77, 0xa5, 0x2d, 0x0b, 0xf2, 0x82, 0x09, 0xdc, - 0x73, 0x94, 0xdc, 0x98, 0x7b, 0x8b, 0x5a, 0x2d, 0x4a, 0x6a, 0xd2, 0x48, 0x3b, 0x70, 0xea, 0x80, - 0x09, 0xea, 0x77, 0x1d, 0x2e, 0x70, 0xa0, 0xee, 0x97, 0x3b, 0x61, 0x5c, 0x4b, 0x31, 0xb5, 0x19, - 0x31, 0x65, 0x60, 0x77, 0x40, 0x89, 0x46, 0x77, 0x9c, 0x3f, 0xa1, 0xad, 0x7c, 0x4c, 0x4c, 0xae, - 0xb8, 0x12, 0x35, 0x8b, 0xc0, 0x2e, 0x16, 0xd8, 0x80, 0xa8, 0x7d, 0xed, 0xe1, 0x19, 0x2d, 0xc3, - 0xac, 0xa0, 0xa2, 0x47, 0x8c, 0x05, 0xa9, 0x88, 0x0f, 0xc8, 0x80, 0x39, 0x1e, 0x7a, 0x1e, 0x0e, - 0x06, 0xc6, 0xa2, 0x94, 0x27, 0x47, 0xf4, 0x01, 0xe4, 0xe2, 0xc9, 0x20, 0x81, 0x91, 0x3f, 0x66, - 0x14, 0x86, 0x48, 0x74, 0x01, 0xe6, 0xc9, 0xe3, 0x3e, 0x71, 0xa9, 0x20, 0xae, 0x51, 0x58, 0xd7, - 0x36, 0x72, 0xf6, 0x48, 0x80, 0xfe, 0x0b, 0xf9, 0x87, 0x98, 0xf6, 0x88, 0xeb, 0x04, 0x04, 0x73, - 0xe6, 0x1b, 0x4b, 0xd2, 0xe7, 0x62, 0x2c, 0xb4, 0xa5, 0xac, 0xf4, 0x9b, 0x06, 0x0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 0xb3, 0xba, 0xe3, 0x34, - 0x5b, 0xd5, 0xd6, 0xbd, 0xe6, 0x44, 0x4c, 0x25, 0x28, 0x4e, 0x02, 0x6a, 0x66, 0xa3, 0xde, 0xb4, - 0x5a, 0x4e, 0xc3, 0xb4, 0xad, 0x7a, 0x4d, 0xd7, 0xd0, 0x45, 0x58, 0x9d, 0xc4, 0xec, 0xd5, 0x5b, - 0xd6, 0xee, 0x67, 0x09, 0x24, 0x85, 0x56, 0xe0, 0xcc, 0x24, 0xa4, 0x51, 0x6d, 0x36, 0xcd, 0x5a, - 0x1c, 0xf4, 0xa4, 0xce, 0x36, 0xef, 0x9a, 0xdb, 0x2d, 0xb3, 0xa6, 0x67, 0xa6, 0x31, 0x6f, 0x57, - 0xad, 0x1d, 0xb3, 0xa6, 0xcf, 0x6e, 0x35, 0x9f, 0xbd, 0x2a, 0x6a, 0xcf, 0x5f, 0x15, 0xb5, 0xbf, - 0x5e, 0x15, 0xb5, 0x27, 0xaf, 0x8b, 0x33, 0xcf, 0x5f, 0x17, 0x67, 0x7e, 0x7f, 0x5d, 0x9c, 0xf9, - 0xea, 0x56, 0x97, 0x8a, 0xfd, 0xb0, 0x5d, 0xee, 0x30, 0xaf, 0xd2, 0xe9, 0x61, 0xce, 0x69, 0xe7, - 0x5a, 0xfc, 0xd1, 0xd2, 0x61, 0x01, 0xa9, 0x1c, 0xdc, 0xa8, 0x74, 0x42, 0x2e, 0x98, 0x27, 0xbf, - 0x61, 0xc4, 0xa0, 0x4f, 0x78, 0xf2, 0x25, 0xd3, 0xce, 0xca, 0x99, 0xbc, 0xf1, 0x4f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xe7, 0x7b, 0xb5, 0xd1, 0xe5, 0x0c, 0x00, 0x00, + proto.RegisterEnum("terra.gov.v2custom.VoteOption", VoteOption_name, VoteOption_value) + proto.RegisterEnum("terra.gov.v2custom.ProposalStatus", ProposalStatus_name, ProposalStatus_value) + proto.RegisterType((*WeightedVoteOption)(nil), "terra.gov.v2custom.WeightedVoteOption") + proto.RegisterType((*Deposit)(nil), "terra.gov.v2custom.Deposit") + proto.RegisterType((*Proposal)(nil), "terra.gov.v2custom.Proposal") + proto.RegisterType((*TallyResult)(nil), "terra.gov.v2custom.TallyResult") + proto.RegisterType((*Vote)(nil), "terra.gov.v2custom.Vote") + proto.RegisterType((*DepositParams)(nil), "terra.gov.v2custom.DepositParams") + proto.RegisterType((*VotingParams)(nil), "terra.gov.v2custom.VotingParams") + proto.RegisterType((*TallyParams)(nil), "terra.gov.v2custom.TallyParams") + proto.RegisterType((*Params)(nil), "terra.gov.v2custom.Params") +} + +func init() { proto.RegisterFile("terra/gov/v2custom/gov.proto", fileDescriptor_de18f1a788afb560) } + +var fileDescriptor_de18f1a788afb560 = []byte{ + // 1364 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x73, 0xd3, 0xc6, + 0x17, 0x8f, 0x6c, 0xc7, 0x71, 0x5e, 0x62, 0x47, 0x2c, 0xf9, 0x82, 0x08, 0xc1, 0xce, 0xd7, 0x5f, + 0x86, 0xc9, 0x97, 0x82, 0x5d, 0x42, 0xcb, 0x81, 0xf6, 0x50, 0x27, 0x36, 0x45, 0x0c, 0xc4, 0xae, + 0x2c, 0x42, 0xe9, 0x45, 0xb3, 0xb6, 0x16, 0x67, 0x67, 0x2c, 0xad, 0xab, 0x5d, 0x05, 0xfc, 0x27, + 0xf4, 0xd2, 0xe1, 0xd8, 0x53, 0xdb, 0x63, 0x8f, 0x3d, 0x70, 0xeb, 0x3f, 0xc0, 0xa9, 0xc3, 0x70, + 0x69, 0x2f, 0xa5, 0x1d, 0x38, 0x74, 0x86, 0xbf, 0xa2, 0xa3, 0xd5, 0xca, 0x76, 0x1c, 0x77, 0x12, + 0xb8, 0x78, 0xbc, 0xef, 0x7d, 0x3e, 0xef, 0xbd, 0x7d, 0xbf, 0x24, 0x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x3c, 0xec, 0x78, 0x54, 0x38, 0x51, 0xd7, + 0x19, 0xf3, 0xd2, 0xce, 0xda, 0x91, 0xf8, 0xed, 0xa4, 0x25, 0xb7, 0x33, 0x4f, 0xff, 0x2c, 0x69, + 0x16, 0xc4, 0xa4, 0x48, 0x8c, 0xee, 0x80, 0xae, 0xf2, 0xec, 0x10, 0xdf, 0x8d, 0xed, 0x64, 0x4f, + 0x68, 0xa7, 0xa0, 0x98, 0x0d, 0xdf, 0x95, 0xb6, 0x4c, 0xc8, 0x0b, 0x26, 0x70, 0xdf, 0x51, 0x72, + 0x63, 0xe1, 0x1d, 0xaa, 0xb5, 0x2c, 0xa9, 0x49, 0x2b, 0xdd, 0x85, 0x53, 0x07, 0x4c, 0x50, 0xbf, + 0xe7, 0x70, 0x81, 0x03, 0x75, 0xbf, 0xdc, 0x09, 0xe3, 0x5a, 0x89, 0xa9, 0xed, 0x88, 0x29, 0x03, + 0xbb, 0x0d, 0x4a, 0x34, 0xbe, 0xe3, 0xe2, 0x09, 0x6d, 0xe5, 0x63, 0x62, 0x72, 0xc5, 0xb5, 0xa8, + 0x5d, 0x04, 0x76, 0xb1, 0xc0, 0x06, 0x44, 0x0d, 0x6c, 0x8d, 0xce, 0x68, 0x15, 0xe6, 0x05, 0x15, + 0x7d, 0x62, 0x2c, 0x49, 0x45, 0x7c, 0x40, 0x06, 0x2c, 0xf0, 0xd0, 0xf3, 0x70, 0x30, 0x34, 0x96, + 0xa5, 0x3c, 0x39, 0xa2, 0x8f, 0x20, 0x17, 0xcf, 0x06, 0x09, 0x8c, 0xfc, 0x31, 0xc3, 0x30, 0x42, + 0xa2, 0x75, 0x58, 0x24, 0x4f, 0x06, 0xc4, 0xa5, 0x82, 0xb8, 0x46, 0x61, 0x43, 0xdb, 0xcc, 0x59, + 0x63, 0x01, 0xfa, 0x1f, 0xe4, 0x1f, 0x61, 0xda, 0x27, 0xae, 0x13, 0x10, 0xcc, 0x99, 0x6f, 0xac, + 0x48, 0x9f, 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 0x35, 0x5b, 0xcd, 0x76, 0xed, 0xae, 0xd3, 0xb6, 0x6b, 0xf6, 0xfd, + 0xf6, 0x54, 0x4c, 0x65, 0x28, 0x4e, 0x03, 0xea, 0x8d, 0x56, 0xb3, 0x6d, 0xda, 0x4e, 0xab, 0x61, + 0x99, 0xcd, 0xba, 0xae, 0xa1, 0xff, 0xc2, 0x85, 0x69, 0xcc, 0x5e, 0xd3, 0x36, 0x77, 0x3f, 0x4f, + 0x20, 0x29, 0xb4, 0x06, 0x67, 0xa6, 0x21, 0xad, 0x5a, 0xbb, 0xdd, 0xa8, 0xc7, 0x41, 0x4f, 0xeb, + 0xac, 0xc6, 0x9d, 0xc6, 0x8e, 0xdd, 0xa8, 0xeb, 0x99, 0x59, 0xcc, 0x5b, 0x35, 0xf3, 0x6e, 0xa3, + 0xae, 0xcf, 0x6f, 0xdb, 0xcf, 0x5f, 0x17, 0xb5, 0x17, 0xaf, 0x8b, 0xda, 0x5f, 0xaf, 0x8b, 0xda, + 0xd3, 0x37, 0xc5, 0xb9, 0x17, 0x6f, 0x8a, 0x73, 0xbf, 0xbf, 0x29, 0xce, 0x7d, 0x75, 0xb3, 0x47, + 0xc5, 0x7e, 0xd8, 0xa9, 0x74, 0x99, 0x57, 0xed, 0xf6, 0x31, 0xe7, 0xb4, 0x7b, 0x35, 0xfe, 0x74, + 0xe9, 0xb2, 0x80, 0x54, 0x0f, 0xae, 0x57, 0xc7, 0x1f, 0x2f, 0x55, 0x31, 0x1c, 0x10, 0x3e, 0xfa, + 0x9e, 0xe9, 0x64, 0xe5, 0x50, 0x5e, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x47, 0xf4, 0x7c, 0xaf, + 0xec, 0x0c, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { diff --git a/custom/gov/types/v2lunc1/params.go b/custom/gov/types/v2custom/params.go similarity index 98% rename from custom/gov/types/v2lunc1/params.go rename to custom/gov/types/v2custom/params.go index 510bf03f..8651d4e8 100644 --- a/custom/gov/types/v2lunc1/params.go +++ b/custom/gov/types/v2custom/params.go @@ -1,4 +1,4 @@ -package v2lunc1 +package v2custom import ( fmt "fmt" @@ -52,7 +52,7 @@ func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { func NewParams( minDeposit sdk.Coins, maxDepositPeriod, votingPeriod time.Duration, quorum, threshold, vetoThreshold, minInitialDepositRatio string, burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, - minUusdDeposit sdk.Coin, + MinUusdDeposit sdk.Coin, ) Params { return Params{ MinDeposit: minDeposit, @@ -65,7 +65,7 @@ func NewParams( BurnProposalDepositPrevote: burnProposalDeposit, BurnVoteQuorum: burnVoteQuorum, BurnVoteVeto: burnVoteVeto, - MinUusdDeposit: minUusdDeposit, + MinUusdDeposit: MinUusdDeposit, } } diff --git a/custom/gov/types/v2lunc1/query.pb.go b/custom/gov/types/v2custom/query.pb.go similarity index 81% rename from custom/gov/types/v2lunc1/query.pb.go rename to custom/gov/types/v2custom/query.pb.go index 60fd6ba8..d468795d 100644 --- a/custom/gov/types/v2lunc1/query.pb.go +++ b/custom/gov/types/v2custom/query.pb.go @@ -1,19 +1,16 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/gov/v2lunc1/query.proto +// source: terra/gov/v2custom/query.proto -package v2lunc1 +package v2custom import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/codec/types" types "github.com/cosmos/cosmos-sdk/types" _ "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" - _ "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -42,7 +39,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_075d72aa1a1cda58, []int{0} + return fileDescriptor_52ac9ccd3a4fff51, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -81,7 +78,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_075d72aa1a1cda58, []int{1} + return fileDescriptor_52ac9ccd3a4fff51, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -127,7 +124,7 @@ 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_075d72aa1a1cda58, []int{2} + return fileDescriptor_52ac9ccd3a4fff51, []int{2} } func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -173,7 +170,7 @@ func (m *QueryMinimalDepositProposalResponse) Reset() { *m = QueryMinima func (m *QueryMinimalDepositProposalResponse) String() string { return proto.CompactTextString(m) } func (*QueryMinimalDepositProposalResponse) ProtoMessage() {} func (*QueryMinimalDepositProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_075d72aa1a1cda58, []int{3} + return fileDescriptor_52ac9ccd3a4fff51, []int{3} } func (m *QueryMinimalDepositProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -210,49 +207,46 @@ func (m *QueryMinimalDepositProposalResponse) GetMinimalDeposit() types.Coin { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "terra.gov.v2lunc1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "terra.gov.v2lunc1.QueryParamsResponse") - proto.RegisterType((*QueryProposalRequest)(nil), "terra.gov.v2lunc1.QueryProposalRequest") - proto.RegisterType((*QueryMinimalDepositProposalResponse)(nil), "terra.gov.v2lunc1.QueryMinimalDepositProposalResponse") -} - -func init() { proto.RegisterFile("terra/gov/v2lunc1/query.proto", fileDescriptor_075d72aa1a1cda58) } - -var fileDescriptor_075d72aa1a1cda58 = []byte{ - // 518 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4f, 0x6b, 0x14, 0x31, - 0x14, 0xdf, 0x29, 0x75, 0xc1, 0x14, 0x94, 0xc6, 0x3d, 0xb8, 0x63, 0x9d, 0x95, 0x11, 0xff, 0x20, - 0x74, 0xc2, 0x6e, 0xc1, 0x22, 0x88, 0x87, 0x6d, 0x2f, 0x82, 0x2d, 0xba, 0xd2, 0x8b, 0x97, 0x25, - 0x33, 0x13, 0xc7, 0xc0, 0x24, 0x6f, 0x3a, 0xc9, 0x0c, 0x2c, 0xc5, 0x8b, 0x9f, 0x40, 0xf0, 0x4b, - 0x78, 0xf4, 0x33, 0x78, 0xaa, 0xb7, 0x82, 0x17, 0x4f, 0x22, 0xbb, 0x82, 0x5f, 0x43, 0x26, 0xc9, - 0xaa, 0xdb, 0x6d, 0xed, 0x25, 0x24, 0xef, 0xf7, 0x7b, 0xef, 0xfd, 0xde, 0xef, 0x05, 0xdd, 0xd4, - 0xac, 0x2c, 0x29, 0xc9, 0xa0, 0x26, 0xf5, 0x20, 0xaf, 0x64, 0xd2, 0x27, 0x87, 0x15, 0x2b, 0x27, - 0x51, 0x51, 0x82, 0x06, 0xbc, 0x6e, 0xe0, 0x28, 0x83, 0x3a, 0x72, 0xb0, 0x1f, 0x24, 0xa0, 0x04, - 0x28, 0x12, 0x53, 0xc5, 0x48, 0xdd, 0x8f, 0x99, 0xa6, 0x7d, 0x92, 0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b6, 0xf9, 0xbc, 0x5b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x73, 0x01, - 0x93, 0xde, 0xeb, 0x03, 0x00, 0x00, + proto.RegisterType((*QueryParamsRequest)(nil), "terra.gov.v2custom.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "terra.gov.v2custom.QueryParamsResponse") + proto.RegisterType((*QueryProposalRequest)(nil), "terra.gov.v2custom.QueryProposalRequest") + proto.RegisterType((*QueryMinimalDepositProposalResponse)(nil), "terra.gov.v2custom.QueryMinimalDepositProposalResponse") +} + +func init() { proto.RegisterFile("terra/gov/v2custom/query.proto", fileDescriptor_52ac9ccd3a4fff51) } + +var fileDescriptor_52ac9ccd3a4fff51 = []byte{ + // 479 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4d, 0x6b, 0x14, 0x41, + 0x10, 0xdd, 0x09, 0x71, 0xc1, 0x0e, 0x28, 0xb6, 0x7b, 0x30, 0xa3, 0x4e, 0x64, 0x02, 0x1a, 0x84, + 0x74, 0x91, 0xcd, 0x21, 0x22, 0x88, 0xb0, 0xd1, 0x83, 0x60, 0xfc, 0x58, 0xcc, 0xc5, 0x4b, 0xe8, + 0x9d, 0x6d, 0xc6, 0x86, 0x9d, 0xa9, 0xc9, 0x54, 0xef, 0xc0, 0x22, 0x7a, 0xf0, 0x17, 0x08, 0xfe, + 0x09, 0x8f, 0xfe, 0x09, 0x21, 0x37, 0x03, 0x5e, 0x3c, 0x89, 0xec, 0x0a, 0xfe, 0x0d, 0x99, 0xee, + 0x5e, 0xe3, 0x90, 0x8d, 0x5e, 0x86, 0xe1, 0xd5, 0xab, 0x7a, 0xaf, 0x5e, 0x17, 0x8b, 0x8c, 0x2a, + 0x4b, 0x09, 0x29, 0x56, 0x50, 0x75, 0x93, 0x31, 0x19, 0xcc, 0xe0, 0x70, 0xac, 0xca, 0x89, 0x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0xc3, 0x7f, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -270,7 +264,7 @@ type QueryClient interface { // Params queries the parameters for custom gov module Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Proposal queries proposal details based on ProposalID. - ProposalMinimalLUNCByUusd(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryMinimalDepositProposalResponse, error) + ProposalMinimalLUNCByUstc(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryMinimalDepositProposalResponse, error) } type queryClient struct { @@ -283,16 +277,16 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Query/Params", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) ProposalMinimalLUNCByUusd(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryMinimalDepositProposalResponse, error) { +func (c *queryClient) ProposalMinimalLUNCByUstc(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryMinimalDepositProposalResponse, error) { out := new(QueryMinimalDepositProposalResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Query/ProposalMinimalLUNCByUusd", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Query/ProposalMinimalLUNCByUstc", in, out, opts...) if err != nil { return nil, err } @@ -304,7 +298,7 @@ type QueryServer interface { // Params queries the parameters for custom gov module Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Proposal queries proposal details based on ProposalID. - ProposalMinimalLUNCByUusd(context.Context, *QueryProposalRequest) (*QueryMinimalDepositProposalResponse, error) + ProposalMinimalLUNCByUstc(context.Context, *QueryProposalRequest) (*QueryMinimalDepositProposalResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -314,8 +308,8 @@ 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) ProposalMinimalLUNCByUusd(ctx context.Context, req *QueryProposalRequest) (*QueryMinimalDepositProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalMinimalLUNCByUusd not implemented") +func (*UnimplementedQueryServer) ProposalMinimalLUNCByUstc(ctx context.Context, req *QueryProposalRequest) (*QueryMinimalDepositProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProposalMinimalLUNCByUstc not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -332,7 +326,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Query/Params", + FullMethod: "/terra.gov.v2custom.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -340,26 +334,26 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_ProposalMinimalLUNCByUusd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Query_ProposalMinimalLUNCByUstc_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).ProposalMinimalLUNCByUusd(ctx, in) + return srv.(QueryServer).ProposalMinimalLUNCByUstc(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Query/ProposalMinimalLUNCByUusd", + FullMethod: "/terra.gov.v2custom.Query/ProposalMinimalLUNCByUstc", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ProposalMinimalLUNCByUusd(ctx, req.(*QueryProposalRequest)) + return srv.(QueryServer).ProposalMinimalLUNCByUstc(ctx, req.(*QueryProposalRequest)) } return interceptor(ctx, in, info, handler) } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "terra.gov.v2lunc1.Query", + ServiceName: "terra.gov.v2custom.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -367,12 +361,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "ProposalMinimalLUNCByUusd", - Handler: _Query_ProposalMinimalLUNCByUusd_Handler, + MethodName: "ProposalMinimalLUNCByUstc", + Handler: _Query_ProposalMinimalLUNCByUstc_Handler, }, }, Streams: []grpc.StreamDesc{}, - Metadata: "terra/gov/v2lunc1/query.proto", + Metadata: "terra/gov/v2custom/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/custom/gov/types/v2lunc1/query.pb.gw.go b/custom/gov/types/v2custom/query.pb.gw.go similarity index 88% rename from custom/gov/types/v2lunc1/query.pb.gw.go rename to custom/gov/types/v2custom/query.pb.gw.go index ba6a6add..6ab2ba49 100644 --- a/custom/gov/types/v2lunc1/query.pb.gw.go +++ b/custom/gov/types/v2custom/query.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: terra/gov/v2lunc1/query.proto +// source: terra/gov/v2custom/query.proto /* -Package v2lunc1 is a reverse proxy. +Package v2custom is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v2lunc1 +package v2custom import ( "context" @@ -51,7 +51,7 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -func request_Query_ProposalMinimalLUNCByUusd_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Query_ProposalMinimalLUNCByUstc_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 @@ -73,12 +73,12 @@ func request_Query_ProposalMinimalLUNCByUusd_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } - msg, err := client.ProposalMinimalLUNCByUusd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ProposalMinimalLUNCByUstc(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_ProposalMinimalLUNCByUusd_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Query_ProposalMinimalLUNCByUstc_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 @@ -100,7 +100,7 @@ func local_request_Query_ProposalMinimalLUNCByUusd_0(ctx context.Context, marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } - msg, err := server.ProposalMinimalLUNCByUusd(ctx, &protoReq) + msg, err := server.ProposalMinimalLUNCByUstc(ctx, &protoReq) return msg, metadata, err } @@ -134,7 +134,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_ProposalMinimalLUNCByUusd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ProposalMinimalLUNCByUstc_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -145,7 +145,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ProposalMinimalLUNCByUusd_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ProposalMinimalLUNCByUstc_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 { @@ -153,7 +153,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ProposalMinimalLUNCByUusd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProposalMinimalLUNCByUstc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -218,7 +218,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_ProposalMinimalLUNCByUusd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ProposalMinimalLUNCByUstc_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) @@ -227,14 +227,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ProposalMinimalLUNCByUusd_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ProposalMinimalLUNCByUstc_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_ProposalMinimalLUNCByUusd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProposalMinimalLUNCByUstc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -242,13 +242,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v2lunc1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v2custom", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ProposalMinimalLUNCByUusd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmos", "gov", "v2lunc1", "proposals", "minimal-deposits", "proposal_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ProposalMinimalLUNCByUstc_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmos", "gov", "v2custom", "proposals", "minimal-deposits", "proposal_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_ProposalMinimalLUNCByUusd_0 = runtime.ForwardResponseMessage + forward_Query_ProposalMinimalLUNCByUstc_0 = runtime.ForwardResponseMessage ) diff --git a/custom/gov/types/v2lunc1/tx.pb.go b/custom/gov/types/v2custom/tx.pb.go similarity index 83% rename from custom/gov/types/v2lunc1/tx.pb.go rename to custom/gov/types/v2custom/tx.pb.go index 546963d6..ca153d92 100644 --- a/custom/gov/types/v2lunc1/tx.pb.go +++ b/custom/gov/types/v2custom/tx.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/gov/v2lunc1/tx.proto +// source: terra/gov/v2custom/tx.proto -package v2lunc1 +package v2custom import ( context "context" @@ -48,7 +48,7 @@ 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_9d64e87259bdff9f, []int{0} + return fileDescriptor_352810ea07a1c9db, []int{0} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ 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_9d64e87259bdff9f, []int{1} + return fileDescriptor_352810ea07a1c9db, []int{1} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,46 +132,46 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgUpdateParams)(nil), "terra.gov.v2lunc1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "terra.gov.v2lunc1.MsgUpdateParamsResponse") -} - -func init() { proto.RegisterFile("terra/gov/v2lunc1/tx.proto", fileDescriptor_9d64e87259bdff9f) } - -var fileDescriptor_9d64e87259bdff9f = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x8b, 0xd3, 0x40, - 0x14, 0x6f, 0x74, 0x5d, 0xe9, 0xb8, 0x28, 0x1d, 0x96, 0xdd, 0x76, 0x84, 0x58, 0xbb, 0x20, 0xa5, - 0xd2, 0x84, 0xed, 0xc2, 0x82, 0x22, 0x82, 0x55, 0xf1, 0x62, 0x61, 0x69, 0x71, 0x05, 0x11, 0x25, - 0x4d, 0x86, 0x69, 0xb0, 0xc9, 0x0b, 0x79, 0x93, 0xd2, 0xde, 0xc4, 0xa3, 0x27, 0xf1, 0x53, 0x78, - 0xec, 0xc1, 0xbb, 0xd7, 0x3d, 0x2e, 0x9e, 0x3c, 0x89, 0xb4, 0x87, 0x7e, 0x0d, 0x49, 0x32, 0x69, - 0xd9, 0x66, 0xd7, 0xf5, 0x12, 0x66, 0xde, 0xef, 0xdf, 0x64, 0xe6, 0x3d, 0xc2, 0x24, 0x0f, 0x43, - 0xcb, 0x14, 0x30, 0x32, 0x47, 0xad, 0x61, 0xe4, 0xdb, 0xfb, 0xa6, 0x1c, 0x1b, 0x41, 0x08, 0x12, - 0x68, 0x29, 0xc1, 0x0c, 0x01, 0x23, 0x43, 0x61, 0x6c, 0xc7, 0x06, 0xf4, 0x00, 0x53, 0xfe, 0x8a, - 0xca, 0xb6, 0x05, 0x08, 0x48, 0x96, 0x66, 0xbc, 0x52, 0xd5, 0xdb, 0x79, 0xf3, 0xd8, 0x2c, 0x05, - 0x2b, 0xa9, 0xd5, 0xfb, 0x54, 0x95, 0x6e, 0x14, 0xb4, 0xab, 0x52, 0x3c, 0x14, 0x71, 0x8a, 0x87, - 0x42, 0x01, 0x25, 0xcb, 0x73, 0x7d, 0x30, 0x93, 0x6f, 0x5a, 0xaa, 0xfd, 0xd0, 0xc8, 0xad, 0x0e, - 0x8a, 0x57, 0x81, 0x63, 0x49, 0x7e, 0x64, 0x85, 0x96, 0x87, 0xf4, 0x90, 0x14, 0xad, 0x48, 0x0e, - 0x20, 0x74, 0xe5, 0xa4, 0xac, 0x55, 0xb5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0xb3, 0x7b, 0xff, - 0xc6, 0x97, 0xbe, 0x2f, 0xc8, 0xf5, 0x67, 0x3c, 0x00, 0x74, 0x25, 0xad, 0xe4, 0x25, 0x0a, 0x62, - 0x77, 0x2f, 0x84, 0x96, 0x46, 0xef, 0xc8, 0xd6, 0x99, 0x36, 0xac, 0x9d, 0xd3, 0x3e, 0x6b, 0x2f, - 0xcd, 0x1a, 0x97, 0x73, 0x32, 0x7f, 0x76, 0xed, 0x63, 0xdc, 0x6f, 0xed, 0xde, 0xc9, 0x4c, 0xd7, - 0x4e, 0x67, 0xba, 0xf6, 0x67, 0xa6, 0x6b, 0x5f, 0xe6, 0x7a, 0xe1, 0x74, 0xae, 0x17, 0x7e, 0xcd, - 0xf5, 0xc2, 0x9b, 0x07, 0xc2, 0x95, 0x83, 0xa8, 0x6f, 0xd8, 0xe0, 0x99, 0xf6, 0xd0, 0x42, 0x74, - 0xed, 0x66, 0x3a, 0x82, 0x36, 0x84, 0xdc, 0x1c, 0x1d, 0x98, 0x76, 0x84, 0x12, 0xbc, 0xa4, 0x13, - 0xe5, 0x24, 0xe0, 0x98, 0xcd, 0x65, 0x7f, 0x33, 0x99, 0xa6, 0x83, 0xbf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x10, 0xdb, 0x9e, 0x6a, 0x10, 0x04, 0x00, 0x00, + proto.RegisterType((*MsgUpdateParams)(nil), "terra.gov.v2custom.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "terra.gov.v2custom.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("terra/gov/v2custom/tx.proto", fileDescriptor_352810ea07a1c9db) } + +var fileDescriptor_352810ea07a1c9db = []byte{ + // 504 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xcf, 0x6a, 0xad, 0x64, 0x2c, 0x4a, 0x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0xbe, 0x2f, 0xc8, 0xcd, 0x67, 0xc2, 0x07, 0x74, 0x14, 0x2d, 0xe7, 0x25, + 0x09, 0xc4, 0x1e, 0x5c, 0x08, 0x65, 0x46, 0x1f, 0xc8, 0xda, 0xb9, 0x3e, 0xac, 0x2e, 0xeb, 0x9f, + 0x85, 0xa7, 0x66, 0x3b, 0x57, 0x20, 0xa5, 0x09, 0xec, 0xc6, 0xa7, 0xb0, 0xe3, 0x5a, 0xaf, 0x4e, + 0x27, 0xba, 0x76, 0x36, 0xd1, 0xb5, 0xbf, 0x13, 0x5d, 0xfb, 0x3a, 0xd5, 0x0b, 0x67, 0x53, 0xbd, + 0xf0, 0x7b, 0xaa, 0x17, 0xde, 0x1e, 0x48, 0x47, 0xf5, 0xfa, 0x5d, 0xc3, 0x02, 0x97, 0x5b, 0x27, + 0x26, 0xa2, 0x63, 0x35, 0xe2, 0x31, 0xb4, 0x20, 0x10, 0x7c, 0xb0, 0xc7, 0xe7, 0x83, 0xc8, 0xd5, + 0xc8, 0x17, 0x98, 0xcd, 0x66, 0x77, 0x35, 0x9a, 0xa8, 0xbd, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x0d, 0x4f, 0xdf, 0x8d, 0x17, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -214,7 +214,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) SubmitProposal(ctx context.Context, in *v1.MsgSubmitProposal, opts ...grpc.CallOption) (*v1.MsgSubmitProposalResponse, error) { out := new(v1.MsgSubmitProposalResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Msg/SubmitProposal", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Msg/SubmitProposal", in, out, opts...) if err != nil { return nil, err } @@ -223,7 +223,7 @@ func (c *msgClient) SubmitProposal(ctx context.Context, in *v1.MsgSubmitProposal func (c *msgClient) ExecLegacyContent(ctx context.Context, in *v1.MsgExecLegacyContent, opts ...grpc.CallOption) (*v1.MsgExecLegacyContentResponse, error) { out := new(v1.MsgExecLegacyContentResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Msg/ExecLegacyContent", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Msg/ExecLegacyContent", in, out, opts...) if err != nil { return nil, err } @@ -232,7 +232,7 @@ func (c *msgClient) ExecLegacyContent(ctx context.Context, in *v1.MsgExecLegacyC func (c *msgClient) Vote(ctx context.Context, in *v1.MsgVote, opts ...grpc.CallOption) (*v1.MsgVoteResponse, error) { out := new(v1.MsgVoteResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Msg/Vote", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Msg/Vote", in, out, opts...) if err != nil { return nil, err } @@ -241,7 +241,7 @@ func (c *msgClient) Vote(ctx context.Context, in *v1.MsgVote, opts ...grpc.CallO func (c *msgClient) VoteWeighted(ctx context.Context, in *v1.MsgVoteWeighted, opts ...grpc.CallOption) (*v1.MsgVoteWeightedResponse, error) { out := new(v1.MsgVoteWeightedResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Msg/VoteWeighted", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Msg/VoteWeighted", in, out, opts...) if err != nil { return nil, err } @@ -250,7 +250,7 @@ func (c *msgClient) VoteWeighted(ctx context.Context, in *v1.MsgVoteWeighted, op func (c *msgClient) Deposit(ctx context.Context, in *v1.MsgDeposit, opts ...grpc.CallOption) (*v1.MsgDepositResponse, error) { out := new(v1.MsgDepositResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Msg/Deposit", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Msg/Deposit", in, out, opts...) if err != nil { return nil, err } @@ -259,7 +259,7 @@ func (c *msgClient) Deposit(ctx context.Context, in *v1.MsgDeposit, opts ...grpc func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/terra.gov.v2lunc1.Msg/UpdateParams", in, out, opts...) + err := c.cc.Invoke(ctx, "/terra.gov.v2custom.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } @@ -323,7 +323,7 @@ func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Msg/SubmitProposal", + FullMethod: "/terra.gov.v2custom.Msg/SubmitProposal", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SubmitProposal(ctx, req.(*v1.MsgSubmitProposal)) @@ -341,7 +341,7 @@ func _Msg_ExecLegacyContent_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Msg/ExecLegacyContent", + FullMethod: "/terra.gov.v2custom.Msg/ExecLegacyContent", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).ExecLegacyContent(ctx, req.(*v1.MsgExecLegacyContent)) @@ -359,7 +359,7 @@ func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Msg/Vote", + FullMethod: "/terra.gov.v2custom.Msg/Vote", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Vote(ctx, req.(*v1.MsgVote)) @@ -377,7 +377,7 @@ func _Msg_VoteWeighted_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Msg/VoteWeighted", + FullMethod: "/terra.gov.v2custom.Msg/VoteWeighted", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).VoteWeighted(ctx, req.(*v1.MsgVoteWeighted)) @@ -395,7 +395,7 @@ func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Msg/Deposit", + FullMethod: "/terra.gov.v2custom.Msg/Deposit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Deposit(ctx, req.(*v1.MsgDeposit)) @@ -413,7 +413,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/terra.gov.v2lunc1.Msg/UpdateParams", + FullMethod: "/terra.gov.v2custom.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) @@ -422,7 +422,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "terra.gov.v2lunc1.Msg", + ServiceName: "terra.gov.v2custom.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -451,7 +451,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "terra/gov/v2lunc1/tx.proto", + Metadata: "terra/gov/v2custom/tx.proto", } func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { diff --git a/custom/params/types/codec.go b/custom/params/types/codec.go index 5c4b5cea..af0de4ad 100644 --- a/custom/params/types/codec.go +++ b/custom/params/types/codec.go @@ -1,7 +1,7 @@ package types import ( - govtypes "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + govtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ) diff --git a/custom/upgrade/types/codec.go b/custom/upgrade/types/codec.go index ac656c27..644e39d8 100644 --- a/custom/upgrade/types/codec.go +++ b/custom/upgrade/types/codec.go @@ -1,7 +1,7 @@ package types import ( - govtypes "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + govtypes "github.com/classic-terra/core/v3/custom/gov/types/v2custom" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) diff --git a/proto/terra/gov/v2lunc1/genesis.proto b/proto/terra/gov/v2custom/genesis.proto similarity index 90% rename from proto/terra/gov/v2lunc1/genesis.proto rename to proto/terra/gov/v2custom/genesis.proto index 5596e4d7..010e6c9e 100644 --- a/proto/terra/gov/v2lunc1/genesis.proto +++ b/proto/terra/gov/v2custom/genesis.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package terra.gov.v2lunc1; +package terra.gov.v2custom; -import "terra/gov/v2lunc1/gov.proto"; +import "terra/gov/v2custom/gov.proto"; import "cosmos/gov/v1/gov.proto"; -option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1"; +option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2custom"; // GenesisState defines the gov module's genesis state. message GenesisState { @@ -28,5 +28,5 @@ message GenesisState { // params defines all the paramaters of x/gov module. // // Since: cosmos-sdk 0.47 - terra.gov.v2lunc1.Params params = 8; + terra.gov.v2custom.Params params = 8; } diff --git a/proto/terra/gov/v2lunc1/gov.proto b/proto/terra/gov/v2custom/gov.proto similarity index 99% rename from proto/terra/gov/v2lunc1/gov.proto rename to proto/terra/gov/v2custom/gov.proto index 092f73f0..d8955183 100644 --- a/proto/terra/gov/v2lunc1/gov.proto +++ b/proto/terra/gov/v2custom/gov.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package terra.gov.v2lunc1; +package terra.gov.v2custom; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; @@ -9,7 +9,7 @@ import "cosmos_proto/cosmos.proto"; import "google/protobuf/any.proto"; import "amino/amino.proto"; -option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1"; +option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2custom"; // VoteOption enumerates the valid vote options for a given governance proposal. enum VoteOption { diff --git a/proto/terra/gov/v2lunc1/query.proto b/proto/terra/gov/v2custom/query.proto similarity index 80% rename from proto/terra/gov/v2lunc1/query.proto rename to proto/terra/gov/v2custom/query.proto index 592e8993..a2e5dbb9 100644 --- a/proto/terra/gov/v2lunc1/query.proto +++ b/proto/terra/gov/v2custom/query.proto @@ -1,24 +1,24 @@ syntax = "proto3"; -package terra.gov.v2lunc1; +package terra.gov.v2custom; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "terra/gov/v2lunc1/gov.proto"; +import "terra/gov/v2custom/gov.proto"; import "amino/amino.proto"; -option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1"; +option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2custom"; // Query defines the gRPC querier service for gov module service Query { // Params queries the parameters for custom gov module rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v2lunc1/params"; + option (google.api.http).get = "/cosmos/gov/v2custom/params"; } // Proposal queries proposal details based on ProposalID. - rpc ProposalMinimalLUNCByUusd(QueryProposalRequest) returns (QueryMinimalDepositProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v2lunc1/proposals/minimal-deposits/{proposal_id}"; + rpc ProposalMinimalLUNCByUstc(QueryProposalRequest) returns (QueryMinimalDepositProposalResponse) { + option (google.api.http).get = "/cosmos/gov/v2custom/proposals/minimal-deposits/{proposal_id}"; } } diff --git a/proto/terra/gov/v2lunc1/tx.proto b/proto/terra/gov/v2custom/tx.proto similarity index 92% rename from proto/terra/gov/v2lunc1/tx.proto rename to proto/terra/gov/v2custom/tx.proto index 264eea92..d39c8929 100644 --- a/proto/terra/gov/v2lunc1/tx.proto +++ b/proto/terra/gov/v2custom/tx.proto @@ -1,14 +1,14 @@ syntax = "proto3"; -package terra.gov.v2lunc1; +package terra.gov.v2custom; import "cosmos/gov/v1/tx.proto"; import "gogoproto/gogo.proto"; -import "terra/gov/v2lunc1/gov.proto"; +import "terra/gov/v2custom/gov.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; -option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1"; +option go_package = "github.com/classic-terra/core/v3/custom/gov/types/v2custom"; // Msg defines the gov Msg service. service Msg { @@ -50,7 +50,7 @@ message MsgUpdateParams { // params defines the x/gov parameters to update. // // NOTE: All parameters must be supplied. - terra.gov.v2lunc1.Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + terra.gov.v2custom.Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } // MsgUpdateParamsResponse defines the response structure for executing a diff --git a/scripts/gov_test/test-upgrade-and-submit-proposal.sh b/scripts/gov_test/test-upgrade-and-submit-proposal.sh index 11786008..ef06ab20 100755 --- a/scripts/gov_test/test-upgrade-and-submit-proposal.sh +++ b/scripts/gov_test/test-upgrade-and-submit-proposal.sh @@ -3,12 +3,12 @@ # Step 1: Run old chain --> Sub Proposal Upgrade (soft-upgrade) # Step 2: Vote --> Proposal Passed # Step 3: Stop old chain --> Switch new code --> Build --> Run new chain -# Step 4: Test Submit Proposal New Flow with MinUusd Deposit +# Step 4: Test Submit Proposal New Flow with MinUstc Deposit HOME_DIR=mytestnet -./build/terrad tx gov submit-legacy-proposal software-upgrade v8_4 --upgrade-height 20 --upgrade-info v8_4 --title "upgrade" --description "upgrade" --no-validate --deposit "100000000uluna" --from test0 --keyring-backend test --home mytestnet -y +./build/terrad tx gov submit-legacy-proposal software-upgrade v10_1 --upgrade-height 20 --upgrade-info v10_1 --title "upgrade" --description "upgrade" --no-validate --deposit "100000000uluna" --from test0 --keyring-backend test --home mytestnet -y ./build/terrad tx gov vote 1 yes --from test0 --home mytestnet --keyring-backend test -y ./build/terrad tx gov vote 1 yes --from test1 --home mytestnet --keyring-backend test -y diff --git a/tests/e2e/initialization/config.go b/tests/e2e/initialization/config.go index 32275320..2c3d0011 100644 --- a/tests/e2e/initialization/config.go +++ b/tests/e2e/initialization/config.go @@ -19,7 +19,7 @@ import ( staketypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/gogo/protobuf/proto" - govv2lunc1 "github.com/classic-terra/core/v3/custom/gov/types/v2lunc1" + govv2custom "github.com/classic-terra/core/v3/custom/gov/types/v2custom" "github.com/classic-terra/core/v3/tests/e2e/util" taxtypes "github.com/classic-terra/core/v3/x/tax/types" @@ -253,7 +253,7 @@ func initGenesis(chain *internalChain, forkHeight int) error { return err } - err = updateModuleGenesis(appGenState, govtypes.ModuleName, &govv2lunc1.GenesisState{}, updateGovGenesis) + err = updateModuleGenesis(appGenState, govtypes.ModuleName, &govv2custom.GenesisState{}, updateGovGenesis) if err != nil { return err } @@ -324,7 +324,7 @@ func updateTreasuryGenesis(treasuryGenState *treasurytypes.GenesisState) { } } -func updateGovGenesis(govGenState *govv2lunc1.GenesisState) { +func updateGovGenesis(govGenState *govv2custom.GenesisState) { govGenState.Params.VotingPeriod = &OneMin govGenState.Params.Quorum = sdk.NewDecWithPrec(2, 1).String() govGenState.Params.MinDeposit = tenTerra