From 3c9a31dca32f960c66d56cfe387b1f708a80c7af Mon Sep 17 00:00:00 2001 From: aljo242 Date: Tue, 31 May 2022 10:56:31 -0400 Subject: [PATCH 01/10] rebase branch and resolve conflicts --- proto/campaign/tx.proto | 10 - x/campaign/client/cli/tx.go | 1 - .../client/cli/tx_add_vesting_options.go | 61 -- x/campaign/keeper/msg_add_vesting_options.go | 111 ---- .../keeper/msg_add_vesting_options_test.go | 220 ------- x/campaign/simulation/simulation.go | 33 - x/campaign/types/codec.go | 2 - x/campaign/types/msg_add_vesting_options.go | 54 -- .../types/msg_add_vesting_options_test.go | 56 -- x/campaign/types/tx.pb.go | 605 ++---------------- 10 files changed, 69 insertions(+), 1084 deletions(-) delete mode 100644 x/campaign/client/cli/tx_add_vesting_options.go delete mode 100644 x/campaign/keeper/msg_add_vesting_options.go delete mode 100644 x/campaign/keeper/msg_add_vesting_options_test.go delete mode 100644 x/campaign/types/msg_add_vesting_options.go delete mode 100644 x/campaign/types/msg_add_vesting_options_test.go diff --git a/proto/campaign/tx.proto b/proto/campaign/tx.proto index feda81fc9..e45909b1a 100644 --- a/proto/campaign/tx.proto +++ b/proto/campaign/tx.proto @@ -17,7 +17,6 @@ service Msg { rpc UpdateSpecialAllocations(MsgUpdateSpecialAllocations) returns (MsgUpdateSpecialAllocationsResponse); rpc InitializeMainnet(MsgInitializeMainnet) returns (MsgInitializeMainnetResponse); rpc AddShares(MsgAddShares) returns (MsgAddSharesResponse); - rpc AddVestingOptions(MsgAddVestingOptions) returns (MsgAddVestingOptionsResponse); rpc MintVouchers(MsgMintVouchers) returns (MsgMintVouchersResponse); rpc BurnVouchers(MsgBurnVouchers) returns (MsgBurnVouchersResponse); rpc RedeemVouchers(MsgRedeemVouchers) returns (MsgRedeemVouchersResponse); @@ -94,15 +93,6 @@ message MsgAddShares { message MsgAddSharesResponse {} -message MsgAddVestingOptions { - string coordinator = 1; - uint64 campaignID = 2; - string address = 3; - ShareVestingOptions vestingOptions = 4 [(gogoproto.nullable) = false]; -} - -message MsgAddVestingOptionsResponse {} - message MsgMintVouchers { string coordinator = 1; uint64 campaignID = 2; diff --git a/x/campaign/client/cli/tx.go b/x/campaign/client/cli/tx.go index 480132aa4..083c54de3 100644 --- a/x/campaign/client/cli/tx.go +++ b/x/campaign/client/cli/tx.go @@ -26,7 +26,6 @@ func GetTxCmd() *cobra.Command { CmdUpdateSpecialAllocations(), CmdInitializeMainnet(), CmdAddShares(), - CmdAddVestingOptions(), CmdMintVouchers(), CmdBurnVouchers(), CmdUnredeemVouchers(), diff --git a/x/campaign/client/cli/tx_add_vesting_options.go b/x/campaign/client/cli/tx_add_vesting_options.go deleted file mode 100644 index 6969abc63..000000000 --- a/x/campaign/client/cli/tx_add_vesting_options.go +++ /dev/null @@ -1,61 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/tendermint/spn/x/campaign/types" -) - -func CmdAddVestingOptions() *cobra.Command { - cmd := &cobra.Command{ - Use: "add-vesting-options [campaign-id] [address] [total-shares] [vesting-shares] [vesting-end-time]", - Short: "Add a mainnet vesting account", - Args: cobra.ExactArgs(5), - RunE: func(cmd *cobra.Command, args []string) error { - campaignID, err := cast.ToUint64E(args[0]) - if err != nil { - return err - } - - address := args[1] - - totalShares, err := types.NewShares(args[2]) - if err != nil { - return err - } - - vestingShares, err := types.NewShares(args[3]) - if err != nil { - return err - } - endTime, _ := strconv.ParseUint(args[4], 10, 64) - delayedVesting := *types.NewShareDelayedVesting(totalShares, vestingShares, int64(endTime)) - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgAddVestingOptions( - campaignID, - clientCtx.GetFromAddress().String(), - address, - delayedVesting, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/campaign/keeper/msg_add_vesting_options.go b/x/campaign/keeper/msg_add_vesting_options.go deleted file mode 100644 index 72e1c20dc..000000000 --- a/x/campaign/keeper/msg_add_vesting_options.go +++ /dev/null @@ -1,111 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - spnerrors "github.com/tendermint/spn/pkg/errors" - "github.com/tendermint/spn/x/campaign/types" - profiletypes "github.com/tendermint/spn/x/profile/types" -) - -func (k msgServer) AddVestingOptions(goCtx context.Context, msg *types.MsgAddVestingOptions) (*types.MsgAddVestingOptionsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - campaign, found := k.GetCampaign(ctx, msg.CampaignID) - if !found { - return nil, sdkerrors.Wrapf(types.ErrCampaignNotFound, "%d", msg.CampaignID) - } - - mainnetLaunched, err := k.IsCampaignMainnetLaunchTriggered(ctx, campaign.CampaignID) - if err != nil { - return nil, spnerrors.Critical(err.Error()) - } - if mainnetLaunched { - return nil, sdkerrors.Wrap(types.ErrMainnetLaunchTriggered, fmt.Sprintf( - "mainnet %d launch is already triggered", - campaign.MainnetID, - )) - } - - // Get the coordinator ID associated to the sender address - coordID, err := k.profileKeeper.CoordinatorIDFromAddress(ctx, msg.Coordinator) - if err != nil { - return nil, err - } - - if campaign.CoordinatorID != coordID { - return nil, sdkerrors.Wrap(profiletypes.ErrCoordInvalid, fmt.Sprintf( - "coordinator of the campaign is %d", - campaign.CoordinatorID, - )) - } - - // check if the account already exists - oldAccount, foundAcc := k.GetMainnetVestingAccount(ctx, campaign.CampaignID, msg.Address) - if foundAcc { - // if yes, remove the allocated share - totalShares, err := oldAccount.GetTotalShares() - if err != nil { - return nil, spnerrors.Critical(err.Error()) - } - campaign.AllocatedShares, err = types.DecreaseShares(campaign.AllocatedShares, totalShares) - if err != nil { - return nil, spnerrors.Critical("campaign allocated shares is lower than all shares") - } - } - - account := types.MainnetVestingAccount{ - CampaignID: campaign.CampaignID, - Address: msg.Address, - VestingOptions: msg.VestingOptions, - } - - // get the VestingOption and account shares - totalShares, err := account.GetTotalShares() - if err != nil { - return nil, spnerrors.Criticalf( - "fail to get the account and vesting option shares: %s", - err.Error(), - ) - } - - // increase the campaign shares - campaign.AllocatedShares = types.IncreaseShares(campaign.AllocatedShares, totalShares) - if types.IsTotalSharesReached(campaign.AllocatedShares, k.GetTotalShares(ctx)) { - return nil, sdkerrors.Wrapf(types.ErrTotalSharesLimit, "%d", msg.CampaignID) - } - - k.SetCampaign(ctx, campaign) - k.SetMainnetVestingAccount(ctx, account) - - if !foundAcc { - err = ctx.EventManager().EmitTypedEvents( - &types.EventCampaignSharesUpdated{ - CampaignID: campaign.CampaignID, - CoordinatorAddress: msg.Coordinator, - AllocatedShares: campaign.AllocatedShares, - }, &types.EventMainnetVestingAccountCreated{ - CampaignID: campaign.CampaignID, - Address: msg.Address, - VestingOptions: msg.VestingOptions, - }, - ) - } else { - err = ctx.EventManager().EmitTypedEvents( - &types.EventCampaignSharesUpdated{ - CampaignID: campaign.CampaignID, - CoordinatorAddress: msg.Coordinator, - AllocatedShares: campaign.AllocatedShares, - }, &types.EventMainnetVestingAccountUpdated{ - CampaignID: campaign.CampaignID, - Address: msg.Address, - VestingOptions: msg.VestingOptions, - }) - } - - return &types.MsgAddVestingOptionsResponse{}, err -} diff --git a/x/campaign/keeper/msg_add_vesting_options_test.go b/x/campaign/keeper/msg_add_vesting_options_test.go deleted file mode 100644 index e5b2f1eee..000000000 --- a/x/campaign/keeper/msg_add_vesting_options_test.go +++ /dev/null @@ -1,220 +0,0 @@ -package keeper_test - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - spntypes "github.com/tendermint/spn/pkg/types" - tc "github.com/tendermint/spn/testutil/constructor" - testkeeper "github.com/tendermint/spn/testutil/keeper" - "github.com/tendermint/spn/testutil/sample" - "github.com/tendermint/spn/x/campaign/types" - profiletypes "github.com/tendermint/spn/x/profile/types" -) - -func TestMsgAddVestingOptions(t *testing.T) { - var ( - addr1 = sample.Address(r) - addr2 = sample.Address(r) - coordAddr1 = sample.Address(r) - coordAddr2 = sample.Address(r) - coordAddrMainnetInitialized = sample.Address(r) - coordAddrMainnetLaunched = sample.Address(r) - campaign = sample.Campaign(r, 0) - campaignInvalidAllocatedShares = sample.Campaign(r, 2) - campaignMainnetInitialized = sample.Campaign(r, 1) - campaignMainnetLaunched = sample.Campaign(r, 3) - - sdkCtx, tk, ts = testkeeper.NewTestSetup(t) - ctx = sdk.WrapSDKContext(sdkCtx) - ) - - // create shares - allocatedShares := tc.Shares(t, "91token") - invalidAllocatedShares := tc.Shares(t, fmt.Sprintf("%dtoken", spntypes.TotalShareNumber)) - highShare := tc.Shares(t, "1000token") - lowShare := tc.Shares(t, "8token") - - // Create a campaigns - res, err := ts.ProfileSrv.CreateCoordinator(ctx, &profiletypes.MsgCreateCoordinator{ - Address: coordAddrMainnetInitialized, - Description: sample.CoordinatorDescription(r), - }) - require.NoError(t, err) - campaignMainnetInitialized.CoordinatorID = res.CoordinatorID - campaignMainnetInitialized.MainnetInitialized = true - campaignMainnetInitialized.AllocatedShares = allocatedShares - chain := sample.Chain(r, 0, res.CoordinatorID) - chain.IsMainnet = true - chain.LaunchTriggered = false - campaignMainnetInitialized.MainnetID = tk.LaunchKeeper.AppendChain(sdkCtx, chain) - campaignMainnetInitialized.CampaignID = tk.CampaignKeeper.AppendCampaign(sdkCtx, campaignMainnetInitialized) - - res, err = ts.ProfileSrv.CreateCoordinator(ctx, &profiletypes.MsgCreateCoordinator{ - Address: coordAddrMainnetLaunched, - Description: sample.CoordinatorDescription(r), - }) - require.NoError(t, err) - campaignMainnetLaunched.CoordinatorID = res.CoordinatorID - campaignMainnetLaunched.MainnetInitialized = true - campaignMainnetLaunched.AllocatedShares = allocatedShares - chainLaunched := sample.Chain(r, 1, res.CoordinatorID) - chainLaunched.IsMainnet = true - chainLaunched.LaunchTriggered = true - campaignMainnetLaunched.MainnetID = tk.LaunchKeeper.AppendChain(sdkCtx, chainLaunched) - campaignMainnetLaunched.CampaignID = tk.CampaignKeeper.AppendCampaign(sdkCtx, campaignMainnetLaunched) - - res, err = ts.ProfileSrv.CreateCoordinator(ctx, &profiletypes.MsgCreateCoordinator{ - Address: coordAddr1, - Description: sample.CoordinatorDescription(r), - }) - require.NoError(t, err) - campaign.CoordinatorID = res.CoordinatorID - campaign.AllocatedShares = allocatedShares - campaign.CampaignID = tk.CampaignKeeper.AppendCampaign(sdkCtx, campaign) - accShare := sample.MainnetVestingAccountWithShares(r, campaign.CampaignID, addr2, lowShare) - tk.CampaignKeeper.SetMainnetVestingAccount(sdkCtx, accShare) - - res, err = ts.ProfileSrv.CreateCoordinator(ctx, &profiletypes.MsgCreateCoordinator{ - Address: coordAddr2, - Description: sample.CoordinatorDescription(r), - }) - require.NoError(t, err) - campaignInvalidAllocatedShares.CoordinatorID = res.CoordinatorID - campaignInvalidAllocatedShares.AllocatedShares = invalidAllocatedShares - campaignInvalidAllocatedShares.CampaignID = tk.CampaignKeeper.AppendCampaign(sdkCtx, campaignInvalidAllocatedShares) - - for _, tc := range []struct { - name string - msg types.MsgAddVestingOptions - expectedID uint64 - err error - }{ - { - name: "invalid campaign id", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddr1, - CampaignID: 100, - Address: addr1, - VestingOptions: sample.ShareVestingOptions(r), - }, - err: types.ErrCampaignNotFound, - }, - { - name: "invalid coordinator address", - msg: types.MsgAddVestingOptions{ - Coordinator: addr1, - CampaignID: campaign.CampaignID, - Address: addr1, - VestingOptions: sample.ShareVestingOptions(r), - }, - err: profiletypes.ErrCoordAddressNotFound, - }, - { - name: "invalid coordinator id", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddrMainnetInitialized, - CampaignID: campaign.CampaignID, - Address: addr1, - VestingOptions: sample.ShareVestingOptions(r), - }, - err: profiletypes.ErrCoordInvalid, - }, - { - name: "campaign with initialized mainnet", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddrMainnetInitialized, - CampaignID: campaignMainnetInitialized.CampaignID, - Address: addr1, - VestingOptions: sample.ShareVestingOptions(r), - }, - }, - { - name: "campaign with launched mainnet", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddrMainnetLaunched, - CampaignID: campaignMainnetLaunched.CampaignID, - Address: addr1, - VestingOptions: sample.ShareVestingOptions(r), - }, - err: types.ErrMainnetLaunchTriggered, - }, - { - name: "allocated shares greater them total shares", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddr2, - CampaignID: campaignInvalidAllocatedShares.CampaignID, - Address: addr1, - VestingOptions: sample.CustomShareVestingOptions(r, highShare), - }, - err: types.ErrTotalSharesLimit, - }, - { - name: "create new account with shares", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddr1, - CampaignID: campaign.CampaignID, - Address: addr1, - VestingOptions: sample.CustomShareVestingOptions(r, lowShare), - }, - }, - { - name: "update existing account shares", - msg: types.MsgAddVestingOptions{ - Coordinator: coordAddr1, - CampaignID: campaign.CampaignID, - Address: addr2, - VestingOptions: sample.CustomShareVestingOptions(r, lowShare), - }, - }, - } { - t.Run(tc.name, func(t *testing.T) { - var ( - accountExists bool - previousAccount types.MainnetVestingAccount - previousCampaign types.Campaign - ) - if tc.err == nil { - var found bool - previousCampaign, found = tk.CampaignKeeper.GetCampaign(sdkCtx, tc.msg.CampaignID) - require.True(t, found) - - previousAccount, accountExists = tk.CampaignKeeper.GetMainnetVestingAccount( - sdkCtx, - tc.msg.CampaignID, - tc.msg.Address, - ) - } - _, err := ts.CampaignSrv.AddVestingOptions(ctx, &tc.msg) - if tc.err != nil { - require.ErrorIs(t, err, tc.err) - return - } - require.NoError(t, err) - - account, found := tk.CampaignKeeper.GetMainnetVestingAccount(sdkCtx, tc.msg.CampaignID, tc.msg.Address) - require.True(t, found) - - campaign, found := tk.CampaignKeeper.GetCampaign(sdkCtx, tc.msg.CampaignID) - require.True(t, found) - - totalShares, err := account.GetTotalShares() - require.NoError(t, err) - tmpShare := types.IncreaseShares(previousCampaign.AllocatedShares, totalShares) - - if accountExists { - tmpAccShares, err := previousAccount.GetTotalShares() - require.NoError(t, err) - tmpShare, err = types.DecreaseShares(tmpShare, tmpAccShares) - require.NoError(t, err) - } - - require.Equal(t, tc.msg.VestingOptions, account.VestingOptions) - equal := types.IsEqualShares(campaign.AllocatedShares, tmpShare) - require.True(t, equal) - }) - } -} diff --git a/x/campaign/simulation/simulation.go b/x/campaign/simulation/simulation.go index 713768406..cdf1f4551 100644 --- a/x/campaign/simulation/simulation.go +++ b/x/campaign/simulation/simulation.go @@ -243,39 +243,6 @@ func SimulateMsgAddShares( } } -// SimulateMsgAddVestingOptions simulates a MsgAddVestingOptions message -func SimulateMsgAddVestingOptions( - ak types.AccountKeeper, - bk types.BankKeeper, - pk types.ProfileKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, campID, found := GetCoordSimAccountWithCampaignID(r, ctx, pk, k, accs, false, true) - if !found { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAddVestingOptions, "skip add vesting options"), nil, nil - } - - shares, getShares := GetSharesFromCampaign(r, ctx, k, campID) - if !getShares { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAddVestingOptions, "skip add vesting options"), nil, nil - } - - // Select a random account to give vesting options - accountNb := r.Intn(len(accs)) - - msg := types.NewMsgAddVestingOptions( - campID, - simAccount.Address.String(), - accs[accountNb].Address.String(), - *types.NewShareDelayedVesting(shares, shares, int64(sample.Duration(r))), - ) - return deliverSimTx(r, app, ctx, ak, bk, simAccount, msg, sdk.NewCoins()) - } -} - // SimulateMsgMintVouchers simulates a MsgMintVouchers message func SimulateMsgMintVouchers(ak types.AccountKeeper, bk types.BankKeeper, diff --git a/x/campaign/types/codec.go b/x/campaign/types/codec.go index 64ec1c0b2..3591623ee 100644 --- a/x/campaign/types/codec.go +++ b/x/campaign/types/codec.go @@ -14,7 +14,6 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateSpecialAllocations{}, "campaign/UpdateSpecialAllocations", nil) cdc.RegisterConcrete(&MsgInitializeMainnet{}, "campaign/InitializeMainnet", nil) cdc.RegisterConcrete(&MsgAddShares{}, "campaign/AddShares", nil) - cdc.RegisterConcrete(&MsgAddVestingOptions{}, "campaign/AddVestingOptions", nil) cdc.RegisterConcrete(&MsgMintVouchers{}, "campaign/MintVouchers", nil) cdc.RegisterConcrete(&MsgBurnVouchers{}, "campaign/BurnVouchers", nil) cdc.RegisterConcrete(&MsgRedeemVouchers{}, "campaign/RedeemVouchers", nil) @@ -31,7 +30,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgUpdateSpecialAllocations{}, &MsgInitializeMainnet{}, &MsgAddShares{}, - &MsgAddVestingOptions{}, &MsgMintVouchers{}, &MsgBurnVouchers{}, &MsgRedeemVouchers{}, diff --git a/x/campaign/types/msg_add_vesting_options.go b/x/campaign/types/msg_add_vesting_options.go deleted file mode 100644 index eca50144a..000000000 --- a/x/campaign/types/msg_add_vesting_options.go +++ /dev/null @@ -1,54 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgAddVestingOptions = "add_vesting_options" - -var _ sdk.Msg = &MsgAddVestingOptions{} - -func NewMsgAddVestingOptions( - campaignID uint64, - coordinator, - address string, - options ShareVestingOptions, -) *MsgAddVestingOptions { - return &MsgAddVestingOptions{ - CampaignID: campaignID, - Coordinator: coordinator, - Address: address, - VestingOptions: options, - } -} - -func (msg *MsgAddVestingOptions) Route() string { - return RouterKey -} - -func (msg *MsgAddVestingOptions) Type() string { - return TypeMsgAddVestingOptions -} - -func (msg *MsgAddVestingOptions) GetSigners() []sdk.AccAddress { - coordinator, err := sdk.AccAddressFromBech32(msg.Coordinator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{coordinator} -} - -func (msg *MsgAddVestingOptions) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgAddVestingOptions) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Coordinator) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid coordinator address (%s)", err) - } - - return msg.VestingOptions.Validate() -} diff --git a/x/campaign/types/msg_add_vesting_options_test.go b/x/campaign/types/msg_add_vesting_options_test.go deleted file mode 100644 index 448693784..000000000 --- a/x/campaign/types/msg_add_vesting_options_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package types_test - -import ( - "testing" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/stretchr/testify/require" - - "github.com/tendermint/spn/testutil/sample" - "github.com/tendermint/spn/x/campaign/types" -) - -func TestMsgAddVestingOptions_ValidateBasic(t *testing.T) { - tests := []struct { - name string - msg types.MsgAddVestingOptions - err error - }{ - { - name: "valid message", - msg: types.MsgAddVestingOptions{ - Coordinator: sample.Address(r), - CampaignID: 0, - VestingOptions: sample.ShareVestingOptions(r), - }, - }, - { - name: "invalid address", - msg: types.MsgAddVestingOptions{ - Coordinator: "invalid_address", - CampaignID: 0, - VestingOptions: sample.ShareVestingOptions(r), - }, - err: sdkerrors.ErrInvalidAddress, - }, - { - name: "invalid vesting options", - msg: types.MsgAddVestingOptions{ - Coordinator: "invalid_address", - CampaignID: 0, - VestingOptions: *types.NewShareDelayedVesting(sample.Shares(r), sample.Shares(r), 0), - }, - err: sdkerrors.ErrInvalidAddress, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := tt.msg.ValidateBasic() - if tt.err != nil { - require.ErrorIs(t, err, tt.err) - return - } - require.NoError(t, err) - }) - } -} diff --git a/x/campaign/types/tx.pb.go b/x/campaign/types/tx.pb.go index 96b2f5a24..83b4068eb 100644 --- a/x/campaign/types/tx.pb.go +++ b/x/campaign/types/tx.pb.go @@ -662,110 +662,6 @@ func (m *MsgAddSharesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddSharesResponse proto.InternalMessageInfo -type MsgAddVestingOptions struct { - Coordinator string `protobuf:"bytes,1,opt,name=coordinator,proto3" json:"coordinator,omitempty"` - CampaignID uint64 `protobuf:"varint,2,opt,name=campaignID,proto3" json:"campaignID,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - VestingOptions ShareVestingOptions `protobuf:"bytes,4,opt,name=vestingOptions,proto3" json:"vestingOptions"` -} - -func (m *MsgAddVestingOptions) Reset() { *m = MsgAddVestingOptions{} } -func (m *MsgAddVestingOptions) String() string { return proto.CompactTextString(m) } -func (*MsgAddVestingOptions) ProtoMessage() {} -func (*MsgAddVestingOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{12} -} -func (m *MsgAddVestingOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAddVestingOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAddVestingOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgAddVestingOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddVestingOptions.Merge(m, src) -} -func (m *MsgAddVestingOptions) XXX_Size() int { - return m.Size() -} -func (m *MsgAddVestingOptions) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddVestingOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAddVestingOptions proto.InternalMessageInfo - -func (m *MsgAddVestingOptions) GetCoordinator() string { - if m != nil { - return m.Coordinator - } - return "" -} - -func (m *MsgAddVestingOptions) GetCampaignID() uint64 { - if m != nil { - return m.CampaignID - } - return 0 -} - -func (m *MsgAddVestingOptions) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *MsgAddVestingOptions) GetVestingOptions() ShareVestingOptions { - if m != nil { - return m.VestingOptions - } - return ShareVestingOptions{} -} - -type MsgAddVestingOptionsResponse struct { -} - -func (m *MsgAddVestingOptionsResponse) Reset() { *m = MsgAddVestingOptionsResponse{} } -func (m *MsgAddVestingOptionsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAddVestingOptionsResponse) ProtoMessage() {} -func (*MsgAddVestingOptionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{13} -} -func (m *MsgAddVestingOptionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAddVestingOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAddVestingOptionsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgAddVestingOptionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddVestingOptionsResponse.Merge(m, src) -} -func (m *MsgAddVestingOptionsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAddVestingOptionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddVestingOptionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAddVestingOptionsResponse proto.InternalMessageInfo - type MsgMintVouchers struct { Coordinator string `protobuf:"bytes,1,opt,name=coordinator,proto3" json:"coordinator,omitempty"` CampaignID uint64 `protobuf:"varint,2,opt,name=campaignID,proto3" json:"campaignID,omitempty"` @@ -776,7 +672,7 @@ func (m *MsgMintVouchers) Reset() { *m = MsgMintVouchers{} } func (m *MsgMintVouchers) String() string { return proto.CompactTextString(m) } func (*MsgMintVouchers) ProtoMessage() {} func (*MsgMintVouchers) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{14} + return fileDescriptor_fb6bf904ffc53c1f, []int{12} } func (m *MsgMintVouchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -833,7 +729,7 @@ func (m *MsgMintVouchersResponse) Reset() { *m = MsgMintVouchersResponse func (m *MsgMintVouchersResponse) String() string { return proto.CompactTextString(m) } func (*MsgMintVouchersResponse) ProtoMessage() {} func (*MsgMintVouchersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{15} + return fileDescriptor_fb6bf904ffc53c1f, []int{13} } func (m *MsgMintVouchersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -872,7 +768,7 @@ func (m *MsgBurnVouchers) Reset() { *m = MsgBurnVouchers{} } func (m *MsgBurnVouchers) String() string { return proto.CompactTextString(m) } func (*MsgBurnVouchers) ProtoMessage() {} func (*MsgBurnVouchers) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{16} + return fileDescriptor_fb6bf904ffc53c1f, []int{14} } func (m *MsgBurnVouchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -929,7 +825,7 @@ func (m *MsgBurnVouchersResponse) Reset() { *m = MsgBurnVouchersResponse func (m *MsgBurnVouchersResponse) String() string { return proto.CompactTextString(m) } func (*MsgBurnVouchersResponse) ProtoMessage() {} func (*MsgBurnVouchersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{17} + return fileDescriptor_fb6bf904ffc53c1f, []int{15} } func (m *MsgBurnVouchersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -969,7 +865,7 @@ func (m *MsgRedeemVouchers) Reset() { *m = MsgRedeemVouchers{} } func (m *MsgRedeemVouchers) String() string { return proto.CompactTextString(m) } func (*MsgRedeemVouchers) ProtoMessage() {} func (*MsgRedeemVouchers) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{18} + return fileDescriptor_fb6bf904ffc53c1f, []int{16} } func (m *MsgRedeemVouchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1033,7 +929,7 @@ func (m *MsgRedeemVouchersResponse) Reset() { *m = MsgRedeemVouchersResp func (m *MsgRedeemVouchersResponse) String() string { return proto.CompactTextString(m) } func (*MsgRedeemVouchersResponse) ProtoMessage() {} func (*MsgRedeemVouchersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{19} + return fileDescriptor_fb6bf904ffc53c1f, []int{17} } func (m *MsgRedeemVouchersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1072,7 +968,7 @@ func (m *MsgUnredeemVouchers) Reset() { *m = MsgUnredeemVouchers{} } func (m *MsgUnredeemVouchers) String() string { return proto.CompactTextString(m) } func (*MsgUnredeemVouchers) ProtoMessage() {} func (*MsgUnredeemVouchers) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{20} + return fileDescriptor_fb6bf904ffc53c1f, []int{18} } func (m *MsgUnredeemVouchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1129,7 +1025,7 @@ func (m *MsgUnredeemVouchersResponse) Reset() { *m = MsgUnredeemVouchers func (m *MsgUnredeemVouchersResponse) String() string { return proto.CompactTextString(m) } func (*MsgUnredeemVouchersResponse) ProtoMessage() {} func (*MsgUnredeemVouchersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb6bf904ffc53c1f, []int{21} + return fileDescriptor_fb6bf904ffc53c1f, []int{19} } func (m *MsgUnredeemVouchersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1171,8 +1067,6 @@ func init() { proto.RegisterType((*MsgInitializeMainnetResponse)(nil), "tendermint.spn.campaign.MsgInitializeMainnetResponse") proto.RegisterType((*MsgAddShares)(nil), "tendermint.spn.campaign.MsgAddShares") proto.RegisterType((*MsgAddSharesResponse)(nil), "tendermint.spn.campaign.MsgAddSharesResponse") - proto.RegisterType((*MsgAddVestingOptions)(nil), "tendermint.spn.campaign.MsgAddVestingOptions") - proto.RegisterType((*MsgAddVestingOptionsResponse)(nil), "tendermint.spn.campaign.MsgAddVestingOptionsResponse") proto.RegisterType((*MsgMintVouchers)(nil), "tendermint.spn.campaign.MsgMintVouchers") proto.RegisterType((*MsgMintVouchersResponse)(nil), "tendermint.spn.campaign.MsgMintVouchersResponse") proto.RegisterType((*MsgBurnVouchers)(nil), "tendermint.spn.campaign.MsgBurnVouchers") @@ -1186,70 +1080,67 @@ func init() { func init() { proto.RegisterFile("campaign/tx.proto", fileDescriptor_fb6bf904ffc53c1f) } var fileDescriptor_fb6bf904ffc53c1f = []byte{ - // 1007 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x24, 0x26, 0xd4, 0xcf, 0x51, 0x20, 0x4b, 0xd5, 0x3a, 0xdb, 0xb0, 0x89, 0x16, 0xb5, - 0x58, 0xa5, 0xd9, 0xa5, 0xa6, 0x1c, 0x10, 0xbd, 0x34, 0x29, 0x12, 0x95, 0x30, 0x48, 0x1b, 0xda, - 0x43, 0x39, 0x44, 0x93, 0xdd, 0xd1, 0x7a, 0xc1, 0x9e, 0x59, 0xed, 0x8c, 0xad, 0x86, 0x2b, 0x37, - 0x0e, 0xa8, 0xe2, 0xc4, 0x0f, 0xe0, 0xc4, 0x5f, 0x40, 0x42, 0x82, 0x53, 0x4f,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0xfe, 0x93, 0x22, 0x2d, 0xc4, 0x07, 0xcb, 0xf2, 0xdf, 0x80, - 0x0f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xce, 0x02, 0xeb, 0x19, 0xbd, 0x10, 0x00, 0x00, + // 946 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0xcf, 0x64, 0x97, 0xd0, 0x7d, 0x89, 0x0a, 0x31, 0x55, 0xbb, 0x71, 0x83, 0x13, 0x19, 0xb5, + 0xac, 0x0a, 0xb1, 0x69, 0x28, 0x07, 0x44, 0x2f, 0x4d, 0x8a, 0x44, 0x25, 0x96, 0x83, 0x43, 0x39, + 0xc0, 0x21, 0x9a, 0xd8, 0x23, 0xef, 0xc0, 0xee, 0x8c, 0xe5, 0x99, 0x8d, 0x1a, 0xae, 0xdc, 0xa1, + 0xe2, 0xc4, 0x07, 0xe0, 0xc4, 0x57, 0x40, 0x42, 0x82, 0x53, 0x8f, 0x3d, 0xf6, 0x14, 0x50, 0xf2, + 0x2d, 0x7a, 0x01, 0x79, 0xc6, 0x3b, 0x6b, 0xaf, 0x37, 0x4e, 0x42, 0x57, 0x4d, 0x4f, 0xd9, 0x99, + 0xfc, 0xe6, 0xbd, 0xf7, 0xfb, 0xcd, 0xfb, 0x33, 0x86, 0xe5, 0x10, 0x0f, 0x12, 0x4c, 0x63, 0xe6, + 0xcb, 0x47, 0x5e, 0x92, 0x72, 0xc9, 0xad, 0x6b, 0x92, 0xb0, 0x88, 0xa4, 0x03, 0xca, 0xa4, 0x27, + 0x12, 0xe6, 0x8d, 0x10, 0xf6, 0x95, 0x98, 0xc7, 0x5c, 0x61, 0xfc, 0xec, 0x97, 0x86, 0xdb, 0x4e, + 0xc8, 0xc5, 0x80, 0x0b, 0x7f, 0x0f, 0x0b, 0xe2, 0xef, 0xdf, 0xde, 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0xc2, 0x8e, 0x75, 0x13, 0x2e, 0xe7, 0xcd, 0x6d, + 0xbb, 0x87, 0x69, 0xe6, 0xe1, 0x35, 0x85, 0x99, 0xd8, 0x75, 0xef, 0xaa, 0xcb, 0xac, 0xc4, 0x6f, + 0xea, 0x75, 0x15, 0x5a, 0xf9, 0x09, 0x53, 0xae, 0xe3, 0x0d, 0xf7, 0x19, 0x82, 0xa5, 0xae, 0x88, + 0xef, 0x45, 0xd1, 0x4e, 0x0f, 0xa7, 0x64, 0x16, 0x77, 0xdb, 0x86, 0xd7, 0x71, 0x14, 0xa5, 0x44, + 0x88, 0x9c, 0xf4, 0x68, 0x69, 0xf5, 0x61, 0x41, 0x28, 0x2f, 0xed, 0xe6, 0x69, 0x25, 0xf1, 0xf1, + 0xf9, 0x4b, 0x62, 0x41, 0x33, 0x08, 0x72, 0x1f, 0xee, 0x55, 0x75, 0xb1, 0x86, 0x99, 0xb9, 0xf1, + 0x3f, 0x75, 0x83, 0xea, 0x52, 0x26, 0xbf, 0xe2, 0xc3, 0xb0, 0x47, 0xd2, 0x59, 0xb0, 0x1e, 0x73, + 0x6b, 0xbc, 0x04, 0x6e, 0xba, 0xbd, 0x15, 0x29, 0x18, 0x7a, 0x87, 0x9a, 0xde, 0xd6, 0x30, 0x65, + 0x86, 0xde, 0x55, 0x58, 0x10, 0xaa, 0xa6, 0x72, 0x66, 0xf9, 0xea, 0x54, 0x52, 0x3f, 0x23, 0xb8, + 0xb4, 0x9f, 0x1b, 0xb9, 0xe0, 0x36, 0x66, 0xe2, 0xc8, 0xb9, 0x17, 0xf9, 0x19, 0xee, 0xcf, 0x91, + 0x9a, 0xe5, 0x01, 0x89, 0x08, 0x19, 0xbc, 0x30, 0xfb, 0x2c, 0x91, 0xf5, 0x73, 0xc2, 0x24, 0xb2, + 0x5e, 0x96, 0x75, 0x69, 0xbe, 0x22, 0xba, 0x5c, 0x57, 0x53, 0xbb, 0xcc, 0xdd, 0x28, 0xf3, 0x3b, + 0x82, 0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xeb, 0xfe, 0x93, 0x23, 0x07, 0x3d, 0x3d, 0x72, 0xd0, 0x3f, 0x47, + 0x0e, 0x7a, 0x7c, 0xec, 0xcc, 0x3d, 0x3d, 0x76, 0xe6, 0x9e, 0x1d, 0x3b, 0x73, 0x5f, 0xdf, 0x2a, + 0x74, 0xc1, 0xb1, 0x65, 0x5f, 0x24, 0xcc, 0x7f, 0xe4, 0x8f, 0x3f, 0x9c, 0xb3, 0x6e, 0xb8, 0xb7, + 0xa0, 0xbe, 0x50, 0x3f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x7d, 0xfa, 0x2f, 0x51, 0x0f, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1270,7 +1161,6 @@ type MsgClient interface { UpdateSpecialAllocations(ctx context.Context, in *MsgUpdateSpecialAllocations, opts ...grpc.CallOption) (*MsgUpdateSpecialAllocationsResponse, error) InitializeMainnet(ctx context.Context, in *MsgInitializeMainnet, opts ...grpc.CallOption) (*MsgInitializeMainnetResponse, error) AddShares(ctx context.Context, in *MsgAddShares, opts ...grpc.CallOption) (*MsgAddSharesResponse, error) - AddVestingOptions(ctx context.Context, in *MsgAddVestingOptions, opts ...grpc.CallOption) (*MsgAddVestingOptionsResponse, error) MintVouchers(ctx context.Context, in *MsgMintVouchers, opts ...grpc.CallOption) (*MsgMintVouchersResponse, error) BurnVouchers(ctx context.Context, in *MsgBurnVouchers, opts ...grpc.CallOption) (*MsgBurnVouchersResponse, error) RedeemVouchers(ctx context.Context, in *MsgRedeemVouchers, opts ...grpc.CallOption) (*MsgRedeemVouchersResponse, error) @@ -1339,15 +1229,6 @@ func (c *msgClient) AddShares(ctx context.Context, in *MsgAddShares, opts ...grp return out, nil } -func (c *msgClient) AddVestingOptions(ctx context.Context, in *MsgAddVestingOptions, opts ...grpc.CallOption) (*MsgAddVestingOptionsResponse, error) { - out := new(MsgAddVestingOptionsResponse) - err := c.cc.Invoke(ctx, "/tendermint.spn.campaign.Msg/AddVestingOptions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) MintVouchers(ctx context.Context, in *MsgMintVouchers, opts ...grpc.CallOption) (*MsgMintVouchersResponse, error) { out := new(MsgMintVouchersResponse) err := c.cc.Invoke(ctx, "/tendermint.spn.campaign.Msg/MintVouchers", in, out, opts...) @@ -1392,7 +1273,6 @@ type MsgServer interface { UpdateSpecialAllocations(context.Context, *MsgUpdateSpecialAllocations) (*MsgUpdateSpecialAllocationsResponse, error) InitializeMainnet(context.Context, *MsgInitializeMainnet) (*MsgInitializeMainnetResponse, error) AddShares(context.Context, *MsgAddShares) (*MsgAddSharesResponse, error) - AddVestingOptions(context.Context, *MsgAddVestingOptions) (*MsgAddVestingOptionsResponse, error) MintVouchers(context.Context, *MsgMintVouchers) (*MsgMintVouchersResponse, error) BurnVouchers(context.Context, *MsgBurnVouchers) (*MsgBurnVouchersResponse, error) RedeemVouchers(context.Context, *MsgRedeemVouchers) (*MsgRedeemVouchersResponse, error) @@ -1421,9 +1301,6 @@ func (*UnimplementedMsgServer) InitializeMainnet(ctx context.Context, req *MsgIn func (*UnimplementedMsgServer) AddShares(ctx context.Context, req *MsgAddShares) (*MsgAddSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddShares not implemented") } -func (*UnimplementedMsgServer) AddVestingOptions(ctx context.Context, req *MsgAddVestingOptions) (*MsgAddVestingOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddVestingOptions not implemented") -} func (*UnimplementedMsgServer) MintVouchers(ctx context.Context, req *MsgMintVouchers) (*MsgMintVouchersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MintVouchers not implemented") } @@ -1549,24 +1426,6 @@ func _Msg_AddShares_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } -func _Msg_AddVestingOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAddVestingOptions) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AddVestingOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.spn.campaign.Msg/AddVestingOptions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddVestingOptions(ctx, req.(*MsgAddVestingOptions)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_MintVouchers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgMintVouchers) if err := dec(in); err != nil { @@ -1667,10 +1526,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AddShares", Handler: _Msg_AddShares_Handler, }, - { - MethodName: "AddVestingOptions", - Handler: _Msg_AddVestingOptions_Handler, - }, { MethodName: "MintVouchers", Handler: _Msg_MintVouchers_Handler, @@ -2153,81 +2008,6 @@ func (m *MsgAddSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgAddVestingOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAddVestingOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAddVestingOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.VestingOptions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if m.CampaignID != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.CampaignID)) - i-- - dAtA[i] = 0x10 - } - if len(m.Coordinator) > 0 { - i -= len(m.Coordinator) - copy(dAtA[i:], m.Coordinator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Coordinator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgAddVestingOptionsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAddVestingOptionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAddVestingOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgMintVouchers) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2739,37 +2519,6 @@ func (m *MsgAddSharesResponse) Size() (n int) { return n } -func (m *MsgAddVestingOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Coordinator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.CampaignID != 0 { - n += 1 + sovTx(uint64(m.CampaignID)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.VestingOptions.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgAddVestingOptionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgMintVouchers) Size() (n int) { if m == nil { return 0 @@ -4224,222 +3973,6 @@ func (m *MsgAddSharesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddVestingOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAddVestingOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddVestingOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coordinator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Coordinator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CampaignID", wireType) - } - m.CampaignID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CampaignID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VestingOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.VestingOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgAddVestingOptionsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAddVestingOptionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddVestingOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgMintVouchers) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 203b48c055b8ab7f8302b808d03ebf3bf960a454 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 1 Jun 2022 13:13:10 -0400 Subject: [PATCH 02/10] clean up proto --- go.mod | 2 +- go.sum | 3 +- proto/campaign/events.proto | 2 +- proto/campaign/genesis.proto | 7 +- proto/campaign/query.proto | 31 +- proto/campaign/tx.proto | 2 +- ...et_vesting_account.proto => vesting.proto} | 6 - x/campaign/types/events.pb.go | 78 +- x/campaign/types/genesis.pb.go | 129 +- x/campaign/types/query.pb.go | 1171 ++--------------- x/campaign/types/query.pb.gw.go | 242 ---- x/campaign/types/tx.pb.go | 119 +- ...et_vesting_account.pb.go => vesting.pb.go} | 400 +----- 13 files changed, 337 insertions(+), 1855 deletions(-) rename proto/campaign/{mainnet_vesting_account.proto => vesting.proto} (85%) rename x/campaign/types/{mainnet_vesting_account.pb.go => vesting.pb.go} (54%) diff --git a/go.mod b/go.mod index ded4b9bb1..8373fd763 100644 --- a/go.mod +++ b/go.mod @@ -167,7 +167,7 @@ require ( golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/ini.v1 v1.66.3 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect ) diff --git a/go.sum b/go.sum index c03977f85..15c108a4d 100644 --- a/go.sum +++ b/go.sum @@ -2290,8 +2290,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/proto/campaign/events.proto b/proto/campaign/events.proto index 51c3eb574..83f0a8389 100644 --- a/proto/campaign/events.proto +++ b/proto/campaign/events.proto @@ -3,7 +3,7 @@ package tendermint.spn.campaign; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "campaign/mainnet_vesting_account.proto"; +import "campaign/vesting.proto"; option go_package = "github.com/tendermint/spn/x/campaign/types"; diff --git a/proto/campaign/genesis.proto b/proto/campaign/genesis.proto index 112826589..fc07f8b35 100644 --- a/proto/campaign/genesis.proto +++ b/proto/campaign/genesis.proto @@ -4,7 +4,7 @@ package tendermint.spn.campaign; // this line is used by starport scaffolding # genesis/proto/import import "gogoproto/gogo.proto"; import "campaign/campaign_chains.proto"; -import "campaign/mainnet_vesting_account.proto"; +import "campaign/vesting.proto"; import "campaign/campaign.proto"; import "campaign/mainnet_account.proto"; import "campaign/params.proto"; @@ -17,8 +17,7 @@ message GenesisState { uint64 campaignCounter = 2; repeated CampaignChains campaignChainsList = 3 [(gogoproto.nullable) = false]; repeated MainnetAccount mainnetAccountList = 4 [(gogoproto.nullable) = false]; - repeated MainnetVestingAccount mainnetVestingAccountList = 5 [(gogoproto.nullable) = false]; - uint64 totalShares = 6; - Params params = 7 [(gogoproto.nullable) = false]; + uint64 totalShares = 5; + Params params = 6 [(gogoproto.nullable) = false]; // this line is used by starport scaffolding # genesis/proto/state } diff --git a/proto/campaign/query.proto b/proto/campaign/query.proto index db22ff665..bd13a54b7 100644 --- a/proto/campaign/query.proto +++ b/proto/campaign/query.proto @@ -8,7 +8,7 @@ import "gogoproto/gogo.proto"; import "campaign/campaign_chains.proto"; import "campaign/campaign_summary.proto"; import "campaign/campaign.proto"; -import "campaign/mainnet_vesting_account.proto"; +import "campaign/vesting.proto"; import "campaign/mainnet_account.proto"; import "campaign/params.proto"; // this line is used by starport scaffolding # 1 @@ -58,16 +58,6 @@ service Query { option (google.api.http).get = "/tendermint/spn/campaign/mainnet_account_balance/{campaignID}"; } - // Queries a mainnetVestingAccount by index. - rpc MainnetVestingAccount(QueryGetMainnetVestingAccountRequest) returns (QueryGetMainnetVestingAccountResponse) { - option (google.api.http).get = "/tendermint/spn/campaign/mainnet_vesting_account/{campaignID}/{address}"; - } - - // Queries a list of mainnetVestingAccount items. - rpc MainnetVestingAccountAll(QueryAllMainnetVestingAccountRequest) returns (QueryAllMainnetVestingAccountResponse) { - option (google.api.http).get = "/tendermint/spn/campaign/mainnet_vesting_account/{campaignID}"; - } - // Queries a campaign summary rpc CampaignSummary(QueryCampaignSummaryRequest) returns (QueryCampaignSummaryResponse) { option (google.api.http).get = "/tendermint/spn/campaign/campaign_summary/{campaignID}"; @@ -176,25 +166,6 @@ message QueryAllMainnetAccountBalanceResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryGetMainnetVestingAccountRequest { - uint64 campaignID = 1; - string address = 2; -} - -message QueryGetMainnetVestingAccountResponse { - MainnetVestingAccount mainnetVestingAccount = 1 [(gogoproto.nullable) = false]; -} - -message QueryAllMainnetVestingAccountRequest { - uint64 campaignID = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -message QueryAllMainnetVestingAccountResponse { - repeated MainnetVestingAccount mainnetVestingAccount = 1 [(gogoproto.nullable) = false]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - message QueryCampaignSummaryRequest { uint64 campaignID = 1; } diff --git a/proto/campaign/tx.proto b/proto/campaign/tx.proto index e45909b1a..cdc315900 100644 --- a/proto/campaign/tx.proto +++ b/proto/campaign/tx.proto @@ -4,7 +4,7 @@ package tendermint.spn.campaign; // this line is used by starport scaffolding # proto/tx/import import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "campaign/mainnet_vesting_account.proto"; +import "campaign/vesting.proto"; import "campaign/special_allocations.proto"; option go_package = "github.com/tendermint/spn/x/campaign/types"; diff --git a/proto/campaign/mainnet_vesting_account.proto b/proto/campaign/vesting.proto similarity index 85% rename from proto/campaign/mainnet_vesting_account.proto rename to proto/campaign/vesting.proto index 34f6c0ed1..a06f6fbfe 100644 --- a/proto/campaign/mainnet_vesting_account.proto +++ b/proto/campaign/vesting.proto @@ -6,12 +6,6 @@ option go_package = "github.com/tendermint/spn/x/campaign/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -message MainnetVestingAccount { - uint64 campaignID = 1; - string address = 2; - ShareVestingOptions vestingOptions = 3 [(gogoproto.nullable) = false]; -} - message ShareVestingOptions { oneof options {ShareDelayedVesting delayedVesting = 1;} } diff --git a/x/campaign/types/events.pb.go b/x/campaign/types/events.pb.go index 1764540b8..126e4fdf2 100644 --- a/x/campaign/types/events.pb.go +++ b/x/campaign/types/events.pb.go @@ -694,45 +694,45 @@ func init() { func init() { proto.RegisterFile("campaign/events.proto", fileDescriptor_d53837db7ef8e0f4) } var fileDescriptor_d53837db7ef8e0f4 = []byte{ - // 608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xae, 0xb7, 0xaa, 0x50, 0x77, 0x80, 0x14, 0x0d, 0x2d, 0x54, 0x28, 0x2d, 0x11, 0x82, 0x0a, - 0x81, 0xa3, 0x8d, 0x13, 0xc7, 0x7e, 0x70, 0xe8, 0x01, 0x90, 0x32, 0xd6, 0xc3, 0x38, 0x4c, 0x6e, - 0x6c, 0x5a, 0x8b, 0xc4, 0x8e, 0x62, 0xb7, 0x62, 0x1c, 0xf8, 0x05, 0x93, 0xe0, 0xc8, 0x6f, 0xd8, - 0x3f, 0xe0, 0xce, 0x61, 0xc7, 0x1d, 0x39, 0x0d, 0xd4, 0x5e, 0xf9, 0x05, 0x9c, 0x50, 0x3e, 0xda, - 0x26, 0xd5, 0xa6, 0x15, 0x8d, 0x48, 0x9c, 0x12, 0xbf, 0x7e, 0xfd, 0xbc, 0xcf, 0x63, 0x3f, 0xf6, - 0x0b, 0x6f, 0x3b, 0xd8, 0xf3, 0x31, 0x1b, 0x70, 0x8b, 0x8e, 0x29, 0x57, 0x12, 0xf9, 0x81, 0x50, - 0x42, 0xdb, 0x52, 0x94, 0x13, 0x1a, 0x78, 0x8c, 0x2b, 0x24, 0x7d, 0x8e, 0x66, 0x59, 0xd5, 0xcd, - 0x81, 0x18, 0x88, 0x28, 0xc7, 0x0a, 0xff, 0xe2, 0xf4, 0xaa, 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x00, 0xde, 0x4b, 0x03, 0xf7, 0xe2, 0x76, 0xf1, 0xcf, 0x0e, 0x7b, - 0x1f, 0xde, 0x4c, 0x3a, 0xd0, 0x2b, 0x5f, 0x31, 0xc1, 0x65, 0x64, 0xb4, 0xca, 0xce, 0x63, 0x74, - 0x41, 0xe3, 0x43, 0x91, 0xf0, 0x5e, 0x66, 0x4d, 0xab, 0x18, 0x6e, 0xa0, 0xbd, 0x84, 0x74, 0x09, - 0xf7, 0xab, 0x9f, 0x70, 0x8e, 0xdc, 0x5b, 0x9d, 0x93, 0x89, 0x01, 0x4e, 0x27, 0x06, 0xf8, 0x39, - 0x31, 0xc0, 0xe7, 0xa9, 0x51, 0x38, 0x9d, 0x1a, 0x85, 0xef, 0x53, 0xa3, 0xb0, 0xff, 0x28, 0x65, - 0x92, 0x45, 0x1d, 0x4b, 0xfa, 0xdc, 0x7a, 0x6f, 0xcd, 0xdb, 0x7b, 0x64, 0x96, 0x7e, 0x29, 0xea, - 0xe6, 0x4f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x16, 0x7a, 0x1a, 0x5d, 0x08, 0x00, 0x00, + // 598 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xce, 0x35, 0x51, 0x20, 0x97, 0x02, 0x92, 0x55, 0xa8, 0x89, 0x90, 0x13, 0x2c, 0x24, 0x22, + 0x04, 0x67, 0xb5, 0x4c, 0x8c, 0xf9, 0x60, 0xc8, 0x00, 0x48, 0x2e, 0xcd, 0x50, 0xa6, 0x8b, 0xef, + 0x48, 0x4e, 0xd8, 0x77, 0x96, 0xef, 0x12, 0x51, 0x06, 0x7e, 0x41, 0x25, 0x18, 0xf9, 0x0d, 0xfd, + 0x07, 0xec, 0x0c, 0x1d, 0x3b, 0x32, 0x15, 0x94, 0xac, 0xfc, 0x02, 0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 0x7e, 0x97, 0x8b, 0x80, 0xf9, 0x2d, 0xf5, 0x63, 0xc2, + 0xa4, 0xe5, 0x38, 0x62, 0xcc, 0xd5, 0xba, 0x3f, 0x0a, 0x1d, 0x5e, 0xc3, 0x19, 0x06, 0xe9, 0x52, + 0x73, 0x61, 0x59, 0xe6, 0x6f, 0xb8, 0x04, 0xe3, 0x22, 0x19, 0xeb, 0x5a, 0xec, 0x7f, 0x91, 0xd1, + 0x3f, 0x57, 0x85, 0x4d, 0x3d, 0x31, 0xb9, 0x8a, 0x0a, 0xf3, 0x2b, 0x80, 0xf7, 0x97, 0x1b, 0xf7, + 0xe3, 0x31, 0xf1, 0xcf, 0x2e, 0xfb, 0x00, 0xde, 0x4c, 0x26, 0xcf, 0x2b, 0x5f, 0x31, 0xc1, 0x65, + 0x64, 0xb4, 0xea, 0xee, 0x63, 0x74, 0xc1, 0xa0, 0x43, 0x91, 0xf0, 0x7e, 0xa6, 0xa6, 0x5d, 0x0a, + 0x0f, 0xd0, 0x5e, 0xe9, 0x74, 0x09, 0xf7, 0xab, 0xdf, 0x70, 0x8e, 0xdc, 0xdb, 0xdd, 0x93, 0xa9, + 0x01, 0x4e, 0xa7, 0x06, 0xf8, 0x39, 0x35, 0xc0, 0xe7, 0x99, 0x51, 0x38, 0x9d, 0x19, 0x85, 0xef, + 0x33, 0xa3, 0x70, 0xf0, 0x68, 0xc9, 0x24, 0x0b, 0x1c, 0x4b, 0xfa, 0xdc, 0x7a, 0x6f, 0xcd, 0xc7, + 0x79, 0x64, 0x96, 0x41, 0x39, 0x9a, 0xe6, 0x4f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xdd, + 0x39, 0xf9, 0x4d, 0x08, 0x00, 0x00, } func (m *EventCampaignCreated) Marshal() (dAtA []byte, err error) { diff --git a/x/campaign/types/genesis.pb.go b/x/campaign/types/genesis.pb.go index 652292b71..cd9fdfa37 100644 --- a/x/campaign/types/genesis.pb.go +++ b/x/campaign/types/genesis.pb.go @@ -25,13 +25,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the campaign module's genesis state. type GenesisState struct { - CampaignList []Campaign `protobuf:"bytes,1,rep,name=campaignList,proto3" json:"campaignList"` - CampaignCounter uint64 `protobuf:"varint,2,opt,name=campaignCounter,proto3" json:"campaignCounter,omitempty"` - CampaignChainsList []CampaignChains `protobuf:"bytes,3,rep,name=campaignChainsList,proto3" json:"campaignChainsList"` - MainnetAccountList []MainnetAccount `protobuf:"bytes,4,rep,name=mainnetAccountList,proto3" json:"mainnetAccountList"` - MainnetVestingAccountList []MainnetVestingAccount `protobuf:"bytes,5,rep,name=mainnetVestingAccountList,proto3" json:"mainnetVestingAccountList"` - TotalShares uint64 `protobuf:"varint,6,opt,name=totalShares,proto3" json:"totalShares,omitempty"` - Params Params `protobuf:"bytes,7,opt,name=params,proto3" json:"params"` + CampaignList []Campaign `protobuf:"bytes,1,rep,name=campaignList,proto3" json:"campaignList"` + CampaignCounter uint64 `protobuf:"varint,2,opt,name=campaignCounter,proto3" json:"campaignCounter,omitempty"` + CampaignChainsList []CampaignChains `protobuf:"bytes,3,rep,name=campaignChainsList,proto3" json:"campaignChainsList"` + MainnetAccountList []MainnetAccount `protobuf:"bytes,4,rep,name=mainnetAccountList,proto3" json:"mainnetAccountList"` + TotalShares uint64 `protobuf:"varint,5,opt,name=totalShares,proto3" json:"totalShares,omitempty"` + Params Params `protobuf:"bytes,6,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -95,13 +94,6 @@ func (m *GenesisState) GetMainnetAccountList() []MainnetAccount { return nil } -func (m *GenesisState) GetMainnetVestingAccountList() []MainnetVestingAccount { - if m != nil { - return m.MainnetVestingAccountList - } - return nil -} - func (m *GenesisState) GetTotalShares() uint64 { if m != nil { return m.TotalShares @@ -123,31 +115,30 @@ func init() { func init() { proto.RegisterFile("campaign/genesis.proto", fileDescriptor_34fad1c9ee281f6a) } var fileDescriptor_34fad1c9ee281f6a = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4b, 0xfb, 0x30, - 0x18, 0xc6, 0xdb, 0xff, 0xfa, 0x9f, 0x90, 0x0d, 0x84, 0xa0, 0xae, 0xee, 0x90, 0x55, 0x0f, 0x5a, - 0x3c, 0xa4, 0x30, 0xcf, 0x1e, 0xdc, 0x04, 0x0f, 0x2a, 0xc8, 0x06, 0x1e, 0x04, 0x19, 0x59, 0x0d, - 0x5d, 0xc0, 0x26, 0xa5, 0xc9, 0x44, 0xbf, 0x85, 0x47, 0x3f, 0xd2, 0x8e, 0x3b, 0x7a, 0x12, 0xd9, - 0xbe, 0x88, 0x2c, 0x4d, 0xeb, 0xea, 0x1c, 0xbb, 0xbd, 0x7d, 0xfb, 0x3c, 0xbf, 0xe7, 0xcd, 0x9b, - 0x80, 0xbd, 0x90, 0xc4, 0x09, 0x61, 0x11, 0x0f, 0x22, 0xca, 0xa9, 0x64, 0x12, 0x27, 0xa9, 0x50, - 0x02, 0x36, 0x14, 0xe5, 0x8f, 0x34, 0x8d, 0x19, 0x57, 0x58, 0x26, 0x1c, 0xe7, 0xb2, 0xe6, 0x4e, - 0x24, 0x22, 0xa1, 0x35, 0xc1, 0xa2, 0xca, 0xe4, 0x4d, 0x54, 0x60, 0xf2, 0x62, 0x10, 0x8e, 0x08, - 0xe3, 0x06, 0xd7, 0x3c, 0x2a, 0xfe, 0xc7, 0x84, 0x71, 0x4e, 0xd5, 0xe0, 0x99, 0x4a, 0xc5, 0x78, - 0x34, 0x20, 0x61, 0x28, 0xc6, 0x5c, 0x19, 0x5d, 0x63, 0x85, 0xb3, 0x12, 0x90, 0x03, 0xca, 0xc6, - 0xdd, 0xe2, 0x7f, 0x42, 0x52, 0x12, 0x9b, 0xdc, 0xc3, 0x77, 0x07, 0xd4, 0x2f, 0xb3, 0x83, 0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0x81, 0x7a, 0x4d, 0xa8, 0x1c, 0x56, 0xf5, 0x3b, 0x3b, 0xfd, 0x0e, - 0x00, 0x00, 0xff, 0xff, 0x4d, 0x9c, 0x30, 0x12, 0x48, 0x03, 0x00, 0x00, + // 355 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4f, 0xfa, 0x30, + 0x18, 0xc6, 0xb7, 0x3f, 0xfc, 0x39, 0x14, 0x12, 0x93, 0x46, 0x65, 0xe1, 0x50, 0xa6, 0x17, 0x17, + 0x0f, 0x5b, 0x82, 0x67, 0x0f, 0x82, 0x89, 0x07, 0x35, 0x31, 0x70, 0x33, 0x31, 0xa4, 0xcc, 0x66, + 0x34, 0x71, 0x6d, 0xb3, 0xbe, 0x18, 0xfd, 0x16, 0x7e, 0x08, 0x3f, 0x0c, 0x47, 0x8e, 0x9e, 0x8c, + 0x81, 0x2f, 0x62, 0xe8, 0xba, 0x21, 0x22, 0xe1, 0xf6, 0xee, 0xed, 0xf3, 0xfc, 0x9e, 0xbe, 0xef, + 0x8a, 0x0e, 0x63, 0x9a, 0x2a, 0xca, 0x13, 0x11, 0x25, 0x4c, 0x30, 0xcd, 0x75, 0xa8, 0x32, 0x09, + 0x12, 0x37, 0x81, 0x89, 0x47, 0x96, 0xa5, 0x5c, 0x40, 0xa8, 0x95, 0x08, 0x0b, 0x59, 0x6b, 0x3f, + 0x91, 0x89, 0x34, 0x9a, 0x68, 0x59, 0xe5, 0xf2, 0x16, 0x29, 0x31, 0x45, 0x31, 0x8c, 0xc7, 0x94, + 0x0b, 0x8b, 0x6b, 0xad, 0x62, 0x9e, 0x99, 0x06, 0x2e, 0x12, 0xdb, 0x6f, 0x6e, 0xf8, 0x36, 0x80, + 0x29, 0xe5, 0x42, 0x30, 0x18, 0xd2, 0x38, 0x96, 0x13, 0x01, 0xf6, 0xfc, 0xa0, 0x3c, 0x57, 0x34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3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xa2, 0x55, 0x28, 0xc4, + 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -179,25 +170,11 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 if m.TotalShares != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.TotalShares)) i-- - dAtA[i] = 0x30 - } - if len(m.MainnetVestingAccountList) > 0 { - for iNdEx := len(m.MainnetVestingAccountList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MainnetVestingAccountList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } + dAtA[i] = 0x28 } if len(m.MainnetAccountList) > 0 { for iNdEx := len(m.MainnetAccountList) - 1; iNdEx >= 0; iNdEx-- { @@ -287,12 +264,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.MainnetVestingAccountList) > 0 { - for _, e := range m.MainnetVestingAccountList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } if m.TotalShares != 0 { n += 1 + sovGenesis(uint64(m.TotalShares)) } @@ -458,40 +429,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MainnetVestingAccountList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MainnetVestingAccountList = append(m.MainnetVestingAccountList, MainnetVestingAccount{}) - if err := m.MainnetVestingAccountList[len(m.MainnetVestingAccountList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalShares", wireType) } @@ -510,7 +447,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } diff --git a/x/campaign/types/query.pb.go b/x/campaign/types/query.pb.go index ce4aa42a4..a4bd97bb5 100644 --- a/x/campaign/types/query.pb.go +++ b/x/campaign/types/query.pb.go @@ -802,206 +802,6 @@ func (m *QueryAllMainnetAccountBalanceResponse) GetPagination() *query.PageRespo return nil } -type QueryGetMainnetVestingAccountRequest struct { - CampaignID uint64 `protobuf:"varint,1,opt,name=campaignID,proto3" json:"campaignID,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryGetMainnetVestingAccountRequest) Reset() { *m = QueryGetMainnetVestingAccountRequest{} } -func (m *QueryGetMainnetVestingAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetMainnetVestingAccountRequest) ProtoMessage() {} -func (*QueryGetMainnetVestingAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{16} -} -func (m *QueryGetMainnetVestingAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetMainnetVestingAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetMainnetVestingAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetMainnetVestingAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetMainnetVestingAccountRequest.Merge(m, src) -} -func (m *QueryGetMainnetVestingAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetMainnetVestingAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetMainnetVestingAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetMainnetVestingAccountRequest proto.InternalMessageInfo - -func (m *QueryGetMainnetVestingAccountRequest) GetCampaignID() uint64 { - if m != nil { - return m.CampaignID - } - return 0 -} - -func (m *QueryGetMainnetVestingAccountRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type QueryGetMainnetVestingAccountResponse struct { - MainnetVestingAccount MainnetVestingAccount `protobuf:"bytes,1,opt,name=mainnetVestingAccount,proto3" json:"mainnetVestingAccount"` -} - -func (m *QueryGetMainnetVestingAccountResponse) Reset() { *m = QueryGetMainnetVestingAccountResponse{} } -func (m *QueryGetMainnetVestingAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetMainnetVestingAccountResponse) ProtoMessage() {} -func (*QueryGetMainnetVestingAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{17} -} -func (m *QueryGetMainnetVestingAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetMainnetVestingAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetMainnetVestingAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetMainnetVestingAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetMainnetVestingAccountResponse.Merge(m, src) -} -func (m *QueryGetMainnetVestingAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetMainnetVestingAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetMainnetVestingAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetMainnetVestingAccountResponse proto.InternalMessageInfo - -func (m *QueryGetMainnetVestingAccountResponse) GetMainnetVestingAccount() MainnetVestingAccount { - if m != nil { - return m.MainnetVestingAccount - } - return MainnetVestingAccount{} -} - -type QueryAllMainnetVestingAccountRequest struct { - CampaignID uint64 `protobuf:"varint,1,opt,name=campaignID,proto3" json:"campaignID,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllMainnetVestingAccountRequest) Reset() { *m = QueryAllMainnetVestingAccountRequest{} } -func (m *QueryAllMainnetVestingAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllMainnetVestingAccountRequest) ProtoMessage() {} -func (*QueryAllMainnetVestingAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{18} -} -func (m *QueryAllMainnetVestingAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllMainnetVestingAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllMainnetVestingAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllMainnetVestingAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllMainnetVestingAccountRequest.Merge(m, src) -} -func (m *QueryAllMainnetVestingAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllMainnetVestingAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllMainnetVestingAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllMainnetVestingAccountRequest proto.InternalMessageInfo - -func (m *QueryAllMainnetVestingAccountRequest) GetCampaignID() uint64 { - if m != nil { - return m.CampaignID - } - return 0 -} - -func (m *QueryAllMainnetVestingAccountRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllMainnetVestingAccountResponse struct { - MainnetVestingAccount []MainnetVestingAccount `protobuf:"bytes,1,rep,name=mainnetVestingAccount,proto3" json:"mainnetVestingAccount"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllMainnetVestingAccountResponse) Reset() { *m = QueryAllMainnetVestingAccountResponse{} } -func (m *QueryAllMainnetVestingAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllMainnetVestingAccountResponse) ProtoMessage() {} -func (*QueryAllMainnetVestingAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{19} -} -func (m *QueryAllMainnetVestingAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllMainnetVestingAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllMainnetVestingAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllMainnetVestingAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllMainnetVestingAccountResponse.Merge(m, src) -} -func (m *QueryAllMainnetVestingAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllMainnetVestingAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllMainnetVestingAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllMainnetVestingAccountResponse proto.InternalMessageInfo - -func (m *QueryAllMainnetVestingAccountResponse) GetMainnetVestingAccount() []MainnetVestingAccount { - if m != nil { - return m.MainnetVestingAccount - } - return nil -} - -func (m *QueryAllMainnetVestingAccountResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - type QueryCampaignSummaryRequest struct { CampaignID uint64 `protobuf:"varint,1,opt,name=campaignID,proto3" json:"campaignID,omitempty"` } @@ -1010,7 +810,7 @@ func (m *QueryCampaignSummaryRequest) Reset() { *m = QueryCampaignSummar func (m *QueryCampaignSummaryRequest) String() string { return proto.CompactTextString(m) } func (*QueryCampaignSummaryRequest) ProtoMessage() {} func (*QueryCampaignSummaryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{20} + return fileDescriptor_7a55190e2afa5f29, []int{16} } func (m *QueryCampaignSummaryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1054,7 +854,7 @@ func (m *QueryCampaignSummaryResponse) Reset() { *m = QueryCampaignSumma func (m *QueryCampaignSummaryResponse) String() string { return proto.CompactTextString(m) } func (*QueryCampaignSummaryResponse) ProtoMessage() {} func (*QueryCampaignSummaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{21} + return fileDescriptor_7a55190e2afa5f29, []int{17} } func (m *QueryCampaignSummaryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1098,7 +898,7 @@ func (m *QueryCampaignSummariesRequest) Reset() { *m = QueryCampaignSumm func (m *QueryCampaignSummariesRequest) String() string { return proto.CompactTextString(m) } func (*QueryCampaignSummariesRequest) ProtoMessage() {} func (*QueryCampaignSummariesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{22} + return fileDescriptor_7a55190e2afa5f29, []int{18} } func (m *QueryCampaignSummariesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1143,7 +943,7 @@ func (m *QueryCampaignSummariesResponse) Reset() { *m = QueryCampaignSum func (m *QueryCampaignSummariesResponse) String() string { return proto.CompactTextString(m) } func (*QueryCampaignSummariesResponse) ProtoMessage() {} func (*QueryCampaignSummariesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{23} + return fileDescriptor_7a55190e2afa5f29, []int{19} } func (m *QueryCampaignSummariesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1194,7 +994,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_7a55190e2afa5f29, []int{24} + return fileDescriptor_7a55190e2afa5f29, []int{20} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1232,7 +1032,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_7a55190e2afa5f29, []int{25} + return fileDescriptor_7a55190e2afa5f29, []int{21} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1275,7 +1075,7 @@ func (m *QueryTotalSharesRequest) Reset() { *m = QueryTotalSharesRequest func (m *QueryTotalSharesRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesRequest) ProtoMessage() {} func (*QueryTotalSharesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{26} + return fileDescriptor_7a55190e2afa5f29, []int{22} } func (m *QueryTotalSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1312,7 +1112,7 @@ func (m *QueryTotalSharesResponse) Reset() { *m = QueryTotalSharesRespon func (m *QueryTotalSharesResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesResponse) ProtoMessage() {} func (*QueryTotalSharesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{27} + return fileDescriptor_7a55190e2afa5f29, []int{23} } func (m *QueryTotalSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1356,7 +1156,7 @@ func (m *QueryAuctionsOfCampaignRequest) Reset() { *m = QueryAuctionsOfC func (m *QueryAuctionsOfCampaignRequest) String() string { return proto.CompactTextString(m) } func (*QueryAuctionsOfCampaignRequest) ProtoMessage() {} func (*QueryAuctionsOfCampaignRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{28} + return fileDescriptor_7a55190e2afa5f29, []int{24} } func (m *QueryAuctionsOfCampaignRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1400,7 +1200,7 @@ func (m *QueryAuctionsOfCampaignResponse) Reset() { *m = QueryAuctionsOf func (m *QueryAuctionsOfCampaignResponse) String() string { return proto.CompactTextString(m) } func (*QueryAuctionsOfCampaignResponse) ProtoMessage() {} func (*QueryAuctionsOfCampaignResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a55190e2afa5f29, []int{29} + return fileDescriptor_7a55190e2afa5f29, []int{25} } func (m *QueryAuctionsOfCampaignResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1453,10 +1253,6 @@ func init() { proto.RegisterType((*QueryGetMainnetAccountBalanceResponse)(nil), "tendermint.spn.campaign.QueryGetMainnetAccountBalanceResponse") proto.RegisterType((*QueryAllMainnetAccountBalanceRequest)(nil), "tendermint.spn.campaign.QueryAllMainnetAccountBalanceRequest") proto.RegisterType((*QueryAllMainnetAccountBalanceResponse)(nil), "tendermint.spn.campaign.QueryAllMainnetAccountBalanceResponse") - proto.RegisterType((*QueryGetMainnetVestingAccountRequest)(nil), "tendermint.spn.campaign.QueryGetMainnetVestingAccountRequest") - proto.RegisterType((*QueryGetMainnetVestingAccountResponse)(nil), "tendermint.spn.campaign.QueryGetMainnetVestingAccountResponse") - proto.RegisterType((*QueryAllMainnetVestingAccountRequest)(nil), "tendermint.spn.campaign.QueryAllMainnetVestingAccountRequest") - proto.RegisterType((*QueryAllMainnetVestingAccountResponse)(nil), "tendermint.spn.campaign.QueryAllMainnetVestingAccountResponse") proto.RegisterType((*QueryCampaignSummaryRequest)(nil), "tendermint.spn.campaign.QueryCampaignSummaryRequest") proto.RegisterType((*QueryCampaignSummaryResponse)(nil), "tendermint.spn.campaign.QueryCampaignSummaryResponse") proto.RegisterType((*QueryCampaignSummariesRequest)(nil), "tendermint.spn.campaign.QueryCampaignSummariesRequest") @@ -1472,95 +1268,90 @@ func init() { func init() { proto.RegisterFile("campaign/query.proto", fileDescriptor_7a55190e2afa5f29) } var fileDescriptor_7a55190e2afa5f29 = []byte{ - // 1408 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcf, 0x6f, 0xdc, 0xc4, - 0x17, 0xcf, 0x24, 0xfd, 0xf6, 0x5b, 0x26, 0x52, 0x4a, 0xa6, 0x89, 0x92, 0x2c, 0x65, 0xb7, 0x31, - 0x34, 0x49, 0x5b, 0x6a, 0x37, 0x85, 0xa6, 0x05, 0x75, 0x13, 0x36, 0x09, 0x8d, 0x72, 0x40, 0x2d, - 0x9b, 0x82, 0xf8, 0x25, 0x2d, 0xb3, 0x8e, 0xbb, 0x31, 0x78, 0x6d, 0x77, 0xc7, 0x5b, 0x1a, 0x55, - 0xbd, 0x70, 0xe1, 0x82, 0x10, 0x52, 0xcf, 0x1c, 0xe0, 0xd2, 0x8a, 0x7f, 0x80, 0x1b, 0xaa, 0xc4, - 0x81, 0x0a, 0x2e, 0x95, 0xb8, 0x70, 0x40, 0xa5, 0x4a, 0x90, 0xf8, 0x17, 0x10, 0x27, 0xb4, 0xe3, - 0xe7, 0xdd, 0x1d, 0x7b, 0xbc, 0xb6, 0xb7, 0x5b, 0x71, 0x8a, 0xe3, 0x79, 0xef, 0xcd, 0xe7, 0xf3, - 0xde, 0xf3, 0xf8, 0xf3, 0xbc, 0x78, 0x42, 0xa7, 0x75, 0x97, 0x9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0xee, 0xba, 0xa3, 0x54, 0xf0, 0x74, 0xd4, 0x95, 0xb9, 0x8e, 0xcd, 0x0c, 0xb2, 0x86, 0x0f, 0x05, - 0x96, 0xdc, 0x73, 0xf4, 0xec, 0xac, 0x1a, 0x53, 0x3b, 0x35, 0x70, 0x5e, 0x3d, 0xf0, 0xe0, 0x51, - 0x61, 0xa8, 0xdc, 0x76, 0x54, 0x28, 0x60, 0x2b, 0x59, 0x56, 0x18, 0xdb, 0x25, 0x8c, 0x3b, 0x95, - 0x81, 0x1d, 0xe6, 0x54, 0xbf, 0x8c, 0x6a, 0xab, 0x8c, 0xaa, 0xdf, 0x36, 0x50, 0x46, 0xf5, 0x0a, - 0xad, 0x19, 0xe0, 0x5b, 0xee, 0xf2, 0x54, 0xee, 0x21, 0x20, 0x21, 0xec, 0x21, 0x25, 0x31, 0xd2, - 0x17, 0x09, 0xb2, 0x21, 0x20, 0x1d, 0xe6, 0x48, 0xe7, 0x13, 0x91, 0xfa, 0x08, 0x04, 0xa8, 0x2b, - 0xf8, 0xf9, 0x70, 0xba, 0xd7, 0x78, 0x8b, 0xa5, 0xad, 0xd7, 0xa7, 0x38, 0x1f, 0x17, 0x00, 0x08, - 0xbf, 0x8d, 0xc7, 0x74, 0x61, 0x05, 0x32, 0x3b, 0x9f, 0x48, 0xdb, 0x37, 0x07, 0xf2, 0xa1, 0x20, - 0xca, 0x06, 0x3e, 0xce, 0x37, 0xde, 0x72, 0x0d, 0xdd, 0xa4, 0x56, 0xc9, 0xb2, 0x1c, 0xdd, 0x7f, - 0x3e, 0x57, 0xa9, 0x45, 0x6d, 0xdd, 0x48, 0xcb, 0xe0, 0xef, 0x61, 0x3c, 0x97, 0x14, 0x09, 0xa8, - 0xdc, 0x43, 0xf8, 0x48, 0xcd, 0xb0, 0x0d, 0x66, 0xb2, 0x75, 0x93, 0x79, 0x0d, 0xb3, 0xda, 0x84, - 0x56, 0x69, 0xd5, 0x71, 0x46, 0x28, 0x40, 0x90, 0xfa, 0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0xbb, 0x30, 0xca, 0x45, 0x98, 0x45, 0x84, 0x25, 0xd8, 0xf5, 0x18, - 0x1e, 0xf5, 0x3a, 0xb7, 0xa1, 0xe1, 0xba, 0x6f, 0x29, 0xaf, 0x07, 0x12, 0xa2, 0xa9, 0x73, 0x45, - 0x7c, 0xf9, 0x5a, 0xd6, 0x81, 0xae, 0x84, 0x0b, 0xb1, 0x11, 0x00, 0x46, 0x1e, 0x63, 0xea, 0xaf, - 0x6e, 0xae, 0xfb, 0x95, 0x3c, 0x50, 0xee, 0xba, 0x73, 0xf6, 0xee, 0x14, 0xfe, 0x1f, 0x8f, 0x41, - 0xee, 0x22, 0x7c, 0x28, 0x70, 0x27, 0x67, 0x62, 0x73, 0x14, 0x33, 0x7c, 0xe6, 0x16, 0x33, 0x78, - 0xf8, 0xd8, 0x94, 0xa5, 0xcf, 0x7e, 0xfd, 0xf3, 0xce, 0xf0, 0x19, 0xa2, 0x6a, 0x1d, 0x57, 0x8d, - 0xb9, 0x9d, 0x89, 0xba, 0x73, 0x71, 0xab, 0xc3, 0xfa, 0x36, 0xf9, 0x1a, 0xe1, 0xd1, 0x20, 0x58, - 0xc9, 0xb2, 0x92, 0xc0, 0x46, 0xa7, 0xd1, 0x24, 0xb0, 0x92, 0xd9, 0x52, 0x39, 0xc1, 0xc1, 0xbe, - 0x40, 0x66, 0x13, 0xc1, 0x92, 0xfb, 0x08, 0x8f, 0x89, 0x73, 0x16, 0x59, 0x4a, 0x9d, 0x1d, 0x61, - 0x44, 0xcc, 0x9d, 0xcf, 0xec, 0x07, 0x70, 0x8b, 0x1c, 0xee, 0x79, 0x72, 0x2e, 0x11, 0x2e, 0x7c, - 0xf7, 0x10, 0x53, 0xfc, 0x17, 0xc2, 0x33, 0xb1, 0x33, 0x1b, 0x59, 0xee, 0x8d, 0x2a, 0x69, 0x6c, - 0xcc, 0xad, 0xf4, 0xed, 0x0f, 0xec, 0x36, 0x39, 0xbb, 0x35, 0x52, 0x8a, 0x65, 0xc7,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0xf7, 0xf0, 0xaf, 0x1b, 0x00, 0x00, + // 1321 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x24, 0x21, 0x94, 0x89, 0x94, 0x92, 0x49, 0x42, 0x12, 0x53, 0xec, 0x66, 0xa1, 0x4d, + 0xda, 0xd2, 0xdd, 0xa6, 0xd0, 0xb4, 0xa0, 0x3a, 0xc1, 0x49, 0x68, 0x94, 0x03, 0x6a, 0x71, 0x8a, + 0xc4, 0x2f, 0xc9, 0x8c, 0x37, 0x53, 0x67, 0x61, 0x7f, 0xd5, 0xb3, 0x2e, 0x8d, 0xaa, 0x5e, 0xb8, + 0x70, 0x41, 0x08, 0xa9, 0x67, 0x0e, 0x70, 0xa1, 0xe2, 0x1f, 0xe0, 0x86, 0x2a, 0x71, 0xa0, 0x82, + 0x4b, 0x25, 0x2e, 0x08, 0xa1, 0x52, 0x25, 0x48, 0xfc, 0x0b, 0x88, 0x13, 0xf2, 0xec, 0x5b, 0xdb, + 0xe3, 0xdd, 0xf5, 0xee, 0xba, 0x91, 0x7a, 0xca, 0x66, 0xdf, 0xbc, 0xf7, 0xbe, 0xef, 0xbd, 0x37, + 0x33, 0xdf, 0x1a, 0x4f, 0xea, 0xd4, 0x72, 0xa9, 0x51, 0xb3, 0xb5, 0xeb, 0x0d, 0x56, 0xdf, 0x55, + 0xdd, 0xba, 0xe3, 0x39, 0x64, 0xda, 0x63, 0xf6, 0x36, 0xab, 0x5b, 0x86, 0xed, 0xa9, 0xdc, 0xb5, + 0xd5, 0x60, 0x51, 0xee, 0x48, 0xcd, 0x71, 0x6a, 0x26, 0xd3, 0xa8, 0x6b, 0x68, 0xd4, 0xb6, 0x1d, + 0x8f, 0x7a, 0x86, 0x63, 0x73, 0xdf, 0x2d, 0x97, 0xd7, 0x1d, 0x6e, 0x39, 0x5c, 0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f, 0x4c, 0xa0, 0x6d, 0xea, 0x15, 0x5a, 0x63, 0xe0, 0x5b, 0xee, 0xf0, 0x54, 0xee, + 0x22, 0x20, 0x21, 0xe5, 0x88, 0x24, 0x31, 0xd4, 0x17, 0x09, 0xb2, 0x21, 0x21, 0x1d, 0x14, 0x48, + 0xe7, 0x13, 0x91, 0xfa, 0x08, 0x24, 0xa8, 0x2b, 0xf8, 0x85, 0xee, 0x72, 0xaf, 0x89, 0x91, 0x4a, + 0xdb, 0xaf, 0x4f, 0x71, 0x3e, 0x2e, 0x00, 0x10, 0x7e, 0x07, 0x8f, 0xe9, 0x92, 0x05, 0x2a, 0x3b, + 0x9f, 0x48, 0xdb, 0x5f, 0x0e, 0xe4, 0xbb, 0x82, 0x28, 0x1b, 0xf8, 0x98, 0x48, 0xbc, 0xe5, 0x32, + 0xdd, 0xa0, 0x66, 0xc9, 0x34, 0x1d, 0xdd, 0xdf, 0x8f, 0xab, 0xd4, 0xa4, 0xb6, 0xce, 0xd2, 0x32, + 0xf8, 0x77, 0x10, 0x1f, 0x4f, 0x8a, 0x04, 0x54, 0xee, 0x22, 0x3c, 0x51, 0x63, 0x36, 0xe3, 0x06, + 0x5f, 0x37, 0xb8, 0x57, 0x37, 0xaa, 0x0d, 0x18, 0x95, 0x66, 0x1f, 0x67, 0xa5, 0x06, 0x04, 0xa5, + 0x5f, 0x73, 0x0c, 0x7b, 0xf5, 0x83, 0x26, 0x85, 0xff, 0x1e, 0x16, 0xe6, 0x6b, 0x86, 0xb7, 0xd3, + 0xa8, 0xaa, 0xba, 0x63, 0x69, 0x70, 0x1c, 0xf8, 0x7f, 0x4e, 0xf3, 0xed, 0x4f, 0x34, 0x6f, 0xd7, + 0x65, 0x5c, 0x38, 0x7c, 0xff, 0x57, 0x61, 0x21, 0xe5, 0x52, 0x5e, 0x8e, 0x82, 0x44, 0xbe, 0x45, + 0xf8, 0x59, 0xdd, 0xa4, 0x86, 0x45, 0xab, 0x26, 0x2b, 0x19, 0xf5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1, 0x5e, 0x1e, 0x3d, 0xda, 0xcb, 0xa3, 0xaf, 0xf6, 0xf3, 0x03, 0x0f, + 0xf6, 0xf3, 0x03, 0xbf, 0xef, 0xe7, 0x07, 0xde, 0x3f, 0xd9, 0xf1, 0x8b, 0x4f, 0x57, 0xfc, 0x9b, + 0x1d, 0xa5, 0xd9, 0x75, 0x19, 0xaf, 0x8e, 0x88, 0x1f, 0x84, 0x5f, 0xf9, 0x3f, 0x00, 0x00, 0xff, + 0xff, 0x75, 0xde, 0x6e, 0xa4, 0x6a, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1591,10 +1382,6 @@ type QueryClient interface { MainnetAccountBalance(ctx context.Context, in *QueryGetMainnetAccountBalanceRequest, opts ...grpc.CallOption) (*QueryGetMainnetAccountBalanceResponse, error) // Queries a list of mainnetAccountBalance items. MainnetAccountBalanceAll(ctx context.Context, in *QueryAllMainnetAccountBalanceRequest, opts ...grpc.CallOption) (*QueryAllMainnetAccountBalanceResponse, error) - // Queries a mainnetVestingAccount by index. - MainnetVestingAccount(ctx context.Context, in *QueryGetMainnetVestingAccountRequest, opts ...grpc.CallOption) (*QueryGetMainnetVestingAccountResponse, error) - // Queries a list of mainnetVestingAccount items. - MainnetVestingAccountAll(ctx context.Context, in *QueryAllMainnetVestingAccountRequest, opts ...grpc.CallOption) (*QueryAllMainnetVestingAccountResponse, error) // Queries a campaign summary CampaignSummary(ctx context.Context, in *QueryCampaignSummaryRequest, opts ...grpc.CallOption) (*QueryCampaignSummaryResponse, error) // Queries a list of campaign summaries @@ -1687,24 +1474,6 @@ func (c *queryClient) MainnetAccountBalanceAll(ctx context.Context, in *QueryAll return out, nil } -func (c *queryClient) MainnetVestingAccount(ctx context.Context, in *QueryGetMainnetVestingAccountRequest, opts ...grpc.CallOption) (*QueryGetMainnetVestingAccountResponse, error) { - out := new(QueryGetMainnetVestingAccountResponse) - err := c.cc.Invoke(ctx, "/tendermint.spn.campaign.Query/MainnetVestingAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) MainnetVestingAccountAll(ctx context.Context, in *QueryAllMainnetVestingAccountRequest, opts ...grpc.CallOption) (*QueryAllMainnetVestingAccountResponse, error) { - out := new(QueryAllMainnetVestingAccountResponse) - err := c.cc.Invoke(ctx, "/tendermint.spn.campaign.Query/MainnetVestingAccountAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) CampaignSummary(ctx context.Context, in *QueryCampaignSummaryRequest, opts ...grpc.CallOption) (*QueryCampaignSummaryResponse, error) { out := new(QueryCampaignSummaryResponse) err := c.cc.Invoke(ctx, "/tendermint.spn.campaign.Query/CampaignSummary", in, out, opts...) @@ -1768,10 +1537,6 @@ type QueryServer interface { MainnetAccountBalance(context.Context, *QueryGetMainnetAccountBalanceRequest) (*QueryGetMainnetAccountBalanceResponse, error) // Queries a list of mainnetAccountBalance items. MainnetAccountBalanceAll(context.Context, *QueryAllMainnetAccountBalanceRequest) (*QueryAllMainnetAccountBalanceResponse, error) - // Queries a mainnetVestingAccount by index. - MainnetVestingAccount(context.Context, *QueryGetMainnetVestingAccountRequest) (*QueryGetMainnetVestingAccountResponse, error) - // Queries a list of mainnetVestingAccount items. - MainnetVestingAccountAll(context.Context, *QueryAllMainnetVestingAccountRequest) (*QueryAllMainnetVestingAccountResponse, error) // Queries a campaign summary CampaignSummary(context.Context, *QueryCampaignSummaryRequest) (*QueryCampaignSummaryResponse, error) // Queries a list of campaign summaries @@ -1812,12 +1577,6 @@ func (*UnimplementedQueryServer) MainnetAccountBalance(ctx context.Context, req func (*UnimplementedQueryServer) MainnetAccountBalanceAll(ctx context.Context, req *QueryAllMainnetAccountBalanceRequest) (*QueryAllMainnetAccountBalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MainnetAccountBalanceAll not implemented") } -func (*UnimplementedQueryServer) MainnetVestingAccount(ctx context.Context, req *QueryGetMainnetVestingAccountRequest) (*QueryGetMainnetVestingAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MainnetVestingAccount not implemented") -} -func (*UnimplementedQueryServer) MainnetVestingAccountAll(ctx context.Context, req *QueryAllMainnetVestingAccountRequest) (*QueryAllMainnetVestingAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MainnetVestingAccountAll not implemented") -} func (*UnimplementedQueryServer) CampaignSummary(ctx context.Context, req *QueryCampaignSummaryRequest) (*QueryCampaignSummaryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CampaignSummary not implemented") } @@ -1982,42 +1741,6 @@ func _Query_MainnetAccountBalanceAll_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _Query_MainnetVestingAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetMainnetVestingAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).MainnetVestingAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.spn.campaign.Query/MainnetVestingAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).MainnetVestingAccount(ctx, req.(*QueryGetMainnetVestingAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_MainnetVestingAccountAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllMainnetVestingAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).MainnetVestingAccountAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.spn.campaign.Query/MainnetVestingAccountAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).MainnetVestingAccountAll(ctx, req.(*QueryAllMainnetVestingAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_CampaignSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryCampaignSummaryRequest) if err := dec(in); err != nil { @@ -2144,14 +1867,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "MainnetAccountBalanceAll", Handler: _Query_MainnetAccountBalanceAll_Handler, }, - { - MethodName: "MainnetVestingAccount", - Handler: _Query_MainnetVestingAccount_Handler, - }, - { - MethodName: "MainnetVestingAccountAll", - Handler: _Query_MainnetVestingAccountAll_Handler, - }, { MethodName: "CampaignSummary", Handler: _Query_CampaignSummary_Handler, @@ -2776,7 +2491,7 @@ func (m *QueryAllMainnetAccountBalanceResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } -func (m *QueryGetMainnetVestingAccountRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCampaignSummaryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2786,23 +2501,16 @@ func (m *QueryGetMainnetVestingAccountRequest) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *QueryGetMainnetVestingAccountRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCampaignSummaryRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetMainnetVestingAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCampaignSummaryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } if m.CampaignID != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.CampaignID)) i-- @@ -2811,7 +2519,7 @@ func (m *QueryGetMainnetVestingAccountRequest) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *QueryGetMainnetVestingAccountResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCampaignSummaryResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2821,18 +2529,18 @@ func (m *QueryGetMainnetVestingAccountResponse) Marshal() (dAtA []byte, err erro return dAtA[:n], nil } -func (m *QueryGetMainnetVestingAccountResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCampaignSummaryResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetMainnetVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCampaignSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.MainnetVestingAccount.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.CampaignSummary.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2844,7 +2552,7 @@ func (m *QueryGetMainnetVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } -func (m *QueryAllMainnetVestingAccountRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCampaignSummariesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2854,12 +2562,12 @@ func (m *QueryAllMainnetVestingAccountRequest) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *QueryAllMainnetVestingAccountRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCampaignSummariesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllMainnetVestingAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCampaignSummariesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2876,15 +2584,10 @@ func (m *QueryAllMainnetVestingAccountRequest) MarshalToSizedBuffer(dAtA []byte) i-- dAtA[i] = 0x12 } - if m.CampaignID != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.CampaignID)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func (m *QueryAllMainnetVestingAccountResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCampaignSummariesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2894,12 +2597,12 @@ func (m *QueryAllMainnetVestingAccountResponse) Marshal() (dAtA []byte, err erro return dAtA[:n], nil } -func (m *QueryAllMainnetVestingAccountResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCampaignSummariesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllMainnetVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCampaignSummariesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2916,10 +2619,10 @@ func (m *QueryAllMainnetVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte i-- dAtA[i] = 0x12 } - if len(m.MainnetVestingAccount) > 0 { - for iNdEx := len(m.MainnetVestingAccount) - 1; iNdEx >= 0; iNdEx-- { + if len(m.CampaignSummaries) > 0 { + for iNdEx := len(m.CampaignSummaries) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.MainnetVestingAccount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.CampaignSummaries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2933,7 +2636,7 @@ func (m *QueryAllMainnetVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } -func (m *QueryCampaignSummaryRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2943,25 +2646,20 @@ func (m *QueryCampaignSummaryRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCampaignSummaryRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCampaignSummaryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.CampaignID != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.CampaignID)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func (m *QueryCampaignSummaryResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2971,18 +2669,18 @@ func (m *QueryCampaignSummaryResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCampaignSummaryResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCampaignSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.CampaignSummary.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2994,7 +2692,7 @@ func (m *QueryCampaignSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *QueryCampaignSummariesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryTotalSharesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3004,152 +2702,12 @@ func (m *QueryCampaignSummariesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCampaignSummariesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryTotalSharesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCampaignSummariesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *QueryCampaignSummariesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCampaignSummariesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCampaignSummariesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.CampaignSummaries) > 0 { - for iNdEx := len(m.CampaignSummaries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CampaignSummaries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryTotalSharesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTotalSharesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTotalSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryTotalSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3234,20 +2792,20 @@ func (m *QueryAuctionsOfCampaignResponse) MarshalToSizedBuffer(dAtA []byte) (int var l int _ = l if len(m.AuctionIDs) > 0 { - dAtA19 := make([]byte, len(m.AuctionIDs)*10) - var j18 int + dAtA16 := make([]byte, len(m.AuctionIDs)*10) + var j15 int for _, num := range m.AuctionIDs { for num >= 1<<7 { - dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j18++ + j15++ } - dAtA19[j18] = uint8(num) - j18++ + dAtA16[j15] = uint8(num) + j15++ } - i -= j18 - copy(dAtA[i:], dAtA19[:j18]) - i = encodeVarintQuery(dAtA, i, uint64(j18)) + i -= j15 + copy(dAtA[i:], dAtA16[:j15]) + i = encodeVarintQuery(dAtA, i, uint64(j15)) i-- dAtA[i] = 0xa } @@ -3500,68 +3058,6 @@ func (m *QueryAllMainnetAccountBalanceResponse) Size() (n int) { return n } -func (m *QueryGetMainnetVestingAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CampaignID != 0 { - n += 1 + sovQuery(uint64(m.CampaignID)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetMainnetVestingAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.MainnetVestingAccount.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllMainnetVestingAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CampaignID != 0 { - n += 1 + sovQuery(uint64(m.CampaignID)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllMainnetVestingAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.MainnetVestingAccount) > 0 { - for _, e := range m.MainnetVestingAccount { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryCampaignSummaryRequest) Size() (n int) { if m == nil { return 0 @@ -5207,415 +4703,6 @@ func (m *QueryAllMainnetAccountBalanceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetMainnetVestingAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetMainnetVestingAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetMainnetVestingAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CampaignID", wireType) - } - m.CampaignID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CampaignID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetMainnetVestingAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetMainnetVestingAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetMainnetVestingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MainnetVestingAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MainnetVestingAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllMainnetVestingAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllMainnetVestingAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllMainnetVestingAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CampaignID", wireType) - } - m.CampaignID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CampaignID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllMainnetVestingAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllMainnetVestingAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllMainnetVestingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MainnetVestingAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MainnetVestingAccount = append(m.MainnetVestingAccount, MainnetVestingAccount{}) - if err := m.MainnetVestingAccount[len(m.MainnetVestingAccount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryCampaignSummaryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/campaign/types/query.pb.gw.go b/x/campaign/types/query.pb.gw.go index aab0425f2..699ba547c 100644 --- a/x/campaign/types/query.pb.gw.go +++ b/x/campaign/types/query.pb.gw.go @@ -527,154 +527,6 @@ func local_request_Query_MainnetAccountBalanceAll_0(ctx context.Context, marshal } -func request_Query_MainnetVestingAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetMainnetVestingAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["campaignID"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "campaignID") - } - - protoReq.CampaignID, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "campaignID", err) - } - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.MainnetVestingAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_MainnetVestingAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetMainnetVestingAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["campaignID"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "campaignID") - } - - protoReq.CampaignID, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "campaignID", err) - } - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.MainnetVestingAccount(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_MainnetVestingAccountAll_0 = &utilities.DoubleArray{Encoding: map[string]int{"campaignID": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_MainnetVestingAccountAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllMainnetVestingAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["campaignID"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "campaignID") - } - - protoReq.CampaignID, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "campaignID", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_MainnetVestingAccountAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.MainnetVestingAccountAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_MainnetVestingAccountAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllMainnetVestingAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["campaignID"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "campaignID") - } - - protoReq.CampaignID, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "campaignID", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_MainnetVestingAccountAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.MainnetVestingAccountAll(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_CampaignSummary_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCampaignSummaryRequest var metadata runtime.ServerMetadata @@ -1045,52 +897,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_MainnetVestingAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_MainnetVestingAccount_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_MainnetVestingAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_MainnetVestingAccountAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_MainnetVestingAccountAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_MainnetVestingAccountAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_CampaignSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1407,46 +1213,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_MainnetVestingAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_MainnetVestingAccount_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_MainnetVestingAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_MainnetVestingAccountAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_MainnetVestingAccountAll_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_MainnetVestingAccountAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_CampaignSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1567,10 +1333,6 @@ var ( pattern_Query_MainnetAccountBalanceAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tendermint", "spn", "campaign", "mainnet_account_balance", "campaignID"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_MainnetVestingAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"tendermint", "spn", "campaign", "mainnet_vesting_account", "campaignID", "address"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_MainnetVestingAccountAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tendermint", "spn", "campaign", "mainnet_vesting_account", "campaignID"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_CampaignSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tendermint", "spn", "campaign", "campaign_summary", "campaignID"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_CampaignSummaries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"tendermint", "spn", "campaign", "campaign_summary"}, "", runtime.AssumeColonVerbOpt(true))) @@ -1599,10 +1361,6 @@ var ( forward_Query_MainnetAccountBalanceAll_0 = runtime.ForwardResponseMessage - forward_Query_MainnetVestingAccount_0 = runtime.ForwardResponseMessage - - forward_Query_MainnetVestingAccountAll_0 = runtime.ForwardResponseMessage - forward_Query_CampaignSummary_0 = runtime.ForwardResponseMessage forward_Query_CampaignSummaries_0 = runtime.ForwardResponseMessage diff --git a/x/campaign/types/tx.pb.go b/x/campaign/types/tx.pb.go index 83b4068eb..ac9559492 100644 --- a/x/campaign/types/tx.pb.go +++ b/x/campaign/types/tx.pb.go @@ -1080,67 +1080,66 @@ func init() { func init() { proto.RegisterFile("campaign/tx.proto", fileDescriptor_fb6bf904ffc53c1f) } var fileDescriptor_fb6bf904ffc53c1f = []byte{ - // 946 bytes of a gzipped FileDescriptorProto + // 938 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0xcf, 0x64, 0x97, 0xd0, 0x7d, 0x89, 0x0a, 0x31, 0x55, 0xbb, 0x71, 0x83, 0x13, 0x19, 0xb5, - 0xac, 0x0a, 0xb1, 0x69, 0x28, 0x07, 0x44, 0x2f, 0x4d, 0x8a, 0x44, 0x25, 0x96, 0x83, 0x43, 0x39, - 0xc0, 0x21, 0x9a, 0xd8, 0x23, 0xef, 0xc0, 0xee, 0x8c, 0xe5, 0x99, 0x8d, 0x1a, 0xae, 0xdc, 0xa1, - 0xe2, 0xc4, 0x07, 0xe0, 0xc4, 0x57, 0x40, 0x42, 0x82, 0x53, 0x8f, 0x3d, 0xf6, 0x14, 0x50, 0xf2, - 0x2d, 0x7a, 0x01, 0x79, 0xc6, 0x3b, 0x6b, 0xaf, 0x37, 0x4e, 0x42, 0x57, 0x4d, 0x4f, 0xd9, 0x99, - 0xfc, 0xe6, 0xbd, 0xf7, 0xfb, 0xcd, 0xfb, 0x33, 0x86, 0xe5, 0x10, 0x0f, 0x12, 0x4c, 0x63, 0xe6, - 0xcb, 0x47, 0x5e, 0x92, 0x72, 0xc9, 0xad, 0x6b, 0x92, 0xb0, 0x88, 0xa4, 0x03, 0xca, 0xa4, 0x27, - 0x12, 0xe6, 0x8d, 0x10, 0xf6, 0x95, 0x98, 0xc7, 0x5c, 0x61, 0xfc, 0xec, 0x97, 0x86, 0xdb, 0x4e, - 0xc8, 0xc5, 0x80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b, - 0xc5, 0x67, 0x58, 0xf4, 0x54, 0xfe, 0xb6, 0x82, 0xc2, 0x8e, 0x75, 0x13, 0x2e, 0xe7, 0xcd, 0x6d, - 0xbb, 0x87, 0x69, 0xe6, 0xe1, 0x35, 0x85, 0x99, 0xd8, 0x75, 0xef, 0xaa, 0xcb, 0xac, 0xc4, 0x6f, - 0xea, 0x75, 0x15, 0x5a, 0xf9, 0x09, 0x53, 0xae, 0xe3, 0x0d, 0xf7, 0x19, 0x82, 0xa5, 0xae, 0x88, - 0xef, 0x45, 0xd1, 0x4e, 0x0f, 0xa7, 0x64, 0x16, 0x77, 0xdb, 0x86, 0xd7, 0x71, 0x14, 0xa5, 0x44, - 0x88, 0x9c, 0xf4, 0x68, 0x69, 0xf5, 0x61, 0x41, 0x28, 0x2f, 0xed, 0xe6, 0x69, 0x25, 0xf1, 0xf1, - 0xf9, 0x4b, 0x62, 0x41, 0x33, 0x08, 0x72, 0x1f, 0xee, 0x55, 0x75, 0xb1, 0x86, 0x99, 0xb9, 0xf1, - 0x3f, 0x75, 0x83, 0xea, 0x52, 0x26, 0xbf, 0xe2, 0xc3, 0xb0, 0x47, 0xd2, 0x59, 0xb0, 0x1e, 0x73, - 0x6b, 0xbc, 0x04, 0x6e, 0xba, 0xbd, 0x15, 0x29, 0x18, 0x7a, 0x87, 0x9a, 0xde, 0xd6, 0x30, 0x65, - 0x86, 0xde, 0x55, 0x58, 0x10, 0xaa, 0xa6, 0x72, 0x66, 0xf9, 0xea, 0x54, 0x52, 0x3f, 0x23, 0xb8, - 0xb4, 0x9f, 0x1b, 0xb9, 0xe0, 0x36, 0x66, 0xe2, 0xc8, 0xb9, 0x17, 0xf9, 0x19, 0xee, 0xcf, 0x91, - 0x9a, 0xe5, 0x01, 0x89, 0x08, 0x19, 0xbc, 0x30, 0xfb, 0x2c, 0x91, 0xf5, 0x73, 0xc2, 0x24, 0xb2, - 0x5e, 0x96, 0x75, 0x69, 0xbe, 0x22, 0xba, 0x5c, 0x57,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, 0x62, 0x28, 0x86, 0x09, 0x97, 0x22, 0x22, 0x71, 0x80, 0x25, 0x6e, 0x37, + 0x77, 0x50, 0x67, 0xcd, 0xd3, 0x6b, 0xfb, 0x63, 0xd8, 0xac, 0x28, 0xe2, 0x11, 0x11, 0x73, 0x26, + 0x88, 0x61, 0x01, 0x0c, 0x39, 0xde, 0xbb, 0xab, 0x84, 0x69, 0x7a, 0x85, 0x1d, 0xfb, 0x07, 0x04, + 0xaf, 0x75, 0x45, 0xf8, 0x49, 0x40, 0xe5, 0x1c, 0x6a, 0x96, 0xad, 0x2e, 0x8f, 0x5b, 0x35, 0x0c, + 0x68, 0xb2, 0x54, 0xe5, 0x86, 0x3a, 0xaa, 0x7e, 0xd7, 0x52, 0xd8, 0x84, 0xab, 0x63, 0x41, 0x0c, + 0x09, 0xd8, 0xff, 0x22, 0xb8, 0xd2, 0x15, 0xe1, 0xfd, 0x38, 0xc0, 0x92, 0x7c, 0x51, 0x90, 0xe4, + 0xd9, 0xa3, 0xfc, 0x15, 0xc1, 0x7a, 0x41, 0xe4, 0xcc, 0xc5, 0x0b, 0xbe, 0xf5, 0x6a, 0x40, 0xb6, + 0x05, 0x5b, 0x93, 0x04, 0xd0, 0x0a, 0xfd, 0x85, 0xe0, 0x9a, 0x06, 0x1c, 0x66, 0x95, 0x73, 0x67, + 0x54, 0x38, 0x0b, 0x10, 0x0a, 0x83, 0x21, 0x2a, 0x76, 0xd5, 0xe5, 0xae, 0xee, 0xbd, 0xeb, 0x4c, + 0x69, 0x0e, 0x4e, 0x35, 0x94, 0xfd, 0x66, 0x2a, 0x9d, 0x37, 0xc1, 0x98, 0x7d, 0x1d, 0xde, 0xaa, + 0xe1, 0xa0, 0xb9, 0xfe, 0x91, 0x65, 0xc3, 0x3d, 0x46, 0x25, 0xc5, 0x7d, 0xfa, 0x3d, 0xe9, 0x62, + 0xca, 0x18, 0x91, 0x0b, 0x20, 0xb9, 0x05, 0x2d, 0xc1, 0x07, 0x89, 0x4f, 0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 0x93, 0xdb, 0x9e, 0x71, 0x0c, 0xaf, 0x57, 0x5a, + 0xde, 0x7b, 0xb5, 0x99, 0x37, 0x86, 0x36, 0x6f, 0xcd, 0x83, 0x1e, 0xfa, 0xdd, 0xbf, 0xfb, 0xe8, + 0xcc, 0x42, 0x8f, 0xcf, 0x2c, 0xf4, 0xcf, 0x99, 0x85, 0x1e, 0x9e, 0x5b, 0x4b, 0x8f, 0xcf, 0xad, + 0xa5, 0x27, 0xe7, 0xd6, 0xd2, 0x57, 0x37, 0x0a, 0x5d, 0x70, 0x64, 0xd9, 0x15, 0x31, 0x73, 0x1f, + 0xb8, 0xa3, 0x0f, 0xe5, 0xb4, 0x1b, 0x1e, 0xad, 0xa8, 0x2f, 0xd4, 0x0f, 0xfe, 0x0b, 0x00, 0x00, + 0xff, 0xff, 0xc9, 0x78, 0x1b, 0x9b, 0x41, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/campaign/types/mainnet_vesting_account.pb.go b/x/campaign/types/vesting.pb.go similarity index 54% rename from x/campaign/types/mainnet_vesting_account.pb.go rename to x/campaign/types/vesting.pb.go index 762905025..f1f6f8243 100644 --- a/x/campaign/types/mainnet_vesting_account.pb.go +++ b/x/campaign/types/vesting.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: campaign/mainnet_vesting_account.proto +// source: campaign/vesting.proto package types @@ -25,66 +25,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type MainnetVestingAccount struct { - CampaignID uint64 `protobuf:"varint,1,opt,name=campaignID,proto3" json:"campaignID,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - VestingOptions ShareVestingOptions `protobuf:"bytes,3,opt,name=vestingOptions,proto3" json:"vestingOptions"` -} - -func (m *MainnetVestingAccount) Reset() { *m = MainnetVestingAccount{} } -func (m *MainnetVestingAccount) String() string { return proto.CompactTextString(m) } -func (*MainnetVestingAccount) ProtoMessage() {} -func (*MainnetVestingAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_90d9b25b318c41d6, []int{0} -} -func (m *MainnetVestingAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MainnetVestingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MainnetVestingAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MainnetVestingAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_MainnetVestingAccount.Merge(m, src) -} -func (m *MainnetVestingAccount) XXX_Size() int { - return m.Size() -} -func (m *MainnetVestingAccount) XXX_DiscardUnknown() { - xxx_messageInfo_MainnetVestingAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_MainnetVestingAccount proto.InternalMessageInfo - -func (m *MainnetVestingAccount) GetCampaignID() uint64 { - if m != nil { - return m.CampaignID - } - return 0 -} - -func (m *MainnetVestingAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *MainnetVestingAccount) GetVestingOptions() ShareVestingOptions { - if m != nil { - return m.VestingOptions - } - return ShareVestingOptions{} -} - type ShareVestingOptions struct { // Types that are valid to be assigned to Options: // *ShareVestingOptions_DelayedVesting @@ -95,7 +35,7 @@ func (m *ShareVestingOptions) Reset() { *m = ShareVestingOptions{} } func (m *ShareVestingOptions) String() string { return proto.CompactTextString(m) } func (*ShareVestingOptions) ProtoMessage() {} func (*ShareVestingOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_90d9b25b318c41d6, []int{1} + return fileDescriptor_57113a5fc3a0f84e, []int{0} } func (m *ShareVestingOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,7 +110,7 @@ func (m *ShareDelayedVesting) Reset() { *m = ShareDelayedVesting{} } func (m *ShareDelayedVesting) String() string { return proto.CompactTextString(m) } func (*ShareDelayedVesting) ProtoMessage() {} func (*ShareDelayedVesting) Descriptor() ([]byte, []int) { - return fileDescriptor_90d9b25b318c41d6, []int{2} + return fileDescriptor_57113a5fc3a0f84e, []int{1} } func (m *ShareDelayedVesting) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -221,88 +161,36 @@ func (m *ShareDelayedVesting) GetEndTime() int64 { } func init() { - proto.RegisterType((*MainnetVestingAccount)(nil), "tendermint.spn.campaign.MainnetVestingAccount") proto.RegisterType((*ShareVestingOptions)(nil), "tendermint.spn.campaign.ShareVestingOptions") proto.RegisterType((*ShareDelayedVesting)(nil), "tendermint.spn.campaign.ShareDelayedVesting") } -func init() { - proto.RegisterFile("campaign/mainnet_vesting_account.proto", fileDescriptor_90d9b25b318c41d6) -} - -var fileDescriptor_90d9b25b318c41d6 = []byte{ - // 411 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xb1, 0x0e, 0xd2, 0x40, - 0x18, 0xc7, 0x7b, 0x40, 0x20, 0x1c, 0x09, 0x43, 0xd5, 0x58, 0x19, 0x8e, 0x86, 0x41, 0x1b, 0xa3, - 0x77, 0x01, 0x27, 0x47, 0x2b, 0x83, 0x0e, 0xc6, 0xa4, 0x1a, 0x06, 0x16, 0x72, 0x6d, 0x2f, 0xe5, - 0x22, 0xbd, 0x6b, 0x7a, 0x07, 0x81, 0xb7, 0x70, 0xf3, 0x1d, 0x4c, 0x7c, 0x0f, 0x46, 0x46, 0x27, - 0x34, 0xf0, 0x16, 0x4e, 0xa6, 0xbd, 0x56, 0x81, 0x68, 0x9c, 0x9c, 0xda, 0xeb, 0xf7, 0xfd, 0xbf, - 0xdf, 0xd7, 0xff, 0xff, 0xe0, 0xc3, 0x88, 0xa6, 0x19, 0xe5, 0x89, 0x20, 0x29, 0xe5, 0x42, 0x30, - 0xbd, 0xd8, 0x30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, 0x9b, 0x5e, 0x6f, 0xf2, 0x00, 0x1b, 0xdf, 0x71, - 0xe1, 0x3b, 0xae, 0x7c, 0xc7, 0x2f, 0x25, 0x17, 0xfe, 0xf3, 0xe2, 0xbf, 0x7e, 0x1c, 0x87, 0x8f, - 0x12, 0xae, 0x97, 0xeb, 0x10, 0x47, 0x32, 0x25, 0x55, 0x48, 0xe6, 0xf1, 0x54, 0xc5, 0x1f, 0x88, - 0xde, 0x65, 0x4c, 0x95, 0x82, 0xcf, 0xdf, 0x86, 0x6d, 0x33, 0x3b, 0xb8, 0x04, 0xd9, 0x02, 0x76, - 0x2a, 0x6f, 0x9c, 0xc6, 0x7f, 0x64, 0xd6, 0x90, 0x22, 0x6f, 0x26, 0xe2, 0xf7, 0x3c, 0x65, 0x65, - 0x9c, 0xcd, 0xa0, 0x3e, 0xfa, 0xd3, 0xfd, 0x09, 0x81, 0xc3, 0x09, 0x81, 0xef, 0x27, 0x04, 0x3e, - 0x9e, 0x91, 0x75, 0x38, 0x23, 0xeb, 0xeb, 0x19, 0x59, 0xf3, 0xc7, 0x17, 0xbc, 0xdf, 0x41, 0x10, - 0x95, 0x09, 0xb2, 0x25, 0xbf, 0x2e, 0x7c, 0xc9, 0x0d, 0xdb, 0xe5, 0x85, 0x7c, 0xf6, 0x33, 0x00, - 0x00, 0xff, 0xff, 0xba, 0x13, 0x8d, 0xec, 0x09, 0x03, 0x00, 0x00, -} - -func (m *MainnetVestingAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MainnetVestingAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MainnetVestingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.VestingOptions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if m.CampaignID != 0 { - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(m.CampaignID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +func init() { proto.RegisterFile("campaign/vesting.proto", fileDescriptor_57113a5fc3a0f84e) } + +var fileDescriptor_57113a5fc3a0f84e = []byte{ + // 337 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xb1, 0x4e, 0x02, 0x31, + 0x1c, 0xc6, 0xaf, 0x90, 0x40, 0x2c, 0x89, 0xc3, 0x69, 0xf4, 0x64, 0x28, 0x84, 0x45, 0x62, 0xb4, + 0x0d, 0x38, 0xb9, 0x22, 0x83, 0x9b, 0x09, 0x1a, 0x06, 0xb7, 0xde, 0x5d, 0x73, 0x34, 0x72, 0xfd, + 0x5f, 0x68, 0x25, 0xf0, 0x16, 0x6e, 0xbe, 0x83, 0x4f, 0xc2, 0xc8, 0xe8, 0x84, 0x06, 0xde, 0xc2, + 0xc9, 0xd0, 0x1e, 0x0a, 0x26, 0x8e, 0x4e, 0x77, 0xcd, 0xff, 0xfb, 0xbe, 0x5f, 0xbe, 0xfe, 0x8b, + 0x8f, 0x22, 0x9e, 0x66, 0x5c, 0x26, 0x8a, 0x8d, 0x85, 0x36, 0x52, 0x25, 0x34, 0x1b, 0x81, 0x01, + 0xff, 0xd8, 0x08, 0x15, 0x8b, 0x51, 0x2a, 0x95, 0xa1, 0x3a, 0x53, 0x74, 0x23, 0xab, 0x1e, 0x26, + 0x90, 0x80, 0xd5, 0xb0, 0xf5, 0x9f, 0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xf7, 0xb6, 0x22, 0xde, + 0xc3, 0xd9, 0x16, 0xef, 0x67, 0x11, 0x4c, 0x67, 0x8a, 0x4d, 0xd8, 0xf7, 0x83, 0xb1, 0xdc, 0xb0, + 0x64, 0x17, 0x7c, 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x51, 0xd2, 0xb3, 0x49, 0x02, 0x00, + 0x00, } func (m *ShareVestingOptions) Marshal() (dAtA []byte, err error) { @@ -351,7 +239,7 @@ func (m *ShareVestingOptions_DelayedVesting) MarshalToSizedBuffer(dAtA []byte) ( return 0, err } i -= size - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(size)) + i = encodeVarintVesting(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -379,7 +267,7 @@ func (m *ShareDelayedVesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.EndTime != 0 { - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(m.EndTime)) + i = encodeVarintVesting(dAtA, i, uint64(m.EndTime)) i-- dAtA[i] = 0x18 } @@ -391,7 +279,7 @@ func (m *ShareDelayedVesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(size)) + i = encodeVarintVesting(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -405,7 +293,7 @@ func (m *ShareDelayedVesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintMainnetVestingAccount(dAtA, i, uint64(size)) + i = encodeVarintVesting(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -414,8 +302,8 @@ func (m *ShareDelayedVesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintMainnetVestingAccount(dAtA []byte, offset int, v uint64) int { - offset -= sovMainnetVestingAccount(v) +func encodeVarintVesting(dAtA []byte, offset int, v uint64) int { + offset -= sovVesting(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -425,24 +313,6 @@ func encodeVarintMainnetVestingAccount(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MainnetVestingAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CampaignID != 0 { - n += 1 + sovMainnetVestingAccount(uint64(m.CampaignID)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovMainnetVestingAccount(uint64(l)) - } - l = m.VestingOptions.Size() - n += 1 + l + sovMainnetVestingAccount(uint64(l)) - return n -} - func (m *ShareVestingOptions) Size() (n int) { if m == nil { return 0 @@ -463,7 +333,7 @@ func (m *ShareVestingOptions_DelayedVesting) Size() (n int) { _ = l if m.DelayedVesting != nil { l = m.DelayedVesting.Size() - n += 1 + l + sovMainnetVestingAccount(uint64(l)) + n += 1 + l + sovVesting(uint64(l)) } return n } @@ -476,160 +346,26 @@ func (m *ShareDelayedVesting) Size() (n int) { if len(m.TotalShares) > 0 { for _, e := range m.TotalShares { l = e.Size() - n += 1 + l + sovMainnetVestingAccount(uint64(l)) + n += 1 + l + sovVesting(uint64(l)) } } if len(m.Vesting) > 0 { for _, e := range m.Vesting { l = e.Size() - n += 1 + l + sovMainnetVestingAccount(uint64(l)) + n += 1 + l + sovVesting(uint64(l)) } } if m.EndTime != 0 { - n += 1 + sovMainnetVestingAccount(uint64(m.EndTime)) + n += 1 + sovVesting(uint64(m.EndTime)) } return n } -func sovMainnetVestingAccount(x uint64) (n int) { +func sovVesting(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozMainnetVestingAccount(x uint64) (n int) { - return sovMainnetVestingAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MainnetVestingAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MainnetVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MainnetVestingAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CampaignID", wireType) - } - m.CampaignID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CampaignID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMainnetVestingAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMainnetVestingAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VestingOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMainnetVestingAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMainnetVestingAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.VestingOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMainnetVestingAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMainnetVestingAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func sozVesting(x uint64) (n int) { + return sovVesting(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ShareVestingOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -639,7 +375,7 @@ func (m *ShareVestingOptions) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount + return ErrIntOverflowVesting } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -667,7 +403,7 @@ func (m *ShareVestingOptions) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount + return ErrIntOverflowVesting } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -680,11 +416,11 @@ func (m *ShareVestingOptions) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } if postIndex > l { return io.ErrUnexpectedEOF @@ -697,12 +433,12 @@ func (m *ShareVestingOptions) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipMainnetVestingAccount(dAtA[iNdEx:]) + skippy, err := skipVesting(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -724,7 +460,7 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount + return ErrIntOverflowVesting } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -752,7 +488,7 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount + return ErrIntOverflowVesting } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -765,11 +501,11 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } if postIndex > l { return io.ErrUnexpectedEOF @@ -786,7 +522,7 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount + return ErrIntOverflowVesting } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -799,11 +535,11 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } if postIndex > l { return io.ErrUnexpectedEOF @@ -820,7 +556,7 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { m.EndTime = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowMainnetVestingAccount + return ErrIntOverflowVesting } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -834,12 +570,12 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipMainnetVestingAccount(dAtA[iNdEx:]) + skippy, err := skipVesting(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMainnetVestingAccount + return ErrInvalidLengthVesting } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -853,7 +589,7 @@ func (m *ShareDelayedVesting) Unmarshal(dAtA []byte) error { } return nil } -func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { +func skipVesting(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -861,7 +597,7 @@ func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowMainnetVestingAccount + return 0, ErrIntOverflowVesting } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -878,7 +614,7 @@ func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowMainnetVestingAccount + return 0, ErrIntOverflowVesting } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -894,7 +630,7 @@ func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowMainnetVestingAccount + return 0, ErrIntOverflowVesting } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -907,14 +643,14 @@ func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthMainnetVestingAccount + return 0, ErrInvalidLengthVesting } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMainnetVestingAccount + return 0, ErrUnexpectedEndOfGroupVesting } depth-- case 5: @@ -923,7 +659,7 @@ func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthMainnetVestingAccount + return 0, ErrInvalidLengthVesting } if depth == 0 { return iNdEx, nil @@ -933,7 +669,7 @@ func skipMainnetVestingAccount(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthMainnetVestingAccount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMainnetVestingAccount = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMainnetVestingAccount = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthVesting = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVesting = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupVesting = fmt.Errorf("proto: unexpected end of group") ) From a015cdfcb5f14b2bb48932bdca1cc22d9b0b7d47 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 1 Jun 2022 13:14:33 -0400 Subject: [PATCH 03/10] cleanup types --- x/campaign/types/genesis.go | 28 +++++---------------- x/campaign/types/mainnet_vesting_account.go | 12 --------- 2 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 x/campaign/types/mainnet_vesting_account.go diff --git a/x/campaign/types/genesis.go b/x/campaign/types/genesis.go index cd93dbea4..6594497a1 100644 --- a/x/campaign/types/genesis.go +++ b/x/campaign/types/genesis.go @@ -9,13 +9,12 @@ import ( // DefaultGenesis returns the default Capability genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - CampaignList: []Campaign{}, - CampaignCounter: 1, - CampaignChainsList: []CampaignChains{}, - MainnetAccountList: []MainnetAccount{}, - MainnetVestingAccountList: []MainnetVestingAccount{}, - Params: DefaultParams(), - TotalShares: spntypes.TotalShareNumber, + CampaignList: []Campaign{}, + CampaignCounter: 1, + CampaignChainsList: []CampaignChains{}, + MainnetAccountList: []MainnetAccount{}, + Params: DefaultParams(), + TotalShares: spntypes.TotalShareNumber, // this line is used by starport scaffolding # genesis/types/default } } @@ -66,21 +65,6 @@ func (gs GenesisState) Validate() error { mainnetAccountIndexMap[index] = struct{}{} } - // Check for duplicated index in mainnetVestingAccount - mainnetVestingAccountIndexMap := make(map[string]struct{}) - for _, elem := range gs.MainnetVestingAccountList { - if _, ok := campaignIDMap[elem.CampaignID]; !ok { - return fmt.Errorf("campaign id %d doesn't exist for mainnet vesting account %s", - elem.CampaignID, elem.Address) - } - index := string(MainnetVestingAccountKey(elem.CampaignID, elem.Address)) - if _, ok := mainnetVestingAccountIndexMap[index]; ok { - return fmt.Errorf("duplicated index for mainnetVestingAccount") - } - - mainnetVestingAccountIndexMap[index] = struct{}{} - } - // this line is used by starport scaffolding # genesis/types/validate return gs.Params.ValidateBasic() diff --git a/x/campaign/types/mainnet_vesting_account.go b/x/campaign/types/mainnet_vesting_account.go deleted file mode 100644 index e537bb646..000000000 --- a/x/campaign/types/mainnet_vesting_account.go +++ /dev/null @@ -1,12 +0,0 @@ -package types - -import "errors" - -// GetTotalShares return total shares for account and delayed vesting options -func (m MainnetVestingAccount) GetTotalShares() (Shares, error) { - dv := m.VestingOptions.GetDelayedVesting() - if dv == nil { - return nil, errors.New("invalid vesting options type") - } - return dv.TotalShares, nil -} From 1096078f147d3f7318cb0a4c4f590e0dcf4cc595 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 1 Jun 2022 13:14:56 -0400 Subject: [PATCH 04/10] cleanup types --- testutil/sample/campaign.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/testutil/sample/campaign.go b/testutil/sample/campaign.go index fab80260c..d44f1c7d5 100644 --- a/testutil/sample/campaign.go +++ b/testutil/sample/campaign.go @@ -42,25 +42,6 @@ func CustomShareVestingOptions(r *rand.Rand, shares campaign.Shares) campaign.Sh return *campaign.NewShareDelayedVesting(shares, shares, Duration(r).Microseconds()) } -// MainnetVestingAccount returns a sample MainnetVestingAccount -func MainnetVestingAccount(r *rand.Rand, campaignID uint64, address string) campaign.MainnetVestingAccount { - return MainnetVestingAccountWithShares(r, campaignID, address, Shares(r)) -} - -// MainnetVestingAccountWithShares returns a sample MainnetVestingAccount with custom shares -func MainnetVestingAccountWithShares( - r *rand.Rand, - campaignID uint64, - address string, - shares campaign.Shares, -) campaign.MainnetVestingAccount { - return campaign.MainnetVestingAccount{ - CampaignID: campaignID, - Address: address, - VestingOptions: CustomShareVestingOptions(r, shares), - } -} - // CampaignName returns a sample campaign name func CampaignName(r *rand.Rand) string { return String(r, 20) From a346cd976524a4bf4f3d31cd61d156a7686ac4b9 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 1 Jun 2022 13:15:57 -0400 Subject: [PATCH 05/10] cleanup testutil --- testutil/sample/campaign.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/testutil/sample/campaign.go b/testutil/sample/campaign.go index d44f1c7d5..de6fa6b8d 100644 --- a/testutil/sample/campaign.go +++ b/testutil/sample/campaign.go @@ -125,19 +125,14 @@ func CampaignGenesisState(r *rand.Rand) campaign.GenesisState { func CampaignGenesisStateWithAccounts(r *rand.Rand) campaign.GenesisState { genState := CampaignGenesisState(r) genState.MainnetAccountList = make([]campaign.MainnetAccount, 0) - genState.MainnetVestingAccountList = make([]campaign.MainnetVestingAccount, 0) for i, c := range genState.CampaignList { for j := 0; j < 5; j++ { mainnetAccount := MainnetAccount(r, c.CampaignID, Address(r)) - mainnetVestingAccount := MainnetVestingAccount(r, c.CampaignID, Address(r)) genState.MainnetAccountList = append(genState.MainnetAccountList, mainnetAccount) - genState.MainnetVestingAccountList = append(genState.MainnetVestingAccountList, mainnetVestingAccount) // increase campaign allocated shares accordingly c.AllocatedShares = campaign.IncreaseShares(c.AllocatedShares, mainnetAccount.Shares) - shares, _ := mainnetVestingAccount.GetTotalShares() - c.AllocatedShares = campaign.IncreaseShares(c.AllocatedShares, shares) } genState.CampaignList[i] = c } From b10fb5625af0291dca8c59cabf3e5d8646efc74e Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 1 Jun 2022 13:21:35 -0400 Subject: [PATCH 06/10] remaining removals --- go.mod | 6 +- go.sum | 11 +- x/campaign/client/cli/query.go | 2 - .../cli/query_mainnet_vesting_account.go | 88 ---------- .../cli/query_mainnet_vesting_account_test.go | 153 ------------------ x/campaign/genesis.go | 6 - x/campaign/handler.go | 5 - .../keeper/grpc_mainnet_vesting_account.go | 59 ------- .../grpc_mainnet_vesting_account_test.go | 133 --------------- x/campaign/keeper/invariants.go | 50 +----- x/campaign/keeper/mainnet_vesting_account.go | 61 ------- .../keeper/mainnet_vesting_account_test.go | 56 ------- x/campaign/module_simulation.go | 14 -- 13 files changed, 11 insertions(+), 633 deletions(-) delete mode 100644 x/campaign/client/cli/query_mainnet_vesting_account.go delete mode 100644 x/campaign/client/cli/query_mainnet_vesting_account_test.go delete mode 100644 x/campaign/keeper/grpc_mainnet_vesting_account.go delete mode 100644 x/campaign/keeper/grpc_mainnet_vesting_account_test.go delete mode 100644 x/campaign/keeper/mainnet_vesting_account.go delete mode 100644 x/campaign/keeper/mainnet_vesting_account_test.go diff --git a/go.mod b/go.mod index 8373fd763..e94ad5458 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/ignite-hq/cli v0.21.0 + github.com/ignite-hq/cli v0.21.2 github.com/pkg/errors v0.9.1 github.com/spf13/cast v1.4.1 github.com/spf13/cobra v1.4.0 @@ -159,9 +159,9 @@ require ( go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect + golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect diff --git a/go.sum b/go.sum index 15c108a4d..0f6e57765 100644 --- a/go.sum +++ b/go.sum @@ -899,8 +899,8 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ignite-hq/cli v0.21.0 h1:o8fxQQVFJ/LBmcfp2b7glhMAYZ9DN/p1iY2SVaJPcIA= -github.com/ignite-hq/cli v0.21.0/go.mod h1:OpVQxPUuWyWN9OyEv3HlYU08uqp75RmceAlkN5uK0NI= +github.com/ignite-hq/cli v0.21.2 h1:xdce/OnPsn1SzaqgV8YjyVMndORiTrxLEzdPSjEmEB4= +github.com/ignite-hq/cli v0.21.2/go.mod h1:UU+knzdlKyj3nKN3WADh6HUjIKPqFBj9htDmIkhRMOQ= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -1799,8 +1799,8 @@ golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1956,8 +1956,9 @@ golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86 h1:A9i04dxx7Cribqbs8jf3FQLogkL/CV2YN7hj9KWJCkc= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/x/campaign/client/cli/query.go b/x/campaign/client/cli/query.go index ee7c11359..3dbd34909 100644 --- a/x/campaign/client/cli/query.go +++ b/x/campaign/client/cli/query.go @@ -29,8 +29,6 @@ func GetQueryCmd(queryRoute string) *cobra.Command { CmdListMainnetAccount(), CmdShowMainnetAccountBalance(), CmdListMainnetAccountBalance(), - CmdShowMainnetVestingAccount(), - CmdListMainnetVestingAccount(), CmdShowCampaignSummary(), CmdListCampaignSummary(), CmdQueryParams(), diff --git a/x/campaign/client/cli/query_mainnet_vesting_account.go b/x/campaign/client/cli/query_mainnet_vesting_account.go deleted file mode 100644 index 51564b3ab..000000000 --- a/x/campaign/client/cli/query_mainnet_vesting_account.go +++ /dev/null @@ -1,88 +0,0 @@ -package cli - -import ( - "context" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/tendermint/spn/x/campaign/types" -) - -func CmdListMainnetVestingAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-mainnet-vesting-account [campaign-id]", - Short: "List all mainnet vesting accounts for a campaign", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - campaignID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - clientCtx := client.GetClientContextFromCmd(cmd) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllMainnetVestingAccountRequest{ - CampaignID: campaignID, - Pagination: pageReq, - } - - res, err := queryClient.MainnetVestingAccountAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowMainnetVestingAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-mainnet-vesting-account [campaign-id] [address]", - Short: "Shows the mainnet vesting account for a campaign", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - argsCampaignID, err := cast.ToUint64E(args[0]) - if err != nil { - return err - } - argsAddress := args[1] - - params := &types.QueryGetMainnetVestingAccountRequest{ - CampaignID: argsCampaignID, - Address: argsAddress, - } - - res, err := queryClient.MainnetVestingAccount(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/campaign/client/cli/query_mainnet_vesting_account_test.go b/x/campaign/client/cli/query_mainnet_vesting_account_test.go deleted file mode 100644 index 74575412b..000000000 --- a/x/campaign/client/cli/query_mainnet_vesting_account_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package cli_test - -import ( - "fmt" - "strconv" - "testing" - - "github.com/cosmos/cosmos-sdk/client/flags" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/stretchr/testify/require" - tmcli "github.com/tendermint/tendermint/libs/cli" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/tendermint/spn/testutil/network" - "github.com/tendermint/spn/testutil/sample" - "github.com/tendermint/spn/x/campaign/client/cli" - "github.com/tendermint/spn/x/campaign/types" -) - -func networkWithMainnetVestingAccountObjects(t *testing.T, n int) (*network.Network, []types.MainnetVestingAccount) { - t.Helper() - r := sample.Rand() - cfg := network.DefaultConfig() - state := types.GenesisState{} - require.NoError(t, cfg.Codec.UnmarshalJSON(cfg.GenesisState[types.ModuleName], &state)) - - campaignID := uint64(5) - for i := 0; i < n; i++ { - state.MainnetVestingAccountList = append(state.MainnetVestingAccountList, sample.MainnetVestingAccount(r, - campaignID, - sample.Address(r), - )) - } - buf, err := cfg.Codec.MarshalJSON(&state) - require.NoError(t, err) - cfg.GenesisState[types.ModuleName] = buf - return network.New(t, cfg), state.MainnetVestingAccountList -} - -func TestShowMainnetVestingAccount(t *testing.T) { - net, objs := networkWithMainnetVestingAccountObjects(t, 2) - - ctx := net.Validators[0].ClientCtx - common := []string{ - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - } - for _, tc := range []struct { - desc string - idCampaignID uint64 - idAddress string - - args []string - err error - obj types.MainnetVestingAccount - }{ - { - desc: "found", - idCampaignID: objs[0].CampaignID, - idAddress: objs[0].Address, - - args: common, - obj: objs[0], - }, - { - desc: "not found", - idCampaignID: 100000, - idAddress: strconv.Itoa(100000), - - args: common, - err: status.Error(codes.NotFound, "not found"), - }, - } { - t.Run(tc.desc, func(t *testing.T) { - args := []string{ - strconv.Itoa(int(tc.idCampaignID)), - tc.idAddress, - } - args = append(args, tc.args...) - out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdShowMainnetVestingAccount(), args) - if tc.err != nil { - stat, ok := status.FromError(tc.err) - require.True(t, ok) - require.ErrorIs(t, stat.Err(), tc.err) - } else { - require.NoError(t, err) - var resp types.QueryGetMainnetVestingAccountResponse - require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) - require.NotNil(t, resp.MainnetVestingAccount) - require.Equal(t, tc.obj, resp.MainnetVestingAccount) - } - }) - } -} - -func TestListMainnetVestingAccount(t *testing.T) { - net, objs := networkWithMainnetVestingAccountObjects(t, 5) - - campaignID := objs[0].CampaignID - ctx := net.Validators[0].ClientCtx - request := func(campaignID uint64, next []byte, offset, limit uint64, total bool) []string { - args := []string{ - strconv.FormatUint(campaignID, 10), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - } - if next == nil { - args = append(args, fmt.Sprintf("--%s=%d", flags.FlagOffset, offset)) - } else { - args = append(args, fmt.Sprintf("--%s=%s", flags.FlagPageKey, next)) - } - args = append(args, fmt.Sprintf("--%s=%d", flags.FlagLimit, limit)) - if total { - args = append(args, fmt.Sprintf("--%s", flags.FlagCountTotal)) - } - return args - } - t.Run("ByOffset", func(t *testing.T) { - step := 2 - for i := 0; i < len(objs); i += step { - args := request(campaignID, nil, uint64(i), uint64(step), false) - out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListMainnetVestingAccount(), args) - require.NoError(t, err) - var resp types.QueryAllMainnetVestingAccountResponse - require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) - require.LessOrEqual(t, len(resp.MainnetVestingAccount), step) - require.Subset(t, objs, resp.MainnetVestingAccount) - } - }) - t.Run("ByKey", func(t *testing.T) { - step := 2 - var next []byte - for i := 0; i < len(objs); i += step { - args := request(campaignID, next, 0, uint64(step), false) - out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListMainnetVestingAccount(), args) - require.NoError(t, err) - var resp types.QueryAllMainnetVestingAccountResponse - require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) - require.LessOrEqual(t, len(resp.MainnetVestingAccount), step) - require.Subset(t, objs, resp.MainnetVestingAccount) - next = resp.Pagination.NextKey - } - }) - t.Run("Total", func(t *testing.T) { - args := request(campaignID, nil, 0, uint64(len(objs)), true) - out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListMainnetVestingAccount(), args) - require.NoError(t, err) - var resp types.QueryAllMainnetVestingAccountResponse - require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) - require.NoError(t, err) - require.Equal(t, len(objs), int(resp.Pagination.Total)) - require.ElementsMatch(t, objs, resp.MainnetVestingAccount) - }) -} diff --git a/x/campaign/genesis.go b/x/campaign/genesis.go index 119987870..8ec975038 100644 --- a/x/campaign/genesis.go +++ b/x/campaign/genesis.go @@ -28,11 +28,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) k.SetMainnetAccount(ctx, elem) } - // Set all the mainnetVestingAccount - for _, elem := range genState.MainnetVestingAccountList { - k.SetMainnetVestingAccount(ctx, elem) - } - k.SetParams(ctx, genState.Params) // set maximum shares constant value @@ -49,7 +44,6 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.CampaignCounter = k.GetCampaignCounter(ctx) genesis.CampaignChainsList = k.GetAllCampaignChains(ctx) genesis.MainnetAccountList = k.GetAllMainnetAccount(ctx) - genesis.MainnetVestingAccountList = k.GetAllMainnetVestingAccount(ctx) genesis.Params = k.GetParams(ctx) // this line is used by starport scaffolding # genesis/module/export diff --git a/x/campaign/handler.go b/x/campaign/handler.go index 11658a745..3539658e6 100644 --- a/x/campaign/handler.go +++ b/x/campaign/handler.go @@ -50,11 +50,6 @@ func NewHandler(k keeper.Keeper) sdk.Handler { return sdk.WrapServiceResult(ctx, res, err) // this line is used by starport scaffolding # 1 - // disabled: https://github.com/tendermint/spn/issues/774 - // case *types.MsgAddVestingOptions: - // res, err := msgServer.AddVestingOptions(sdk.WrapSDKContext(ctx), msg) - // return sdk.WrapServiceResult(ctx, res, err) - default: errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) diff --git a/x/campaign/keeper/grpc_mainnet_vesting_account.go b/x/campaign/keeper/grpc_mainnet_vesting_account.go deleted file mode 100644 index 896cae1de..000000000 --- a/x/campaign/keeper/grpc_mainnet_vesting_account.go +++ /dev/null @@ -1,59 +0,0 @@ -package keeper - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/tendermint/spn/x/campaign/types" -) - -func (k Keeper) MainnetVestingAccountAll(c context.Context, req *types.QueryAllMainnetVestingAccountRequest) (*types.QueryAllMainnetVestingAccountResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var mainnetVestingAccounts []types.MainnetVestingAccount - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - mainnetVestingAccountStore := prefix.NewStore(store, types.MainnetVestingAccountAllKey(req.CampaignID)) - - pageRes, err := query.Paginate(mainnetVestingAccountStore, req.Pagination, func(key []byte, value []byte) error { - var mainnetVestingAccount types.MainnetVestingAccount - if err := k.cdc.Unmarshal(value, &mainnetVestingAccount); err != nil { - return err - } - - mainnetVestingAccounts = append(mainnetVestingAccounts, mainnetVestingAccount) - return nil - }) - - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllMainnetVestingAccountResponse{MainnetVestingAccount: mainnetVestingAccounts, Pagination: pageRes}, nil -} - -func (k Keeper) MainnetVestingAccount(c context.Context, req *types.QueryGetMainnetVestingAccountRequest) (*types.QueryGetMainnetVestingAccountResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - val, found := k.GetMainnetVestingAccount( - ctx, - req.CampaignID, - req.Address, - ) - if !found { - return nil, status.Error(codes.NotFound, "not found") - } - - return &types.QueryGetMainnetVestingAccountResponse{MainnetVestingAccount: val}, nil -} diff --git a/x/campaign/keeper/grpc_mainnet_vesting_account_test.go b/x/campaign/keeper/grpc_mainnet_vesting_account_test.go deleted file mode 100644 index 6133fab97..000000000 --- a/x/campaign/keeper/grpc_mainnet_vesting_account_test.go +++ /dev/null @@ -1,133 +0,0 @@ -package keeper_test - -import ( - "strconv" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - testkeeper "github.com/tendermint/spn/testutil/keeper" - "github.com/tendermint/spn/testutil/sample" - "github.com/tendermint/spn/x/campaign/keeper" - "github.com/tendermint/spn/x/campaign/types" -) - -func createNMainnetVestingAccountForCampaignID( - keeper *keeper.Keeper, - ctx sdk.Context, - n int, - campaignID uint64, -) []types.MainnetVestingAccount { - items := make([]types.MainnetVestingAccount, n) - for i := range items { - items[i] = sample.MainnetVestingAccount(r, campaignID, strconv.Itoa(i)) - keeper.SetMainnetVestingAccount(ctx, items[i]) - } - return items -} - -func TestMainnetVestingAccountQuerySingle(t *testing.T) { - var ( - ctx, tk, _ = testkeeper.NewTestSetup(t) - wctx = sdk.WrapSDKContext(ctx) - msgs = createNMainnetVestingAccount(tk.CampaignKeeper, ctx, 2) - ) - for _, tc := range []struct { - desc string - request *types.QueryGetMainnetVestingAccountRequest - response *types.QueryGetMainnetVestingAccountResponse - err error - }{ - { - desc: "First", - request: &types.QueryGetMainnetVestingAccountRequest{ - CampaignID: msgs[0].CampaignID, - Address: msgs[0].Address, - }, - response: &types.QueryGetMainnetVestingAccountResponse{MainnetVestingAccount: msgs[0]}, - }, - { - desc: "Second", - request: &types.QueryGetMainnetVestingAccountRequest{ - CampaignID: msgs[1].CampaignID, - Address: msgs[1].Address, - }, - response: &types.QueryGetMainnetVestingAccountResponse{MainnetVestingAccount: msgs[1]}, - }, - { - desc: "KeyNotFound", - request: &types.QueryGetMainnetVestingAccountRequest{ - CampaignID: 100000, - Address: strconv.Itoa(100000), - }, - err: status.Error(codes.NotFound, "not found"), - }, - { - desc: "InvalidRequest", - err: status.Error(codes.InvalidArgument, "invalid request"), - }, - } { - t.Run(tc.desc, func(t *testing.T) { - response, err := tk.CampaignKeeper.MainnetVestingAccount(wctx, tc.request) - if tc.err != nil { - require.ErrorIs(t, err, tc.err) - } else { - require.Equal(t, tc.response, response) - } - }) - } -} - -func TestMainnetVestingAccountQueryPaginated(t *testing.T) { - var ( - campaignID = uint64(5) - ctx, tk, _ = testkeeper.NewTestSetup(t) - wctx = sdk.WrapSDKContext(ctx) - msgs = createNMainnetVestingAccountForCampaignID(tk.CampaignKeeper, ctx, 5, campaignID) - ) - request := func(campaignID uint64, next []byte, offset, limit uint64, total bool) *types.QueryAllMainnetVestingAccountRequest { - return &types.QueryAllMainnetVestingAccountRequest{ - CampaignID: campaignID, - Pagination: &query.PageRequest{ - Key: next, - Offset: offset, - Limit: limit, - CountTotal: total, - }, - } - } - t.Run("ByOffset", func(t *testing.T) { - step := 2 - for i := 0; i < len(msgs); i += step { - resp, err := tk.CampaignKeeper.MainnetVestingAccountAll(wctx, request(campaignID, nil, uint64(i), uint64(step), false)) - require.NoError(t, err) - require.LessOrEqual(t, len(resp.MainnetVestingAccount), step) - require.Subset(t, msgs, resp.MainnetVestingAccount) - } - }) - t.Run("ByKey", func(t *testing.T) { - step := 2 - var next []byte - for i := 0; i < len(msgs); i += step { - resp, err := tk.CampaignKeeper.MainnetVestingAccountAll(wctx, request(campaignID, next, 0, uint64(step), false)) - require.NoError(t, err) - require.LessOrEqual(t, len(resp.MainnetVestingAccount), step) - require.Subset(t, msgs, resp.MainnetVestingAccount) - next = resp.Pagination.NextKey - } - }) - t.Run("Total", func(t *testing.T) { - resp, err := tk.CampaignKeeper.MainnetVestingAccountAll(wctx, request(campaignID, nil, 0, 0, true)) - require.NoError(t, err) - require.Equal(t, len(msgs), int(resp.Pagination.Total)) - require.ElementsMatch(t, msgs, resp.MainnetVestingAccount) - }) - t.Run("InvalidRequest", func(t *testing.T) { - _, err := tk.CampaignKeeper.MainnetVestingAccountAll(wctx, nil) - require.ErrorIs(t, err, status.Error(codes.InvalidArgument, "invalid request")) - }) -} diff --git a/x/campaign/keeper/invariants.go b/x/campaign/keeper/invariants.go index 0b26c64e1..90c93376a 100644 --- a/x/campaign/keeper/invariants.go +++ b/x/campaign/keeper/invariants.go @@ -9,17 +9,14 @@ import ( ) const ( - accountWithoutCampaignRoute = "account-without-campaign" - vestingAccountWithoutCampaignRoute = "vesting-account-without-campaign" - campaignSharesRoute = "campaign-shares" + accountWithoutCampaignRoute = "account-without-campaign" + campaignSharesRoute = "campaign-shares" ) // RegisterInvariants registers all module invariants func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { ir.RegisterRoute(types.ModuleName, accountWithoutCampaignRoute, AccountWithoutCampaignInvariant(k)) - ir.RegisterRoute(types.ModuleName, vestingAccountWithoutCampaignRoute, - VestingAccountWithoutCampaignInvariant(k)) ir.RegisterRoute(types.ModuleName, campaignSharesRoute, CampaignSharesInvariant(k)) } @@ -31,10 +28,6 @@ func AllInvariants(k Keeper) sdk.Invariant { if stop { return res, stop } - res, stop = VestingAccountWithoutCampaignInvariant(k)(ctx) - if stop { - return res, stop - } return CampaignSharesInvariant(k)(ctx) } } @@ -56,23 +49,6 @@ func AccountWithoutCampaignInvariant(k Keeper) sdk.Invariant { } } -// VestingAccountWithoutCampaignInvariant invariant that checks if -// the `MainnetVestingAccount` campaign exist. -func VestingAccountWithoutCampaignInvariant(k Keeper) sdk.Invariant { - return func(ctx sdk.Context) (string, bool) { - all := k.GetAllMainnetVestingAccount(ctx) - for _, acc := range all { - if _, found := k.GetCampaign(ctx, acc.CampaignID); !found { - return sdk.FormatInvariant( - types.ModuleName, vestingAccountWithoutCampaignRoute, - fmt.Sprintf("%s: %d", types.ErrCampaignNotFound, acc.CampaignID), - ), true - } - } - return "", false - } -} - // CampaignSharesInvariant invariant that checks, for all campaigns, if the amount of allocated shares is equal to // the sum of `MainnetVestingAccount` and `MainnetAccount` shares plus // the amount of vouchers in circulation plus @@ -93,28 +69,6 @@ func CampaignSharesInvariant(k Keeper) sdk.Invariant { ) } - // get all mainnet vesting account shares - vestingAccounts := k.GetAllMainnetVestingAccount(ctx) - for _, acc := range vestingAccounts { - if _, ok := accountSharesByCampaign[acc.CampaignID]; !ok { - accountSharesByCampaign[acc.CampaignID] = types.EmptyShares() - } - totalShare, err := acc.GetTotalShares() - if err != nil { - return sdk.FormatInvariant( - types.ModuleName, campaignSharesRoute, - fmt.Sprintf( - "invalid total share for vesting account: %s", - acc.Address, - ), - ), true - } - accountSharesByCampaign[acc.CampaignID] = types.IncreaseShares( - accountSharesByCampaign[acc.CampaignID], - totalShare, - ) - } - for _, campaign := range k.GetAllCampaign(ctx) { campaignID := campaign.CampaignID expectedAllocatedSharesShares := accountSharesByCampaign[campaignID] diff --git a/x/campaign/keeper/mainnet_vesting_account.go b/x/campaign/keeper/mainnet_vesting_account.go deleted file mode 100644 index ead60fe4d..000000000 --- a/x/campaign/keeper/mainnet_vesting_account.go +++ /dev/null @@ -1,61 +0,0 @@ -package keeper - -import ( - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/tendermint/spn/x/campaign/types" -) - -// SetMainnetVestingAccount set a specific mainnetVestingAccount in the store from its index -func (k Keeper) SetMainnetVestingAccount(ctx sdk.Context, mainnetVestingAccount types.MainnetVestingAccount) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MainnetVestingAccountKeyPrefix)) - b := k.cdc.MustMarshal(&mainnetVestingAccount) - store.Set(types.MainnetVestingAccountKey( - mainnetVestingAccount.CampaignID, - mainnetVestingAccount.Address, - ), b) -} - -// GetMainnetVestingAccount returns a mainnetVestingAccount from its index -func (k Keeper) GetMainnetVestingAccount( - ctx sdk.Context, - campaignID uint64, - address string, -) (val types.MainnetVestingAccount, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MainnetVestingAccountKeyPrefix)) - - b := store.Get(types.MainnetVestingAccountKey(campaignID, address)) - if b == nil { - return val, false - } - - k.cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveMainnetVestingAccount removes a mainnetVestingAccount from the store -func (k Keeper) RemoveMainnetVestingAccount( - ctx sdk.Context, - campaignID uint64, - address string, -) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MainnetVestingAccountKeyPrefix)) - store.Delete(types.MainnetVestingAccountKey(campaignID, address)) -} - -// GetAllMainnetVestingAccount returns all mainnetVestingAccount -func (k Keeper) GetAllMainnetVestingAccount(ctx sdk.Context) (list []types.MainnetVestingAccount) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MainnetVestingAccountKeyPrefix)) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.MainnetVestingAccount - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} diff --git a/x/campaign/keeper/mainnet_vesting_account_test.go b/x/campaign/keeper/mainnet_vesting_account_test.go deleted file mode 100644 index 4a820e3a7..000000000 --- a/x/campaign/keeper/mainnet_vesting_account_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package keeper_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - testkeeper "github.com/tendermint/spn/testutil/keeper" - "github.com/tendermint/spn/testutil/sample" - campaignkeeper "github.com/tendermint/spn/x/campaign/keeper" - "github.com/tendermint/spn/x/campaign/types" -) - -func createNMainnetVestingAccount(keeper *campaignkeeper.Keeper, ctx sdk.Context, n int) []types.MainnetVestingAccount { - items := make([]types.MainnetVestingAccount, n) - for i := range items { - items[i] = sample.MainnetVestingAccount(r, 0, sample.Address(r)) - keeper.SetMainnetVestingAccount(ctx, items[i]) - } - return items -} - -func TestMainnetVestingAccountGet(t *testing.T) { - ctx, tk, _ := testkeeper.NewTestSetup(t) - items := createNMainnetVestingAccount(tk.CampaignKeeper, ctx, 10) - for _, item := range items { - rst, found := tk.CampaignKeeper.GetMainnetVestingAccount(ctx, - item.CampaignID, - item.Address, - ) - require.True(t, found) - require.Equal(t, item, rst) - } -} -func TestMainnetVestingAccountRemove(t *testing.T) { - ctx, tk, _ := testkeeper.NewTestSetup(t) - items := createNMainnetVestingAccount(tk.CampaignKeeper, ctx, 10) - for _, item := range items { - tk.CampaignKeeper.RemoveMainnetVestingAccount(ctx, - item.CampaignID, - item.Address, - ) - _, found := tk.CampaignKeeper.GetMainnetVestingAccount(ctx, - item.CampaignID, - item.Address, - ) - require.False(t, found) - } -} - -func TestMainnetVestingAccountGetAll(t *testing.T) { - ctx, tk, _ := testkeeper.NewTestSetup(t) - items := createNMainnetVestingAccount(tk.CampaignKeeper, ctx, 10) - require.ElementsMatch(t, items, tk.CampaignKeeper.GetAllMainnetVestingAccount(ctx)) -} diff --git a/x/campaign/module_simulation.go b/x/campaign/module_simulation.go index 8a7bcefdc..0c46a570f 100644 --- a/x/campaign/module_simulation.go +++ b/x/campaign/module_simulation.go @@ -20,7 +20,6 @@ const ( defaultWeightMsgInitializeMainnet = 15 defaultWeightMsgUpdateSpecialAllocations = 20 defaultWeightMsgAddShares = 20 - defaultWeightMsgAddVestingOptions = 20 defaultWeightMsgMintVouchers = 20 defaultWeightMsgBurnVouchers = 20 defaultWeightMsgRedeemVouchers = 20 @@ -32,7 +31,6 @@ const ( opWeightMsgInitializeMainnet = "op_weight_msg_initialize_mainnet" opWeightMsgUpdateSpecialAllocations = "op_weight_msg_update_special_allocations" opWeightMsgAddShares = "op_weight_msg_add_shares" - opWeightMsgAddVestingOptions = "op_weight_msg_add_vesting_options" opWeightMsgMintVouchers = "op_weight_msg_mint_vouchers" opWeightMsgBurnVouchers = "op_weight_msg_burn_vouchers" opWeightMsgRedeemVouchers = "op_weight_msg_redeem_vouchers" @@ -77,7 +75,6 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp weightMsgInitializeMainnet int weightMsgUpdateSpecialAllocations int weightMsgAddShares int - weightMsgAddVestingOptions int weightMsgMintVouchers int weightMsgBurnVouchers int weightMsgRedeemVouchers int @@ -116,11 +113,6 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp weightMsgAddShares = defaultWeightMsgAddShares }, ) - appParams.GetOrGenerate(cdc, opWeightMsgAddVestingOptions, &weightMsgAddVestingOptions, nil, - func(_ *rand.Rand) { - weightMsgAddVestingOptions = defaultWeightMsgAddVestingOptions - }, - ) appParams.GetOrGenerate(cdc, opWeightMsgMintVouchers, &weightMsgMintVouchers, nil, func(_ *rand.Rand) { weightMsgMintVouchers = defaultWeightMsgMintVouchers @@ -183,11 +175,5 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp weightMsgUnredeemVouchers, campaignsim.SimulateMsgUnredeemVouchers(am.accountKeeper, am.bankKeeper, am.keeper), ), - - // disabled: https://github.com/tendermint/spn/issues/774 - // simulation.NewWeightedOperation( - // weightMsgAddVestingOptions, - // campaignsim.SimulateMsgAddVestingOptions(am.accountKeeper, am.bankKeeper, am.profileKeeper, am.keeper), - // ), } } From 50010db75a84d18c85549c76942fb62d23400902 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Tue, 7 Jun 2022 09:59:20 -0400 Subject: [PATCH 07/10] remove remaining refs --- x/campaign/genesis_test.go | 1 - x/campaign/keeper/invariants_test.go | 49 ------------------------ x/campaign/types/genesis_test.go | 56 +--------------------------- 3 files changed, 2 insertions(+), 104 deletions(-) diff --git a/x/campaign/genesis_test.go b/x/campaign/genesis_test.go index cd44319f1..ca8e0a065 100644 --- a/x/campaign/genesis_test.go +++ b/x/campaign/genesis_test.go @@ -30,7 +30,6 @@ func TestGenesis(t *testing.T) { require.Equal(t, genesisState.CampaignCounter, got.CampaignCounter) require.ElementsMatch(t, genesisState.MainnetAccountList, got.MainnetAccountList) - require.ElementsMatch(t, genesisState.MainnetVestingAccountList, got.MainnetVestingAccountList) require.Equal(t, genesisState.Params, got.Params) diff --git a/x/campaign/keeper/invariants_test.go b/x/campaign/keeper/invariants_test.go index adadde4df..3d730c8f6 100644 --- a/x/campaign/keeper/invariants_test.go +++ b/x/campaign/keeper/invariants_test.go @@ -30,23 +30,6 @@ func TestAccountWithoutCampaignInvariant(t *testing.T) { }) } -func TestVestingAccountWithoutCampaignInvariant(t *testing.T) { - ctx, tk, _ := testkeeper.NewTestSetup(t) - t.Run("valid case", func(t *testing.T) { - campaign := sample.Campaign(r, 0) - campaign.CampaignID = tk.CampaignKeeper.AppendCampaign(ctx, campaign) - tk.CampaignKeeper.SetMainnetVestingAccount(ctx, sample.MainnetVestingAccount(r, campaign.CampaignID, sample.Address(r))) - msg, broken := keeper.VestingAccountWithoutCampaignInvariant(*tk.CampaignKeeper)(ctx) - require.False(t, broken, msg) - }) - - t.Run("invalid case", func(t *testing.T) { - tk.CampaignKeeper.SetMainnetVestingAccount(ctx, sample.MainnetVestingAccount(r, 10000, sample.Address(r))) - msg, broken := keeper.VestingAccountWithoutCampaignInvariant(*tk.CampaignKeeper)(ctx) - require.True(t, broken, msg) - }) -} - func TestCampaignSharesInvariant(t *testing.T) { t.Run("valid case", func(t *testing.T) { ctx, tk, _ := testkeeper.NewTestSetup(t) @@ -91,26 +74,6 @@ func TestCampaignSharesInvariant(t *testing.T) { Shares: tc.Shares(t, "2500foo"), }) - // add vesting accounts with shares - tk.CampaignKeeper.SetMainnetVestingAccount(ctx, types.MainnetVestingAccount{ - CampaignID: campaignID1, - Address: sample.Address(r), - VestingOptions: *types.NewShareDelayedVesting( - tc.Shares(t, "10foo,20bar"), - types.EmptyShares(), - 1, - ), - }) - tk.CampaignKeeper.SetMainnetVestingAccount(ctx, types.MainnetVestingAccount{ - CampaignID: campaignID2, - Address: sample.Address(r), - VestingOptions: *types.NewShareDelayedVesting( - tc.Shares(t, "2500foo"), - types.EmptyShares(), - 1, - ), - }) - msg, broken := keeper.CampaignSharesInvariant(*tk.CampaignKeeper)(ctx) require.False(t, broken, msg) }) @@ -123,18 +86,6 @@ func TestCampaignSharesInvariant(t *testing.T) { require.False(t, broken, msg) }) - t.Run("mainnet vesting account has invalid total shares", func(t *testing.T) { - ctx, tk, _ := testkeeper.NewTestSetup(t) - tk.CampaignKeeper.SetMainnetVestingAccount(ctx, types.MainnetVestingAccount{ - CampaignID: 0, - Address: sample.Address(r), - VestingOptions: types.ShareVestingOptions{}, - }) - - msg, broken := keeper.CampaignSharesInvariant(*tk.CampaignKeeper)(ctx) - require.True(t, broken, msg) - }) - t.Run("allocated shares cannot be converted to vouchers", func(t *testing.T) { ctx, tk, _ := testkeeper.NewTestSetup(t) campaignID := uint64(4) diff --git a/x/campaign/types/genesis_test.go b/x/campaign/types/genesis_test.go index b13c589a9..f1eb7074b 100644 --- a/x/campaign/types/genesis_test.go +++ b/x/campaign/types/genesis_test.go @@ -2,11 +2,9 @@ package types_test import ( "fmt" - "testing" - "time" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + "testing" spntypes "github.com/tendermint/spn/pkg/types" tc2 "github.com/tendermint/spn/testutil/constructor" @@ -69,18 +67,6 @@ func TestGenesisState_Validate(t *testing.T) { Shares: shares3, }, }, - MainnetVestingAccountList: []types.MainnetVestingAccount{ - { - CampaignID: campaign1.CampaignID, - Address: sample.Address(r), - VestingOptions: *types.NewShareDelayedVesting(shares2, shares2, time.Now().Unix()), - }, - { - CampaignID: campaign2.CampaignID, - Address: sample.Address(r), - VestingOptions: *types.NewShareDelayedVesting(shares4, shares4, time.Now().Unix()), - }, - }, TotalShares: spntypes.TotalShareNumber, Params: types.DefaultParams(), }, @@ -105,16 +91,6 @@ func TestGenesisState_Validate(t *testing.T) { sample.MainnetAccount(r, 0, sample.Address(r)), sample.MainnetAccount(r, 1, sample.Address(r)), }, - MainnetVestingAccountList: []types.MainnetVestingAccount{ - { - CampaignID: 33333, - Address: "33333", - }, - { - CampaignID: 9999, - Address: "9999", - }, - }, TotalShares: spntypes.TotalShareNumber, }, errorMessage: "campaign id 33333 doesn't exist for mainnet vesting account 33333", @@ -188,17 +164,7 @@ func TestGenesisState_Validate(t *testing.T) { sample.Campaign(r, 0), }, CampaignCounter: 1, - MainnetVestingAccountList: []types.MainnetVestingAccount{ - { - CampaignID: 0, - Address: "0", - }, - { - CampaignID: 0, - Address: "0", - }, - }, - TotalShares: spntypes.TotalShareNumber, + TotalShares: spntypes.TotalShareNumber, }, errorMessage: "duplicated index for mainnetVestingAccount", }, @@ -322,24 +288,6 @@ func TestGenesisState_Validate(t *testing.T) { ) } - for _, acc := range tc.genState.MainnetVestingAccountList { - // check if the campaign exists for mainnet accounts - _, ok := campaignIDMap[acc.CampaignID] - require.True(t, ok) - - // sum mainnet account shares - if _, ok := shares[acc.CampaignID]; !ok { - shares[acc.CampaignID] = types.EmptyShares() - } - totalShares, err := acc.GetTotalShares() - require.NoError(t, err) - - shares[acc.CampaignID] = types.IncreaseShares( - shares[acc.CampaignID], - totalShares, - ) - } - for campaignID, share := range campaignIDMap { // check if the campaign shares is equal all accounts shares accShares, ok := shares[campaignID] From 9f9d325623dd807189dd375d48acdb4548994585 Mon Sep 17 00:00:00 2001 From: ltacker Date: Fri, 10 Jun 2022 10:08:09 +0200 Subject: [PATCH 08/10] use cli pr 2549 --- go.mod | 3 ++- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7bf1c2821..ae831dcc3 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/ignite-hq/cli v0.21.2 + github.com/ignite-hq/cli v0.22.1-0.20220610070456-1b33c09fceb7 github.com/pkg/errors v0.9.1 github.com/spf13/cast v1.4.1 github.com/spf13/cobra v1.4.0 @@ -38,6 +38,7 @@ require ( github.com/bgentry/speakeasy v0.1.0 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/btcsuite/btcd v0.22.0-beta // indirect + github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect diff --git a/go.sum b/go.sum index 54fcc80f8..fe22aa355 100644 --- a/go.sum +++ b/go.sum @@ -252,6 +252,8 @@ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= @@ -898,8 +900,8 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ignite-hq/cli v0.21.2 h1:xdce/OnPsn1SzaqgV8YjyVMndORiTrxLEzdPSjEmEB4= -github.com/ignite-hq/cli v0.21.2/go.mod h1:UU+knzdlKyj3nKN3WADh6HUjIKPqFBj9htDmIkhRMOQ= +github.com/ignite-hq/cli v0.22.1-0.20220610070456-1b33c09fceb7 h1:2HUkG2SzDJ8K7//JNFwtx4D3V1HxGRtHaEku5gdstts= +github.com/ignite-hq/cli v0.22.1-0.20220610070456-1b33c09fceb7/go.mod h1:KpUW5KOrkZpfYF/1wPC3wVAj1An1d2nX7SKbcEM/1ds= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= From cb44d7a44c4695e69595276f60d3298875e78a60 Mon Sep 17 00:00:00 2001 From: ltacker Date: Fri, 10 Jun 2022 10:36:38 +0200 Subject: [PATCH 09/10] fix invariant test --- x/campaign/keeper/invariants_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/campaign/keeper/invariants_test.go b/x/campaign/keeper/invariants_test.go index 3d730c8f6..d525c7082 100644 --- a/x/campaign/keeper/invariants_test.go +++ b/x/campaign/keeper/invariants_test.go @@ -66,12 +66,12 @@ func TestCampaignSharesInvariant(t *testing.T) { tk.CampaignKeeper.SetMainnetAccount(ctx, types.MainnetAccount{ CampaignID: campaignID1, Address: sample.Address(r), - Shares: tc.Shares(t, "20foo,40bar"), + Shares: tc.Shares(t, "30foo,60bar"), }) tk.CampaignKeeper.SetMainnetAccount(ctx, types.MainnetAccount{ CampaignID: campaignID2, Address: sample.Address(r), - Shares: tc.Shares(t, "2500foo"), + Shares: tc.Shares(t, "5000foo"), }) msg, broken := keeper.CampaignSharesInvariant(*tk.CampaignKeeper)(ctx) From 5e3e0c9cf64e9cb4b3da4f82c38d041e5945cde0 Mon Sep 17 00:00:00 2001 From: ltacker Date: Fri, 10 Jun 2022 10:47:45 +0200 Subject: [PATCH 10/10] fix genesis tests --- x/campaign/types/genesis_test.go | 35 -------------------------------- 1 file changed, 35 deletions(-) diff --git a/x/campaign/types/genesis_test.go b/x/campaign/types/genesis_test.go index f1eb7074b..1db2d2f36 100644 --- a/x/campaign/types/genesis_test.go +++ b/x/campaign/types/genesis_test.go @@ -71,30 +71,6 @@ func TestGenesisState_Validate(t *testing.T) { Params: types.DefaultParams(), }, }, - { - desc: "non existing campaign for mainnet vesting account", - genState: &types.GenesisState{ - CampaignChainsList: []types.CampaignChains{ - { - CampaignID: 0, - }, - { - CampaignID: 1, - }, - }, - CampaignList: []types.Campaign{ - sample.Campaign(r, 0), - sample.Campaign(r, 1), - }, - CampaignCounter: 2, - MainnetAccountList: []types.MainnetAccount{ - sample.MainnetAccount(r, 0, sample.Address(r)), - sample.MainnetAccount(r, 1, sample.Address(r)), - }, - TotalShares: spntypes.TotalShareNumber, - }, - errorMessage: "campaign id 33333 doesn't exist for mainnet vesting account 33333", - }, { desc: "non existing campaign for mainnet account", genState: &types.GenesisState{ @@ -157,17 +133,6 @@ func TestGenesisState_Validate(t *testing.T) { }, errorMessage: "duplicated index for campaignChains", }, - { - desc: "duplicated mainnetVestingAccount", - genState: &types.GenesisState{ - CampaignList: []types.Campaign{ - sample.Campaign(r, 0), - }, - CampaignCounter: 1, - TotalShares: spntypes.TotalShareNumber, - }, - errorMessage: "duplicated index for mainnetVestingAccount", - }, { desc: "duplicated campaign", genState: &types.GenesisState{