From b25991fde93d4029c15cc78a4cd4c8a232078a85 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Tue, 16 Nov 2021 12:13:39 -0500 Subject: [PATCH] in progress --- app/app.go | 10 +- .../tokenfactory/v1beta1/genesis.proto | 4 + proto/osmosis/tokenfactory/v1beta1/tx.proto | 5 +- testutil/keeper/tokenfactory.go | 39 ----- x/tokenfactory/client/cli/query.go | 66 ++++++++- x/tokenfactory/genesis_test.go | 36 +++-- x/tokenfactory/keeper/createdenom.go | 10 +- x/tokenfactory/keeper/keeper.go | 6 +- x/tokenfactory/keeper/msg_server.go | 53 +++++-- x/tokenfactory/keeper/msg_server_test.go | 26 ++-- x/tokenfactory/types/events.go | 15 ++ x/tokenfactory/types/genesis.pb.go | 82 +++++++++-- x/tokenfactory/types/tx.pb.go | 133 ++++++++++++------ x/tokenfactory/types/types.go | 1 - 14 files changed, 345 insertions(+), 141 deletions(-) delete mode 100644 testutil/keeper/tokenfactory.go create mode 100644 x/tokenfactory/types/events.go delete mode 100644 x/tokenfactory/types/types.go diff --git a/app/app.go b/app/app.go index d2042769d52..7a985649f3a 100644 --- a/app/app.go +++ b/app/app.go @@ -109,6 +109,9 @@ import ( poolincentivesclient "github.com/osmosis-labs/osmosis/x/pool-incentives/client" poolincentiveskeeper "github.com/osmosis-labs/osmosis/x/pool-incentives/keeper" poolincentivestypes "github.com/osmosis-labs/osmosis/x/pool-incentives/types" + "github.com/osmosis-labs/osmosis/x/tokenfactory" + tokenfactorykeeper "github.com/osmosis-labs/osmosis/x/tokenfactory/keeper" + tokenfactorytypes "github.com/osmosis-labs/osmosis/x/tokenfactory/types" "github.com/osmosis-labs/osmosis/x/txfees" txfeeskeeper "github.com/osmosis-labs/osmosis/x/txfees/keeper" txfeestypes "github.com/osmosis-labs/osmosis/x/txfees/types" @@ -151,6 +154,7 @@ var ( poolincentives.AppModuleBasic{}, epochs.AppModuleBasic{}, claim.AppModuleBasic{}, + tokenfactory.AppModuleBasic{}, ) // module account permissions @@ -169,6 +173,7 @@ var ( lockuptypes.ModuleName: {authtypes.Minter, authtypes.Burner}, poolincentivestypes.ModuleName: nil, txfeestypes.ModuleName: nil, + tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner}, } // module accounts that are allowed to receive tokens @@ -217,6 +222,7 @@ type OsmosisApp struct { EpochsKeeper epochskeeper.Keeper PoolIncentivesKeeper poolincentiveskeeper.Keeper TxFeesKeeper txfeeskeeper.Keeper + TokenFactoryKeeper tokenfactorykeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -259,7 +265,7 @@ func NewOsmosisApp( govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, gammtypes.StoreKey, lockuptypes.StoreKey, claimtypes.StoreKey, incentivestypes.StoreKey, - epochstypes.StoreKey, poolincentivestypes.StoreKey, txfeestypes.StoreKey, + epochstypes.StoreKey, poolincentivestypes.StoreKey, txfeestypes.StoreKey, tokenfactorytypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -411,6 +417,8 @@ func NewOsmosisApp( ) poolIncentivesHooks := app.PoolIncentivesKeeper.Hooks() + app.TokenFactoryKeeper = *tokenfactorykeeper.NewKeeper(appCodec, keys[tokenfactorytypes.StoreKey], app.BankKeeper) + // register the proposal types govRouter := govtypes.NewRouter() govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). diff --git a/proto/osmosis/tokenfactory/v1beta1/genesis.proto b/proto/osmosis/tokenfactory/v1beta1/genesis.proto index 163010c5c8f..ae79f669b90 100644 --- a/proto/osmosis/tokenfactory/v1beta1/genesis.proto +++ b/proto/osmosis/tokenfactory/v1beta1/genesis.proto @@ -8,6 +8,8 @@ option go_package = "github.com/osmosis-labs/osmosis/x/tokenfactory/types"; // GenesisState defines the tokenfactory module's genesis state. message GenesisState { + option (gogoproto.equal) = true; + repeated GenesisDenom factory_denoms = 1 [ (gogoproto.moretags) = "yaml:\"factory_denoms\"", (gogoproto.nullable) = false @@ -15,6 +17,8 @@ message GenesisState { } message GenesisDenom { + option (gogoproto.equal) = true; + string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; DenomAuthorityMetadata authority_metadata = 2 [ (gogoproto.moretags) = "yaml:\"authority_metadata\"", diff --git a/proto/osmosis/tokenfactory/v1beta1/tx.proto b/proto/osmosis/tokenfactory/v1beta1/tx.proto index f1f55b651b7..aa1bc8aac1f 100644 --- a/proto/osmosis/tokenfactory/v1beta1/tx.proto +++ b/proto/osmosis/tokenfactory/v1beta1/tx.proto @@ -21,7 +21,10 @@ message MsgCreateDenom { string nonce = 2 [ (gogoproto.moretags) = "yaml:\"nonce\"" ]; } -message MsgCreateDenomResponse {} +message MsgCreateDenomResponse { + string new_token_denom = 1 + [ (gogoproto.moretags) = "yaml:\"new_token_denom\"" ]; +} // ===================== MsgMint message MsgMint { diff --git a/testutil/keeper/tokenfactory.go b/testutil/keeper/tokenfactory.go deleted file mode 100644 index 274dc7dd410..00000000000 --- a/testutil/keeper/tokenfactory.go +++ /dev/null @@ -1,39 +0,0 @@ -package keeper - -import ( - "testing" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/osmosis-labs/osmosis/x/tokenfactory/keeper" - "github.com/osmosis-labs/osmosis/x/tokenfactory/types" - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" -) - -func TokenfactoryKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) - memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) - - db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) - stateStore.MountStoreWithDB(storeKey, sdk.StoreTypeIAVL, db) - stateStore.MountStoreWithDB(memStoreKey, sdk.StoreTypeMemory, nil) - require.NoError(t, stateStore.LoadLatestVersion()) - - registry := codectypes.NewInterfaceRegistry() - k := keeper.NewKeeper( - codec.NewProtoCodec(registry), - storeKey, - memStoreKey, - nil, - ) - - ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) - return k, ctx -} diff --git a/x/tokenfactory/client/cli/query.go b/x/tokenfactory/client/cli/query.go index 6e47241d865..2e8b79812e9 100644 --- a/x/tokenfactory/client/cli/query.go +++ b/x/tokenfactory/client/cli/query.go @@ -2,11 +2,14 @@ package cli import ( "fmt" + // "strings" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + // "github.com/cosmos/cosmos-sdk/client/flags" // sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,7 +27,68 @@ func GetQueryCmd(queryRoute string) *cobra.Command { RunE: client.ValidateCmd, } - // this line is used by starport scaffolding # 1 + cmd.AddCommand( + GetCmdDenomAuthorityMetadata(), + GetCmdDenomsFromCreator(), + ) + + return cmd +} + +// GetCmdDenomAuthorityMetadata returns the authority metadata for a queried denom +func GetCmdDenomAuthorityMetadata() *cobra.Command { + cmd := &cobra.Command{ + Use: "denom-authority-metadata [denom] [flags]", + Short: "Get the authority metadata for a specific denom", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.DenomAuthorityMetadata(cmd.Context(), &types.QueryDenomAuthorityMetadataRequest{ + Denom: args[0], + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdDenomAuthorityMetadata returns the authority metadata for a queried denom +func GetCmdDenomsFromCreator() *cobra.Command { + cmd := &cobra.Command{ + Use: "denoms-from-creator [creator address] [flags]", + Short: "Returns a list of all tokens created by a specific creator address", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.DenomsFromCreator(cmd.Context(), &types.QueryDenomsFromCreatorRequest{ + Creator: args[0], + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) return cmd } diff --git a/x/tokenfactory/genesis_test.go b/x/tokenfactory/genesis_test.go index 77a131358b6..b000ca90f53 100644 --- a/x/tokenfactory/genesis_test.go +++ b/x/tokenfactory/genesis_test.go @@ -3,21 +3,37 @@ package tokenfactory_test import ( "testing" - keepertest "github.com/osmosis-labs/osmosis/testutil/keeper" - "github.com/osmosis-labs/osmosis/x/tokenfactory" + simapp "github.com/osmosis-labs/osmosis/app" + appparams "github.com/osmosis-labs/osmosis/app/params" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/osmosis-labs/osmosis/x/tokenfactory/types" - "github.com/stretchr/testify/require" ) func TestGenesis(t *testing.T) { + appparams.SetAddressPrefixes() + genesisState := types.GenesisState{ - // this line is used by starport scaffolding # genesis/test/state + FactoryDenoms: []types.GenesisDenom{ + { + Denom: "factory/osmo1t7egva48prqmzl59x5ngv4zx0dtrwewc9m7z44/bitcoin", + AuthorityMetadata: types.DenomAuthorityMetadata{ + Admin: "osmo1t7egva48prqmzl59x5ngv4zx0dtrwewc9m7z44", + }, + }, + { + Denom: "factory/osmo1t7egva48prqmzl59x5ngv4zx0dtrwewc9m7z44/litecoin", + AuthorityMetadata: types.DenomAuthorityMetadata{ + Admin: "osmo1t7egva48prqmzl59x5ngv4zx0dtrwewc9m7z44", + }, + }, + }, } + app := simapp.Setup(false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - k, ctx := keepertest.TokenfactoryKeeper(t) - tokenfactory.InitGenesis(ctx, *k, genesisState) - got := tokenfactory.ExportGenesis(ctx, *k) - require.NotNil(t, got) - - // this line is used by starport scaffolding # genesis/test/assert + // tokenfactory.InitGenesis(ctx, *k, genesisState) + // got := tokenfactory.ExportGenesis(ctx, *k) + // require.NotNil(t, got) + // require.Equal(t, genesisState, got) } diff --git a/x/tokenfactory/keeper/createdenom.go b/x/tokenfactory/keeper/createdenom.go index 8cfd8d86e44..c03b46b36fb 100644 --- a/x/tokenfactory/keeper/createdenom.go +++ b/x/tokenfactory/keeper/createdenom.go @@ -7,15 +7,15 @@ import ( ) // ConvertToBaseToken converts a fee amount in a whitelisted fee token to the base fee token amount -func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, denomnonce string) error { +func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, denomnonce string) (newTokenDenom string, err error) { denom, err := types.GetTokenDenom(creatorAddr, denomnonce) if err != nil { - return err + return "", err } _, found := k.bankKeeper.GetDenomMetaData(ctx, denom) if found { - return types.ErrDenomExists + return "", types.ErrDenomExists } baseDenomUnit := banktypes.DenomUnit{ @@ -35,9 +35,9 @@ func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, denomnonce stri } err = k.SetAuthorityMetadata(ctx, denom, authorityMetadata) if err != nil { - return err + return "", err } k.addDenomFromCreator(ctx, creatorAddr, denom) - return nil + return denom, nil } diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index e10dd8cb0ca..660940f9f0c 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -15,7 +15,6 @@ type ( Keeper struct { cdc codec.Marshaler storeKey sdk.StoreKey - memKey sdk.StoreKey bankKeeper types.BankKeeper } @@ -23,15 +22,12 @@ type ( func NewKeeper( cdc codec.Marshaler, - storeKey, - memKey sdk.StoreKey, - + storeKey sdk.StoreKey, bankKeeper types.BankKeeper, ) *Keeper { return &Keeper{ cdc: cdc, storeKey: storeKey, - memKey: memKey, bankKeeper: bankKeeper, } diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index cae1f3ac39b..0eee7d06b5a 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -23,16 +23,23 @@ var _ types.MsgServer = msgServer{} func (server msgServer) CreateDenom(goCtx context.Context, msg *types.MsgCreateDenom) (*types.MsgCreateDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - err := server.Keeper.CreateDenom(ctx, msg.Sender, msg.Nonce) + denom, err := server.Keeper.CreateDenom(ctx, msg.Sender, msg.Nonce) if err != nil { return nil, err } - // TODO: events - // ctx.EventManager().EmitEvents(sdk.Events{}) - - return &types.MsgCreateDenomResponse{}, nil + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.TypeMsgCreateDenom, + sdk.NewAttribute(types.AttributeCreator, msg.Sender), + sdk.NewAttribute(types.AttributeNewTokenDenom, denom), + ), + }) + + return &types.MsgCreateDenomResponse{ + NewTokenDenom: denom, + }, nil } func (server msgServer) Mint(goCtx context.Context, msg *types.MsgMint) (*types.MsgMintResponse, error) { @@ -49,8 +56,13 @@ func (server msgServer) Mint(goCtx context.Context, msg *types.MsgMint) (*types. server.Keeper.mintTo(ctx, msg.Amount, msg.MintToAddress) - // TODO: events - // ctx.EventManager().EmitEvents(sdk.Events{}) + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.TypeMsgMint, + sdk.NewAttribute(types.AttributeMintToAddress, msg.MintToAddress), + sdk.NewAttribute(types.AttributeAmount, msg.Amount.String()), + ), + }) return &types.MsgMintResponse{}, nil } @@ -69,8 +81,13 @@ func (server msgServer) Burn(goCtx context.Context, msg *types.MsgBurn) (*types. server.Keeper.burnFrom(ctx, msg.Amount, msg.GetBurnFromAddress()) - // TODO: events - // ctx.EventManager().EmitEvents(sdk.Events{}) + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.TypeMsgBurn, + sdk.NewAttribute(types.AttributeBurnFromAddress, msg.BurnFromAddress), + sdk.NewAttribute(types.AttributeAmount, msg.Amount.String()), + ), + }) return &types.MsgBurnResponse{}, nil } @@ -89,8 +106,14 @@ func (server msgServer) ForceTransfer(goCtx context.Context, msg *types.MsgForce server.Keeper.forceTransfer(ctx, msg.Amount, msg.TransferFromAddress, msg.TransferToAddress) - // TODO: events - // ctx.EventManager().EmitEvents(sdk.Events{}) + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.TypeMsgForceTransfer, + sdk.NewAttribute(types.AttributeTransferFromAddress, msg.TransferFromAddress), + sdk.NewAttribute(types.AttributeTransferToAddress, msg.TransferToAddress), + sdk.NewAttribute(types.AttributeAmount, msg.Amount.String()), + ), + }) return &types.MsgForceTransferResponse{}, nil } @@ -113,7 +136,13 @@ func (server msgServer) ChangeAdmin(goCtx context.Context, msg *types.MsgChangeA } // TODO: events - // ctx.EventManager().EmitEvents(sdk.Events{}) + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.TypeMsgChangeAdmin, + sdk.NewAttribute(types.AttributeDenom, msg.GetDenom()), + sdk.NewAttribute(types.AttributeNewAdmin, msg.NewAdmin), + ), + }) return &types.MsgChangeAdminResponse{}, nil } diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 8e3afb623bd..846c3dce799 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -1,16 +1,16 @@ -package keeper_test +// package keeper_test -import ( - "context" - "testing" +// import ( +// "context" +// "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - keepertest "github.com/osmosis-labs/osmosis/testutil/keeper" - "github.com/osmosis-labs/osmosis/x/tokenfactory/keeper" - "github.com/osmosis-labs/osmosis/x/tokenfactory/types" -) +// sdk "github.com/cosmos/cosmos-sdk/types" +// keepertest "github.com/osmosis-labs/osmosis/testutil/keeper" +// "github.com/osmosis-labs/osmosis/x/tokenfactory/keeper" +// "github.com/osmosis-labs/osmosis/x/tokenfactory/types" +// ) -func setupMsgServer(t testing.TB) (types.MsgServer, context.Context) { - k, ctx := keepertest.TokenfactoryKeeper(t) - return keeper.NewMsgServerImpl(*k), sdk.WrapSDKContext(ctx) -} +// func setupMsgServer(t testing.TB) (types.MsgServer, context.Context) { +// k, ctx := keepertest.TokenfactoryKeeper(t) +// return keeper.NewMsgServerImpl(*k), sdk.WrapSDKContext(ctx) +// } diff --git a/x/tokenfactory/types/events.go b/x/tokenfactory/types/events.go new file mode 100644 index 00000000000..24742983950 --- /dev/null +++ b/x/tokenfactory/types/events.go @@ -0,0 +1,15 @@ +package types + +// event types +const ( + AttributeAmount = "amount" + AttributeCreator = "creator" + AttributeNonce = "nonce" + AttributeNewTokenDenom = "new_token_denom" + AttributeMintToAddress = "mint_to_address" + AttributeBurnFromAddress = "burn_from_address" + AttributeTransferFromAddress = "transfer_from_address" + AttributeTransferToAddress = "transfer_to_address" + AttributeDenom = "denom" + AttributeNewAdmin = "new_admin" +) diff --git a/x/tokenfactory/types/genesis.pb.go b/x/tokenfactory/types/genesis.pb.go index 30c1eb64866..06df2cfe9c5 100644 --- a/x/tokenfactory/types/genesis.pb.go +++ b/x/tokenfactory/types/genesis.pb.go @@ -130,30 +130,86 @@ func init() { } var fileDescriptor_5749c3f71850298b = []byte{ - // 323 bytes of a gzipped FileDescriptorProto + // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xca, 0x2f, 0xce, 0xcd, 0x2f, 0xce, 0x2c, 0xd6, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0x4b, 0x4b, 0x4c, 0x2e, 0xc9, 0x2f, 0xaa, 0xd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24, 0x98, 0x14, + 0x18, 0x35, 0xb8, 0x8d, 0x4c, 0xf0, 0xbb, 0x1a, 0x6c, 0x93, 0x23, 0x7a, 0xd0, 0x38, 0x29, 0x42, + 0xdd, 0x2f, 0x09, 0xb1, 0x0f, 0xd3, 0x74, 0xa5, 0x20, 0x41, 0x8c, 0x00, 0x85, 0xf8, 0xc3, 0xc9, + 0xef, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, + 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x4c, 0xd2, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xa1, 0xae, 0xd2, 0xcd, 0x49, 0x4c, 0x2a, 0x86, 0x71, + 0xf4, 0x2b, 0x50, 0xa3, 0xae, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x4f, 0xc6, 0x80, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x96, 0xd9, 0xb1, 0x3f, 0x02, 0x00, 0x00, } +func (this *GenesisState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GenesisState) + if !ok { + that2, ok := that.(GenesisState) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FactoryDenoms) != len(that1.FactoryDenoms) { + return false + } + for i := range this.FactoryDenoms { + if !this.FactoryDenoms[i].Equal(&that1.FactoryDenoms[i]) { + return false + } + } + return true +} +func (this *GenesisDenom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GenesisDenom) + if !ok { + that2, ok := that.(GenesisDenom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Denom != that1.Denom { + return false + } + if !this.AuthorityMetadata.Equal(&that1.AuthorityMetadata) { + return false + } + return true +} func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/x/tokenfactory/types/tx.pb.go b/x/tokenfactory/types/tx.pb.go index 043bf7dc6d5..d5b28f7b21b 100644 --- a/x/tokenfactory/types/tx.pb.go +++ b/x/tokenfactory/types/tx.pb.go @@ -83,6 +83,7 @@ func (m *MsgCreateDenom) GetNonce() string { } type MsgCreateDenomResponse struct { + NewTokenDenom string `protobuf:"bytes,1,opt,name=new_token_denom,json=newTokenDenom,proto3" json:"new_token_denom,omitempty" yaml:"new_token_denom"` } func (m *MsgCreateDenomResponse) Reset() { *m = MsgCreateDenomResponse{} } @@ -118,6 +119,13 @@ func (m *MsgCreateDenomResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateDenomResponse proto.InternalMessageInfo +func (m *MsgCreateDenomResponse) GetNewTokenDenom() string { + if m != nil { + return m.NewTokenDenom + } + return "" +} + // ===================== MsgMint type MsgMint struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` @@ -532,46 +540,48 @@ func init() { } var fileDescriptor_283b6c9a90a846b4 = []byte{ - // 622 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xc1, 0x6e, 0xd3, 0x30, - 0x1c, 0xc6, 0x9b, 0x6d, 0x0c, 0xf0, 0x18, 0xdb, 0xc2, 0x98, 0x42, 0x34, 0x25, 0x93, 0xa5, 0x21, - 0x90, 0x58, 0xc2, 0xc6, 0xc4, 0x81, 0x13, 0xeb, 0x50, 0xc5, 0x81, 0x72, 0x88, 0x76, 0x42, 0x48, - 0x55, 0x92, 0xba, 0x59, 0xc4, 0x62, 0x17, 0xdb, 0xa5, 0xeb, 0x5b, 0x70, 0xe1, 0xce, 0x95, 0xb7, - 0xe0, 0x84, 0x76, 0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, 0x56, 0x6a, 0x33, 0xdf, 0x11, - 0xeb, 0x94, 0x84, 0xb8, 0xfe, 0xf0, 0x2a, 0x36, 0x6b, 0xe3, 0x4a, 0x52, 0x06, 0x9d, 0x4c, 0xaf, - 0xbe, 0x06, 0xeb, 0x51, 0x88, 0xf9, 0x19, 0x39, 0x69, 0xb7, 0x29, 0x62, 0x4c, 0x5b, 0x16, 0xbd, - 0xf5, 0x24, 0x36, 0x77, 0xa4, 0x22, 0x9d, 0x6e, 0x71, 0xd2, 0x72, 0x25, 0x00, 0x9d, 0xaa, 0x00, - 0x6e, 0x81, 0x8d, 0xcc, 0x41, 0xe1, 0xea, 0x97, 0x74, 0x55, 0xef, 0x51, 0x7c, 0x33, 0xae, 0x1a, - 0x60, 0xc3, 0xeb, 0x51, 0xdc, 0xa0, 0x24, 0xaa, 0xfa, 0xda, 0x4d, 0x62, 0x53, 0x93, 0x9a, 0x14, - 0x68, 0x75, 0x28, 0x89, 0xc6, 0xce, 0x26, 0x45, 0x99, 0xb7, 0xd4, 0x47, 0xe1, 0xed, 0xc7, 0x12, - 0xd8, 0x6c, 0xb2, 0xa0, 0x41, 0xa8, 0x8f, 0xce, 0xa8, 0x8b, 0x59, 0x07, 0xd1, 0x9b, 0x31, 0xe9, - 0x80, 0x07, 0x3c, 0x5b, 0xc0, 0xb4, 0xd1, 0xbd, 0x24, 0x36, 0x77, 0xa5, 0x2e, 0x87, 0x26, 0xcc, - 0xfe, 0x4b, 0xac, 0xbe, 0x03, 0x5b, 0xf9, 0xf0, 0xf8, 0x4a, 0xac, 0x88, 0x8a, 0x46, 0x12, 0x9b, - 0xfa, 0x44, 0xc5, 0xf2, 0xb5, 0x98, 0x16, 0x42, 0x1d, 0x68, 0x93, 0x5b, 0x55, 0xec, 0xe3, 0x37, - 0x45, 0x26, 0xef, 0xdc, 0xc5, 0x01, 0x3a, 0x69, 0x47, 0x21, 0x5e, 0x30, 0x79, 0xed, 0x34, 0x48, - 0xd3, 0xc9, 0x13, 0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 0x21, 0x07, 0x00, 0x00, + // 646 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x4f, 0xd4, 0x4e, + 0x18, 0xde, 0x02, 0x3f, 0x7e, 0x3a, 0xb8, 0x02, 0x15, 0x49, 0x6d, 0x48, 0x4b, 0x26, 0xc1, 0x68, + 0x22, 0xad, 0x20, 0xf1, 0xe0, 0x49, 0x16, 0x43, 0x3c, 0xb8, 0x1e, 0x1a, 0x4e, 0x86, 0x64, 0xd3, + 0x76, 0x87, 0xd2, 0x48, 0x67, 0x70, 0x66, 0xd6, 0x85, 0x6f, 0xe1, 0xc5, 0xbb, 0x57, 0xbf, 0x85, + 0x27, 0xc3, 0x91, 0xa3, 0xa7, 0xc6, 0xc0, 0x37, 0xe8, 0x27, 0x30, 0x9d, 0x99, 0xfe, 0xdb, 0x35, + 0xb2, 0x7b, 0xe2, 0xb6, 0x3b, 0xef, 0xf3, 0x3c, 0x33, 0xcf, 0x3b, 0xf3, 0xbc, 0x05, 0x1b, 0x84, + 0x25, 0x84, 0xc5, 0xcc, 0xe5, 0xe4, 0x23, 0xc2, 0x47, 0x7e, 0xc8, 0x09, 0x3d, 0x77, 0x3f, 0x6f, + 0x05, 0x88, 0xfb, 0x5b, 0x2e, 0x3f, 0x73, 0x4e, 0x29, 0xe1, 0x44, 0x5f, 0x53, 0x30, 0xa7, 0x0e, + 0x73, 0x14, 0xcc, 0x5c, 0x89, 0x48, 0x44, 0x04, 0xd0, 0xcd, 0x7f, 0x49, 0x8e, 0x69, 0x85, 0x82, + 0xe4, 0x06, 0x3e, 0x43, 0xa5, 0x62, 0x48, 0x62, 0x2c, 0xeb, 0x30, 0x04, 0xf7, 0xbb, 0x2c, 0xda, + 0xa3, 0xc8, 0xe7, 0xe8, 0x0d, 0xc2, 0x24, 0xd1, 0x9f, 0x82, 0x79, 0x86, 0x70, 0x1f, 0x51, 0x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0x7a, 0x0e, 0x9b, 0x40, 0xbd, + 0x1e, 0x18, 0x7d, 0x08, 0xda, 0xcd, 0xb0, 0x38, 0x37, 0xf2, 0x1b, 0x78, 0xf3, 0xe5, 0x74, 0xf8, + 0x72, 0xe3, 0xfc, 0x9e, 0x6a, 0xaf, 0x6b, 0x82, 0x7b, 0xaa, 0xd0, 0x93, 0xdc, 0xd3, 0xf8, 0x13, + 0xe9, 0xbc, 0xbf, 0xb8, 0xb2, 0xb4, 0xcb, 0x2b, 0x4b, 0xfb, 0x7d, 0x65, 0x69, 0x5f, 0xae, 0xad, + 0xd6, 0xe5, 0xb5, 0xd5, 0xfa, 0x75, 0x6d, 0xb5, 0x3e, 0xec, 0x44, 0x31, 0x3f, 0x1e, 0x04, 0x4e, + 0x48, 0x12, 0x57, 0x29, 0x6f, 0x9e, 0xf8, 0x01, 0x2b, 0xfe, 0xb8, 0x67, 0xcd, 0x0f, 0x28, 0x3f, + 0x3f, 0x45, 0x2c, 0x98, 0x17, 0x1f, 0xba, 0x17, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x21, 0x60, + 0x04, 0xa5, 0x65, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -855,6 +865,13 @@ func (m *MsgCreateDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.NewTokenDenom) > 0 { + i -= len(m.NewTokenDenom) + copy(dAtA[i:], m.NewTokenDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewTokenDenom))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1176,6 +1193,10 @@ func (m *MsgCreateDenomResponse) Size() (n int) { } var l int _ = l + l = len(m.NewTokenDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1446,6 +1467,38 @@ func (m *MsgCreateDenomResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgCreateDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewTokenDenom", 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.NewTokenDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/tokenfactory/types/types.go b/x/tokenfactory/types/types.go deleted file mode 100644 index ab1254f4c2b..00000000000 --- a/x/tokenfactory/types/types.go +++ /dev/null @@ -1 +0,0 @@ -package types