diff --git a/app/ante_handler.go b/app/ante_handler.go index 8184a88a..26cd3093 100644 --- a/app/ante_handler.go +++ b/app/ante_handler.go @@ -2,19 +2,20 @@ package app import ( errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" globalfeeante "github.com/OmniFlix/omniflixhub/v5/x/globalfee/ante" globalfeekeeper "github.com/OmniFlix/omniflixhub/v5/x/globalfee/keeper" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" ) // Lower back to 1 mil after https://github.com/cosmos/relayer/issues/1255 @@ -27,7 +28,7 @@ type HandlerOptions struct { GovKeeper govkeeper.Keeper IBCKeeper *ibckeeper.Keeper - TxCounterStoreKey storetypes.StoreKey + TxCounterStoreKey *storetypes.KVStoreKey WasmConfig wasmtypes.WasmConfig Codec codec.BinaryCodec @@ -56,7 +57,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { anteDecorators := []sdk.AnteDecorator{ ante.NewSetUpContextDecorator(), // Outermost AnteDecorator, SetUpContext must be called first wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), - wasmkeeper.NewCountTXDecorator(options.TxCounterStoreKey), + wasmkeeper.NewCountTXDecorator(runtime.NewKVStoreService(options.TxCounterStoreKey)), ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), ante.NewValidateBasicDecorator(), ante.NewTxTimeoutHeightDecorator(), diff --git a/app/app.go b/app/app.go index 273972a6..8e903e62 100644 --- a/app/app.go +++ b/app/app.go @@ -12,19 +12,19 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + "cosmossdk.io/log" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/OmniFlix/omniflixhub/v5/app/openapiconsole" appparams "github.com/OmniFlix/omniflixhub/v5/app/params" "github.com/OmniFlix/omniflixhub/v5/docs" - dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmos "github.com/cometbft/cometbft/libs/os" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -39,17 +39,17 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/crisis" + "github.com/cosmos/cosmos-sdk/x/gov" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" "github.com/spf13/cast" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" v012 "github.com/OmniFlix/omniflixhub/v5/app/upgrades/v012" @@ -57,7 +57,7 @@ import ( v2_1 "github.com/OmniFlix/omniflixhub/v5/app/upgrades/v2.1" v3 "github.com/OmniFlix/omniflixhub/v5/app/upgrades/v3" v4 "github.com/OmniFlix/omniflixhub/v5/app/upgrades/v4" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + v5 "github.com/OmniFlix/omniflixhub/v5/app/upgrades/v5" ) const Name = "omniflixhub" @@ -76,13 +76,7 @@ var ( func getGovProposalHandlers() []govclient.ProposalHandler { var govProposalHandlers []govclient.ProposalHandler - govProposalHandlers = append(govProposalHandlers, - paramsclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, - ) + govProposalHandlers = append(govProposalHandlers, paramsclient.ProposalHandler) return govProposalHandlers } @@ -90,14 +84,11 @@ func getGovProposalHandlers() []govclient.ProposalHandler { var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string - Upgrades = []upgrades.Upgrade{v012.Upgrade, v2.Upgrade, v2_1.Upgrade, v3.Upgrade, v4.Upgrade} + Upgrades = []upgrades.Upgrade{v012.Upgrade, v2.Upgrade, v2_1.Upgrade, v3.Upgrade, v4.Upgrade, v5.Upgrade} Forks []upgrades.Fork ) -var ( - _ runtime.AppI = (*OmniFlixApp)(nil) - _ servertypes.Application = (*OmniFlixApp)(nil) -) +var _ runtime.AppI = (*OmniFlixApp)(nil) // OmniFlixApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object @@ -112,6 +103,7 @@ type OmniFlixApp struct { invCheckPeriod uint mm *module.Manager + ModuleBasics module.BasicManager sm *module.SimulationManager configurator module.Configurator } @@ -143,13 +135,15 @@ func NewOmniFlixApp( appCodec := encodingConfig.Marshaler cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry + txConfig := encodingConfig.TxConfig - bApp := baseapp.NewBaseApp(Name, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) + bApp := baseapp.NewBaseApp(Name, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) app := &OmniFlixApp{ + AppKeepers: keepers.AppKeepers{}, BaseApp: bApp, cdc: cdc, appCodec: appCodec, @@ -186,6 +180,8 @@ func NewOmniFlixApp( app.mm = module.NewManager(appModules(app, encodingConfig, skipGenesisInvariants)...) + // part of sdk v0.50.x migration + app.mm.SetOrderPreBlockers(upgradetypes.ModuleName) // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so to keep the // CanWithdrawInvariant invariant. @@ -203,18 +199,29 @@ func NewOmniFlixApp( app.mm.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterServices(app.configurator) + err := app.mm.RegisterServices(app.configurator) + if err != nil { + panic(err) + } + // Migration check + app.ModuleBasics = module.NewBasicManagerFromManager( + app.mm, + map[string]module.AppModuleBasic{ + "gov": gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + }), + }, + ) + + app.setupUpgradeHandlers() + app.setupUpgradeStoreLoaders() // simulations app.sm = module.NewSimulationManager(simulationModules(app, encodingConfig, skipGenesisInvariants)...) app.sm.RegisterStoreDecoders() - // initialize stores - app.MountKVStores(app.GetKVStoreKey()) - app.MountTransientStores(app.GetTransientStoreKey()) - app.MountMemoryStores(app.GetMemoryStoreKey()) - // SDK v47 - since we do not use dep inject, this gives us access to newer gRPC services. autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules)) @@ -229,6 +236,11 @@ func NewOmniFlixApp( panic("error while reading wasm config: " + err.Error()) } + // initialize stores + app.MountKVStores(app.GetKVStoreKey()) + app.MountTransientStores(app.GetTransientStoreKey()) + app.MountMemoryStores(app.GetMemoryStoreKey()) + anteHandler, err := NewAnteHandler( HandlerOptions{ HandlerOptions: ante.HandlerOptions{ @@ -255,12 +267,12 @@ func NewOmniFlixApp( // initialize BaseApp app.SetInitChainer(app.InitChainer) + app.SetPreBlocker(app.PreBlocker) app.SetBeginBlocker(app.BeginBlocker) app.SetAnteHandler(anteHandler) app.SetEndBlocker(app.EndBlocker) - - app.setupUpgradeHandlers() - app.setupUpgradeStoreLoaders() + app.SetPrecommiter(app.PreCommitter) + app.SetPrepareCheckStater(app.PrepareCheckStater) if loadLatest { if err := app.LoadLatestVersion(); err != nil { @@ -274,29 +286,52 @@ func NewOmniFlixApp( // Name returns the name of the App func (app *OmniFlixApp) Name() string { return app.BaseApp.Name() } +// PreBlocker application updates before begin of the block +func (app *OmniFlixApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return app.mm.PreBlock(ctx) +} + // BeginBlocker application updates every begin block -func (app *OmniFlixApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { +func (app *OmniFlixApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { BeginBlockForks(ctx, app) - return app.mm.BeginBlock(ctx, req) + return app.mm.BeginBlock(ctx) } // EndBlocker application updates every end block -func (app *OmniFlixApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) +func (app *OmniFlixApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { + return app.mm.EndBlock(ctx) } // InitChainer application update at chain initialization -func (app *OmniFlixApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *OmniFlixApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState GenesisState if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) + err := app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) + if err != nil { + panic(err) + } return app.mm.InitGenesis(ctx, app.appCodec, genesisState) } +// PreCommitter application updates before the commit of a block after all transactions have been delivered. +func (app *OmniFlixApp) PreCommitter(ctx sdk.Context) { + mm := app.ModuleManager() + if err := mm.Precommit(ctx); err != nil { + panic(err) + } +} + +func (app *OmniFlixApp) PrepareCheckStater(ctx sdk.Context) { + mm := app.ModuleManager() + if err := mm.PrepareCheckState(ctx); err != nil { + panic(err) + } +} + // LoadHeight loads a particular height func (app *OmniFlixApp) LoadHeight(height int64) error { return app.LoadVersion(height) @@ -354,7 +389,7 @@ func (app *OmniFlixApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. - tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register legacy and grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -372,13 +407,17 @@ func (app *OmniFlixApp) RegisterTxService(clientCtx client.Context) { authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) } +func (app *OmniFlixApp) ModuleManager() module.Manager { + return *app.mm +} + func (app *OmniFlixApp) SimulationManager() *module.SimulationManager { return app.sm } // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *OmniFlixApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( + cmtservice.RegisterTendermintService( clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, @@ -386,8 +425,8 @@ func (app *OmniFlixApp) RegisterTendermintService(clientCtx client.Context) { ) } -func (app *OmniFlixApp) RegisterNodeService(clientCtx client.Context) { - nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +func (app *OmniFlixApp) RegisterNodeService(clientCtx client.Context, cfg config.Config) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg) } func (app *OmniFlixApp) setupUpgradeHandlers() { diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index 031f5e94..fd81fb2e 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -2,21 +2,26 @@ package apptesting import ( "fmt" + "os" "time" - "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/x/consensus/testutil" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + coreheader "cosmossdk.io/core/header" + sdkmath "cosmossdk.io/math" "github.com/OmniFlix/omniflixhub/v5/app" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + "cosmossdk.io/store/rootmulti" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/ed25519" - "github.com/cometbft/cometbft/libs/log" - tmtypes "github.com/cometbft/cometbft/proto/tendermint/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/store/rootmulti" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" @@ -29,13 +34,29 @@ import ( ) var ( - SecondaryDenom = "uxflx" - SecondaryAmount = sdk.NewInt(100000000) + SecondaryDenom = "uxflx" + SecondaryAmount = sdkmath.NewInt(100000000) + baseTestAccts = []sdk.AccAddress{} + defaultTestStartTime = time.Now().UTC() + testDescription = stakingtypes.NewDescription("test_moniker", "test_identity", "test_website", "test_security_contact", "test_details") ) +func init() { + baseTestAccts = CreateRandomAccounts(3) +} + type KeeperTestHelper struct { suite.Suite + // defaults to false, + // set to true if any method that potentially alters baseapp/abci is used. + // this controls whether we can reuse the app instance, or have to set a new one. + hasUsedAbci bool + // defaults to false, set to true if we want to use a new app instance with caching enabled. + // then on new setup test call, we just drop the current cache. + // this is not always enabled, because some tests may take a painful performance hit due to CacheKv. + withCaching bool + App *app.OmniFlixApp Ctx sdk.Context QueryHelper *baseapp.QueryServiceTestHelper @@ -44,57 +65,165 @@ type KeeperTestHelper struct { // Setup sets up basic environment for suite (App, Ctx, and test accounts) func (s *KeeperTestHelper) Setup() { - t := s.T() - s.App = app.Setup(t) - s.Ctx = s.App.BaseApp.NewContext(false, tmtypes.Header{Height: 1, ChainID: app.SimAppChainID, Time: time.Now().UTC()}) + dir, err := os.MkdirTemp("", "omniflixhub-test-home") + if err != nil { + panic(fmt.Sprintf("failed creating temporary directory: %v", err)) + } + s.T().Cleanup(func() { os.RemoveAll(dir); s.withCaching = false }) + s.App = app.SetupWithCustomHome(false, dir) + s.setupGeneral() + + // Manually set validator signing info, otherwise we panic + vals, err := s.App.StakingKeeper.GetAllValidators(s.Ctx) + if err != nil { + panic(err) + } + for _, val := range vals { + consAddr, _ := val.GetConsAddr() + signingInfo := slashingtypes.NewValidatorSigningInfo( + consAddr, + s.Ctx.BlockHeight(), + s.Ctx.BlockTime().Unix(), + time.Unix(0, 0), + false, + 0, + ) + err := s.App.SlashingKeeper.SetValidatorSigningInfo(s.Ctx, consAddr, signingInfo) + if err != nil { + panic(err) + } + } +} + +func (s *KeeperTestHelper) SetupWithCustomChainId(chainId string) { + dir, err := os.MkdirTemp("", "omniflixhub-test-home") + if err != nil { + panic(fmt.Sprintf("failed creating temporary directory: %v", err)) + } + s.T().Cleanup(func() { os.RemoveAll(dir); s.withCaching = false }) + s.App = app.SetupWithCustomHomeAndChainId(false, dir, chainId) + s.setupGeneralCustomChainId(chainId) + + // Manually set validator signing info, otherwise we panic + vals, err := s.App.StakingKeeper.GetAllValidators(s.Ctx) + if err != nil { + panic(err) + } + for _, val := range vals { + consAddr, _ := val.GetConsAddr() + signingInfo := slashingtypes.NewValidatorSigningInfo( + consAddr, + s.Ctx.BlockHeight(), + 0, + time.Unix(0, 0), + false, + 0, + ) + err := s.App.SlashingKeeper.SetValidatorSigningInfo(s.Ctx, consAddr, signingInfo) + if err != nil { + panic(err) + } + } +} + +func (s *KeeperTestHelper) Reset() { + if s.hasUsedAbci || !s.withCaching { + s.withCaching = true + s.Setup() + } else { + s.setupGeneral() + } +} + +func (s *KeeperTestHelper) SetupWithLevelDb() func() { + app, cleanup := app.SetupTestingAppWithLevelDb(false) + s.App = app + s.setupGeneral() + return cleanup +} + +func (s *KeeperTestHelper) setupGeneral() { + s.setupGeneralCustomChainId("omniflixhub-1") +} + +func (s *KeeperTestHelper) setupGeneralCustomChainId(chainId string) { + s.Ctx = s.App.BaseApp.NewContextLegacy(false, cmtproto.Header{Height: 1, ChainID: chainId, Time: defaultTestStartTime}) + if s.withCaching { + s.Ctx, _ = s.Ctx.CacheContext() + } s.QueryHelper = &baseapp.QueryServiceTestHelper{ GRPCQueryRouter: s.App.GRPCQueryRouter(), Ctx: s.Ctx, } - s.TestAccs = CreateRandomAccounts(3) + s.TestAccs = []sdk.AccAddress{} + s.TestAccs = append(s.TestAccs, baseTestAccts...) + s.hasUsedAbci = false } func (s *KeeperTestHelper) SetupTestForInitGenesis() { // Setting to True, leads to init genesis not running - s.App = app.Setup(s.T()) - s.Ctx = s.App.BaseApp.NewContext(true, tmtypes.Header{}) + s.App = app.Setup(true) + s.Ctx = s.App.BaseApp.NewContextLegacy(true, cmtproto.Header{}) + s.hasUsedAbci = true } // CreateTestContext creates a test context. func (s *KeeperTestHelper) CreateTestContext() sdk.Context { - ctx, _ := s.CreateTestContextWithMultiStore() + ctx := s.CreateTestContextWithMultiStore() return ctx } // CreateTestContextWithMultiStore creates a test context and returns it together with multi store. -func (s *KeeperTestHelper) CreateTestContextWithMultiStore() (sdk.Context, sdk.CommitMultiStore) { +func (s *KeeperTestHelper) CreateTestContextWithMultiStore() sdk.Context { db := dbm.NewMemDB() logger := log.NewNopLogger() - ms := rootmulti.NewStore(db, logger) + ms := rootmulti.NewStore(db, logger, nil) - return sdk.NewContext(ms, tmtypes.Header{}, false, logger), ms + return sdk.NewContext(ms, cmtproto.Header{}, false, logger) } func (s *KeeperTestHelper) Commit() { - oldHeight := s.Ctx.BlockHeight() - oldHeader := s.Ctx.BlockHeader() - s.App.Commit() - newHeader := tmtypes.Header{Height: oldHeight + 1, ChainID: oldHeader.ChainID, Time: oldHeader.Time.Add(time.Second)} - s.App.BeginBlock(abci.RequestBeginBlock{Header: newHeader}) - s.Ctx = s.App.BaseApp.NewContext(false, newHeader) + // oldHeight := s.Ctx.BlockHeight() + // oldHeader := s.Ctx.BlockHeader() + // commit, _ := s.App.Commit() + // newHeader := cmtproto.Header{Height: oldHeight + 1, ChainID: oldHeader.ChainID, Time: oldHeader.Time.Add(time.Second)} + // s.App.PreBlocker(s.Ctx, abci.Request_Commit{Commit: commit}) + // s.Ctx = s.App.BaseApp.NewContextLegacy(false, newHeader) + + _, err := s.App.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.Ctx.BlockHeight(), Time: s.Ctx.BlockTime()}) + if err != nil { + panic(err) + } + _, err = s.App.Commit() + if err != nil { + panic(err) + } + + newBlockTime := s.Ctx.BlockTime().Add(time.Second) + + header := s.Ctx.BlockHeader() + header.Time = newBlockTime + header.Height++ + + s.Ctx = s.App.BaseApp.NewUncachedContext(false, header).WithHeaderInfo(coreheader.Info{ + Height: header.Height, + Time: header.Time, + }) + + s.hasUsedAbci = true } // FundAcc funds target address with specified amount. func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins) { - err := banktestutil.FundAccount(s.App.BankKeeper, s.Ctx, acc, amounts) + err := banktestutil.FundAccount(s.Ctx, s.App.BankKeeper, acc, amounts) s.Require().NoError(err) } // FundModuleAcc funds target modules with specified amount. func (s *KeeperTestHelper) FundModuleAcc(moduleName string, amounts sdk.Coins) { - err := banktestutil.FundModuleAccount(s.App.BankKeeper, s.Ctx, moduleName, amounts) + err := banktestutil.FundModuleAccount(s.Ctx, s.App.BankKeeper, moduleName, amounts) s.Require().NoError(err) } @@ -107,21 +236,29 @@ func (s *KeeperTestHelper) MintCoins(coins sdk.Coins) { func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress { valPub := secp256k1.GenPrivKey().PubKey() valAddr := sdk.ValAddress(valPub.Address()) - bondDenom := s.App.StakingKeeper.GetParams(s.Ctx).BondDenom - selfBond := sdk.NewCoins(sdk.Coin{Amount: sdk.NewInt(100), Denom: bondDenom}) + stakingParams, err := s.App.StakingKeeper.GetParams(s.Ctx) + s.Require().NoError(err) + bondDenom := stakingParams.BondDenom + bondAmt := sdk.DefaultPowerReduction + selfBond := sdk.NewCoins(sdk.Coin{Amount: bondAmt, Denom: bondDenom}) s.FundAcc(sdk.AccAddress(valAddr), selfBond) - stakingCoin := sdk.NewCoin(sdk.DefaultBondDenom, selfBond[0].Amount) - ZeroCommission := stakingtypes.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) - _, err := stakingtypes.NewMsgCreateValidator(valAddr, valPub, stakingCoin, stakingtypes.Description{}, ZeroCommission, sdk.OneInt()) + stakingCoin := sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: selfBond[0].Amount} + ZeroCommission := stakingtypes.NewCommissionRates(sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec()) + valCreateMsg, err := stakingtypes.NewMsgCreateValidator(valAddr.String(), valPub, stakingCoin, testDescription, ZeroCommission, sdkmath.OneInt()) + s.Require().NoError(err) + stakingMsgSvr := stakingkeeper.NewMsgServerImpl(s.App.StakingKeeper) + res, err := stakingMsgSvr.CreateValidator(s.Ctx, valCreateMsg) s.Require().NoError(err) + s.Require().NotNil(res) - val, found := s.App.StakingKeeper.GetValidator(s.Ctx, valAddr) - s.Require().True(found) + val, err := s.App.StakingKeeper.GetValidator(s.Ctx, valAddr) + s.Require().NoError(err) val = val.UpdateStatus(bondStatus) - s.App.StakingKeeper.SetValidator(s.Ctx, val) + err = s.App.StakingKeeper.SetValidator(s.Ctx, val) + s.Require().NoError(err) consAddr, err := val.GetConsAddr() s.Suite.Require().NoError(err) @@ -134,7 +271,8 @@ func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sd false, 0, ) - s.App.SlashingKeeper.SetValidatorSigningInfo(s.Ctx, consAddr, signingInfo) + err = s.App.SlashingKeeper.SetValidatorSigningInfo(s.Ctx, consAddr, signingInfo) + s.Require().NoError(err) return valAddr } @@ -153,16 +291,17 @@ func (s *KeeperTestHelper) SetupMultipleValidators(numValidator int) []string { func (s *KeeperTestHelper) BeginNewBlock(executeNextEpoch bool) { var valAddr []byte - validators := s.App.StakingKeeper.GetAllValidators(s.Ctx) + validators, err := s.App.StakingKeeper.GetAllValidators(s.Ctx) + s.Require().NoError(err) if len(validators) >= 1 { valAddrFancy, err := validators[0].GetConsAddr() s.Require().NoError(err) - valAddr = valAddrFancy.Bytes() + valAddr = valAddrFancy } else { valAddrFancy := s.SetupValidator(stakingtypes.Bonded) validator, _ := s.App.StakingKeeper.GetValidator(s.Ctx, valAddrFancy) valAddr2, _ := validator.GetConsAddr() - valAddr = valAddr2.Bytes() + valAddr = valAddr2 } s.BeginNewBlockWithProposer(executeNextEpoch, valAddr) @@ -170,36 +309,48 @@ func (s *KeeperTestHelper) BeginNewBlock(executeNextEpoch bool) { // BeginNewBlockWithProposer begins a new block with a proposer. func (s *KeeperTestHelper) BeginNewBlockWithProposer(executeNextEpoch bool, proposer sdk.ValAddress) { - validator, found := s.App.StakingKeeper.GetValidator(s.Ctx, proposer) - s.Assert().True(found) + // validator, err := s.App.StakingKeeper.GetValidator(s.Ctx, proposer) + // s.Assert().NoError(err) - valConsAddr, err := validator.GetConsAddr() - s.Require().NoError(err) + // valConsAddr, err := validator.GetConsAddr() + // s.Require().NoError(err) + + // valAddr := valConsAddr + + validator, err := s.App.StakingKeeper.GetValidator(s.Ctx, proposer) + s.Assert().NoError(err) - valAddr := valConsAddr.Bytes() + valAddr, err := validator.GetConsAddr() + s.Require().NoError(err) newBlockTime := s.Ctx.BlockTime().Add(5 * time.Second) - header := tmtypes.Header{Height: s.Ctx.BlockHeight() + 1, Time: newBlockTime} + header := cmtproto.Header{Height: s.Ctx.BlockHeight() + 1, Time: newBlockTime} newCtx := s.Ctx.WithBlockTime(newBlockTime).WithBlockHeight(s.Ctx.BlockHeight() + 1) s.Ctx = newCtx - lastCommitInfo := abci.CommitInfo{ - Votes: []abci.VoteInfo{{ - Validator: abci.Validator{Address: valAddr, Power: 1000}, - SignedLastBlock: true, - }}, + + voteInfos := []abci.VoteInfo{ + { + Validator: abci.Validator{Address: valAddr, Power: 1000}, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, } - reqBeginBlock := abci.RequestBeginBlock{Header: header, LastCommitInfo: lastCommitInfo} + s.Ctx = s.Ctx.WithVoteInfos(voteInfos) fmt.Println("beginning block ", s.Ctx.BlockHeight()) - s.App.BeginBlocker(s.Ctx, reqBeginBlock) - s.Ctx = s.App.NewContext(false, reqBeginBlock.Header) + + _, err = s.App.BeginBlocker(s.Ctx) + s.Require().NoError(err) + + s.Ctx = s.App.NewContextLegacy(false, header) + s.hasUsedAbci = true } // EndBlock ends the block, and runs commit func (s *KeeperTestHelper) EndBlock() { - reqEndBlock := abci.RequestEndBlock{Height: s.Ctx.BlockHeight()} - s.App.EndBlocker(s.Ctx, reqEndBlock) + _, err := s.App.EndBlocker(s.Ctx) + s.Require().NoError(err) + s.hasUsedAbci = true } func (s *KeeperTestHelper) RunMsg(msg sdk.Msg) (*sdk.Result, error) { @@ -214,19 +365,20 @@ func (s *KeeperTestHelper) RunMsg(msg sdk.Msg) (*sdk.Result, error) { } // AllocateRewardsToValidator allocates reward tokens to a distribution module then allocates rewards to the validator address. -func (s *KeeperTestHelper) AllocateRewardsToValidator(valAddr sdk.ValAddress, rewardAmt math.Int) { - validator, found := s.App.StakingKeeper.GetValidator(s.Ctx, valAddr) - s.Require().True(found) +func (s *KeeperTestHelper) AllocateRewardsToValidator(valAddr sdk.ValAddress, rewardAmt sdkmath.Int) { + validator, err := s.App.StakingKeeper.GetValidator(s.Ctx, valAddr) + s.Require().NoError(err) // allocate reward tokens to distribution module coins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, rewardAmt)} - err := banktestutil.FundModuleAccount(s.App.BankKeeper, s.Ctx, distrtypes.ModuleName, coins) + err = testutil.FundModuleAccount(s.App.BankKeeper, s.Ctx, distrtypes.ModuleName, coins) s.Require().NoError(err) // allocate rewards to validator s.Ctx = s.Ctx.WithBlockHeight(s.Ctx.BlockHeight() + 1) - decTokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDec(20000)}} - s.App.DistrKeeper.AllocateTokensToValidator(s.Ctx, validator, decTokens) + decTokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdkmath.LegacyNewDec(20000)}} + err = s.App.DistrKeeper.AllocateTokensToValidator(s.Ctx, validator, decTokens) + s.Require().NoError(err) } // BuildTx builds a transaction. diff --git a/app/encoding.go b/app/encoding.go index 627006b6..b4ba71ea 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -5,6 +5,12 @@ import ( "github.com/cosmos/cosmos-sdk/std" ) +var encodingConfig params.EncodingConfig = MakeEncodingConfig() + +func GetEncodingConfig() params.EncodingConfig { + return encodingConfig +} + // MakeEncodingConfig creates an EncodingConfig for testing func MakeEncodingConfig() params.EncodingConfig { encodingConfig := params.MakeEncodingConfig() diff --git a/app/export.go b/app/export.go index fa89f43e..746b3a4d 100644 --- a/app/export.go +++ b/app/export.go @@ -2,15 +2,12 @@ package app import ( "encoding/json" - "log" + "fmt" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis @@ -19,17 +16,19 @@ func (app *OmniFlixApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. height := app.LastBlockHeight() + 1 if forZeroHeight { - height = 0 - app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) + return servertypes.ExportedApp{}, fmt.Errorf("forZeroHeight not supported") } - genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + if err != nil { + return servertypes.ExportedApp{}, err + } appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -47,140 +46,10 @@ func (app *OmniFlixApp) ExportAppStateAndValidators( }, nil } -// prepare for fresh start at zero height -// NOTE zero height genesis is a temporary feature which will be deprecated -// -// in favour of export at a block height -func (app *OmniFlixApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { - applyAllowedAddrs := false - - // check if there is an allowed address list - if len(jailAllowedAddrs) > 0 { - applyAllowedAddrs = true - } - - allowedAddrsMap := make(map[string]bool) - - for _, addr := range jailAllowedAddrs { - _, err := sdk.ValAddressFromBech32(addr) - if err != nil { - log.Fatal(err) - } - allowedAddrsMap[addr] = true - } - - /* Just to be safe, assert the invariants on current state. */ - app.CrisisKeeper.AssertInvariants(ctx) - - /* Handle fee distribution state. */ - - // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, err := app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) - if err != nil { - panic(err) - } - return false - }) - - // withdraw all delegator rewards - dels := app.StakingKeeper.GetAllDelegations(ctx) - for _, delegation := range dels { - _, err := app.DistrKeeper.WithdrawDelegationRewards(ctx, delegation.GetDelegatorAddr(), delegation.GetValidatorAddr()) - if err != nil { - panic(err) - } - } - - // clear validator slash events - app.DistrKeeper.DeleteAllValidatorSlashEvents(ctx) - - // clear validator historical rewards - app.DistrKeeper.DeleteAllValidatorHistoricalRewards(ctx) - - // set context height to zero - height := ctx.BlockHeight() - ctx = ctx.WithBlockHeight(0) - - // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) - feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) - - app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) - return false - }) - - // reinitialize all delegations - for _, del := range dels { - app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, del.GetDelegatorAddr(), del.GetValidatorAddr()) - app.DistrKeeper.Hooks().AfterDelegationModified(ctx, del.GetDelegatorAddr(), del.GetValidatorAddr()) - } - - // reset context height - ctx = ctx.WithBlockHeight(height) - - /* Handle staking state. */ - - // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { - for i := range red.Entries { - red.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetRedelegation(ctx, red) - return false - }) - - // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { - for i := range ubd.Entries { - ubd.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) - return false - }) - - // Iterate through validators by power descending, reset bond heights, and - // update bond intra-tx counters. - store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) - counter := int16(0) - - func() { - defer iter.Close() - for ; iter.Valid(); iter.Next() { - addr := sdk.ValAddress(iter.Key()[1:]) - validator, found := app.StakingKeeper.GetValidator(ctx, addr) - if !found { - panic("expected validator, not found") - } - - validator.UnbondingHeight = 0 - if applyAllowedAddrs && !allowedAddrsMap[addr.String()] { - validator.Jailed = true - } - - app.StakingKeeper.SetValidator(ctx, validator) - counter++ - } - }() - - if _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx); err != nil { +func (app *OmniFlixApp) ExportState(ctx sdk.Context) map[string]json.RawMessage { + export, err := app.mm.ExportGenesis(ctx, app.AppCodec()) + if err != nil { panic(err) } - - /* Handle slashing state. */ - - // reset start height on signing infos - app.SlashingKeeper.IterateValidatorSigningInfos( - ctx, - func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { - info.StartHeight = 0 - app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) - return false - }, - ) + return export } diff --git a/app/genesis.go b/app/genesis.go index 5bf0c1da..87c401da 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -3,7 +3,7 @@ package app import ( "encoding/json" - "github.com/cosmos/cosmos-sdk/codec" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ) // The genesis state of the blockchain is represented here as a map of raw json @@ -15,7 +15,40 @@ import ( // object provided to it during init. type GenesisState map[string]json.RawMessage +// CloneGenesisState creates a deep clone of the provided GenesisState. +func cloneGenesisState(original GenesisState) GenesisState { + clone := make(GenesisState, len(original)) + for key, value := range original { + // Make a copy of the json.RawMessage (which is a []byte slice). + copiedValue := make(json.RawMessage, len(value)) + copy(copiedValue, value) + if len(copiedValue) == 0 { + // If the value is empty, set it to nil. + copiedValue = nil + } + clone[key] = copiedValue + } + return clone +} + +var defaultGenesisState GenesisState = nil + // NewDefaultGenesisState generates the default state for the application. -func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState { - return ModuleBasics.DefaultGenesis(cdc) +func NewDefaultGenesisState() GenesisState { + if defaultGenesisState != nil { + return cloneGenesisState(defaultGenesisState) + } + encCfg := GetEncodingConfig() + gen := ModuleBasics.DefaultGenesis(encCfg.Marshaler) + + // here we override wasm config to make it permissioned by default + wasmGen := wasmtypes.GenesisState{ + Params: wasmtypes.Params{ + CodeUploadAccess: wasmtypes.AllowNobody, + InstantiateDefaultPermission: wasmtypes.AccessTypeEverybody, + }, + } + gen[wasmtypes.ModuleName] = encCfg.Marshaler.MustMarshalJSON(&wasmGen) + defaultGenesisState = cloneGenesisState(gen) + return gen } diff --git a/app/helpers/mock.go b/app/helpers/mock.go index ffbfc82f..832a5e54 100644 --- a/app/helpers/mock.go +++ b/app/helpers/mock.go @@ -24,7 +24,7 @@ func NewPV() PV { // GetPubKey implements PrivValidator interface func (pv PV) GetPubKey() (crypto.PubKey, error) { - return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey()) + return cryptocodec.ToCmtPubKeyInterface(pv.PrivKey.PubKey()) } // SignVote implements PrivValidator interface diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index da88ad56..31052e0e 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -4,24 +4,25 @@ import ( "fmt" "path/filepath" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/OmniFlix/omniflixhub/v5/x/ics721nft" nfttransfer "github.com/bianjieai/nft-transfer" - "github.com/cometbft/cometbft/libs/log" - tmos "github.com/cometbft/cometbft/libs/os" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/store/streaming" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - icq "github.com/cosmos/ibc-apps/modules/async-icq/v7" - icqkeeper "github.com/cosmos/ibc-apps/modules/async-icq/v7/keeper" - icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" + icq "github.com/cosmos/ibc-apps/modules/async-icq/v8" + icqkeeper "github.com/cosmos/ibc-apps/modules/async-icq/v8/keeper" + icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v8/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -31,8 +32,8 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" @@ -43,11 +44,11 @@ import ( distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + evidencekeeper "cosmossdk.io/x/evidence/keeper" + evidencetypes "cosmossdk.io/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "cosmossdk.io/x/feegrant" + feegrantkeeper "cosmossdk.io/x/feegrant/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -76,29 +77,26 @@ import ( tokenfactorykeeper "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/keeper" tokenfactorytypes "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" + upgradetypes "cosmossdk.io/x/upgrade/types" - "github.com/cosmos/ibc-go/v7/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" - packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" - packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward" + packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" - ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7" - ibchookskeeper "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/keeper" - ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" + ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8" + ibchookskeeper "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/keeper" + ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/types" allockeeper "github.com/OmniFlix/omniflixhub/v5/x/alloc/keeper" alloctypes "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" @@ -202,14 +200,6 @@ func NewAppKeeper( keys := appKeepers.GetKVStoreKey() tkeys := appKeepers.GetTransientStoreKey() - /* - configure state listening capabilities using AppOptions - we are doing nothing with the returned streamingServices and waitGroup in this case - */ - if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, logger, appKeepers.keys); err != nil { - tmos.Exit(err.Error()) - } - appKeepers.ParamsKeeper = initParamsKeeper( appCodec, legacyAmino, @@ -218,14 +208,18 @@ func NewAppKeeper( ) govModAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String() + bech32AccountAddressPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() + bech32ValidatorAddressPrefix := sdk.GetConfig().GetBech32ValidatorAddrPrefix() + bech32ConsensusAddressPrefix := sdk.GetConfig().GetBech32ConsensusAddrPrefix() // set the BaseApp's parameter store appKeepers.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( appCodec, - keys[consensusparamtypes.StoreKey], + runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), govModAddress, + runtime.EventService{}, ) - bApp.SetParamStore(&appKeepers.ConsensusParamsKeeper) + bApp.SetParamStore(&appKeepers.ConsensusParamsKeeper.ParamsStore) // add capability keeper and ScopeToModule for ibc module appKeepers.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, appKeepers.keys[capabilitytypes.StoreKey], appKeepers.memKeys[capabilitytypes.MemStoreKey]) @@ -239,50 +233,54 @@ func NewAppKeeper( appKeepers.CrisisKeeper = crisiskeeper.NewKeeper( appCodec, - keys[crisistypes.StoreKey], + runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, appKeepers.BankKeeper, authtypes.FeeCollectorName, govModAddress, + addresscodec.NewBech32Codec(bech32AccountAddressPrefix), ) - Bech32AccountAddrPrefix := "omniflix" appKeepers.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, - keys[authtypes.StoreKey], + runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, - Bech32AccountAddrPrefix, + addresscodec.NewBech32Codec(bech32AccountAddressPrefix), + bech32AccountAddressPrefix, govModAddress, ) appKeepers.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, - keys[banktypes.StoreKey], + runtime.NewKVStoreService(keys[banktypes.StoreKey]), appKeepers.AccountKeeper, blockedAddress, govModAddress, + logger, ) appKeepers.AuthzKeeper = authzkeeper.NewKeeper( - keys[authzkeeper.StoreKey], + runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), appCodec, bApp.MsgServiceRouter(), appKeepers.AccountKeeper, ) appKeepers.FeeGrantKeeper = feegrantkeeper.NewKeeper( appCodec, - keys[feegrant.StoreKey], + runtime.NewKVStoreService(keys[feegrant.StoreKey]), appKeepers.AccountKeeper, ) appKeepers.StakingKeeper = stakingkeeper.NewKeeper( appCodec, - keys[stakingtypes.StoreKey], + runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), appKeepers.AccountKeeper, appKeepers.BankKeeper, govModAddress, + addresscodec.NewBech32Codec(bech32ValidatorAddressPrefix), + addresscodec.NewBech32Codec(bech32ConsensusAddressPrefix), ) appKeepers.MintKeeper = mintkeeper.NewKeeper( appCodec, - keys[minttypes.StoreKey], + runtime.NewKVStoreService(keys[minttypes.StoreKey]), appKeepers.StakingKeeper, appKeepers.AccountKeeper, appKeepers.BankKeeper, @@ -291,7 +289,7 @@ func NewAppKeeper( ) appKeepers.DistrKeeper = distrkeeper.NewKeeper( appCodec, - keys[distrtypes.StoreKey], + runtime.NewKVStoreService(keys[distrtypes.StoreKey]), appKeepers.AccountKeeper, appKeepers.BankKeeper, appKeepers.StakingKeeper, @@ -301,7 +299,7 @@ func NewAppKeeper( appKeepers.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, legacyAmino, - keys[slashingtypes.StoreKey], + runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), appKeepers.StakingKeeper, govModAddress, ) @@ -317,7 +315,7 @@ func NewAppKeeper( appKeepers.UpgradeKeeper = upgradekeeper.NewKeeper( skipUpgradeHeights, - appKeepers.keys[upgradetypes.StoreKey], + runtime.NewKVStoreService(appKeepers.keys[upgradetypes.StoreKey]), appCodec, homePath, bApp, @@ -332,14 +330,17 @@ func NewAppKeeper( appKeepers.StakingKeeper, appKeepers.UpgradeKeeper, appKeepers.ScopedIBCKeeper, + govModAddress, ) // Create evidence Keeper for to register the IBC light client misbehaviour evidence route evidenceKeeper := evidencekeeper.NewKeeper( appCodec, - keys[evidencetypes.StoreKey], + runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), appKeepers.StakingKeeper, appKeepers.SlashingKeeper, + addresscodec.NewBech32Codec(sdk.Bech32PrefixAccAddr), + runtime.ProvideCometInfoService(), ) // If evidence needs to be handled for the app, set routes in router here and seal appKeepers.EvidenceKeeper = *evidenceKeeper @@ -351,19 +352,22 @@ func NewAppKeeper( govRouter := govv1beta1.NewRouter() govRouter. AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(appKeepers.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)) + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper)) + // UNFORKING v5 + // Also verify that NewSoftwareUpgradeProposalHandler is okay to remove here, as it should be done with new v1 gov props + // AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(appKeepers.UpgradeKeeper)). + // AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)) govConfig := govtypes.DefaultConfig() govConfig.MaxMetadataLen = 10200 govKeeper := govkeeper.NewKeeper( appCodec, - keys[govtypes.StoreKey], + runtime.NewKVStoreService(keys[govtypes.StoreKey]), appKeepers.AccountKeeper, appKeepers.BankKeeper, appKeepers.StakingKeeper, + appKeepers.DistrKeeper, bApp.MsgServiceRouter(), govConfig, govModAddress, @@ -389,8 +393,7 @@ func NewAppKeeper( ) appKeepers.IBCHooksKeeper = hooksKeeper - omniflixPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() - wasmHooks := ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, omniflixPrefix) // The contract keeper needs to be set later + wasmHooks := ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, bech32AccountAddressPrefix) // The contract keeper needs to be set later appKeepers.Ics20WasmHooks = &wasmHooks appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( appKeepers.IBCKeeper.ChannelKeeper, @@ -417,10 +420,11 @@ func NewAppKeeper( appKeepers.GetSubspace(ibctransfertypes.ModuleName), &appKeepers.HooksICS4Wrapper, appKeepers.IBCKeeper.ChannelKeeper, - &appKeepers.IBCKeeper.PortKeeper, + appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, appKeepers.BankKeeper, appKeepers.ScopedTransferKeeper, + govModAddress, ) // Set TransferKeeper reference in PacketForwardKeeper appKeepers.PacketForwardKeeper.SetTransferKeeper(appKeepers.TransferKeeper) @@ -431,11 +435,13 @@ func NewAppKeeper( appKeepers.GetSubspace(icahosttypes.SubModuleName), nil, appKeepers.IBCKeeper.ChannelKeeper, - &appKeepers.IBCKeeper.PortKeeper, + appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, appKeepers.ScopedICAHostKeeper, bApp.MsgServiceRouter(), + govModAddress, ) + appKeepers.ICAHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter()) icaHostIBCModule := icahost.NewIBCModule(appKeepers.ICAHostKeeper) // ICQ Keeper @@ -444,7 +450,7 @@ func NewAppKeeper( appKeepers.keys[icqtypes.StoreKey], appKeepers.IBCKeeper.ChannelKeeper, // may be replaced with middleware appKeepers.IBCKeeper.ChannelKeeper, - &appKeepers.IBCKeeper.PortKeeper, + appKeepers.IBCKeeper.PortKeeper, appKeepers.ScopedICQKeeper, bApp.GRPCQueryRouter(), govModAddress, @@ -495,7 +501,7 @@ func NewAppKeeper( govModAddress, appKeepers.HooksICS4Wrapper, appKeepers.IBCKeeper.ChannelKeeper, - &appKeepers.IBCKeeper.PortKeeper, + appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, ics721nft.NewKeeper(appCodec, appKeepers.ONFTKeeper, appKeepers.AccountKeeper, appKeepers.BankKeeper), appKeepers.ScopedNFTTransferKeeper, @@ -579,14 +585,14 @@ func NewAppKeeper( appKeepers.WasmKeeper = wasmkeeper.NewKeeper( appCodec, - keys[wasmtypes.StoreKey], + runtime.NewKVStoreService(keys[wasmtypes.StoreKey]), appKeepers.AccountKeeper, appKeepers.BankKeeper, appKeepers.StakingKeeper, distrkeeper.NewQuerier(appKeepers.DistrKeeper), &appKeepers.HooksICS4Wrapper, appKeepers.IBCKeeper.ChannelKeeper, - &appKeepers.IBCKeeper.PortKeeper, + appKeepers.IBCKeeper.PortKeeper, appKeepers.ScopedWasmKeeper, appKeepers.TransferKeeper, bApp.MsgServiceRouter(), diff --git a/app/keepers/keys.go b/app/keepers/keys.go index a1bc035b..df0f9195 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -1,6 +1,10 @@ package keepers import ( + storetypes "cosmossdk.io/store/types" + evidencetypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + upgradetypes "cosmossdk.io/x/upgrade/types" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" alloctypes "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" globalfeetypes "github.com/OmniFlix/omniflixhub/v5/x/globalfee/types" @@ -10,34 +14,29 @@ import ( tokenfactorytypes "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" streampaytypes "github.com/OmniFlix/streampay/v2/x/streampay/types" ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/group" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" - ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v8/types" + ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" ) func (appKeepers *AppKeepers) GenerateKeys() { - appKeepers.keys = sdk.NewKVStoreKeys( + appKeepers.keys = storetypes.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, @@ -71,10 +70,10 @@ func (appKeepers *AppKeepers) GenerateKeys() { itctypes.StoreKey, ) // Define transient store keys - appKeepers.tkeys = sdk.NewTransientStoreKeys(paramstypes.TStoreKey) + appKeepers.tkeys = storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) // MemKeys are for information that is stored only in RAM. - appKeepers.memKeys = sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + appKeepers.memKeys = storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) } func (appKeepers *AppKeepers) GetKVStoreKey() map[string]*storetypes.KVStoreKey { diff --git a/app/keepers/wasm.go b/app/keepers/wasm.go index 504d2534..4774f1ce 100644 --- a/app/keepers/wasm.go +++ b/app/keepers/wasm.go @@ -1,8 +1,6 @@ package keepers import ( - "strings" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" itctypes "github.com/OmniFlix/omniflixhub/v5/x/itc/types" marketplacetypes "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" @@ -12,17 +10,18 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ) // AllCapabilities returns all capabilities available with the current wasmvm // See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md -// This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425 +// This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/v2/issues/425 var wasmCapabilities = []string{ "iterator", "staking", "stargate", + "osmosis", "cosmwasm_1_1", "cosmwasm_1_2", "cosmwasm_1_3", @@ -31,8 +30,8 @@ var wasmCapabilities = []string{ "token_factory", } -func AcceptedStargateQueries() wasmkeeper.AcceptedStargateQueries { - return wasmkeeper.AcceptedStargateQueries{ +func AcceptedStargateQueries() wasmkeeper.AcceptedQueries { + return wasmkeeper.AcceptedQueries{ // ibc "/ibc.core.client.v1.Query/ClientState": &ibcclienttypes.QueryClientStateResponse{}, "/ibc.core.client.v1.Query/ConsensusState": &ibcclienttypes.QueryConsensusStateResponse{}, @@ -92,6 +91,6 @@ func AcceptedStargateQueries() wasmkeeper.AcceptedStargateQueries { } } -func GetWasmCapabilities() string { - return strings.Join(wasmCapabilities, ",") +func GetWasmCapabilities() []string { + return wasmCapabilities } diff --git a/app/modules.go b/app/modules.go index 549af481..e9b9194d 100644 --- a/app/modules.go +++ b/app/modules.go @@ -1,12 +1,16 @@ package app +// sdk v.50.x migration TODO:Eventually should get rid of this in favor of NewBasicManagerFromManager + import ( + "cosmossdk.io/x/nft" "github.com/CosmWasm/wasmd/x/wasm" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" appparams "github.com/OmniFlix/omniflixhub/v5/app/params" "github.com/OmniFlix/omniflixhub/v5/x/globalfee" nfttransfer "github.com/bianjieai/nft-transfer" ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" @@ -14,7 +18,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/group" - "github.com/cosmos/cosmos-sdk/x/nft" "github.com/cosmos/cosmos-sdk/x/auth/vesting" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" @@ -25,8 +28,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + "github.com/cosmos/ibc-go/modules/capability" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/cosmos/cosmos-sdk/x/crisis" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" @@ -34,11 +37,11 @@ import ( distr "github.com/cosmos/cosmos-sdk/x/distribution" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + "cosmossdk.io/x/evidence" + evidencetypes "cosmossdk.io/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" + "cosmossdk.io/x/feegrant" + feegrantmodule "cosmossdk.io/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -63,26 +66,26 @@ import ( "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory" tokenfactorytypes "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "cosmossdk.io/x/upgrade" + upgradetypes "cosmossdk.io/x/upgrade/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v7/modules/core" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - icq "github.com/cosmos/ibc-apps/modules/async-icq/v7" - icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" + icq "github.com/cosmos/ibc-apps/modules/async-icq/v8" + icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v8/types" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" - ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7" - ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" + ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8" + ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/types" "github.com/OmniFlix/omniflixhub/v5/x/alloc" alloctypes "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" @@ -175,7 +178,7 @@ func appModules( bondDenom := app.GetChainBondDenom() return []module.AppModule{ genutil.NewAppModule( - app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, + app.AccountKeeper, app.StakingKeeper, app.BaseApp, encodingConfig.TxConfig, ), auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)), @@ -210,6 +213,7 @@ func appModules( app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), + app.InterfaceRegistry(), ), distr.NewAppModule( appCodec, @@ -228,7 +232,7 @@ func appModules( ), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - upgrade.NewAppModule(app.UpgradeKeeper), + upgrade.NewAppModule(app.UpgradeKeeper, addresscodec.NewBech32Codec(appparams.Bech32AccountAddrPrefix)), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), params.NewAppModule(app.ParamsKeeper), @@ -288,7 +292,7 @@ func simulationModules( mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.InterfaceRegistry()), params.NewAppModule(app.ParamsKeeper), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), @@ -308,7 +312,8 @@ NOTE: capability module's beginBlocker must come before any modules using capabi func orderBeginBlockers() []string { return []string{ - upgradetypes.ModuleName, + // Changed this as part of v0.50.x migration, moved this to preblockers + // upgradetypes.ModuleName, capabilitytypes.ModuleName, minttypes.ModuleName, alloctypes.ModuleName, // must run before distribution module diff --git a/app/params/constants.go b/app/params/constants.go index 365a86de..e11f509b 100644 --- a/app/params/constants.go +++ b/app/params/constants.go @@ -1,6 +1,7 @@ package params const ( - Name = "OmniFlixHub" - BondDenom = "uflix" + Name = "OmniFlixHub" + BondDenom = "uflix" + Bech32AccountAddrPrefix = "omniflix" ) diff --git a/app/params/proto.go b/app/params/proto.go index 84ff35a3..2e112b0e 100644 --- a/app/params/proto.go +++ b/app/params/proto.go @@ -1,15 +1,32 @@ package params import ( + "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/x/auth/tx" + "github.com/cosmos/gogoproto/proto" ) -// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration. +// makeEncodingConfig creates an EncodingConfig for an amino based test configuration. func MakeEncodingConfig() EncodingConfig { amino := codec.NewLegacyAmino() - interfaceRegistry := types.NewInterfaceRegistry() + // interfaceRegistry := testutil.CodecOptions{AccAddressPrefix: "omniflix", ValAddressPrefix: "omniflixvaloper"}.NewInterfaceRegistry() + interfaceRegistry, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ + ProtoFiles: proto.HybridResolver, + SigningOptions: signing.Options{ + AddressCodec: address.Bech32Codec{ + Bech32Prefix: Bech32AccountAddrPrefix, + }, + ValidatorAddressCodec: address.Bech32Codec{ + Bech32Prefix: Bech32AccountAddrPrefix + "valoper", + }, + }, + }) + if err != nil { + panic(err) + } marshaler := codec.NewProtoCodec(interfaceRegistry) txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) diff --git a/app/prefix.go b/app/prefix.go index 258fd8cb..e7e409fb 100644 --- a/app/prefix.go +++ b/app/prefix.go @@ -18,10 +18,21 @@ var ( ) func SetConfig() { + config := sdk.GetConfig() + config.Seal() +} + +func init() { + // This package does not contain the `app/config` package in its import chain, and therefore needs to call + // SetAddressPrefixes() explicitly in order to set the `dydx` address prefixes. + SetAddressPrefixes() +} + +// SetAddressPrefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings. +func SetAddressPrefixes() { config := sdk.GetConfig() config.SetBech32PrefixForAccount(AccountAddressPrefix, AccountPubKeyPrefix) config.SetBech32PrefixForValidator(ValidatorAddressPrefix, ValidatorPubKeyPrefix) config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix) config.SetAddressVerifier(wasmtypes.VerifyAddressLen()) - config.Seal() } diff --git a/app/test_helpers.go b/app/test_helpers.go index a684e0af..7275190b 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -2,35 +2,29 @@ package app import ( "encoding/json" - "path/filepath" - "testing" + "os" "time" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/snapshots" - + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" apphelpers "github.com/OmniFlix/omniflixhub/v5/app/helpers" - appparams "github.com/OmniFlix/omniflixhub/v5/app/params" - dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/ed25519" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" - baseApp "github.com/cosmos/cosmos-sdk/baseapp" + cosmosdb "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/baseapp" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sims "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/require" ) // SimAppChainID hardcoded chainID for simulation @@ -68,165 +62,63 @@ type EmptyAppOptions struct{} func (EmptyAppOptions) Get(_ string) interface{} { return nil } -func Setup(t *testing.T) *OmniFlixApp { - t.Helper() - +// SetupWithGenesisValSet initializes a new omniFlixApp with a validator set and genesis accounts +// that also act as delegators. For simplicity, each validator is bonded with a delegation +// of one consensus engine unit in the default token of the omniFlixApp from first genesis +// account. A Nop logger is set in omniFlixApp. +func GenesisStateWithValSet(omniflixapp *OmniFlixApp) GenesisState { privVal := apphelpers.NewPV() - pubKey, err := privVal.GetPubKey() - require.NoError(t, err) - // create validator set with single validator + pubKey, _ := privVal.GetPubKey() validator := tmtypes.NewValidator(pubKey, 1) valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) // generate genesis account senderPrivKey := secp256k1.GenPrivKey() - acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) - balance := banktypes.Balance{ - Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(appparams.BondDenom, sdk.NewInt(100000000000000))), - } - - app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance) + senderPrivKey.PubKey().Address() + acc := authtypes.NewBaseAccountWithAddress(senderPrivKey.PubKey().Address().Bytes()) - return app -} - -// SetupWithGenesisValSet initializes a new omniFlixApp with a validator set and genesis accounts -// that also act as delegators. For simplicity, each validator is bonded with a delegation -// of one consensus engine unit in the default token of the omniFlixApp from first genesis -// account. A Nop logger is set in omniFlixApp. -func SetupWithGenesisValSet( - t *testing.T, - valSet *tmtypes.ValidatorSet, - genAccs []authtypes.GenesisAccount, - balances ...banktypes.Balance, -) *OmniFlixApp { - t.Helper() - - omniflixTestApp, genesisState := setup(t, true) - genesisState = genesisStateWithValSet(t, omniflixTestApp, genesisState, valSet, genAccs, balances...) - - stateBytes, err := json.MarshalIndent(genesisState, "", " ") - require.NoError(t, err) - - // init chain will set the validator set and initialize the genesis accounts - omniflixTestApp.InitChain( - abci.RequestInitChain{ - ChainId: SimAppChainID, - Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, - AppStateBytes: stateBytes, - Time: time.Now().UTC(), - InitialHeight: 1, - }, - ) - - // commit genesis changes - omniflixTestApp.Commit() - omniflixTestApp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{ - ChainID: SimAppChainID, - Height: omniflixTestApp.LastBlockHeight() + 1, - AppHash: omniflixTestApp.LastCommitID().Hash, - ValidatorsHash: valSet.Hash(), - NextValidatorsHash: valSet.Hash(), - Time: time.Now().UTC(), - }}) - - return omniflixTestApp -} - -func setup(t *testing.T, withGenesis bool, opts ...wasmkeeper.Option) (*OmniFlixApp, GenesisState) { - t.Helper() - - db := dbm.NewMemDB() - nodeHome := t.TempDir() - encCdc := MakeEncodingConfig() - snapshotDir := filepath.Join(nodeHome, "data", "snapshots") - - snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) - require.NoError(t, err) - t.Cleanup(func() { snapshotDB.Close() }) - snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) - require.NoError(t, err) - - appOptions := make(simtestutil.AppOptionsMap) - appOptions[flags.FlagHome] = nodeHome // ensure unique folder - - app := NewOmniFlixApp( - log.NewNopLogger(), - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - 0, - encCdc, - appOptions, - opts, - baseApp.SetChainID(SimAppChainID), - baseApp.SetSnapshot(snapshotStore, snapshottypes.SnapshotOptions{KeepRecent: 2}), - ) - if withGenesis { - return app, NewDefaultGenesisState(encCdc.Marshaler) - } - - return app, GenesisState{} -} - -func genesisStateWithValSet( - t *testing.T, - app *OmniFlixApp, - genesisState GenesisState, - valSet *tmtypes.ValidatorSet, - genAccs []authtypes.GenesisAccount, - balances ...banktypes.Balance, -) GenesisState { - t.Helper() - // set genesis accounts + ////////////////////// + balances := []banktypes.Balance{} + genesisState := NewDefaultGenesisState() + genAccs := []authtypes.GenesisAccount{acc} authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) - genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) + genesisState[authtypes.ModuleName] = encodingConfig.Marshaler.MustMarshalJSON(authGenesis) validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) bondAmt := sdk.DefaultPowerReduction + initValPowers := []abci.ValidatorUpdate{} for _, val := range valSet.Validators { - pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) - require.NoError(t, err) - pkAny, err := codectypes.NewAnyWithValue(pk) - require.NoError(t, err) + pk, _ := cryptocodec.FromCmtPubKeyInterface(val.PubKey) + pkAny, _ := codectypes.NewAnyWithValue(pk) validator := stakingtypes.Validator{ OperatorAddress: sdk.ValAddress(val.Address).String(), ConsensusPubkey: pkAny, Jailed: false, Status: stakingtypes.Bonded, Tokens: bondAmt, - DelegatorShares: sdk.OneDec(), + DelegatorShares: sdkmath.LegacyOneDec(), Description: stakingtypes.Description{}, UnbondingHeight: int64(0), UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), - MinSelfDelegation: sdk.ZeroInt(), + Commission: stakingtypes.NewCommission(sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec()), + MinSelfDelegation: sdkmath.ZeroInt(), } validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) - + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress().String(), sdk.ValAddress(val.Address).String(), sdkmath.LegacyOneDec())) + + // add initial validator powers so consumer InitGenesis runs correctly + pub, _ := val.ToProto() + initValPowers = append(initValPowers, abci.ValidatorUpdate{ + Power: val.VotingPower, + PubKey: pub.PubKey, + }) } // set validators and delegations - defaultStParams := stakingtypes.DefaultParams() - stParams := stakingtypes.NewParams( - defaultStParams.UnbondingTime, - defaultStParams.MaxValidators, - defaultStParams.MaxEntries, - defaultStParams.HistoricalEntries, - appparams.BondDenom, - defaultStParams.MinCommissionRate, - ) - - // set validators and delegations - stakingGenesis := stakingtypes.NewGenesisState(stParams, validators, delegations) - genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) + stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) + genesisState[stakingtypes.ModuleName] = encodingConfig.Marshaler.MustMarshalJSON(stakingGenesis) totalSupply := sdk.NewCoins() for _, b := range balances { @@ -236,13 +128,13 @@ func genesisStateWithValSet( for range delegations { // add delegated tokens to total supply - totalSupply = totalSupply.Add(sdk.NewCoin(appparams.BondDenom, bondAmt)) + totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) } // add bonded amount to bonded pool module account balances = append(balances, banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(appparams.BondDenom, bondAmt)}, + Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, }) // update total supply @@ -253,12 +145,110 @@ func genesisStateWithValSet( []banktypes.Metadata{}, []banktypes.SendEnabled{}, ) + genesisState[banktypes.ModuleName] = encodingConfig.Marshaler.MustMarshalJSON(bankGenesis) - genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) + _, err := tmtypes.PB2TM.ValidatorUpdates(initValPowers) + if err != nil { + panic("failed to get vals") + } return genesisState } +var defaultGenesisStatebytes = []byte{} + +// SetupWithCustomHome initializes a new OmniFlixApp with a custom home directory +func SetupWithCustomHome(isCheckTx bool, dir string) *OmniFlixApp { + return SetupWithCustomHomeAndChainId(isCheckTx, dir, "omniflixhub-1") +} + +func SetupWithCustomHomeAndChainId(isCheckTx bool, dir, chainId string) *OmniFlixApp { + db := cosmosdb.NewMemDB() + app := NewOmniFlixApp( + log.NewNopLogger(), + db, + nil, + true, + map[int64]bool{}, + dir, + 0, + encodingConfig, + sims.EmptyAppOptions{}, + []wasmkeeper.Option{}, + baseapp.SetChainID(chainId)) + if !isCheckTx { + if len(defaultGenesisStatebytes) == 0 { + var err error + genesisState := GenesisStateWithValSet(app) + defaultGenesisStatebytes, err = json.Marshal(genesisState) + if err != nil { + panic(err) + } + } + + _, err := app.InitChain( + &abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: sims.DefaultConsensusParams, + AppStateBytes: defaultGenesisStatebytes, + ChainId: chainId, + }, + ) + if err != nil { + panic(err) + } + } + + return app +} + +func Setup(isCheckTx bool) *OmniFlixApp { + return SetupWithCustomHome(isCheckTx, DefaultNodeHome) +} + +// SetupTestingAppWithLevelDb initializes a new OmniFlixApp intended for testing, +// with LevelDB as a db. +func SetupTestingAppWithLevelDb(isCheckTx bool) (app *OmniFlixApp, cleanupFn func()) { + dir, err := os.MkdirTemp(os.TempDir(), "omniflix_leveldb_testing") + if err != nil { + panic(err) + } + db, err := cosmosdb.NewGoLevelDB("omniflix_leveldb_testing", dir, nil) + if err != nil { + panic(err) + } + app = NewOmniFlixApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, encodingConfig, sims.EmptyAppOptions{}, []wasmkeeper.Option{}, baseapp.SetChainID("omniflixhub-1")) + if !isCheckTx { + genesisState := GenesisStateWithValSet(app) + stateBytes, err := json.MarshalIndent(genesisState, "", " ") + if err != nil { + panic(err) + } + + _, err = app.InitChain( + &abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: sims.DefaultConsensusParams, + AppStateBytes: stateBytes, + ChainId: "omniflixhub-1", + }, + ) + if err != nil { + panic(err) + } + } + + cleanupFn = func() { + db.Close() + err = os.RemoveAll(dir) + if err != nil { + panic(err) + } + } + + return app, cleanupFn +} + func keyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { key := ed25519.GenPrivKey() pub := key.PubKey() diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 08c846f5..2e01c51a 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,11 +1,11 @@ package upgrades import ( + store "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" ) @@ -13,8 +13,8 @@ import ( // BaseAppParamManager defines an interface that BaseApp is expected to full-fill, // that allows upgrade handlers to modify BaseApp parameters. type BaseAppParamManager interface { - GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams - StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) + GetConsensusParams(ctx sdk.Context) tmproto.ConsensusParams + StoreConsensusParams(ctx sdk.Context, cp tmproto.ConsensusParams) error } // Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal diff --git a/app/upgrades/v012/constants.go b/app/upgrades/v012/constants.go index 78760165..c7684361 100644 --- a/app/upgrades/v012/constants.go +++ b/app/upgrades/v012/constants.go @@ -1,10 +1,10 @@ package v012 import ( + store "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" - store "github.com/cosmos/cosmos-sdk/store/types" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" ) const UpgradeName = "v0.12.x" diff --git a/app/upgrades/v012/upgrades.go b/app/upgrades/v012/upgrades.go index 6fcbb5df..76c9a605 100644 --- a/app/upgrades/v012/upgrades.go +++ b/app/upgrades/v012/upgrades.go @@ -1,6 +1,9 @@ package v012 import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" sdk "github.com/cosmos/cosmos-sdk/types" @@ -9,9 +12,8 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" ) func CreateV012UpgradeHandler( @@ -20,9 +22,8 @@ func CreateV012UpgradeHandler( bpm upgrades.BaseAppParamManager, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - ctx.Logger().Info("running migrations ...") - + return func(context context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(context) // Run migrations before applying any other state changes. // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). versionMap, err := mm.RunMigrations(ctx, cfg, fromVM) diff --git a/app/upgrades/v2.1/constants.go b/app/upgrades/v2.1/constants.go index a1ead5e2..b294a4c6 100644 --- a/app/upgrades/v2.1/constants.go +++ b/app/upgrades/v2.1/constants.go @@ -1,8 +1,8 @@ package v2_1 import ( + store "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" - store "github.com/cosmos/cosmos-sdk/store/types" ) const UpgradeName = "v2.1" diff --git a/app/upgrades/v2.1/upgrades.go b/app/upgrades/v2.1/upgrades.go index 9e2704b6..c4c36367 100644 --- a/app/upgrades/v2.1/upgrades.go +++ b/app/upgrades/v2.1/upgrades.go @@ -1,11 +1,13 @@ package v2_1 import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) func CreateV2UpgradeHandler( @@ -14,7 +16,8 @@ func CreateV2UpgradeHandler( _ upgrades.BaseAppParamManager, _ *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(context context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(context) ctx.Logger().Info("running migrations ...") // Run migrations before applying any other state changes. // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). diff --git a/app/upgrades/v2/constants.go b/app/upgrades/v2/constants.go index 3de54491..0ba3c0d3 100644 --- a/app/upgrades/v2/constants.go +++ b/app/upgrades/v2/constants.go @@ -1,15 +1,15 @@ package v2 import ( + store "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" globalfeetypes "github.com/OmniFlix/omniflixhub/v5/x/globalfee/types" tokenfactorytypes "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types" - store "github.com/cosmos/cosmos-sdk/store/types" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" "github.com/cosmos/cosmos-sdk/x/group" - icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" + icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v8/types" ) const UpgradeName = "v2" diff --git a/app/upgrades/v2/upgrades.go b/app/upgrades/v2/upgrades.go index 3022be0b..9538468c 100644 --- a/app/upgrades/v2/upgrades.go +++ b/app/upgrades/v2/upgrades.go @@ -1,6 +1,10 @@ package v2 import ( + "context" + + sdkmath "cosmossdk.io/math" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" alloctypes "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" @@ -22,11 +26,10 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/cosmos/ibc-go/v7/modules/core/exported" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v8/modules/core/exported" ) func CreateV2UpgradeHandler( @@ -35,9 +38,8 @@ func CreateV2UpgradeHandler( bpm upgrades.BaseAppParamManager, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - ctx.Logger().Info("running migrations ...") - + return func(context context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(context) // https://github.com/cosmos/cosmos-sdk/pull/12363/files // Set param key table for params module migration for _, subspace := range keepers.ParamsKeeper.GetSubspaces() { @@ -50,7 +52,7 @@ func CreateV2UpgradeHandler( case banktypes.ModuleName: keyTable = banktypes.ParamKeyTable() //nolint:staticcheck case stakingtypes.ModuleName: - keyTable = stakingtypes.ParamKeyTable() + keyTable = stakingtypes.ParamKeyTable() //nolint:staticcheck case minttypes.ModuleName: keyTable = minttypes.ParamKeyTable() //nolint:staticcheck case distrtypes.ModuleName: @@ -93,7 +95,7 @@ func CreateV2UpgradeHandler( // Migrate Tendermint consensus parameters from x/params module to a deprecated x/consensus module. // The old params module is required to still be imported in your app.go in order to handle this migration. baseAppLegacySS := keepers.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) - baseapp.MigrateParams(ctx, baseAppLegacySS, &keepers.ConsensusParamsKeeper) + baseapp.MigrateParams(ctx, baseAppLegacySS, &keepers.ConsensusParamsKeeper.ParamsStore) // Run migrations before applying any other state changes. // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). @@ -108,15 +110,21 @@ func CreateV2UpgradeHandler( keepers.IBCKeeper.ClientKeeper.SetParams(ctx, params) // set proposal's minimum initial deposit to 20% - govParams := keepers.GovKeeper.GetParams(ctx) - govParams.MinInitialDepositRatio = sdk.NewDec(20).Quo(sdk.NewDec(100)).String() - if err := keepers.GovKeeper.SetParams(ctx, govParams); err != nil { + govParams, err := keepers.GovKeeper.Params.Get(ctx) + if err != nil { + return nil, err + } + govParams.MinInitialDepositRatio = sdkmath.LegacyNewDec(20).Quo(sdkmath.LegacyNewDec(100)).String() + if err := keepers.GovKeeper.Params.Set(ctx, govParams); err != nil { return nil, err } // set validator's minimum commission to 5% - stakingParams := keepers.StakingKeeper.GetParams(ctx) - stakingParams.MinCommissionRate = sdk.NewDecWithPrec(5, 2) + stakingParams, err := keepers.StakingKeeper.GetParams(ctx) + if err != nil { + return nil, err + } + stakingParams.MinCommissionRate = sdkmath.LegacyNewDecWithPrec(5, 2) err = keepers.StakingKeeper.SetParams(ctx, stakingParams) if err != nil { return nil, err diff --git a/app/upgrades/v3/constants.go b/app/upgrades/v3/constants.go index 52c8f9cc..98324c0d 100644 --- a/app/upgrades/v3/constants.go +++ b/app/upgrades/v3/constants.go @@ -1,9 +1,9 @@ package v3 import ( + store "cosmossdk.io/store/types" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" - store "github.com/cosmos/cosmos-sdk/store/types" ) const UpgradeName = "v3" diff --git a/app/upgrades/v3/upgrades.go b/app/upgrades/v3/upgrades.go index ace3eab9..ff447735 100644 --- a/app/upgrades/v3/upgrades.go +++ b/app/upgrades/v3/upgrades.go @@ -1,12 +1,14 @@ package v3 import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) func CreateV3UpgradeHandler( @@ -15,8 +17,8 @@ func CreateV3UpgradeHandler( _ upgrades.BaseAppParamManager, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - ctx.Logger().Info("running migrations ...") + return func(context context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(context) // Run migrations before applying any other state changes. // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). versionMap, err := mm.RunMigrations(ctx, cfg, fromVM) diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go index 1871869e..e2b26865 100644 --- a/app/upgrades/v4/constants.go +++ b/app/upgrades/v4/constants.go @@ -1,9 +1,9 @@ package v4 import ( + store "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" - store "github.com/cosmos/cosmos-sdk/store/types" - ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" + ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/types" ) const UpgradeName = "v4" diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index 992eeb4b..e9e96f0a 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -1,11 +1,13 @@ package v4 import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/OmniFlix/omniflixhub/v5/app/keepers" "github.com/OmniFlix/omniflixhub/v5/app/upgrades" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) func CreateV4UpgradeHandler( @@ -14,8 +16,8 @@ func CreateV4UpgradeHandler( _ upgrades.BaseAppParamManager, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - ctx.Logger().Info("running migrations ...") + return func(context context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(context) // Run migrations before applying any other state changes. // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). versionMap, err := mm.RunMigrations(ctx, cfg, fromVM) diff --git a/app/upgrades/v5/constants.go b/app/upgrades/v5/constants.go new file mode 100644 index 00000000..61615c73 --- /dev/null +++ b/app/upgrades/v5/constants.go @@ -0,0 +1,16 @@ +package v4 + +import ( + store "cosmossdk.io/store/types" + "github.com/OmniFlix/omniflixhub/v5/app/upgrades" +) + +const UpgradeName = "v5" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateV5UpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{}, + }, +} diff --git a/app/upgrades/v5/upgrades.go b/app/upgrades/v5/upgrades.go new file mode 100644 index 00000000..ffc08a9f --- /dev/null +++ b/app/upgrades/v5/upgrades.go @@ -0,0 +1,48 @@ +package v4 + +import ( + "context" + "time" + + sdkmath "cosmossdk.io/math" + + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/OmniFlix/omniflixhub/v5/app/keepers" + "github.com/OmniFlix/omniflixhub/v5/app/upgrades" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" +) + +func CreateV5UpgradeHandler( + mm *module.Manager, + cfg module.Configurator, + _ upgrades.BaseAppParamManager, + keepers *keepers.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(context context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(context) + // Run migrations before applying any other state changes. + // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). + versionMap, err := mm.RunMigrations(ctx, cfg, fromVM) + if err != nil { + return nil, err + } + // Set Gov Params + govParams, err := keepers.GovKeeper.Params.Get(ctx) + if err != nil { + return nil, err + } + govParams.ExpeditedThreshold = "0.7" + expeditedVotingPeriod := time.Hour * 24 + govParams.ExpeditedVotingPeriod = &expeditedVotingPeriod + govParams.ExpeditedMinDeposit = sdk.NewCoins(sdk.NewCoin("uflix", sdkmath.NewIntWithDecimal(2500, 6))) + + err = keepers.GovKeeper.Params.Set(ctx, govParams) + if err != nil { + return nil, err + } + + ctx.Logger().Info("Upgrade complete") + return versionMap, nil + } +} diff --git a/cmd/omniflixhubd/cmd/root.go b/cmd/omniflixhubd/cmd/root.go index 90c79976..99781dc5 100644 --- a/cmd/omniflixhubd/cmd/root.go +++ b/cmd/omniflixhubd/cmd/root.go @@ -5,43 +5,72 @@ import ( "io" "os" + "github.com/cosmos/cosmos-sdk/baseapp" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + tmcfg "github.com/cometbft/cometbft/config" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" - "github.com/cosmos/cosmos-sdk/client/pruning" + "github.com/cosmos/cosmos-sdk/types/module" "github.com/prometheus/client_golang/prometheus" - "github.com/OmniFlix/omniflixhub/v5/app" - "github.com/OmniFlix/omniflixhub/v5/app/params" - + "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - dbm "github.com/cometbft/cometbft-db" + "github.com/OmniFlix/omniflixhub/v5/app" + "github.com/OmniFlix/omniflixhub/v5/app/params" tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/client/rpc" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" + sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/types" - vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + rosettaCmd "github.com/cosmos/rosetta/cmd" "github.com/spf13/cast" "github.com/spf13/cobra" + "github.com/spf13/viper" ) -var ChainID string - // NewRootCmd creates a new root command for omniflixhubd. It is called once in the // main function. func NewRootCmd() (*cobra.Command, params.EncodingConfig) { // Set config for prefixes - encodingConfig := app.MakeEncodingConfig() - app.SetConfig() + encodingConfig := app.GetEncodingConfig() + + initAppOptions := viper.New() + tempDir := tempDir() + initAppOptions.Set(flags.FlagHome, tempDir) + + tempApp := app.NewOmniFlixApp( + log.NewNopLogger(), + dbm.NewMemDB(), + nil, + true, + nil, + tempDir, + 0, + encodingConfig, + initAppOptions, + nil, + baseapp.SetChainID("omniflixhub-1"), + ) + defer func() { + if err := tempApp.Close(); err != nil { + panic(err) + } + }() initClientCtx := client.Context{}. WithCodec(encodingConfig.Marshaler). @@ -73,50 +102,71 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { return err } appTemplate, appConfig := initAppConfig() - customTMConfig := initTendermintConfig() + customTMConfig := initCometBftConfig() return server.InterceptConfigsPreRunHandler(cmd, appTemplate, appConfig, customTMConfig) }, } - initRootCmd(rootCmd, encodingConfig) + initRootCmd(rootCmd, encodingConfig, tempApp) + + // must need as part of cosmos-sdk 0.50.x migration + if err := autoCliOpts(initClientCtx, tempApp).EnhanceRootCommand(rootCmd); err != nil { + panic(err) + } return rootCmd, encodingConfig } -// initTendermintConfig helps to override default Tendermint Config values. +// initCometBftConfig helps to override default CometBft Config values. // return tmcfg.DefaultConfig if no custom configuration is required for the application. -func initTendermintConfig() *tmcfg.Config { +func initCometBftConfig() *tmcfg.Config { cfg := tmcfg.DefaultConfig() // these values put a higher strain on node memory - // cfg.P2P.MaxNumInboundPeers = 100 - // cfg.P2P.MaxNumOutboundPeers = 40 + cfg.P2P.MaxNumInboundPeers = 100 + cfg.P2P.MaxNumOutboundPeers = 40 return cfg } -func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { - ac := appCreator{encodingConfig} - +func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig, tempApp *app.OmniFlixApp) { rootCmd.AddCommand( - genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), + genutilcli.InitCmd(tempApp.ModuleBasics, app.DefaultNodeHome), + tmcli.NewCompletionCmd(rootCmd, true), + genutilcli.CollectGenTxsCmd( + banktypes.GenesisBalancesIterator{}, + app.DefaultNodeHome, + genutiltypes.DefaultMessageValidator, + encodingConfig.TxConfig.SigningContext().ValidatorAddressCodec(), + ), + genutilcli.MigrateGenesisCmd(genutilcli.MigrationMap), + genutilcli.GenTxCmd( + tempApp.ModuleBasics, + encodingConfig.TxConfig, + banktypes.GenesisBalancesIterator{}, + app.DefaultNodeHome, + encodingConfig.TxConfig.SigningContext().ValidatorAddressCodec(), + ), + genutilcli.ValidateGenesisCmd(tempApp.ModuleBasics), tmcli.NewCompletionCmd(rootCmd, true), addDebugCommands(debug.Cmd()), - config.Cmd(), - pruning.PruningCmd(ac.newApp), ) - a := appCreator{encodingConfig} - server.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags) + ac := appCreator{ + encCfg: encodingConfig, + } + + server.AddCommands(rootCmd, app.DefaultNodeHome, ac.newApp, ac.appExport, addModuleInitFlags) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( - rpc.StatusCommand(), - genesisCommand(encodingConfig), + server.StatusCommand(), queryCommand(), - txCommand(), - keys.Commands(app.DefaultNodeHome), + txCommand(tempApp.ModuleBasics), + keys.Commands(), ) + // add rosetta + rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler)) } func addModuleInitFlags(startCmd *cobra.Command) { @@ -124,13 +174,14 @@ func addModuleInitFlags(startCmd *cobra.Command) { wasm.AddModuleInitFlags(startCmd) } -func genesisCommand(encodingConfig params.EncodingConfig, cmds ...*cobra.Command) *cobra.Command { - cmd := genutilcli.GenesisCoreCommand(encodingConfig.TxConfig, app.ModuleBasics, app.DefaultNodeHome) - - for _, subCmd := range cmds { - cmd.AddCommand(subCmd) +func tempDir() string { + dir, err := os.MkdirTemp("", "omniflixhubtemp") + if err != nil { + dir = app.DefaultNodeHome } - return cmd + defer os.RemoveAll(dir) + + return dir } func queryCommand() *cobra.Command { @@ -144,9 +195,8 @@ func queryCommand() *cobra.Command { } cmd.AddCommand( - authcmd.GetAccountCmd(), rpc.ValidatorCommand(), - rpc.BlockCommand(), + server.QueryBlockCmd(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), ) @@ -157,7 +207,7 @@ func queryCommand() *cobra.Command { return cmd } -func txCommand() *cobra.Command { +func txCommand(moduleBasics module.BasicManager) *cobra.Command { cmd := &cobra.Command{ Use: "tx", Short: "Transactions subcommands", @@ -175,11 +225,9 @@ func txCommand() *cobra.Command { authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), - vestingcli.GetTxCmd(), - authcmd.GetAuxToFeeCommand(), ) - app.ModuleBasics.AddTxCommands(cmd) + moduleBasics.AddTxCommands(cmd) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd @@ -190,7 +238,7 @@ type appCreator struct { } // newApp is an AppCreator -func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { +func (ac appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { skipUpgradeHeights := make(map[int64]bool) for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { skipUpgradeHeights[int64(h)] = true @@ -211,7 +259,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - a.encCfg, + ac.encCfg, appOpts, wasmOpts, baseappOptions..., @@ -219,7 +267,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a } // appExport creates a new app (optionally at a given height) -func (a appCreator) appExport( +func (ac appCreator) appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, @@ -246,7 +294,7 @@ func (a appCreator) appExport( map[int64]bool{}, homePath, uint(1), - a.encCfg, + ac.encCfg, appOpts, emptyWasmOpts, ) @@ -263,7 +311,7 @@ func (a appCreator) appExport( map[int64]bool{}, homePath, uint(1), - a.encCfg, + ac.encCfg, appOpts, emptyWasmOpts, ) @@ -271,3 +319,24 @@ func (a appCreator) appExport( return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } + +func autoCliOpts(initClientCtx client.Context, tempApp *app.OmniFlixApp) autocli.AppOptions { + modules := make(map[string]appmodule.AppModule) + for _, m := range tempApp.ModuleManager().Modules { + if moduleWithName, ok := m.(module.HasName); ok { + moduleName := moduleWithName.Name() + if appModule, ok := moduleWithName.(appmodule.AppModule); ok { + modules[moduleName] = appModule + } + } + } + + return autocli.AppOptions{ + Modules: modules, + ModuleOptions: runtimeservices.ExtractAutoCLIOptions(tempApp.ModuleManager().Modules), + AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), + ClientCtx: initClientCtx, + } +} diff --git a/cmd/omniflixhubd/main.go b/cmd/omniflixhubd/main.go index 637ee799..b5fbeb2f 100644 --- a/cmd/omniflixhubd/main.go +++ b/cmd/omniflixhubd/main.go @@ -9,6 +9,8 @@ import ( ) func main() { + app.SetConfig() + rootCmd, _ := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { os.Exit(1) diff --git a/go.mod b/go.mod index 8f4ccb12..4da8ea82 100644 --- a/go.mod +++ b/go.mod @@ -1,21 +1,36 @@ module github.com/OmniFlix/omniflixhub/v5 -go 1.21 +go 1.22 + +toolchain go1.22.5 require ( - github.com/CosmWasm/wasmd v0.45.0 + cosmossdk.io/client/v2 v2.0.0-beta.1 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.3.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.0 + cosmossdk.io/x/evidence v0.1.0 + cosmossdk.io/x/feegrant v0.1.0 + cosmossdk.io/x/nft v0.1.1 + cosmossdk.io/x/tx v0.13.3 + cosmossdk.io/x/upgrade v0.1.1 + github.com/CosmWasm/wasmd v0.51.0 github.com/CosmWasm/wasmvm v1.5.2 - github.com/OmniFlix/streampay/v2 v2.4.1 - github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0 - github.com/cometbft/cometbft v0.37.5 - github.com/cometbft/cometbft-db v0.8.0 + github.com/CosmWasm/wasmvm/v2 v2.0.1 + github.com/OmniFlix/streampay/v2 v2.4.2-0.20240709201324-767b263c3aa0 + github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0.0.20240604024247-74d40a1974c2 + github.com/cometbft/cometbft v0.38.9 + github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.47.11 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240228213828-cce7f56d000b - github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.1.1 - github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79 - github.com/cosmos/ibc-go/v7 v7.4.0 + github.com/cosmos/cosmos-sdk v0.50.8 + github.com/cosmos/gogoproto v1.5.0 + github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 + github.com/cosmos/ibc-apps/modules/async-icq/v8 v8.0.0 + github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/v8 v8.4.0 + github.com/cosmos/rosetta v0.50.7 github.com/golang/protobuf v1.5.4 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 @@ -24,85 +39,97 @@ require ( github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 - google.golang.org/grpc v1.62.1 - google.golang.org/protobuf v1.33.0 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 ) require ( + cosmossdk.io/collections v0.4.0 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/goware/urlx v0.3.2 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.9.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.uber.org/multierr v1.11.0 // indirect golang.org/x/time v0.5.0 // indirect + gotest.tools/v3 v3.5.1 // indirect ) require ( - cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.25.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/api v0.3.1 - cosmossdk.io/core v0.6.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.0 cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.3.1 // indirect - cosmossdk.io/math v1.3.0 - cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect - github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/iavl v1.1.2 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect @@ -113,39 +140,35 @@ require ( github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/orderedmap v0.2.0 // indirect + github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -153,44 +176,43 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/rakyll/statik v0.1.7 // indirect + github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/viper v1.18.2 // indirect + github.com/spf13/viper v1.18.2 github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/api v0.155.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/api v0.169.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -209,5 +231,10 @@ replace ( // pin the version of goleveldb to v1.0.1-0.20210819022825-2ae1ddf74ef7 required by SDK v47 upgrade guide. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + golang.org/x/exp => golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 + ) + +exclude github.com/coinbase/rosetta-sdk-go v0.7.9 + +exclude github.com/gogo/protobuf v1.3.3 diff --git a/go.sum b/go.sum index bc9075c5..17adabd9 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,11 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -57,7 +55,6 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= @@ -71,8 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -112,8 +109,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -174,8 +171,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= -cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -187,11 +184,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.6.1 h1:OBy7TI2W+/gyn2z40vVvruK3di+cAluinA6cybFbE7s= -cosmossdk.io/core v0.6.1/go.mod h1:g3MMBCBXtxbDWBURDVnJE7XML4BG5qENhs0gzkcpuFA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -200,84 +200,77 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= +cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= +cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= +cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= +cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= +cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8= +cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY= +cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= +cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= +cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= +cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= -git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= -github.com/CosmWasm/wasmd v0.45.0 h1:9zBqrturKJwC2kVsfHvbrA++EN0PS7UTXCffCGbg6JI= -github.com/CosmWasm/wasmd v0.45.0/go.mod h1:RnSAiqbNIZu4QhO+0pd7qGZgnYAMBPGmXpzTADag944= +github.com/CosmWasm/wasmd v0.51.0 h1:3A2o20RrdF7P1D3Xb+R7A/pHbbHWsYCDXrHLa7S0SC8= +github.com/CosmWasm/wasmd v0.51.0/go.mod h1:7TSaj5HoolghujuVWeExqmcUKgpcYWEySGLSODbnnwY= github.com/CosmWasm/wasmvm v1.5.2 h1:+pKB1Mz9GZVt1vadxB+EDdD1FOz3dMNjIKq/58/lrag= github.com/CosmWasm/wasmvm v1.5.2/go.mod h1:Q0bSEtlktzh7W2hhEaifrFp1Erx11ckQZmjq8FLCyys= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/CosmWasm/wasmvm/v2 v2.0.1 h1:0YCQ7MKGNri7NFeRp75erPJXrqyCtH4gdc9jMstyMzk= +github.com/CosmWasm/wasmvm/v2 v2.0.1/go.mod h1:su9lg5qLr7adV95eOfzjZWkGiky8WNaNIHDr7Fpu7Ck= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OmniFlix/streampay/v2 v2.4.1 h1:394V0VqeN2eRhmzbGUPZu5zKkyo1ve3ygM0TnxbB03w= -github.com/OmniFlix/streampay/v2 v2.4.1/go.mod h1:djfBuEZqQZqu8359HTXMunVgnexFeaRLNC5rdXZmFJk= +github.com/OmniFlix/streampay/v2 v2.4.2-0.20240709201324-767b263c3aa0 h1:2QR5JpIYJEqquCuH9lLEpMeqQDUBe6mj+IGJcVzVhv0= +github.com/OmniFlix/streampay/v2 v2.4.2-0.20240709201324-767b263c3aa0/go.mod h1:+xhkWPG2nHIATjLOWwDx2j9Qnyz0mPLPQ4Zq7SkmaZg= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -287,42 +280,21 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0 h1:399lErsTpI+faTerw5Q4OuVlXAmAQSuibVvxHR3C6OY= -github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= -github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0.0.20240604024247-74d40a1974c2 h1:HJlrWY4KrrleEHp06O+y/4ipx7t2y//S+xMh6L2Hqw0= +github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0.0.20240604024247-74d40a1974c2/go.mod h1:ISMrcdEBCCHNMp8+58fggn7MxQwAnBcuhruFYWMIwMA= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= -github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -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/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -330,12 +302,11 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -353,7 +324,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -363,31 +333,28 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= -github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= -github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= -github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= -github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= -github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= -github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= -github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= -github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= +github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= +github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= +github.com/cometbft/cometbft v0.38.9 h1:cJBJBG0mPKz+sqelCi/hlfZjadZQGdDNnu6YQ1ZsUHQ= +github.com/cometbft/cometbft v0.38.9/go.mod h1:xOoGZrtUT+A5izWfHSJgl0gYZUE7lu7Z2XIS1vWG/QQ= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -398,87 +365,73 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= -github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/cosmos-sdk v0.50.8 h1:2UJHssUaGHTl4/dFp8xyREKAnfiRU6VVfqtKG9n8w5g= +github.com/cosmos/cosmos-sdk v0.50.8/go.mod h1:Zb+DgHtiByNwgj71IlJBXwOq6dLhtyAq3AgqpXm/jHo= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= -github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240228213828-cce7f56d000b h1:VwhHRRIPdMshBMb2TP7xrkY4Ee8CJWsHZvucYeJ56no= -github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240228213828-cce7f56d000b/go.mod h1:UvDmcGIWJPIytq+Q78/ff5NTOsuX/7IrNgEugTW5i0s= -github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.1.1 h1:02RCbih5lQ8aGdDMSvxhTnk5JDLEDitn17ytEE1Qhko= -github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.1.1/go.mod h1:LvVkEXTORVgd87W2Yu7ZY3acKKeTMq/txdTworn8EZI= -github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79 h1:pCxyhIxgWTabAQC5UerkITraHG3SwajdLKKMCFDWCv4= -github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79/go.mod h1:JwHFbo1oX/ht4fPpnPvmhZr+dCkYK1Vihw+vZE9umR4= -github.com/cosmos/ibc-go/v7 v7.4.0 h1:8FqYMptvksgMvlbN4UW9jFxTXzsPyfAzEZurujXac8M= -github.com/cosmos/ibc-go/v7 v7.4.0/go.mod h1:L/KaEhzV5TGUCTfGysVgMBQtl5Dm7hHitfpk+GIeoAo= +github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o= +github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 h1:dyLNlDElY6+5zW/BT/dO/3Ad9FpQblfh+9dQpYQodbA= +github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2/go.mod h1:82hPO/tRawbuFad2gPwChvpZ0JEIoNi91LwVneAYCeM= +github.com/cosmos/ibc-apps/modules/async-icq/v8 v8.0.0 h1:nKP2+Rzlz2iyvTosY5mvP+aEBPe06oaDl3G7xLGBpNI= +github.com/cosmos/ibc-apps/modules/async-icq/v8 v8.0.0/go.mod h1:D3Q380FpWRFtmUQWLosPxachi6w24Og2t5u/Tww5wtY= +github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165 h1:uaW2p383zzr6JjgWa0D4/kUkzOG5p0DyIpNPY6e0mpI= +github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165/go.mod h1:9+Z14xz3Y+5uEn5i1CvLcDN1aTthEhYUdI7pphySkY8= +github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= +github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/ibc-go/v8 v8.4.0 h1:K2PfX0AZ+1XKZytHGEMuSjQXG/MZshPb83RSTQt2+cE= +github.com/cosmos/ibc-go/v8 v8.4.0/go.mod h1:zh6x1osR0hNvEcFrC/lhGD08sMfQmr9wHVvZ/mRWMCs= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= -github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cosmos/rosetta v0.50.7 h1:ED/KfEvfdvgfxpqhy9KnfLK5LN9LZw3O0+chZp4dzN4= +github.com/cosmos/rosetta v0.50.7/go.mod h1:1Jp5gJdrVHlNMp8h4tc2g5kANUTuASOiarxgpCctYkU= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -488,8 +441,9 @@ github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -501,16 +455,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -523,19 +473,13 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= -github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -543,6 +487,7 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -551,13 +496,10 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -565,14 +507,14 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -580,7 +522,6 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -591,9 +532,6 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= @@ -637,12 +575,10 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -662,7 +598,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -692,9 +627,7 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -712,54 +645,53 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/goware/urlx v0.3.2 h1:gdoo4kBHlkqZNaf6XlQ12LGtQOmpKJrR04Rc3RnpJEo= +github.com/goware/urlx v0.3.2/go.mod h1:h8uwbJy68o+tQXCGZNa9D73WN8n0r9OBae5bUnLcgjw= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= +github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -767,36 +699,39 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= -github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= @@ -804,24 +739,9 @@ github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPt github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -831,7 +751,6 @@ github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -841,79 +760,55 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= -github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -921,18 +816,9 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -946,11 +832,8 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -958,16 +841,12 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= @@ -975,28 +854,28 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1007,7 +886,6 @@ github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJ github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= @@ -1019,19 +897,15 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -1042,7 +916,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1053,48 +926,41 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= @@ -1113,11 +979,6 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1152,7 +1013,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1162,7 +1022,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1170,6 +1029,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= @@ -1183,22 +1043,12 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -1207,17 +1057,8 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1229,8 +1070,8 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1243,66 +1084,57 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= -go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1323,12 +1155,11 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1366,20 +1197,16 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1395,8 +1222,10 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 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= @@ -1422,8 +1251,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1439,8 +1268,10 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1452,7 +1283,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1461,7 +1291,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1471,7 +1300,6 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1491,22 +1319,17 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1516,11 +1339,11 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1547,17 +1370,20 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1572,23 +1398,21 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1602,6 +1426,7 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1610,7 +1435,6 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1642,10 +1466,10 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1653,14 +1477,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1710,8 +1529,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= -google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1729,7 +1548,6 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1737,7 +1555,6 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -1830,12 +1647,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1877,8 +1694,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1896,8 +1713,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1912,12 +1729,9 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1933,8 +1747,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C 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.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1945,7 +1757,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= @@ -1954,7 +1765,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/proto/OmniFlix/alloc/v1beta1/params.proto b/proto/OmniFlix/alloc/v1beta1/params.proto index b10fbc8a..357bad12 100644 --- a/proto/OmniFlix/alloc/v1beta1/params.proto +++ b/proto/OmniFlix/alloc/v1beta1/params.proto @@ -11,34 +11,34 @@ message WeightedAddress { string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; string weight = 2 [ (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } message DistributionProportions { string staking_rewards = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.moretags) = "yaml:\"staking_rewards\"", (gogoproto.nullable) = false ]; string nft_incentives = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.moretags) = "yaml:\"nft_incentives\"", (gogoproto.nullable) = false ]; string node_hosts_incentives = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.moretags) = "yaml:\"node_hosts_incentives\"", (gogoproto.nullable) = false ]; string developer_rewards = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.moretags) = "yaml:\"developer_rewards\"", (gogoproto.nullable) = false ]; string community_pool = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.moretags) = "yaml:\"community_pool\"", (gogoproto.nullable) = false ]; diff --git a/proto/OmniFlix/itc/v1/itc.proto b/proto/OmniFlix/itc/v1/itc.proto index bd94dd8b..e54e02e1 100644 --- a/proto/OmniFlix/itc/v1/itc.proto +++ b/proto/OmniFlix/itc/v1/itc.proto @@ -102,7 +102,7 @@ message NFTDetails { string royalty_share = 6 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"royalty_share\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; bool transferable = 7; bool extensible = 8; diff --git a/proto/OmniFlix/marketplace/v1beta1/auction.proto b/proto/OmniFlix/marketplace/v1beta1/auction.proto index 46aa892f..288ba869 100644 --- a/proto/OmniFlix/marketplace/v1beta1/auction.proto +++ b/proto/OmniFlix/marketplace/v1beta1/auction.proto @@ -31,7 +31,7 @@ message AuctionListing { string owner = 7; string increment_percentage = 8 [ (gogoproto.moretags) = "yaml:\"increment_percentage\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; repeated string whitelist_accounts = 9 [ diff --git a/proto/OmniFlix/marketplace/v1beta1/listing.proto b/proto/OmniFlix/marketplace/v1beta1/listing.proto index e3432a68..2328c3e5 100644 --- a/proto/OmniFlix/marketplace/v1beta1/listing.proto +++ b/proto/OmniFlix/marketplace/v1beta1/listing.proto @@ -29,7 +29,7 @@ message WeightedAddress { string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; string weight = 2 [ (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/OmniFlix/marketplace/v1beta1/params.proto b/proto/OmniFlix/marketplace/v1beta1/params.proto index 07958db5..e24fd90f 100644 --- a/proto/OmniFlix/marketplace/v1beta1/params.proto +++ b/proto/OmniFlix/marketplace/v1beta1/params.proto @@ -12,7 +12,7 @@ option (gogoproto.goproto_getters_all) = false; message Params { string sale_commission = 1 [ (gogoproto.moretags) = "yaml:\"sale_commission\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; Distribution distribution = 2 [(gogoproto.nullable) = false]; @@ -31,12 +31,12 @@ message Params { message Distribution { string staking = 1 [ (gogoproto.moretags) = "yaml:\"staking\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; string community_pool = 2 [ (gogoproto.moretags) = "yaml:\"community_pool\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/OmniFlix/marketplace/v1beta1/tx.proto b/proto/OmniFlix/marketplace/v1beta1/tx.proto index f8a7f060..8de29945 100644 --- a/proto/OmniFlix/marketplace/v1beta1/tx.proto +++ b/proto/OmniFlix/marketplace/v1beta1/tx.proto @@ -122,7 +122,7 @@ message MsgCreateAuction { string increment_percentage = 6 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"increment_percentage\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; repeated string whitelist_accounts = 7 [ (gogoproto.nullable) = false, diff --git a/proto/OmniFlix/onft/v1beta1/onft.proto b/proto/OmniFlix/onft/v1beta1/onft.proto index b23cd4a0..7c91870c 100644 --- a/proto/OmniFlix/onft/v1beta1/onft.proto +++ b/proto/OmniFlix/onft/v1beta1/onft.proto @@ -68,7 +68,7 @@ message ONFT { string royalty_share = 9 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"royalty_share\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; } @@ -107,7 +107,7 @@ message ONFTMetadata { string royalty_share = 9 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"royalty_share\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; string uri_hash = 10; } @@ -125,7 +125,7 @@ message WeightedAddress { string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; string weight = 2 [ (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/OmniFlix/onft/v1beta1/tx.proto b/proto/OmniFlix/onft/v1beta1/tx.proto index 8ccbc251..5b7339ed 100644 --- a/proto/OmniFlix/onft/v1beta1/tx.proto +++ b/proto/OmniFlix/onft/v1beta1/tx.proto @@ -124,7 +124,7 @@ message MsgMintONFT { string royalty_share = 8 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"royalty_share\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; string sender = 9; string recipient = 10; diff --git a/scripts/protoc_swagger_openapi_gen.sh b/scripts/protoc_swagger_openapi_gen.sh index 4a9ac27b..d065228b 100644 --- a/scripts/protoc_swagger_openapi_gen.sh +++ b/scripts/protoc_swagger_openapi_gen.sh @@ -6,7 +6,7 @@ mkdir -p ./tmp-swagger-gen # Get the paths used repos from go/pkg/mod cosmos_sdk_dir=$(go list -f '{{ .Dir }}' -m github.com/cosmos/cosmos-sdk) -ibc_go=$(go list -f '{{ .Dir }}' -m github.com/cosmos/ibc-go/v7) +ibc_go=$(go list -f '{{ .Dir }}' -m github.com/cosmos/ibc-go/v8) streampay=$(go list -f '{{ .Dir }}' -m github.com/OmniFlix/streampay/v2) echo "$cosmos_sdk_dir"/proto cd proto diff --git a/x/alloc/keeper/keeper.go b/x/alloc/keeper/keeper.go index f3cdecdb..8277006d 100644 --- a/x/alloc/keeper/keeper.go +++ b/x/alloc/keeper/keeper.go @@ -4,10 +4,12 @@ import ( "errors" "fmt" + sdkmath "cosmossdk.io/math" + + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -74,7 +76,11 @@ func (k Keeper) GetModuleAccountAddress() sdk.AccAddress { // DistributeMintedCoins implements distribution of minted coins from mint to external modules. func (k Keeper) DistributeMintedCoins(ctx sdk.Context) error { blockRewardsAddr := k.accountKeeper.GetModuleAccount(ctx, authtypes.FeeCollectorName).GetAddress() - blockRewards := k.bankKeeper.GetBalance(ctx, blockRewardsAddr, k.stakingKeeper.BondDenom(ctx)) + bondDenom, err := k.stakingKeeper.BondDenom(ctx) + if err != nil { + return err + } + blockRewards := k.bankKeeper.GetBalance(ctx, blockRewardsAddr, bondDenom) params := k.GetParams(ctx) proportions := params.DistributionProportions @@ -186,9 +192,9 @@ func (k Keeper) distributeCoinToWeightedAddresses( return nil } -func getProportionAmount(totalCoin sdk.Coin, ratio sdk.Dec) (sdk.Coin, error) { - if ratio.GT(sdk.OneDec()) { +func getProportionAmount(totalCoin sdk.Coin, ratio sdkmath.LegacyDec) (sdk.Coin, error) { + if ratio.GT(sdkmath.LegacyOneDec()) { return sdk.Coin{}, errors.New("ratio cannot be greater than 1") } - return sdk.NewCoin(totalCoin.Denom, sdk.NewDecFromInt(totalCoin.Amount).Mul(ratio).TruncateInt()), nil + return sdk.NewCoin(totalCoin.Denom, sdkmath.LegacyNewDecFromInt(totalCoin.Amount).Mul(ratio).TruncateInt()), nil } diff --git a/x/alloc/keeper/keeper_test.go b/x/alloc/keeper/keeper_test.go index 6ef42749..918c301e 100644 --- a/x/alloc/keeper/keeper_test.go +++ b/x/alloc/keeper/keeper_test.go @@ -1,36 +1,27 @@ package keeper_test import ( + "fmt" "testing" - "time" - - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdkmath "cosmossdk.io/math" "github.com/OmniFlix/omniflixhub/v5/app/apptesting" "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/stretchr/testify/suite" - - "github.com/OmniFlix/omniflixhub/v5/app" ) type KeeperTestSuite struct { apptesting.KeeperTestHelper - suite.Suite - ctx sdk.Context - app *app.OmniFlixApp + queryClient types.QueryClient } func (suite *KeeperTestSuite) SetupTest() { - suite.app = app.Setup(suite.T()) - suite.ctx = suite.app.BaseApp.NewContext(false, tmproto.Header{ - ChainID: app.SimAppChainID, - Height: 5, - Time: time.Now().UTC(), - }) + suite.Reset() + suite.queryClient = types.NewQueryClient(suite.QueryHelper) } func TestKeeperTestSuite(t *testing.T) { @@ -54,11 +45,11 @@ func (suite *KeeperTestSuite) TestParams() { name: "set invalid params", input: types.Params{ DistributionProportions: types.DistributionProportions{ - StakingRewards: sdk.NewDecWithPrec(-1, 2), - NftIncentives: sdk.NewDecWithPrec(100, 2), - NodeHostsIncentives: sdk.NewDecWithPrec(5, 2), - DeveloperRewards: sdk.NewDecWithPrec(0, 2), - CommunityPool: sdk.NewDecWithPrec(5, 2), + StakingRewards: sdkmath.LegacyNewDecWithPrec(-1, 2), + NftIncentives: sdkmath.LegacyNewDecWithPrec(100, 2), + NodeHostsIncentives: sdkmath.LegacyNewDecWithPrec(5, 2), + DeveloperRewards: sdkmath.LegacyNewDecWithPrec(0, 2), + CommunityPool: sdkmath.LegacyNewDecWithPrec(5, 2), }, }, expectErr: true, @@ -67,11 +58,11 @@ func (suite *KeeperTestSuite) TestParams() { name: "set full valid params", input: types.Params{ DistributionProportions: types.DistributionProportions{ - StakingRewards: sdk.NewDecWithPrec(60, 2), // 60% - NftIncentives: sdk.NewDecWithPrec(15, 2), // 15% - NodeHostsIncentives: sdk.NewDecWithPrec(5, 2), // 5% - DeveloperRewards: sdk.NewDecWithPrec(15, 2), // 15% - CommunityPool: sdk.NewDecWithPrec(5, 2), // 5% + StakingRewards: sdkmath.LegacyNewDecWithPrec(60, 2), // 60% + NftIncentives: sdkmath.LegacyNewDecWithPrec(15, 2), // 15% + NodeHostsIncentives: sdkmath.LegacyNewDecWithPrec(5, 2), // 5% + DeveloperRewards: sdkmath.LegacyNewDecWithPrec(15, 2), // 15% + CommunityPool: sdkmath.LegacyNewDecWithPrec(5, 2), // 5% }, }, expectErr: false, @@ -82,8 +73,8 @@ func (suite *KeeperTestSuite) TestParams() { tc := tc suite.Run(tc.name, func() { - expected := suite.app.AllocKeeper.GetParams(suite.ctx) - err := suite.app.AllocKeeper.SetParams(suite.ctx, tc.input) + expected := suite.App.AllocKeeper.GetParams(suite.Ctx) + err := suite.App.AllocKeeper.SetParams(suite.Ctx, tc.input) if tc.expectErr { suite.Require().Error(err) } else { @@ -91,7 +82,7 @@ func (suite *KeeperTestSuite) TestParams() { suite.Require().NoError(err) } - p := suite.app.AllocKeeper.GetParams(suite.ctx) + p := suite.App.AllocKeeper.GetParams(suite.Ctx) suite.Require().Equal(expected, p) }) } @@ -99,65 +90,66 @@ func (suite *KeeperTestSuite) TestParams() { func (suite *KeeperTestSuite) TestDistribution() { suite.SetupTest() - - denom := suite.app.StakingKeeper.BondDenom(suite.ctx) - allocKeeper := suite.app.AllocKeeper - params := suite.app.AllocKeeper.GetParams(suite.ctx) - nftIncentivesReceiver := sdk.AccAddress([]byte("addr1a--------------")) - nodeHostIncentivesReceiver := sdk.AccAddress([]byte("addr1b--------------")) - devRewardsReceiver := sdk.AccAddress([]byte("addr1c--------------")) - params.DistributionProportions.StakingRewards = sdk.NewDecWithPrec(60, 2) - params.DistributionProportions.NodeHostsIncentives = sdk.NewDecWithPrec(5, 2) - params.DistributionProportions.NftIncentives = sdk.NewDecWithPrec(15, 2) - params.DistributionProportions.CommunityPool = sdk.NewDecWithPrec(5, 2) - params.DistributionProportions.DeveloperRewards = sdk.NewDecWithPrec(15, 2) + denom, _ := suite.App.StakingKeeper.BondDenom(suite.Ctx) + allocKeeper := suite.App.AllocKeeper + params := suite.App.AllocKeeper.GetParams(suite.Ctx) + nftIncentivesReceiver, _ := sdk.AccAddressFromBech32("omniflix139qa9tklr4trzvugqm5ycvky80px90yn5hs3kc") + nodeHostIncentivesReceiver, _ := sdk.AccAddressFromBech32("omniflix1djc90zwkk2vaqryne8c68f2tkp6u9ug9qfrnh8") + devRewardsReceiver, _ := sdk.AccAddressFromBech32("omniflix1ftvf4euvdvq95jpeyvgf6r6j78j5rct2a3jnkn") + params.DistributionProportions.StakingRewards = sdkmath.LegacyNewDecWithPrec(60, 2) + params.DistributionProportions.NodeHostsIncentives = sdkmath.LegacyNewDecWithPrec(5, 2) + params.DistributionProportions.NftIncentives = sdkmath.LegacyNewDecWithPrec(15, 2) + params.DistributionProportions.CommunityPool = sdkmath.LegacyNewDecWithPrec(5, 2) + params.DistributionProportions.DeveloperRewards = sdkmath.LegacyNewDecWithPrec(15, 2) params.WeightedNftIncentivesReceivers = []types.WeightedAddress{ { Address: nftIncentivesReceiver.String(), - Weight: sdk.NewDec(1), + Weight: sdkmath.LegacyNewDec(1), }, } params.WeightedNodeHostsIncentivesReceivers = []types.WeightedAddress{ { Address: nodeHostIncentivesReceiver.String(), - Weight: sdk.NewDec(1), + Weight: sdkmath.LegacyNewDec(1), }, } params.WeightedDeveloperRewardsReceivers = []types.WeightedAddress{ { Address: devRewardsReceiver.String(), - Weight: sdk.NewDec(1), + Weight: sdkmath.LegacyNewDec(1), }, } - err := suite.app.AllocKeeper.SetParams(suite.ctx, params) + err := suite.App.AllocKeeper.SetParams(suite.Ctx, params) + fmt.Println(params, suite.App.AppCodec()) suite.Require().NoError(err) - feePool := suite.app.DistrKeeper.GetFeePool(suite.ctx) - feeCollector := suite.app.AccountKeeper.GetModuleAddress(authtypes.FeeCollectorName) + distributionModuleAccount := suite.App.DistrKeeper.GetDistributionAccount(suite.Ctx) + feeCollector := suite.App.AccountKeeper.GetModuleAddress(authtypes.FeeCollectorName) suite.Equal( "0", - suite.app.BankKeeper.GetAllBalances(suite.ctx, feeCollector).AmountOf(denom).String()) + suite.App.BankKeeper.GetAllBalances(suite.Ctx, feeCollector).AmountOf(denom).String()) suite.Equal( - sdk.NewDec(0), - feePool.CommunityPool.AmountOf(denom)) + sdkmath.LegacyNewDec(0).TruncateInt().String(), + suite.App.BankKeeper.GetAllBalances(suite.Ctx, distributionModuleAccount.GetAddress()).AmountOf(denom).String()) - mintCoin := sdk.NewCoin(denom, sdk.NewInt(100_000)) + mintCoin := sdk.NewCoin(denom, sdkmath.NewInt(100_000)) mintCoins := sdk.Coins{mintCoin} - feeCollectorAccount := suite.app.AccountKeeper.GetModuleAccount(suite.ctx, authtypes.FeeCollectorName) + feeCollectorAccount := suite.App.AccountKeeper.GetModuleAccount(suite.Ctx, authtypes.FeeCollectorName) suite.Require().NotNil(feeCollectorAccount) - suite.Require().NoError(FundModuleAccount(suite.app.BankKeeper, suite.ctx, feeCollectorAccount.GetName(), mintCoins)) - feeCollector = suite.app.AccountKeeper.GetModuleAddress(authtypes.FeeCollectorName) + suite.Require().NoError(FundModuleAccount(suite.App.BankKeeper, suite.Ctx, feeCollectorAccount.GetName(), mintCoins)) + feeCollector = suite.App.AccountKeeper.GetModuleAddress(authtypes.FeeCollectorName) suite.Equal( mintCoin.Amount.String(), - suite.app.BankKeeper.GetAllBalances(suite.ctx, feeCollector).AmountOf(denom).String()) + suite.App.BankKeeper.GetAllBalances(suite.Ctx, feeCollector).AmountOf(denom).String()) suite.Equal( - sdk.NewDec(0), - feePool.CommunityPool.AmountOf(denom)) + sdkmath.LegacyNewDec(0).TruncateInt().String(), + suite.App.BankKeeper.GetAllBalances(suite.Ctx, distributionModuleAccount.GetAddress()).AmountOf(denom).String(), + ) - _ = allocKeeper.DistributeMintedCoins(suite.ctx) + _ = allocKeeper.DistributeMintedCoins(suite.Ctx) - feeCollector = suite.app.AccountKeeper.GetModuleAddress(authtypes.FeeCollectorName) + feeCollector = suite.App.AccountKeeper.GetModuleAddress(authtypes.FeeCollectorName) modulePortion := params.DistributionProportions.NftIncentives. Add(params.DistributionProportions.DeveloperRewards). Add(params.DistributionProportions.NodeHostsIncentives). @@ -165,18 +157,18 @@ func (suite *KeeperTestSuite) TestDistribution() { // remaining going to next module should be 100% - 40% = 60% suite.Equal( - sdk.NewDecFromInt(mintCoin.Amount).Mul(sdk.NewDecWithPrec(100, 2).Sub(modulePortion)).RoundInt().String(), - suite.app.BankKeeper.GetAllBalances(suite.ctx, feeCollector).AmountOf(denom).String()) + sdkmath.LegacyNewDecFromInt(mintCoin.Amount).Mul(sdkmath.LegacyNewDecWithPrec(100, 2).Sub(modulePortion)).TruncateInt().String(), + suite.App.BankKeeper.GetAllBalances(suite.Ctx, feeCollector).AmountOf(denom).String()) suite.Equal( - sdk.NewDecFromInt(mintCoin.Amount).Mul(params.DistributionProportions.DeveloperRewards).TruncateInt(), - suite.app.BankKeeper.GetBalance(suite.ctx, devRewardsReceiver, denom).Amount) + sdkmath.LegacyNewDecFromInt(mintCoin.Amount).Mul(params.DistributionProportions.DeveloperRewards).TruncateInt().String(), + suite.App.BankKeeper.GetBalance(suite.Ctx, devRewardsReceiver, denom).Amount.String()) // since the NFT incentives are not setup yet, funds go into the community pool - feePool = suite.app.DistrKeeper.GetFeePool(suite.ctx) + distributionModuleAccount = suite.App.DistrKeeper.GetDistributionAccount(suite.Ctx) communityPoolPortion := params.DistributionProportions.CommunityPool // 5% suite.Equal( - sdk.NewDecFromInt(mintCoin.Amount).Mul(communityPoolPortion), - feePool.CommunityPool.AmountOf(denom)) + sdkmath.LegacyNewDecFromInt(mintCoin.Amount).Mul(communityPoolPortion).TruncateInt().String(), + suite.App.BankKeeper.GetAllBalances(suite.Ctx, distributionModuleAccount.GetAddress()).AmountOf(denom).String()) } diff --git a/x/alloc/migrations/v3/migrate.go b/x/alloc/migrations/v3/migrate.go index 72c4347c..812e4632 100644 --- a/x/alloc/migrations/v3/migrate.go +++ b/x/alloc/migrations/v3/migrate.go @@ -1,6 +1,7 @@ package v3 import ( + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/x/alloc/exported" "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" "github.com/cosmos/cosmos-sdk/codec" @@ -19,7 +20,7 @@ var ParamsKey = []byte{0x00} // module state. func Migrate( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, legacySubspace exported.Subspace, cdc codec.BinaryCodec, ) error { diff --git a/x/alloc/migrations/v3/migrator_test.go b/x/alloc/migrations/v3/migrator_test.go index d6035a5e..e19c8e3c 100644 --- a/x/alloc/migrations/v3/migrator_test.go +++ b/x/alloc/migrations/v3/migrator_test.go @@ -3,6 +3,8 @@ package v3_test import ( "testing" + storetypes "cosmossdk.io/store/types" + "github.com/stretchr/testify/require" "github.com/OmniFlix/omniflixhub/v5/x/alloc" @@ -30,8 +32,8 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(alloc.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v3.ModuleName) - tKey := sdk.NewTransientStoreKey("transient_test") + storeKey := storetypes.NewKVStoreKey(v3.ModuleName) + tKey := storetypes.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) diff --git a/x/alloc/module.go b/x/alloc/module.go index c18f31e1..28f5d0fa 100644 --- a/x/alloc/module.go +++ b/x/alloc/module.go @@ -5,14 +5,14 @@ import ( "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" + "github.com/OmniFlix/omniflixhub/v5/x/alloc/exported" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/OmniFlix/omniflixhub/v5/x/alloc/client/cli" "github.com/OmniFlix/omniflixhub/v5/x/alloc/keeper" "github.com/OmniFlix/omniflixhub/v5/x/alloc/types" @@ -24,8 +24,11 @@ import ( ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModule = (*AppModule)(nil) + _ module.AppModuleBasic = (*AppModule)(nil) + _ module.HasGenesis = (*AppModule)(nil) + + _ appmodule.HasBeginBlocker = (*AppModule)(nil) ) // ---------------------------------------------------------------------------- @@ -44,6 +47,12 @@ func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType is a marker function just indicates that this is a one-per-module type. +func (am AppModule) IsOnePerModuleType() {} + // Name returns the alloc module's name. func (AppModuleBasic) Name() string { return types.ModuleName @@ -144,14 +153,12 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the alloc module's genesis initialization It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) InitGenesis(ctx, am.keeper, genState) - - return []abci.ValidatorUpdate{} } // ExportGenesis returns the alloc module's exported genesis state as raw JSON bytes. @@ -164,12 +171,8 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // BeginBlock executes all ABCI BeginBlock logic respective to the alloc module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctxx context.Context) error { + ctx := sdk.UnwrapSDKContext(ctxx) BeginBlocker(ctx, am.keeper) -} - -// EndBlock executes all ABCI EndBlock logic respective to the alloc module. It -// returns no validator updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} + return nil } diff --git a/x/alloc/types/codec.go b/x/alloc/types/codec.go index 61c38b59..5844bd0a 100644 --- a/x/alloc/types/codec.go +++ b/x/alloc/types/codec.go @@ -4,28 +4,10 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" ) -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) - - // Register all Amino interfaces and concrete types on the authz Amino codec - // so that this can later be used to properly serialize MsgGrant and MsgExec - // instances. - RegisterLegacyAminoCodec(authzcodec.Amino) -} - // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(Params{}, "OmniFlix/alloc/Params", nil) diff --git a/x/alloc/types/expected_keepers.go b/x/alloc/types/expected_keepers.go index 4793dc14..a283a583 100644 --- a/x/alloc/types/expected_keepers.go +++ b/x/alloc/types/expected_keepers.go @@ -1,35 +1,36 @@ package types import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type AccountKeeper interface { - NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI - NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + NewAccount(context.Context, sdk.AccountI) sdk.AccountI + NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - SetAccount(ctx sdk.Context, acc authtypes.AccountI) + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + SetAccount(ctx context.Context, acc sdk.AccountI) - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI GetModuleAddress(name string) sdk.AccAddress } type BankKeeper interface { - IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error - SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error + IsSendEnabledCoins(ctx context.Context, coins ...sdk.Coin) error + SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error BlockedAddr(addr sdk.AccAddress) bool - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins } type StakingKeeper interface { // BondDenom - Bondable coin denomination - BondDenom(sdk.Context) string + BondDenom(context.Context) (string, error) } type DistrKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } diff --git a/x/alloc/types/msgs.go b/x/alloc/types/msgs.go index e0ce8a24..045040cc 100644 --- a/x/alloc/types/msgs.go +++ b/x/alloc/types/msgs.go @@ -8,11 +8,6 @@ import ( var _ sdk.Msg = &MsgUpdateParams{} -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) diff --git a/x/alloc/types/params.go b/x/alloc/types/params.go index d442b86a..4c5c3f1d 100644 --- a/x/alloc/types/params.go +++ b/x/alloc/types/params.go @@ -1,8 +1,6 @@ package types -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) +import sdkmath "cosmossdk.io/math" func NewParams( distrProportions DistributionProportions, @@ -22,11 +20,11 @@ func NewParams( func DefaultParams() Params { return Params{ DistributionProportions: DistributionProportions{ - StakingRewards: sdk.NewDecWithPrec(60, 2), // 60% - NftIncentives: sdk.NewDecWithPrec(15, 2), // 15% - NodeHostsIncentives: sdk.NewDecWithPrec(5, 2), // 5% - DeveloperRewards: sdk.NewDecWithPrec(15, 2), // 15% - CommunityPool: sdk.NewDecWithPrec(5, 2), // 5% + StakingRewards: sdkmath.LegacyNewDecWithPrec(60, 2), // 60% + NftIncentives: sdkmath.LegacyNewDecWithPrec(15, 2), // 15% + NodeHostsIncentives: sdkmath.LegacyNewDecWithPrec(5, 2), // 5% + DeveloperRewards: sdkmath.LegacyNewDecWithPrec(15, 2), // 15% + CommunityPool: sdkmath.LegacyNewDecWithPrec(5, 2), // 5% }, WeightedDeveloperRewardsReceivers: []WeightedAddress(nil), WeightedNftIncentivesReceivers: []WeightedAddress(nil), diff --git a/x/alloc/types/params.pb.go b/x/alloc/types/params.pb.go index f87b55f5..0f5b63be 100644 --- a/x/alloc/types/params.pb.go +++ b/x/alloc/types/params.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -25,8 +25,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type WeightedAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight" yaml:"weight"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight" yaml:"weight"` } func (m *WeightedAddress) Reset() { *m = WeightedAddress{} } @@ -70,11 +70,11 @@ func (m *WeightedAddress) GetAddress() string { } type DistributionProportions struct { - StakingRewards github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=staking_rewards,json=stakingRewards,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_rewards" yaml:"staking_rewards"` - NftIncentives github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=nft_incentives,json=nftIncentives,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"nft_incentives" yaml:"nft_incentives"` - NodeHostsIncentives github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=node_hosts_incentives,json=nodeHostsIncentives,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"node_hosts_incentives" yaml:"node_hosts_incentives"` - DeveloperRewards github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=developer_rewards,json=developerRewards,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"developer_rewards" yaml:"developer_rewards"` - CommunityPool github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=community_pool,json=communityPool,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_pool" yaml:"community_pool"` + StakingRewards cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=staking_rewards,json=stakingRewards,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"staking_rewards" yaml:"staking_rewards"` + NftIncentives cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=nft_incentives,json=nftIncentives,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"nft_incentives" yaml:"nft_incentives"` + NodeHostsIncentives cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=node_hosts_incentives,json=nodeHostsIncentives,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"node_hosts_incentives" yaml:"node_hosts_incentives"` + DeveloperRewards cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=developer_rewards,json=developerRewards,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"developer_rewards" yaml:"developer_rewards"` + CommunityPool cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=community_pool,json=communityPool,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"community_pool" yaml:"community_pool"` } func (m *DistributionProportions) Reset() { *m = DistributionProportions{} } @@ -193,46 +193,46 @@ func init() { } var fileDescriptor_daf6c8a7183c717a = []byte{ - // 609 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x3f, 0x6f, 0xd3, 0x40, - 0x1c, 0x8d, 0x69, 0x1a, 0xc4, 0x55, 0x49, 0xc1, 0xd0, 0x36, 0x42, 0xc8, 0x81, 0x03, 0x41, 0x24, - 0xc0, 0xee, 0x1f, 0x21, 0x24, 0x16, 0x44, 0x14, 0x41, 0xe9, 0x10, 0xa2, 0x5b, 0x2a, 0xb1, 0x58, - 0x8e, 0x7d, 0x49, 0x4e, 0xb5, 0x7d, 0xe6, 0xee, 0x92, 0x34, 0x2b, 0x33, 0x03, 0x23, 0x1f, 0x80, - 0x95, 0x9d, 0x8f, 0xd0, 0xb1, 0x23, 0x62, 0x88, 0x50, 0xb2, 0x31, 0xe6, 0x13, 0x20, 0xff, 0x8d, - 0xf3, 0xaf, 0x92, 0xc5, 0x94, 0xf3, 0x2f, 0x4f, 0xef, 0xbd, 0xfc, 0xfc, 0x5e, 0x0e, 0x3c, 0xfc, - 0xe0, 0xb8, 0xe4, 0xad, 0x4d, 0xce, 0x35, 0xc3, 0xb6, 0xa9, 0xa9, 0xf5, 0x0f, 0x5a, 0x58, 0x18, - 0x07, 0x9a, 0x67, 0x30, 0xc3, 0xe1, 0xaa, 0xc7, 0xa8, 0xa0, 0xf2, 0x6e, 0x0c, 0x52, 0x03, 0x90, - 0x1a, 0x81, 0xee, 0xde, 0xe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0xc8, 0x66, - 0x76, 0x3f, 0x32, 0x5b, 0x5d, 0x30, 0xbb, 0x8e, 0x1f, 0x22, 0x25, 0xc6, 0x34, 0xd2, 0xc5, 0x99, - 0xd9, 0xfc, 0x29, 0x81, 0xea, 0x8c, 0x66, 0x55, 0xea, 0x53, 0x6e, 0xf3, 0xd9, 0xdc, 0xbe, 0x8c, - 0xdc, 0x6a, 0x8b, 0x6e, 0xaf, 0x96, 0x81, 0x28, 0x79, 0xd1, 0x8d, 0xe5, 0xba, 0x25, 0xd6, 0x6b, - 0x27, 0x17, 0x63, 0x45, 0xba, 0x1c, 0x2b, 0xd2, 0x9f, 0xb1, 0x22, 0x7d, 0x9d, 0x28, 0xb9, 0xcb, - 0x89, 0x92, 0xfb, 0x35, 0x51, 0x72, 0x1f, 0xf7, 0x53, 0xc1, 0x4f, 0xae, 0x03, 0xea, 0xb8, 0xa4, - 0x6d, 0x93, 0xf3, 0x6e, 0xaf, 0xa5, 0xf5, 0x5f, 0x68, 0xf1, 0xfd, 0x10, 0xd4, 0xa0, 0x55, 0x08, - 0xfe, 0xe9, 0x8f, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x38, 0x5f, 0xdf, 0x3e, 0x06, 0x00, - 0x00, + // 613 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdd, 0x8a, 0xd3, 0x4e, + 0x18, 0xc6, 0x9b, 0x7f, 0xbb, 0xfd, 0xe3, 0x2c, 0xed, 0x6a, 0x74, 0x77, 0x8b, 0x4a, 0xaa, 0xa3, + 0x60, 0x41, 0x49, 0xf6, 0x43, 0x11, 0x44, 0x11, 0x6b, 0x11, 0x95, 0x65, 0x2d, 0x73, 0x22, 0x78, + 0x12, 0xd2, 0x64, 0x9a, 0x0e, 0x9b, 0x64, 0xc2, 0xcc, 0xb4, 0xdd, 0xde, 0x83, 0x82, 0x17, 0xe1,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 0x46, 0x7d, 0xca, 0x82, 0x13, 0x97, 0xdb, 0x60, 0x8b, 0x0b, + 0xe3, 0x84, 0x78, 0xb6, 0xce, 0x70, 0xdf, 0x60, 0x56, 0x92, 0xef, 0xc5, 0x7a, 0xc8, 0x9d, 0x08, + 0x39, 0xe7, 0x01, 0x51, 0x39, 0xae, 0xa0, 0xa8, 0x20, 0x9b, 0xa0, 0xec, 0xb5, 0x85, 0x4e, 0x3c, + 0x13, 0x7b, 0x82, 0xf4, 0x30, 0x8f, 0xdf, 0xec, 0xf9, 0x7a, 0x98, 0xed, 0x08, 0x33, 0x6b, 0x01, + 0x51, 0xc9, 0x6b, 0x8b, 0x77, 0xe9, 0xb3, 0xdc, 0x07, 0xdb, 0x1e, 0xb5, 0xb0, 0xde, 0xa1, 0x5c, + 0xf0, 0x2c, 0x2b, 0x1f, 0xb2, 0x5e, 0xaf, 0xc7, 0xba, 0x1d, 0xb3, 0x96, 0x39, 0x41, 0x74, 0x3d, + 0xa8, 0xbf, 0x0d, 0xca, 0x19, 0xb0, 0x03, 0xae, 0x59, 0xb8, 0x87, 0x1d, 0xea, 0x63, 0x96, 0xf6, + 0xb1, 0x10, 0x42, 0x5f, 0xae, 0x07, 0xad, 0x44, 0xd0, 0x05, 0x17, 0x88, 0xae, 0xa6, 0xb5, 0x4c, + 0x2f, 0x4d, 0xea, 0xba, 0x5d, 0x8f, 0x88, 0x81, 0xee, 0x53, 0xea, 0x54, 0x36, 0xfe, 0xa1, 0x97, + 0xb3, 0x16, 0x10, 0x95, 0xd2, 0x42, 0x33, 0x78, 0xfe, 0xbc, 0x01, 0x8a, 0xcd, 0x70, 0x07, 0x64, + 0x1f, 0x54, 0xac, 0xcc, 0xf8, 0xe8, 0xfe, 0x74, 0x7e, 0xc2, 0x61, 0xd9, 0x3c, 0xd0, 0xd4, 0xe5, + 0x0b, 0xa2, 0xae, 0x18, 0xbb, 0x7a, 0x21, 0x88, 0x8a, 0x76, 0xad, 0x15, 0x53, 0xf9, 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, } func (m *WeightedAddress) Marshal() (dAtA []byte, err error) { diff --git a/x/alloc/types/params_legacy.go b/x/alloc/types/params_legacy.go index 758bad26..1470e6ed 100644 --- a/x/alloc/types/params_legacy.go +++ b/x/alloc/types/params_legacy.go @@ -4,6 +4,8 @@ import ( "errors" "fmt" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) @@ -71,7 +73,7 @@ func validateDistributionProportions(i interface{}) error { totalProportions := v.StakingRewards.Add(v.NftIncentives).Add(v.NodeHostsIncentives).Add(v.DeveloperRewards).Add(v.CommunityPool) - if !totalProportions.Equal(sdk.NewDec(1)) { + if !totalProportions.Equal(sdkmath.LegacyNewDec(1)) { return errors.New("total distributions ratio should be equal to 100%") } @@ -89,7 +91,7 @@ func validateWeightedAddresses(i interface{}) error { return nil } - weightSum := sdk.NewDec(0) + weightSum := sdkmath.LegacyNewDec(0) for i, w := range v { // we allow address to be "" to go to community pool if w.Address != "" { @@ -101,13 +103,13 @@ func validateWeightedAddresses(i interface{}) error { if !w.Weight.IsPositive() { return fmt.Errorf("non-positive weight at %dth", i) } - if w.Weight.GT(sdk.NewDec(1)) { + if w.Weight.GT(sdkmath.LegacyNewDec(1)) { return fmt.Errorf("more than 1 weight at %dth", i) } weightSum = weightSum.Add(w.Weight) } - if !weightSum.Equal(sdk.NewDec(1)) { + if !weightSum.Equal(sdkmath.LegacyNewDec(1)) { return fmt.Errorf("invalid weight sum: %s", weightSum.String()) } diff --git a/x/globalfee/ante/fee.go b/x/globalfee/ante/fee.go index 6228a227..972702b7 100644 --- a/x/globalfee/ante/fee.go +++ b/x/globalfee/ante/fee.go @@ -3,6 +3,8 @@ package ante import ( "errors" + sdkmath "cosmossdk.io/math" + tmstrings "github.com/cometbft/cometbft/libs/strings" errorsmod "cosmossdk.io/errors" @@ -158,7 +160,7 @@ func (mfd FeeDecorator) GetGlobalFee(ctx sdk.Context, feeTx sdk.FeeTx) (sdk.Coin requiredGlobalFees := make(sdk.Coins, len(globalMinGasPrices)) // Determine the required fees by multiplying each required minimum gas // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). - glDec := sdk.NewDec(int64(feeTx.GetGas())) + glDec := sdkmath.LegacyNewDec(int64(feeTx.GetGas())) for i, gp := range globalMinGasPrices { fee := gp.Amount.Mul(glDec) requiredGlobalFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) @@ -173,11 +175,12 @@ func (mfd FeeDecorator) DefaultZeroGlobalFee(ctx sdk.Context) ([]sdk.DecCoin, er return nil, errors.New("empty staking bond denomination") } - return []sdk.DecCoin{sdk.NewDecCoinFromDec(bondDenom, sdk.NewDec(0))}, nil + return []sdk.DecCoin{sdk.NewDecCoinFromDec(bondDenom, sdkmath.LegacyNewDec(0))}, nil } func (mfd FeeDecorator) getBondDenom(ctx sdk.Context) string { - return mfd.StakingKeeper.BondDenom(ctx) + bondDenom, _ := mfd.StakingKeeper.BondDenom(ctx) + return bondDenom } // ContainsOnlyBypassMinFeeMsgs returns true if all the given msgs type are listed @@ -205,7 +208,7 @@ func GetMinGasPrice(ctx sdk.Context, gasLimit int64) sdk.Coins { requiredFees := make(sdk.Coins, len(minGasPrices)) // Determine the required fees by multiplying each required minimum gas // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). - glDec := sdk.NewDec(gasLimit) + glDec := sdkmath.LegacyNewDec(gasLimit) for i, gp := range minGasPrices { fee := gp.Amount.Mul(glDec) requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) diff --git a/x/globalfee/ante/fee_utils_test.go b/x/globalfee/ante/fee_utils_test.go index 85552046..86d56db8 100644 --- a/x/globalfee/ante/fee_utils_test.go +++ b/x/globalfee/ante/fee_utils_test.go @@ -3,17 +3,19 @@ package ante import ( "testing" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" ) func TestContainZeroCoins(t *testing.T) { - zeroCoin1 := sdk.NewCoin("photon", sdk.ZeroInt()) - zeroCoin2 := sdk.NewCoin("uflix", sdk.ZeroInt()) - coin1 := sdk.NewCoin("photon", sdk.NewInt(1)) - coin2 := sdk.NewCoin("uflix", sdk.NewInt(2)) - coin3 := sdk.NewCoin("quark", sdk.NewInt(3)) + zeroCoin1 := sdk.NewCoin("photon", sdkmath.ZeroInt()) + zeroCoin2 := sdk.NewCoin("uflix", sdkmath.ZeroInt()) + coin1 := sdk.NewCoin("photon", sdkmath.NewInt(1)) + coin2 := sdk.NewCoin("uflix", sdkmath.NewInt(2)) + coin3 := sdk.NewCoin("quark", sdkmath.NewInt(3)) // coins must be valid !!! coinsEmpty := sdk.Coins{} coinsNonEmpty := sdk.Coins{coin1, coin2} @@ -57,15 +59,15 @@ func TestContainZeroCoins(t *testing.T) { // This sanitizing happens when the minGasPrice is set into the context. // (see baseapp.SetMinGasPrices in gaia/cmd/root.go line 221) func TestCombinedFeeRequirement(t *testing.T) { - zeroCoin1 := sdk.NewCoin("photon", sdk.ZeroInt()) - zeroCoin2 := sdk.NewCoin("stake", sdk.ZeroInt()) - zeroCoin3 := sdk.NewCoin("quark", sdk.ZeroInt()) - coin1 := sdk.NewCoin("photon", sdk.NewInt(1)) - coin2 := sdk.NewCoin("stake", sdk.NewInt(2)) - coin1High := sdk.NewCoin("photon", sdk.NewInt(10)) - coin2High := sdk.NewCoin("stake", sdk.NewInt(20)) - coinNewDenom1 := sdk.NewCoin("Newphoton", sdk.NewInt(1)) - coinNewDenom2 := sdk.NewCoin("Newstake", sdk.NewInt(1)) + zeroCoin1 := sdk.NewCoin("photon", sdkmath.ZeroInt()) + zeroCoin2 := sdk.NewCoin("stake", sdkmath.ZeroInt()) + zeroCoin3 := sdk.NewCoin("quark", sdkmath.ZeroInt()) + coin1 := sdk.NewCoin("photon", sdkmath.NewInt(1)) + coin2 := sdk.NewCoin("stake", sdkmath.NewInt(2)) + coin1High := sdk.NewCoin("photon", sdkmath.NewInt(10)) + coin2High := sdk.NewCoin("stake", sdkmath.NewInt(20)) + coinNewDenom1 := sdk.NewCoin("Newphoton", sdkmath.NewInt(1)) + coinNewDenom2 := sdk.NewCoin("Newstake", sdkmath.NewInt(1)) // coins must be valid !!! and sorted!!! coinsEmpty := sdk.Coins{} coinsNonEmpty := sdk.Coins{coin1, coin2}.Sort() @@ -175,8 +177,8 @@ func TestSplitCoinsByDenoms(t *testing.T) { "stake": true, } - photon := sdk.NewCoin("photon", sdk.OneInt()) - uatom := sdk.NewCoin("uatom", sdk.OneInt()) + photon := sdk.NewCoin("photon", sdkmath.OneInt()) + uatom := sdk.NewCoin("uatom", sdkmath.OneInt()) feeCoins := sdk.NewCoins(photon, uatom) tests := map[string]struct { @@ -227,10 +229,10 @@ func TestSplitCoinsByDenoms(t *testing.T) { } func TestSplitGlobalFees(t *testing.T) { - photon0 := sdk.NewCoin("photon", sdk.ZeroInt()) - uatom0 := sdk.NewCoin("uatom", sdk.ZeroInt()) - photon1 := sdk.NewCoin("photon", sdk.OneInt()) - uatom1 := sdk.NewCoin("uatom", sdk.OneInt()) + photon0 := sdk.NewCoin("photon", sdkmath.ZeroInt()) + uatom0 := sdk.NewCoin("uatom", sdkmath.ZeroInt()) + photon1 := sdk.NewCoin("photon", sdkmath.OneInt()) + uatom1 := sdk.NewCoin("uatom", sdkmath.OneInt()) globalFeesEmpty := sdk.Coins{} globalFees := sdk.Coins{photon1, uatom1}.Sort() @@ -272,7 +274,7 @@ func TestSplitGlobalFees(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { nonZeroCoins, zeroCoinsMap := getNonZeroFees(test.globalfees) - require.True(t, nonZeroCoins.IsEqual(test.globalfeesNonZero)) + require.True(t, nonZeroCoins.Equal(test.globalfeesNonZero)) require.True(t, equalMap(zeroCoinsMap, test.zeroGlobalFeesDenom)) }) } diff --git a/x/globalfee/genesis_test.go b/x/globalfee/genesis_test.go index 504ba0ce..09b39c5b 100644 --- a/x/globalfee/genesis_test.go +++ b/x/globalfee/genesis_test.go @@ -4,16 +4,19 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + "cosmossdk.io/store" + metrics2 "cosmossdk.io/store/metrics" + storetypes "cosmossdk.io/store/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" appparams "github.com/OmniFlix/omniflixhub/v5/app/params" globalfeekeeper "github.com/OmniFlix/omniflixhub/v5/x/globalfee/keeper" @@ -83,7 +86,7 @@ func TestInitExportGenesis(t *testing.T) { src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}],"bypass_min_fee_msg_types":[],"max_total_bypass_min_fee_msg_gas_usage":"0"}}`, exp: types.GenesisState{ Params: types.Params{ - MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1))), + MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdkmath.NewInt(1))), BypassMinFeeMsgTypes: []string{}, MaxTotalBypassMinFeeMsgGasUsage: uint64(0), }, @@ -94,8 +97,8 @@ func TestInitExportGenesis(t *testing.T) { exp: types.GenesisState{ Params: types.Params{ MinimumGasPrices: sdk.NewDecCoins( - sdk.NewDecCoin("ALX", sdk.NewInt(1)), - sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)), + sdk.NewDecCoin("ALX", sdkmath.NewInt(1)), + sdk.NewDecCoinFromDec("BLX", sdkmath.LegacyNewDecWithPrec(1, 3)), ), BypassMinFeeMsgTypes: []string{}, MaxTotalBypassMinFeeMsgGasUsage: uint64(0), @@ -130,18 +133,21 @@ func TestInitExportGenesis(t *testing.T) { func setupTestStore(t *testing.T) (sdk.Context, appparams.EncodingConfig, globalfeekeeper.Keeper) { t.Helper() db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) + ms := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics2.NewNoOpMetrics()) encCfg := appparams.MakeEncodingConfig() - keyParams := sdk.NewKVStoreKey(types.StoreKey) + keyParams := storetypes.NewKVStoreKey(paramstypes.StoreKey) + globalfeeKeyStore := storetypes.NewKVStoreKey(types.StoreKey) + tkeyParams := storetypes.NewTransientStoreKey(paramstypes.TStoreKey) ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) + ms.MountStoreWithDB(globalfeeKeyStore, storetypes.StoreTypeIAVL, db) + ms.MountStoreWithDB(tkeyParams, storetypes.StoreTypeTransient, db) require.NoError(t, ms.LoadLatestVersion()) - globalfeeKeeper := globalfeekeeper.NewKeeper(encCfg.Marshaler, keyParams, "omniflix1llyd96levrglxhw6sczgk9wn48t64zkhv4fq0r") + globalfeeKeeper := globalfeekeeper.NewKeeper(encCfg.Marshaler, globalfeeKeyStore, "") ctx := sdk.NewContext(ms, tmproto.Header{ - Height: 1234567, - Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), - ChainID: "testing", + Height: 1234567, + Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), }, false, log.NewNopLogger()) return ctx, encCfg, globalfeeKeeper diff --git a/x/globalfee/keeper/grpc_query_test.go b/x/globalfee/keeper/grpc_query_test.go index 0acbc6f2..e761ee56 100644 --- a/x/globalfee/keeper/grpc_query_test.go +++ b/x/globalfee/keeper/grpc_query_test.go @@ -3,6 +3,8 @@ package keeper_test import ( "testing" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -20,20 +22,20 @@ func TestQueryGlobalFeeParamMinGasPrices(t *testing.T) { "single fee coin": { setupStore: func(ctx sdk.Context, k globalfeekeeper.Keeper) { err := k.SetParams(ctx, types.Params{ - MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdk.OneInt())), + MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdkmath.OneInt())), }) require.NoError(t, err) }, - expMin: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdk.OneInt())), + expMin: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdkmath.OneInt())), }, "multiple fee coins": { setupStore: func(ctx sdk.Context, k globalfeekeeper.Keeper) { err := k.SetParams(ctx, types.Params{ - MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdk.OneInt()), sdk.NewDecCoin("test", sdk.NewInt(2))), + MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdkmath.OneInt()), sdk.NewDecCoin("test", sdkmath.NewInt(2))), }) require.NoError(t, err) }, - expMin: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdk.OneInt()), sdk.NewDecCoin("test", sdk.NewInt(2))), + expMin: sdk.NewDecCoins(sdk.NewDecCoin("uflix", sdkmath.OneInt()), sdk.NewDecCoin("test", sdkmath.NewInt(2))), }, "no coins": { setupStore: func(ctx sdk.Context, k globalfeekeeper.Keeper) { @@ -51,7 +53,7 @@ func TestQueryGlobalFeeParamMinGasPrices(t *testing.T) { ctx, _, keeper := setupTestStore(t) spec.setupStore(ctx, keeper) q := globalfeekeeper.NewGrpcQuerier(keeper) - gotResp, gotErr := q.Params(sdk.WrapSDKContext(ctx), nil) + gotResp, gotErr := q.Params(ctx, nil) require.NoError(t, gotErr) require.NotNil(t, gotResp) assert.Equal(t, spec.expMin, gotResp.Params.MinimumGasPrices) diff --git a/x/globalfee/keeper/keeper.go b/x/globalfee/keeper/keeper.go index 3ffd2286..f9fd2aef 100644 --- a/x/globalfee/keeper/keeper.go +++ b/x/globalfee/keeper/keeper.go @@ -1,8 +1,8 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/OmniFlix/omniflixhub/v5/x/globalfee/types" diff --git a/x/globalfee/keeper/keeper_test.go b/x/globalfee/keeper/keeper_test.go index 07388835..9d314953 100644 --- a/x/globalfee/keeper/keeper_test.go +++ b/x/globalfee/keeper/keeper_test.go @@ -4,14 +4,15 @@ import ( "testing" "time" + "cosmossdk.io/log" + "cosmossdk.io/store/metrics" + rootmulti "cosmossdk.io/store/rootmulti" + storetypes "cosmossdk.io/store/types" appparams "github.com/OmniFlix/omniflixhub/v5/app/params" globalfeekeeper "github.com/OmniFlix/omniflixhub/v5/x/globalfee/keeper" "github.com/OmniFlix/omniflixhub/v5/x/globalfee/types" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) @@ -19,9 +20,10 @@ import ( func setupTestStore(t *testing.T) (sdk.Context, appparams.EncodingConfig, globalfeekeeper.Keeper) { t.Helper() db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) + logger := log.NewNopLogger() + ms := rootmulti.NewStore(db, logger, metrics.NewNoOpMetrics()) encCfg := appparams.MakeEncodingConfig() - keyParams := sdk.NewKVStoreKey(types.StoreKey) + keyParams := storetypes.NewKVStoreKey(types.StoreKey) ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) require.NoError(t, ms.LoadLatestVersion()) diff --git a/x/globalfee/module.go b/x/globalfee/module.go index e56a7aa6..49ccb73e 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -3,7 +3,6 @@ package globalfee import ( "context" "encoding/json" - "fmt" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -35,6 +34,12 @@ type AppModuleBasic struct { cdc codec.Codec } +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType is a marker function just indicates that this is a one-per-module type. +func (am AppModule) IsOnePerModuleType() {} + func (am AppModuleBasic) Name() string { return types.ModuleName } @@ -103,7 +108,6 @@ func NewAppModule( func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(gs, &genesisState) - fmt.Println(genesisState) if err := am.keeper.SetParams(ctx, genesisState.Params); err != nil { panic(err) } @@ -111,10 +115,9 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra } func (am AppModule) ExportGenesis(ctx sdk.Context, marshaller codec.JSONCodec) json.RawMessage { - genState := &types.GenesisState{ - Params: am.keeper.GetParams(ctx), - } - return marshaller.MustMarshalJSON(genState) + var genState types.GenesisState + genState.Params = am.keeper.GetParams(ctx) + return marshaller.MustMarshalJSON(&genState) } func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) { @@ -129,11 +132,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), keeper.NewGrpcQuerier(am.keeper)) } -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ context.Context) error { + return nil } -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return nil +func (am AppModule) EndBlock(_ context.Context) ([]abci.ValidatorUpdate, error) { + return []abci.ValidatorUpdate{}, nil } // ConsensusVersion is a sequence number for state-breaking change of the diff --git a/x/globalfee/types/codec.go b/x/globalfee/types/codec.go index 93c4d5be..b68442af 100644 --- a/x/globalfee/types/codec.go +++ b/x/globalfee/types/codec.go @@ -4,30 +4,10 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" ) -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) - - // Register all Amino interfaces and concrete types on the authz Amino codec - // so that this can later be used to properly serialize MsgGrant and MsgExec - // instances. - RegisterLegacyAminoCodec(authzcodec.Amino) - RegisterLegacyAminoCodec(govcodec.Amino) -} - // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(Params{}, "OmniFlix/globalfee/Params", nil) diff --git a/x/globalfee/types/msgs.go b/x/globalfee/types/msgs.go index e0ce8a24..045040cc 100644 --- a/x/globalfee/types/msgs.go +++ b/x/globalfee/types/msgs.go @@ -8,11 +8,6 @@ import ( var _ sdk.Msg = &MsgUpdateParams{} -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) diff --git a/x/globalfee/types/params_test.go b/x/globalfee/types/params_test.go index f03b3bfa..e01ba40b 100644 --- a/x/globalfee/types/params_test.go +++ b/x/globalfee/types/params_test.go @@ -3,6 +3,8 @@ package types import ( "testing" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,39 +25,39 @@ func Test_validateParams(t *testing.T) { false, }, "DecCoins conversion fails, fail": { - sdk.Coins{sdk.NewCoin("photon", sdk.OneInt())}, + sdk.Coins{sdk.NewCoin("photon", sdkmath.OneInt())}, true, }, "coins amounts are zero, pass": { sdk.DecCoins{ - sdk.NewDecCoin("atom", sdk.ZeroInt()), - sdk.NewDecCoin("photon", sdk.ZeroInt()), + sdk.NewDecCoin("atom", sdkmath.ZeroInt()), + sdk.NewDecCoin("photon", sdkmath.ZeroInt()), }, false, }, "duplicate coins denoms, fail": { sdk.DecCoins{ - sdk.NewDecCoin("photon", sdk.OneInt()), - sdk.NewDecCoin("photon", sdk.OneInt()), + sdk.NewDecCoin("photon", sdkmath.OneInt()), + sdk.NewDecCoin("photon", sdkmath.OneInt()), }, true, }, "coins are not sorted by denom alphabetically, fail": { sdk.DecCoins{ - sdk.NewDecCoin("photon", sdk.OneInt()), - sdk.NewDecCoin("atom", sdk.OneInt()), + sdk.NewDecCoin("photon", sdkmath.OneInt()), + sdk.NewDecCoin("atom", sdkmath.OneInt()), }, true, }, "negative amount, fail": { sdk.DecCoins{ - sdk.DecCoin{Denom: "photon", Amount: sdk.OneDec().Neg()}, + sdk.DecCoin{Denom: "photon", Amount: sdkmath.LegacyOneDec().Neg()}, }, true, }, "invalid denom, fail": { sdk.DecCoins{ - sdk.DecCoin{Denom: "photon!", Amount: sdk.OneDec().Neg()}, + sdk.DecCoin{Denom: "photon!", Amount: sdkmath.LegacyOneDec().Neg()}, }, true, }, diff --git a/x/ics721nft/interface.go b/x/ics721nft/interface.go index 15741772..3079b889 100644 --- a/x/ics721nft/interface.go +++ b/x/ics721nft/interface.go @@ -1,15 +1,16 @@ package ics721nft import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type ( // AccountKeeper defines the contract required for account APIs. AccountKeeper interface { - NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - SetAccount(sdk.Context, authtypes.AccountI) + NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + SetAccount(context.Context, sdk.AccountI) GetModuleAddress(name string) sdk.AccAddress } BankKeeper interface { diff --git a/x/ics721nft/keeper.go b/x/ics721nft/keeper.go index 723c5b4c..6733df43 100644 --- a/x/ics721nft/keeper.go +++ b/x/ics721nft/keeper.go @@ -3,18 +3,20 @@ package ics721nft import ( "errors" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + "cosmossdk.io/x/nft" + nftkeeper "cosmossdk.io/x/nft/keeper" onftkeeper "github.com/OmniFlix/omniflixhub/v5/x/onft/keeper" onfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types" nfttransfer "github.com/bianjieai/nft-transfer/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/nft" - nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" "github.com/cosmos/gogoproto/proto" ) @@ -202,7 +204,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { } func (k Keeper) validRoyaltyReceiverAddresses(addresses []*onfttypes.WeightedAddress) bool { - weightSum := sdk.NewDec(0) + weightSum := sdkmath.LegacyNewDec(0) for _, addr := range addresses { address, err := sdk.AccAddressFromBech32(addr.Address) if err != nil { @@ -214,10 +216,10 @@ func (k Keeper) validRoyaltyReceiverAddresses(addresses []*onfttypes.WeightedAdd if !addr.Weight.IsPositive() { return false } - if addr.Weight.GT(sdk.NewDec(1)) { + if addr.Weight.GT(sdkmath.LegacyNewDec(1)) { return false } weightSum = weightSum.Add(addr.Weight) } - return weightSum.Equal(sdk.NewDec(1)) + return weightSum.Equal(sdkmath.LegacyNewDec(1)) } diff --git a/x/itc/keeper/campaign.go b/x/itc/keeper/campaign.go index 44882345..36415394 100644 --- a/x/itc/keeper/campaign.go +++ b/x/itc/keeper/campaign.go @@ -4,6 +4,8 @@ import ( "crypto/sha256" "fmt" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" "github.com/OmniFlix/omniflixhub/v5/x/itc/types" @@ -70,7 +72,7 @@ func (k Keeper) CancelCampaign(ctx sdk.Context, campaignId uint64, creator sdk.A } // return funds - if campaign.AvailableTokens.IsValid() && campaign.AvailableTokens.Amount.GT(sdk.ZeroInt()) { + if campaign.AvailableTokens.IsValid() && campaign.AvailableTokens.Amount.GT(sdkmath.ZeroInt()) { if err := k.bankKeeper.SendCoinsFromModuleToAccount( ctx, types.ModuleName, diff --git a/x/itc/keeper/grpc_query.go b/x/itc/keeper/grpc_query.go index e6d2757c..6e72e8b9 100644 --- a/x/itc/keeper/grpc_query.go +++ b/x/itc/keeper/grpc_query.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/itc/keeper/itc.go b/x/itc/keeper/itc.go index bdf2d85e..0e1493c9 100644 --- a/x/itc/keeper/itc.go +++ b/x/itc/keeper/itc.go @@ -3,8 +3,11 @@ package keeper import ( "fmt" + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "cosmossdk.io/store/prefix" "github.com/OmniFlix/omniflixhub/v5/x/itc/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" gogotypes "github.com/cosmos/gogoproto/types" ) @@ -64,7 +67,7 @@ func (k Keeper) RemoveCampaign(ctx sdk.Context, id uint64) { // GetAllCampaigns returns all campaigns func (k Keeper) GetAllCampaigns(ctx sdk.Context) (list []types.Campaign) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, types.PrefixCampaignId) + iterator := storetypes.KVStorePrefixIterator(store, types.PrefixCampaignId) defer iterator.Close() @@ -80,7 +83,7 @@ func (k Keeper) GetAllCampaigns(ctx sdk.Context) (list []types.Campaign) { // GetCampaignsByCreator returns all campaigns created by specific address func (k Keeper) GetCampaignsByCreator(ctx sdk.Context, creator sdk.AccAddress) (campaigns []types.Campaign) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, append(types.PrefixCampaignCreator, creator.Bytes()...)) + iterator := storetypes.KVStorePrefixIterator(store, append(types.PrefixCampaignCreator, creator.Bytes()...)) defer iterator.Close() @@ -105,7 +108,7 @@ func (k Keeper) SetClaim(ctx sdk.Context, claim types.Claim) { func (k Keeper) GetClaims(ctx sdk.Context, campaignId uint64) (claims []types.Claim) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, + iterator := storetypes.KVStorePrefixIterator(store, append(types.PrefixClaimByNftId, sdk.Uint64ToBigEndian(campaignId)...)) defer iterator.Close() @@ -142,7 +145,7 @@ func (k Keeper) HasClaim(ctx sdk.Context, id uint64, nftId string) bool { func (k Keeper) RemoveClaims(ctx sdk.Context, campaignId uint64) { store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator( + iter := storetypes.KVStorePrefixIterator( prefix.NewStore(store, types.PrefixClaimByNftId), sdk.Uint64ToBigEndian(campaignId), ) @@ -157,7 +160,7 @@ func (k Keeper) RemoveClaims(ctx sdk.Context, campaignId uint64) { // FinalizeAndEndCampaigns finalizes and ends and all campaigns that are reached end time func (k Keeper) FinalizeAndEndCampaigns(ctx sdk.Context) error { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, types.PrefixCampaignId) + iterator := storetypes.KVStorePrefixIterator(store, types.PrefixCampaignId) defer iterator.Close() @@ -179,7 +182,7 @@ func (k Keeper) endCampaign(ctx sdk.Context, campaign types.Campaign) { // Transfer Remaining funds to creator availableTokens := campaign.AvailableTokens moduleAccAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) - if availableTokens.IsValid() && availableTokens.Amount != sdk.ZeroInt() { + if availableTokens.IsValid() && availableTokens.Amount != sdkmath.ZeroInt() { if err := k.bankKeeper.SendCoins(ctx, moduleAccAddr, campaign.GetCreator(), sdk.NewCoins(sdk.NewCoin(availableTokens.Denom, availableTokens.Amount))); err != nil { panic(err) diff --git a/x/itc/keeper/keeper.go b/x/itc/keeper/keeper.go index daa90343..e4d4fa3a 100644 --- a/x/itc/keeper/keeper.go +++ b/x/itc/keeper/keeper.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/OmniFlix/omniflixhub/v5/x/itc/types" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/itc/keeper/keeper_test.go b/x/itc/keeper/keeper_test.go index 566011e5..751af486 100644 --- a/x/itc/keeper/keeper_test.go +++ b/x/itc/keeper/keeper_test.go @@ -5,6 +5,8 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" + onftkeeper "github.com/OmniFlix/omniflixhub/v5/x/onft/keeper" onfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types" @@ -46,7 +48,7 @@ var ( MediaUri: "ipfs://minttesturi", PreviewUri: "ipfs://minttestpreviewuri", Data: "{}", - RoyaltyShare: sdk.NewDecWithPrec(1, 2), + RoyaltyShare: sdkmath.LegacyNewDecWithPrec(1, 2), Transferable: true, Extensible: true, Nsfw: false, @@ -76,7 +78,7 @@ func (suite *KeeperTestSuite) SetupTest() { func (suite *KeeperTestSuite) CreateDefaultCampaign() { suite.createDefaultNftDenom() _, err := suite.msgServer.CreateCampaign( - sdk.WrapSDKContext(suite.Ctx), + suite.Ctx, types.NewMsgCreateCampaign( defaultCampaignName, defaultCampaignDescription, @@ -106,7 +108,7 @@ func (suite *KeeperTestSuite) CreateSecondaryCampaign() { suite.createDefaultMintNftDenom() _, _ = suite.msgServer.CreateCampaign( - sdk.WrapSDKContext(suite.Ctx), + suite.Ctx, types.NewMsgCreateCampaign( secondaryCampaignName, secondaryCampaignDescription, @@ -144,14 +146,14 @@ func (suite *KeeperTestSuite) createDefaultNftDenom() { []*onfttypes.WeightedAddress{ { Address: suite.TestAccs[0].String(), - Weight: sdk.OneDec(), + Weight: sdkmath.LegacyOneDec(), }, }, ) createDenomMsg.Id = defaultNftDenomId _, _ = suite.nftMsgServer.CreateDenom( - sdk.WrapSDKContext(suite.Ctx), + suite.Ctx, createDenomMsg, ) } @@ -173,7 +175,7 @@ func (suite *KeeperTestSuite) createSecondaryNftDenom() { createDenomMsg.Id = secondaryNftDenomId _, _ = suite.nftMsgServer.CreateDenom( - sdk.WrapSDKContext(suite.Ctx), + suite.Ctx, createDenomMsg, ) } @@ -193,14 +195,14 @@ func (suite *KeeperTestSuite) createDefaultMintNftDenom() { []*onfttypes.WeightedAddress{ { Address: suite.TestAccs[0].String(), - Weight: sdk.OneDec(), + Weight: sdkmath.LegacyOneDec(), }, }, ) createDenomMsg.Id = defaultNftMintDenomId _, _ = suite.nftMsgServer.CreateDenom( - sdk.WrapSDKContext(suite.Ctx), + suite.Ctx, createDenomMsg, ) } @@ -220,11 +222,11 @@ func (suite *KeeperTestSuite) mintNFT(denomId, nftId string) { true, true, false, - sdk.NewDecWithPrec(1, 2), + sdkmath.LegacyNewDecWithPrec(1, 2), ) mintNftMsg.Id = nftId _, _ = suite.nftMsgServer.MintONFT( - sdk.WrapSDKContext(suite.Ctx), + suite.Ctx, mintNftMsg, ) } diff --git a/x/itc/keeper/msg_server_test.go b/x/itc/keeper/msg_server_test.go index ae505f62..d3be7f20 100644 --- a/x/itc/keeper/msg_server_test.go +++ b/x/itc/keeper/msg_server_test.go @@ -4,6 +4,8 @@ import ( "fmt" "time" + sdkmath "cosmossdk.io/math" + onfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -171,7 +173,7 @@ func (suite *KeeperTestSuite) TestCreateCampaign() { nftMintDetails: nil, distribution: &defaultDistribution, creator: suite.TestAccs[0].String(), - creationFee: types.DefaultCampaignCreationFee.SubAmount(sdk.NewInt(1_000_000)), + creationFee: types.DefaultCampaignCreationFee.SubAmount(sdkmath.NewInt(1_000_000)), valid: false, expectedMessageEvents: 0, expectedTransferEvents: 0, @@ -238,7 +240,7 @@ func (suite *KeeperTestSuite) TestCreateCampaign() { ) // Test create campaign message _, err := suite.msgServer.CreateCampaign( - sdk.WrapSDKContext(ctx), + ctx, createCampaignMsg, ) if tc.valid { @@ -300,7 +302,7 @@ func (suite *KeeperTestSuite) TestCancelCampaign() { ) _, err := suite.msgServer.CancelCampaign( - sdk.WrapSDKContext(ctx), + ctx, cancelCampaignMsg, ) @@ -421,7 +423,7 @@ func (suite *KeeperTestSuite) TestClaimCampaign() { ) _, err := suite.msgServer.Claim( - sdk.WrapSDKContext(ctx), + ctx, claimCampaignMsg, ) @@ -496,7 +498,7 @@ func (suite *KeeperTestSuite) TestDepositCampaign() { ) _, err := suite.msgServer.DepositCampaign( - sdk.WrapSDKContext(ctx), + ctx, depositCampaignMsg, ) @@ -528,7 +530,7 @@ func (suite *KeeperTestSuite) TestUpdateParams() { Authority: suite.App.ItcKeeper.GetAuthority(), Params: types.Params{ MaxCampaignDuration: types.DefaultMaxCampaignDuration, - CreationFee: sdk.NewCoin("foo", sdk.NewInt(0)), + CreationFee: sdk.NewCoin("foo", sdkmath.NewInt(0)), }, }, expectErr: true, diff --git a/x/itc/migrations/v2/migrate.go b/x/itc/migrations/v2/migrate.go index 8a407916..0ac79205 100644 --- a/x/itc/migrations/v2/migrate.go +++ b/x/itc/migrations/v2/migrate.go @@ -1,6 +1,7 @@ package v2 import ( + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/x/itc/exported" "github.com/OmniFlix/omniflixhub/v5/x/itc/types" "github.com/cosmos/cosmos-sdk/codec" @@ -19,7 +20,7 @@ var ParamsKey = []byte{0x12} // module state. func Migrate( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, legacySubspace exported.Subspace, cdc codec.BinaryCodec, ) error { diff --git a/x/itc/migrations/v2/migrator_test.go b/x/itc/migrations/v2/migrator_test.go index 4169c2a2..d9401921 100644 --- a/x/itc/migrations/v2/migrator_test.go +++ b/x/itc/migrations/v2/migrator_test.go @@ -3,6 +3,8 @@ package v2_test import ( "testing" + storetypes "cosmossdk.io/store/types" + "github.com/stretchr/testify/require" "github.com/OmniFlix/omniflixhub/v5/x/itc" @@ -30,8 +32,8 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(itc.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v2.ModuleName) - tKey := sdk.NewTransientStoreKey("transient_test") + storeKey := storetypes.NewKVStoreKey(v2.ModuleName) + tKey := storetypes.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) diff --git a/x/itc/module.go b/x/itc/module.go index ba1a246e..0be0f9ce 100644 --- a/x/itc/module.go +++ b/x/itc/module.go @@ -5,6 +5,8 @@ import ( "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" + "github.com/OmniFlix/omniflixhub/v5/x/itc/exported" "github.com/OmniFlix/omniflixhub/v5/x/itc/client/cli" @@ -25,7 +27,7 @@ import ( ) var ( - _ module.AppModule = AppModule{} + _ appmodule.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} ) @@ -45,6 +47,12 @@ func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType is a marker function just indicates that this is a one-per-module type. +func (am AppModule) IsOnePerModuleType() {} + // Name returns the itc module's name. func (AppModuleBasic) Name() string { return types.ModuleName @@ -156,12 +164,3 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } - -// BeginBlock executes all ABCI BeginBlock logic respective to the itc module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock executes all ABCI EndBlock logic respective to the itc module. It -// returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return EndBlock(ctx, am.keeper) -} diff --git a/x/itc/types/codec.go b/x/itc/types/codec.go index 82059e0f..5c25c3f9 100644 --- a/x/itc/types/codec.go +++ b/x/itc/types/codec.go @@ -5,11 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -43,20 +40,3 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } - -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) - - // Register all Amino interfaces and concrete types on the authz Amino codec - // so that this can later be used to properly serialize MsgGrant and MsgExec - // instances. - RegisterLegacyAminoCodec(authzcodec.Amino) - RegisterLegacyAminoCodec(govcodec.Amino) -} diff --git a/x/itc/types/expected_keepers.go b/x/itc/types/expected_keepers.go index a8dd9d4c..9a81c72a 100644 --- a/x/itc/types/expected_keepers.go +++ b/x/itc/types/expected_keepers.go @@ -1,29 +1,31 @@ package types import ( + "context" "time" + sdkmath "cosmossdk.io/math" + nft "github.com/OmniFlix/omniflixhub/v5/x/onft/exported" nfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types" streampaytypes "github.com/OmniFlix/streampay/v2/x/streampay/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the expected account keeper type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI GetModuleAddress(module string) sdk.AccAddress } // BankKeeper defines the expected bank keeper type BankKeeper interface { - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SendCoins(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Coins) error - SendCoinsFromModuleToAccount(ctx sdk.Context, formModule string, toAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, formModule string, toModule string, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, fromAddr sdk.AccAddress, toModule string, amt sdk.Coins) error + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoins(ctx context.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Coins) error + SendCoinsFromModuleToAccount(ctx context.Context, formModule string, toAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, formModule string, toModule string, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, fromAddr sdk.AccAddress, toModule string, amt sdk.Coins) error } // NftKeeper defines the expected nft keeper @@ -44,7 +46,7 @@ type NftKeeper interface { transferable, extensible, nsfw bool, - royaltyShare sdk.Dec, + royaltyShare sdkmath.LegacyDec, receiver sdk.AccAddress, ) error TransferOwnership(ctx sdk.Context, denomId, nftId string, srcOwner, dstOwner sdk.AccAddress) error @@ -65,5 +67,5 @@ type StreamPayKeeper interface { // DistributionKeeper defines the expected distribution keeper type DistributionKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } diff --git a/x/itc/types/itc.pb.go b/x/itc/types/itc.pb.go index d7cac811..c9dc32fa 100644 --- a/x/itc/types/itc.pb.go +++ b/x/itc/types/itc.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -232,19 +232,19 @@ func (m *Distribution) XXX_DiscardUnknown() { var xxx_messageInfo_Distribution proto.InternalMessageInfo type NFTDetails struct { - DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - MediaUri string `protobuf:"bytes,4,opt,name=media_uri,json=mediaUri,proto3" json:"media_uri,omitempty"` - PreviewUri string `protobuf:"bytes,5,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty"` - RoyaltyShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=royalty_share,json=royaltyShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"royalty_share" yaml:"royalty_share"` - Transferable bool `protobuf:"varint,7,opt,name=transferable,proto3" json:"transferable,omitempty"` - Extensible bool `protobuf:"varint,8,opt,name=extensible,proto3" json:"extensible,omitempty"` - Nsfw bool `protobuf:"varint,9,opt,name=nsfw,proto3" json:"nsfw,omitempty"` - Data string `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` - UriHash string `protobuf:"bytes,11,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` - StartIndex uint64 `protobuf:"varint,12,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"` - NameDelimiter string `protobuf:"bytes,13,opt,name=name_delimiter,json=nameDelimiter,proto3" json:"name_delimiter,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + MediaUri string `protobuf:"bytes,4,opt,name=media_uri,json=mediaUri,proto3" json:"media_uri,omitempty"` + PreviewUri string `protobuf:"bytes,5,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty"` + RoyaltyShare cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=royalty_share,json=royaltyShare,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"royalty_share" yaml:"royalty_share"` + Transferable bool `protobuf:"varint,7,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,8,opt,name=extensible,proto3" json:"extensible,omitempty"` + Nsfw bool `protobuf:"varint,9,opt,name=nsfw,proto3" json:"nsfw,omitempty"` + Data string `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` + UriHash string `protobuf:"bytes,11,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` + StartIndex uint64 `protobuf:"varint,12,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"` + NameDelimiter string `protobuf:"bytes,13,opt,name=name_delimiter,json=nameDelimiter,proto3" json:"name_delimiter,omitempty"` } func (m *NFTDetails) Reset() { *m = NFTDetails{} } @@ -334,86 +334,86 @@ func init() { func init() { proto.RegisterFile("OmniFlix/itc/v1/itc.proto", fileDescriptor_bab9913014645745) } var fileDescriptor_bab9913014645745 = []byte{ - // 1259 bytes of a gzipped FileDescriptorProto + // 1263 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0x1d, 0x3b, 0x96, 0x46, 0xb2, 0xac, 0x6c, 0xfe, 0x68, 0xbb, 0x96, 0x54, 0x02, 0x2d, - 0x0c, 0x03, 0xa5, 0xe0, 0xb4, 0x41, 0x91, 0xde, 0xf4, 0xdb, 0x10, 0x8d, 0x65, 0x63, 0x45, 0x17, - 0x4d, 0x2e, 0xc4, 0x4a, 0x5c, 0xd9, 0x0b, 0xf3, 0x47, 0x20, 0x57, 0x8a, 0xfd, 0x16, 0x01, 0x7a, - 0xe9, 0xa5, 0x8f, 0xd2, 0x7b, 0x8e, 0xb9, 0xb5, 0xe8, 0x41, 0x6d, 0x92, 0x37, 0xf0, 0x13, 0x14, - 0xbb, 0x4b, 0x5a, 0x8c, 0x5c, 0x34, 0x68, 0x4e, 0xda, 0xfd, 0x66, 0xe6, 0x9b, 0xe1, 0xec, 0xec, - 0xb7, 0x82, 0xad, 0x23, 0x3f, 0x60, 0x3d, 0x8f, 0x5d, 0x34, 0x18, 0x1f, 0x35, 0x66, 0x07, 0xe2, - 0xc7, 0x9c, 0x44, 0x21, 0x0f, 0xd1, 0x66, 0x6a, 0x32, 0x05, 0x36, 0x3b, 0xd8, 0xae, 0x8e, 0xc2, - 0xd8, 0x0f, 0xe3, 0xc6, 0x90, 0xc4, 0xb4, 0x31, 0x3b, 0x18, 0x52, 0x4e, 0x0e, 0x1a, 0xa3, 0x90, - 0x05, 0x2a, 0x60, 0xfb, 0xde, 0x69, 0x78, 0x1a, 0xca, 0x65, 0x43, 0xac, 0x12, 0xb4, 0x76, 0x1a, - 0x86, 0xa7, 0x1e, 0x6d, 0xc8, 0xdd, 0x70, 0x3a, 0x6e, 0x70, 0xe6, 0xd3, 0x98, 0x13, 0x7f, 0x92, - 0x38,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 0xa7, 0x49, 0xec, 0x2e, 0x14, 0x02, 0xea, 0x31, 0xe2, 0x4c, 0x62, + 0x26, 0x15, 0xb6, 0x80, 0xf3, 0x12, 0x38, 0x8f, 0x19, 0xaa, 0x42, 0x71, 0x1c, 0xd3, 0x29, 0xa3, + 0x2f, 0xa5, 0x79, 0x4d, 0x9a, 0x21, 0x85, 0x84, 0xc3, 0x4f, 0xb0, 0x19, 0x47, 0x97, 0xc4, 0xe7, + 0x97, 0x4e, 0x32, 0x22, 0x31, 0x55, 0xc2, 0xd7, 0xfc, 0x56, 0x7c, 0xce, 0x9f, 0xb3, 0xea, 0xae, + 0xba, 0x14, 0x89, 0xf7, 0xc2, 0x64, 0x51, 0x3d, 0x20, 0x7c, 0x64, 0x1e, 0xd3, 0x21, 0x71, 0x2f, + 0xdb, 0xd4, 0xbd, 0x9a, 0x55, 0xef, 0xa5, 0x93, 0xbc, 0xc8, 0x60, 0xe0, 0x8d, 0x74, 0xdf, 0x13, + 0x5b, 0x64, 0xc0, 0x06, 0x8f, 0x49, 0x98, 0x0c, 0x68, 0x2c, 0x6e, 0x88, 0x94, 0xce, 0x3c, 0xfe, + 0x00, 0x43, 0x15, 0x00, 0x7a, 0xc1, 0x69, 0x98, 0x30, 0xe1, 0x91, 0x97, 0x1e, 0x0b, 0x88, 0xec, + 0x4c, 0x32, 0x78, 0x29, 0xf5, 0x2e, 0x8f, 0xe5, 0x5a, 0x60, 0x1e, 0xe1, 0x44, 0x0a, 0x58, 0x01, + 0xcb, 0xb5, 0x68, 0xee, 0x24, 0x66, 0xce, 0x88, 0x24, 0x23, 0xa9, 0x4b, 0x05, 0xbc, 0x3e, 0x89, + 0xd9, 0x53, 0x92, 0x8c, 0x44, 0x27, 0xd4, 0x6b, 0xc2, 0x42, 0x8f, 0x5e, 0x48, 0x4d, 0x59, 0xc5, + 0xea, 0x71, 0xb2, 0x04, 0x82, 0xbe, 0x80, 0x92, 0xe8, 0xb8, 0xe3, 0x51, 0x9f, 0x05, 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0xc8, 0xea, 0xb4, 0x55, 0xe1, 0xcb, 0x0e, 0x56, 0x57, 0x50, 0xff, 0xd0, 0x29, 0x6b, 0x68, + 0x07, 0x1e, 0x2c, 0x5b, 0x53, 0xdb, 0xca, 0xc1, 0x09, 0x14, 0xae, 0x1f, 0x38, 0x74, 0x07, 0x36, + 0x5b, 0xc7, 0x0d, 0xeb, 0x44, 0x95, 0x73, 0x24, 0x5a, 0x82, 0xa0, 0xb4, 0x00, 0x75, 0x8f, 0x6c, + 0x55, 0xfb, 0x07, 0x6e, 0x4e, 0xa3, 0xdb, 0x96, 0xa6, 0x95, 0xe6, 0xd9, 0xeb, 0xb7, 0x95, 0xdc, + 0x9b, 0xb7, 0x95, 0xdc, 0xeb, 0x77, 0x15, 0xed, 0xcd, 0xbb, 0x8a, 0xf6, 0xf7, 0xbb, 0x8a, 0xf6, + 0xea, 0x7d, 0x25, 0xf7, 0xe6, 0x7d, 0x25, 0xf7, 0xc7, 0xfb, 0x4a, 0xee, 0xb9, 0x39, 0x64, 0x7c, + 0x34, 0xe9, 0x9b, 0x6e, 0x14, 0xd4, 0xaf, 0xff, 0x09, 0x46, 0x41, 0xc8, 0x06, 0x3e, 0xbb, 0x18, + 0x4d, 0xfa, 0xf5, 0xe9, 0xe3, 0xba, 0xfa, 0x6b, 0x28, 0x24, 0x28, 0xe9, 0xdf, 0x96, 0x12, 0xf3, + 0xe5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xae, 0x08, 0xed, 0x73, 0x37, 0x0a, 0x00, 0x00, } func (m *Campaign) Marshal() (dAtA []byte, err error) { diff --git a/x/itc/types/msgs.go b/x/itc/types/msgs.go index 0c726020..caca382f 100644 --- a/x/itc/types/msgs.go +++ b/x/itc/types/msgs.go @@ -108,11 +108,6 @@ func (msg MsgCreateCampaign) ValidateBasic() error { return msg.CreationFee.Validate() } -// GetSignBytes Implements Msg. -func (msg *MsgCreateCampaign) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) -} - // GetSigners Implements Msg. func (msg MsgCreateCampaign) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Creator) @@ -141,11 +136,6 @@ func (msg MsgCancelCampaign) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg *MsgCancelCampaign) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) -} - // GetSigners Implements Msg. func (msg MsgCancelCampaign) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Creator) @@ -179,11 +169,6 @@ func (msg MsgDepositCampaign) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg *MsgDepositCampaign) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) -} - // GetSigners Implements Msg. func (msg MsgDepositCampaign) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Depositor) @@ -219,11 +204,6 @@ func (msg MsgClaim) ValidateBasic() error { return ValidateInteractionType(msg.Interaction) } -// GetSignBytes Implements Msg. -func (msg *MsgClaim) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) -} - // GetSigners Implements Msg. func (msg MsgClaim) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Claimer) @@ -233,11 +213,6 @@ func (msg MsgClaim) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) diff --git a/x/marketplace/README.md b/x/marketplace/README.md index 730c5885..5ed43c47 100644 --- a/x/marketplace/README.md +++ b/x/marketplace/README.md @@ -30,7 +30,7 @@ message WeightedAddress { string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; string weight = 2 [ (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } @@ -67,7 +67,7 @@ message AuctionListing { string owner = 7; string increment_percentage = 8 [ (gogoproto.moretags) = "yaml:\"increment_percentage\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; repeated string whitelist_accounts = 9 [ @@ -188,7 +188,7 @@ message MsgCreateAuction { string increment_percentage = 6 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"increment_percentage\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; repeated string whitelist_accounts = 7 [ (gogoproto.nullable) = false, diff --git a/x/marketplace/abci.go b/x/marketplace/abci.go index c08fb06c..ee0c6642 100644 --- a/x/marketplace/abci.go +++ b/x/marketplace/abci.go @@ -6,12 +6,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -func EndBlock(ctx sdk.Context, k keeper.Keeper) []abcitypes.ValidatorUpdate { +func EndBlock(ctx sdk.Context, k keeper.Keeper) ([]abcitypes.ValidatorUpdate, error) { log := k.Logger(ctx) err := k.UpdateAuctionStatusesAndProcessBids(ctx) if err != nil { - panic(err) + return []abcitypes.ValidatorUpdate{}, err } log.Info("Updated Auctions and Processed bids.. ") - return []abcitypes.ValidatorUpdate{} + return []abcitypes.ValidatorUpdate{}, nil } diff --git a/x/marketplace/client/cli/tx.go b/x/marketplace/client/cli/tx.go index bdd246d6..eb1edae3 100644 --- a/x/marketplace/client/cli/tx.go +++ b/x/marketplace/client/cli/tx.go @@ -6,6 +6,8 @@ import ( "strings" "time" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" @@ -252,7 +254,7 @@ func parseSplitShares(splitsharesStr string) ([]types.WeightedAddress, error) { if err != nil { return nil, err } - weight, err := sdk.NewDecFromStr(strings.TrimSpace(split[1])) + weight, err := sdkmath.LegacyNewDecFromStr(strings.TrimSpace(split[1])) if err != nil { return nil, err } @@ -352,7 +354,7 @@ func GetCmdCreateAuction() *cobra.Command { if err != nil { return err } - increment, err := sdk.NewDecFromStr(incrementStr) + increment, err := sdkmath.LegacyNewDecFromStr(incrementStr) if err != nil { return err } diff --git a/x/marketplace/exported/marketplace.go b/x/marketplace/exported/marketplace.go index 13ac52a2..61f3ab05 100644 --- a/x/marketplace/exported/marketplace.go +++ b/x/marketplace/exported/marketplace.go @@ -3,6 +3,8 @@ package exported import ( "time" + sdkmath "cosmossdk.io/math" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,7 +25,7 @@ type AuctionListingI interface { GetNftId() string GetStartPrice() sdk.Coin GetStartTime() time.Time - GetIncrementPercentage() sdk.Dec + GetIncrementPercentage() sdkmath.LegacyDec GetOwner() sdk.AccAddress GetSplitShares() interface{} GetStatus() string diff --git a/x/marketplace/keeper/alias.go b/x/marketplace/keeper/alias.go index e2a98606..3fccb4ba 100644 --- a/x/marketplace/keeper/alias.go +++ b/x/marketplace/keeper/alias.go @@ -4,10 +4,9 @@ import ( "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // GetMarketplaceAccount returns marketplace ModuleAccount -func (k Keeper) GetMarketplaceAccount(ctx sdk.Context) authtypes.ModuleAccountI { +func (k Keeper) GetMarketplaceAccount(ctx sdk.Context) sdk.ModuleAccountI { return k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) } diff --git a/x/marketplace/keeper/auction.go b/x/marketplace/keeper/auction.go index 8c0bcd73..ada39ea8 100644 --- a/x/marketplace/keeper/auction.go +++ b/x/marketplace/keeper/auction.go @@ -3,8 +3,11 @@ package keeper import ( "fmt" + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "cosmossdk.io/store/prefix" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" gogotypes "github.com/cosmos/gogoproto/types" ) @@ -76,7 +79,7 @@ func (k Keeper) RemoveAuctionListing(ctx sdk.Context, id uint64) { // GetAllAuctionListings returns all auction listings func (k Keeper) GetAllAuctionListings(ctx sdk.Context) (list []types.AuctionListing) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PrefixAuctionId) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() @@ -92,7 +95,7 @@ func (k Keeper) GetAllAuctionListings(ctx sdk.Context) (list []types.AuctionList // GetAuctionListingsByOwner returns all auction listings of specific owner func (k Keeper) GetAuctionListingsByOwner(ctx sdk.Context, owner sdk.AccAddress) (auctionListings []types.AuctionListing) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, append(types.PrefixAuctionOwner, owner.Bytes()...)) + iterator := storetypes.KVStorePrefixIterator(store, append(types.PrefixAuctionOwner, owner.Bytes()...)) defer iterator.Close() @@ -175,7 +178,7 @@ func (k Keeper) UnsetActiveAuction(ctx sdk.Context, auctionId uint64) { func (k Keeper) IterateInactiveAuctions(ctx sdk.Context, fn func(index int, item types.AuctionListing) (stop bool)) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PrefixInactiveAuction) - iter := sdk.KVStorePrefixIterator(store, []byte{}) + iter := storetypes.KVStorePrefixIterator(store, []byte{}) defer iter.Close() for i := 0; iter.Valid(); iter.Next() { @@ -192,7 +195,7 @@ func (k Keeper) IterateInactiveAuctions(ctx sdk.Context, fn func(index int, item func (k Keeper) IterateActiveAuctions(ctx sdk.Context, fn func(index int, item types.AuctionListing) (stop bool)) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PrefixActiveAuction) - iter := sdk.KVStorePrefixIterator(store, []byte{}) + iter := storetypes.KVStorePrefixIterator(store, []byte{}) defer iter.Close() for i := 0; iter.Valid(); iter.Next() { @@ -210,7 +213,7 @@ func (k Keeper) IterateActiveAuctions(ctx sdk.Context, fn func(index int, item t // UpdateAuctionStatusesAndProcessBids update all auction listings status func (k Keeper) UpdateAuctionStatusesAndProcessBids(ctx sdk.Context) error { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PrefixAuctionId) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() @@ -283,14 +286,14 @@ func (k Keeper) processBid(ctx sdk.Context, auction types.AuctionListing, bid ty } saleCommission := k.GetSaleCommission(ctx) marketplaceCoin := k.GetProportions(bid.Amount, saleCommission) - if marketplaceCoin.Amount.GTE(sdk.OneInt()) { + if marketplaceCoin.Amount.GTE(sdkmath.OneInt()) { err = k.DistributeCommission(ctx, marketplaceCoin) if err != nil { return err } auctionSaleAmountCoin = BidAmountCoin.Sub(marketplaceCoin) } - if nft.GetRoyaltyShare().GT(sdk.ZeroDec()) { + if nft.GetRoyaltyShare().GT(sdkmath.LegacyZeroDec()) { nftRoyaltyShareCoin := k.GetProportions(auctionSaleAmountCoin, nft.GetRoyaltyShare()) creator, err := sdk.AccAddressFromBech32(denom.Creator) if err != nil { diff --git a/x/marketplace/keeper/bid.go b/x/marketplace/keeper/bid.go index 2a35ee76..6139908b 100644 --- a/x/marketplace/keeper/bid.go +++ b/x/marketplace/keeper/bid.go @@ -1,8 +1,9 @@ package keeper import ( + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" gogotypes "github.com/cosmos/gogoproto/types" ) @@ -34,7 +35,7 @@ func (k Keeper) RemoveBid(ctx sdk.Context, id uint64) { // GetAllBids returns all bids func (k Keeper) GetAllBids(ctx sdk.Context) (list []types.Bid) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PrefixBidByAuctionId) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() @@ -50,7 +51,7 @@ func (k Keeper) GetAllBids(ctx sdk.Context) (list []types.Bid) { // GetBidsByBidder returns all bids of specific bidder func (k Keeper) GetBidsByBidder(ctx sdk.Context, bidder sdk.AccAddress) (bids []types.Bid) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, append(types.PrefixBidByBidder, bidder.Bytes()...)) + iterator := storetypes.KVStorePrefixIterator(store, append(types.PrefixBidByBidder, bidder.Bytes()...)) defer iterator.Close() diff --git a/x/marketplace/keeper/grpc_query.go b/x/marketplace/keeper/grpc_query.go index 012d0388..16dc8398 100644 --- a/x/marketplace/keeper/grpc_query.go +++ b/x/marketplace/keeper/grpc_query.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "cosmossdk.io/store/prefix" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" gogotypes "github.com/cosmos/gogoproto/types" diff --git a/x/marketplace/keeper/keeper.go b/x/marketplace/keeper/keeper.go index dfcd185d..6c57ff35 100644 --- a/x/marketplace/keeper/keeper.go +++ b/x/marketplace/keeper/keeper.go @@ -3,16 +3,18 @@ package keeper import ( "fmt" + sdkmath "cosmossdk.io/math" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" onfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types" errorsmod "cosmossdk.io/errors" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/log" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -132,7 +134,7 @@ func (k Keeper) Buy(ctx sdk.Context, listing types.Listing, buyer sdk.AccAddress } saleCommission := k.GetSaleCommission(ctx) marketplaceCoin := k.GetProportions(listing.Price, saleCommission) - if marketplaceCoin.Amount.GTE(sdk.OneInt()) { + if marketplaceCoin.Amount.GTE(sdkmath.OneInt()) { err = k.DistributeCommission(ctx, marketplaceCoin) if err != nil { return err @@ -140,7 +142,7 @@ func (k Keeper) Buy(ctx sdk.Context, listing types.Listing, buyer sdk.AccAddress listingSaleAmountCoin = listingPriceCoin.Sub(marketplaceCoin) } // check if it is a valid royalty share - if nft.GetRoyaltyShare().GT(sdk.ZeroDec()) && nft.GetRoyaltyShare().LTE(sdk.OneDec()) { + if nft.GetRoyaltyShare().GT(sdkmath.LegacyZeroDec()) && nft.GetRoyaltyShare().LTE(sdkmath.LegacyOneDec()) { nftRoyaltyShareCoin := k.GetProportions(listingSaleAmountCoin, nft.GetRoyaltyShare()) creator, err := sdk.AccAddressFromBech32(denom.Creator) if err != nil { @@ -190,8 +192,8 @@ func (k Keeper) Buy(ctx sdk.Context, listing types.Listing, buyer sdk.AccAddress return nil } -func (k Keeper) GetProportions(totalCoin sdk.Coin, ratio sdk.Dec) sdk.Coin { - return sdk.NewCoin(totalCoin.Denom, sdk.NewDecFromInt(totalCoin.Amount).Mul(ratio).TruncateInt()) +func (k Keeper) GetProportions(totalCoin sdk.Coin, ratio sdkmath.LegacyDec) sdk.Coin { + return sdk.NewCoin(totalCoin.Denom, sdkmath.LegacyNewDecFromInt(totalCoin.Amount).Mul(ratio).TruncateInt()) } func (k Keeper) DistributeCommission(ctx sdk.Context, marketplaceCoin sdk.Coin) error { @@ -199,7 +201,7 @@ func (k Keeper) DistributeCommission(ctx sdk.Context, marketplaceCoin sdk.Coin) stakingCommissionCoin := k.GetProportions(marketplaceCoin, distrParams.Staking) moduleAccAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) feeCollectorAddr := k.accountKeeper.GetModuleAddress(authtypes.FeeCollectorName) - if distrParams.Staking.GT(sdk.ZeroDec()) && stakingCommissionCoin.Amount.GT(sdk.ZeroInt()) { + if distrParams.Staking.GT(sdkmath.LegacyZeroDec()) && stakingCommissionCoin.Amount.GT(sdkmath.ZeroInt()) { err := k.bankKeeper.SendCoins(ctx, moduleAccAddr, feeCollectorAddr, sdk.NewCoins(stakingCommissionCoin)) if err != nil { return err @@ -313,8 +315,8 @@ func (k Keeper) PlaceBid(ctx sdk.Context, auction types.AuctionListing, newBid t return nil } -func (k Keeper) GetNewBidPrice(denom string, amount sdk.Coin, increment sdk.Dec) sdk.Coin { - return sdk.NewCoin(denom, amount.Amount.Add(sdk.NewDecFromInt(amount.Amount).Mul(increment).TruncateInt())) +func (k Keeper) GetNewBidPrice(denom string, amount sdk.Coin, increment sdkmath.LegacyDec) sdk.Coin { + return sdk.NewCoin(denom, amount.Amount.Add(sdkmath.LegacyNewDecFromInt(amount.Amount).Mul(increment).TruncateInt())) } func (k Keeper) TransferRoyalty( @@ -349,7 +351,7 @@ func (k Keeper) TransferRoyalty( remaining = remaining.Sub(sharePortionCoin) } // sending remaining to creator - if remaining.Amount.GT(sdk.ZeroInt()) { + if remaining.Amount.GT(sdkmath.ZeroInt()) { err := k.bankKeeper.SendCoins(ctx, moduleAcc, creator, sdk.NewCoins(remaining)) if err != nil { return err diff --git a/x/marketplace/keeper/listing.go b/x/marketplace/keeper/listing.go index 00a8a21f..4a1f7dfd 100644 --- a/x/marketplace/keeper/listing.go +++ b/x/marketplace/keeper/listing.go @@ -3,8 +3,10 @@ package keeper import ( "encoding/binary" + storetypes "cosmossdk.io/store/types" + + "cosmossdk.io/store/prefix" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" gogotypes "github.com/cosmos/gogoproto/types" ) @@ -72,7 +74,7 @@ func (k Keeper) RemoveListing(ctx sdk.Context, id string) { // GetAllListings returns all listings func (k Keeper) GetAllListings(ctx sdk.Context) (list []types.Listing) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PrefixListingId) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() @@ -88,7 +90,7 @@ func (k Keeper) GetAllListings(ctx sdk.Context) (list []types.Listing) { // GetListingsByOwner returns all listings of specific owner func (k Keeper) GetListingsByOwner(ctx sdk.Context, owner sdk.AccAddress) (listings []types.Listing) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, append(types.PrefixListingOwner, owner.Bytes()...)) + iterator := storetypes.KVStorePrefixIterator(store, append(types.PrefixListingOwner, owner.Bytes()...)) defer iterator.Close() diff --git a/x/marketplace/keeper/params.go b/x/marketplace/keeper/params.go index 79e079c8..9d2b3f58 100644 --- a/x/marketplace/keeper/params.go +++ b/x/marketplace/keeper/params.go @@ -3,6 +3,8 @@ package keeper import ( "time" + sdkmath "cosmossdk.io/math" + "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -31,7 +33,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { } // GetSaleCommission returns the current sale commission of marketplace. -func (k Keeper) GetSaleCommission(ctx sdk.Context) (percent sdk.Dec) { +func (k Keeper) GetSaleCommission(ctx sdk.Context) (percent sdkmath.LegacyDec) { params := k.GetParams(ctx) return params.SaleCommission } diff --git a/x/marketplace/migrations/v3/migrate.go b/x/marketplace/migrations/v3/migrate.go index 257e2cf7..d58f5d8c 100644 --- a/x/marketplace/migrations/v3/migrate.go +++ b/x/marketplace/migrations/v3/migrate.go @@ -1,6 +1,7 @@ package v3 import ( + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/exported" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" "github.com/cosmos/cosmos-sdk/codec" @@ -19,7 +20,7 @@ var ParamsKey = []byte{0x15} // module state. func Migrate( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, legacySubspace exported.Subspace, cdc codec.BinaryCodec, ) error { diff --git a/x/marketplace/migrations/v3/migrator_test.go b/x/marketplace/migrations/v3/migrator_test.go index 442e1b64..c69e0bab 100644 --- a/x/marketplace/migrations/v3/migrator_test.go +++ b/x/marketplace/migrations/v3/migrator_test.go @@ -3,6 +3,9 @@ package v3_test import ( "testing" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" "github.com/OmniFlix/omniflixhub/v5/x/marketplace" @@ -10,7 +13,6 @@ import ( v3 "github.com/OmniFlix/omniflixhub/v5/x/marketplace/migrations/v3" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/types" "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) @@ -30,8 +32,8 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(marketplace.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v3.ModuleName) - tKey := sdk.NewTransientStoreKey("transient_test") + storeKey := storetypes.NewKVStoreKey(v3.ModuleName) + tKey := storetypes.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) diff --git a/x/marketplace/module.go b/x/marketplace/module.go index f66e8e31..83273962 100644 --- a/x/marketplace/module.go +++ b/x/marketplace/module.go @@ -5,6 +5,8 @@ import ( "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" + "github.com/OmniFlix/omniflixhub/v5/x/marketplace/exported" "github.com/OmniFlix/omniflixhub/v5/x/marketplace/client/cli" @@ -24,8 +26,9 @@ import ( ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ appmodule.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ module.HasABCIEndBlock = AppModule{} ) // ---------------------------------------------------------------------------- @@ -99,6 +102,12 @@ type AppModule struct { legacySubspace exported.Subspace } +func (am AppModule) IsOnePerModuleType() { +} + +func (am AppModule) IsAppModule() { +} + func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ss exported.Subspace) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), @@ -155,10 +164,11 @@ func (AppModule) ConsensusVersion() uint64 { } // BeginBlock executes all ABCI BeginBlock logic respective to the marketplace module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (am AppModule) BeginBlock(_ sdk.Context) {} // EndBlock executes all ABCI EndBlock logic respective to the marketplace module. It // returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(goCtx context.Context) ([]abci.ValidatorUpdate, error) { + ctx := sdk.UnwrapSDKContext(goCtx) return EndBlock(ctx, am.keeper) } diff --git a/x/marketplace/types/auction.go b/x/marketplace/types/auction.go index 1fdc705b..a59e4b05 100644 --- a/x/marketplace/types/auction.go +++ b/x/marketplace/types/auction.go @@ -3,6 +3,8 @@ package types import ( "time" + sdkmath "cosmossdk.io/math" + "github.com/OmniFlix/omniflixhub/v5/x/marketplace/exported" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" @@ -13,7 +15,7 @@ var ( _ exported.AuctionListingI = &AuctionListing{} ) -func NewAuctionListing(id uint64, nftId, denomId string, startTime time.Time, endTime *time.Time, startPrice sdk.Coin, incrementPercentage sdk.Dec, +func NewAuctionListing(id uint64, nftId, denomId string, startTime time.Time, endTime *time.Time, startPrice sdk.Coin, incrementPercentage sdkmath.LegacyDec, owner sdk.AccAddress, whitelistAccounts []string, splitShares []WeightedAddress, ) AuctionListing { return AuctionListing{ @@ -50,7 +52,7 @@ func (al AuctionListing) GetStartPrice() sdk.Coin { return al.StartPrice } -func (al AuctionListing) GetIncrementPercentage() sdk.Dec { +func (al AuctionListing) GetIncrementPercentage() sdkmath.LegacyDec { return al.IncrementPercentage } diff --git a/x/marketplace/types/auction.pb.go b/x/marketplace/types/auction.pb.go index fa24fc85..8535df1e 100644 --- a/x/marketplace/types/auction.pb.go +++ b/x/marketplace/types/auction.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -58,16 +58,16 @@ func (AuctionStatus) EnumDescriptor() ([]byte, []int) { } type AuctionListing struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - NftId string `protobuf:"bytes,2,opt,name=nft_id,json=nftId,proto3" json:"nft_id,omitempty" yaml:"nft_id"` - DenomId string `protobuf:"bytes,3,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` - StartPrice types.Coin `protobuf:"bytes,4,opt,name=start_price,json=startPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"start_price" yaml:"start_price"` - StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` - EndTime *time.Time `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty" yaml:"end_time"` - Owner string `protobuf:"bytes,7,opt,name=owner,proto3" json:"owner,omitempty"` - IncrementPercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=increment_percentage,json=incrementPercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"increment_percentage" yaml:"increment_percentage"` - WhitelistAccounts []string `protobuf:"bytes,9,rep,name=whitelist_accounts,json=whitelistAccounts,proto3" json:"whitelist_accounts,omitempty" yaml:"whitelist_accounts"` - SplitShares []WeightedAddress `protobuf:"bytes,10,rep,name=split_shares,json=splitShares,proto3" json:"split_shares" yaml:"split_shares"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + NftId string `protobuf:"bytes,2,opt,name=nft_id,json=nftId,proto3" json:"nft_id,omitempty" yaml:"nft_id"` + DenomId string `protobuf:"bytes,3,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + StartPrice types.Coin `protobuf:"bytes,4,opt,name=start_price,json=startPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"start_price" yaml:"start_price"` + StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` + EndTime *time.Time `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty" yaml:"end_time"` + Owner string `protobuf:"bytes,7,opt,name=owner,proto3" json:"owner,omitempty"` + IncrementPercentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=increment_percentage,json=incrementPercentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"increment_percentage" yaml:"increment_percentage"` + WhitelistAccounts []string `protobuf:"bytes,9,rep,name=whitelist_accounts,json=whitelistAccounts,proto3" json:"whitelist_accounts,omitempty" yaml:"whitelist_accounts"` + SplitShares []WeightedAddress `protobuf:"bytes,10,rep,name=split_shares,json=splitShares,proto3" json:"split_shares" yaml:"split_shares"` } func (m *AuctionListing) Reset() { *m = AuctionListing{} } @@ -154,55 +154,56 @@ func init() { } var fileDescriptor_b7c419bfddde4ca0 = []byte{ - // 759 bytes of a gzipped FileDescriptorProto - 0x1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1d, 0x58, 0x27, 0x5f, 0x58, 0xff, - 0x7c, 0xa6, 0xf8, 0x28, 0x0e, 0x4a, 0xfc, 0x63, 0x3f, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x25, - 0x02, 0xc2, 0x2b, 0x6c, 0x05, 0x00, 0x00, + // 769 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x3d, 0x8f, 0xdb, 0x46, + 0x10, 0x15, 0xf5, 0x75, 0xd2, 0x2a, 0x76, 0x7c, 0x7b, 0xe7, 0x98, 0x27, 0x25, 0xa4, 0xc2, 0x26, + 0x82, 0x01, 0x93, 0xb0, 0xf3, 0x09, 0x77, 0xa2, 0x2c, 0x03, 0x04, 0x0c, 0x59, 0xa0, 0x74, 0x89, + 0x91, 0x86, 0xa0, 0xb8, 0x2b, 0x6a, 0x71, 0x22, 0x57, 0xe0, 0xae, 0x6c, 0x5f, 0x99, 0x7f, 0xe0, + 0x9f, 0x90, 0x3a, 0xbf, 0xe4, 0x8a, 0x14, 0x57, 0x06, 0x29, 0xe4, 0xf8, 0xae, 0x49, 0xad, 0x22, + 0x75, 0xc0, 0xdd, 0xd5, 0x47, 0x1c, 0xe3, 0x5c, 0x71, 0x67, 0xe6, 0xbd, 0xc7, 0xe1, 0xe3, 0xcc, + 0x82, 0xfb, 0xcf, 0x93, 0x94, 0x3c, 0x9d, 0x93, 0xd7, 0x4e, 0x12, 0x66, 0x67, 0x98, 0x2f, 0xe6, + 0x61, 0x84, 0x9d, 0x97, 0x0f, 0x27, 0x98, 0x87, 0x0f, 0x9d, 0x70, 0x19, 0x71, 0x42, 0x53, 0x7b, + 0x91, 0x51, 0x4e, 0xe1, 0xe7, 0x1b, 0xac, 0xbd, 0x87, 0xb5, 0x15, 0xb6, 0x69, 0x44, 0x94, 0x25, + 0x94, 0x39, 0x93, 0x90, 0xed, 0x04, 0x22, 0x4a, 0x14,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, 0xbe, 0x33, 0x0a, 0x17, 0x57, + 0x86, 0x76, 0x79, 0x65, 0x68, 0x7f, 0x5d, 0x19, 0xda, 0x9b, 0x6b, 0xa3, 0x70, 0x79, 0x6d, 0x14, + 0xfe, 0xb8, 0x36, 0x0a, 0x3f, 0x7f, 0xb7, 0xb7, 0x86, 0xdb, 0x9b, 0x88, 0x26, 0x29, 0x99, 0xce, + 0xc9, 0xeb, 0xd9, 0x72, 0xe2, 0xbc, 0xfc, 0xd6, 0xf9, 0xef, 0xd5, 0x24, 0x56, 0x73, 0x52, 0x15, + 0x1f, 0xfb, 0xf5, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x24, 0xd6, 0xf8, 0x59, 0x60, 0x05, 0x00, + 0x00, } func (this *Bid) Equal(that interface{}) bool { diff --git a/x/marketplace/types/codec.go b/x/marketplace/types/codec.go index 876b038b..ab57c7ca 100644 --- a/x/marketplace/types/codec.go +++ b/x/marketplace/types/codec.go @@ -1,17 +1,12 @@ package types import ( + "github.com/OmniFlix/omniflixhub/v5/x/marketplace/exported" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" - gogotypes "github.com/cosmos/gogoproto/types" - - "github.com/OmniFlix/omniflixhub/v5/x/marketplace/exported" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -51,30 +46,3 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } - -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) - // Register all Amino interfaces and concrete types on the authz Amino codec - // so that this can later be used to properly serialize MsgGrant and MsgExec - // instances. - RegisterLegacyAminoCodec(authzcodec.Amino) - RegisterLegacyAminoCodec(govcodec.Amino) -} - -func MustMarshalListingID(cdc codec.BinaryCodec, listingId string) []byte { - listingIdWrap := gogotypes.StringValue{Value: listingId} - return cdc.MustMarshal(&listingIdWrap) -} - -func MustUnMarshalListingID(cdc codec.BinaryCodec, value []byte) string { - var listingIdWrap gogotypes.StringValue - cdc.MustUnmarshal(value, &listingIdWrap) - return listingIdWrap.Value -} diff --git a/x/marketplace/types/expected_keepers.go b/x/marketplace/types/expected_keepers.go index ccbffdbd..0b67c5a7 100644 --- a/x/marketplace/types/expected_keepers.go +++ b/x/marketplace/types/expected_keepers.go @@ -1,27 +1,28 @@ package types import ( + "context" + nft "github.com/OmniFlix/omniflixhub/v5/x/onft/exported" nftypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type AccountKeeper interface { // Methods imported from account should be defined here - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI GetModuleAddress(module string) sdk.AccAddress } type BankKeeper interface { // Methods imported from bank should be defined here BlockedAddr(recipient sdk.AccAddress) bool - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SendCoins(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Coins) error - SendCoinsFromModuleToAccount(ctx sdk.Context, formModule string, toAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, formModule string, toModule string, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, fromAddr sdk.AccAddress, toModule string, amt sdk.Coins) error + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoins(ctx context.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Coins) error + SendCoinsFromModuleToAccount(ctx context.Context, formModule string, toAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, formModule string, toModule string, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, fromAddr sdk.AccAddress, toModule string, amt sdk.Coins) error } // NftKeeper methods imported from nft should be defined here @@ -33,5 +34,5 @@ type NftKeeper interface { // DistributionKeeper defines the expected distribution keeper type DistributionKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } diff --git a/x/marketplace/types/listing.pb.go b/x/marketplace/types/listing.pb.go index 385573b9..a8cbf3a4 100644 --- a/x/marketplace/types/listing.pb.go +++ b/x/marketplace/types/listing.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -68,8 +68,8 @@ func (m *Listing) XXX_DiscardUnknown() { var xxx_messageInfo_Listing proto.InternalMessageInfo type WeightedAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight" yaml:"weight"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight" yaml:"weight"` } func (m *WeightedAddress) Reset() { *m = WeightedAddress{} } @@ -115,38 +115,38 @@ func init() { } var fileDescriptor_300685922a0a2983 = []byte{ - // 482 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0x6e, 0xd4, 0x3c, - 0x14, 0x4d, 0xa6, 0x9d, 0x99, 0xef, 0xf3, 0x94, 0x16, 0x5c, 0x16, 0xa1, 0xa0, 0x64, 0x94, 0x45, - 0x19, 0x21, 0x6a, 0xab, 0x45, 0xb0, 0xe8, 0x06, 0x11, 0x10, 0x52, 0x25, 0x24, 0xa4, 0x80, 0x54, - 0x89, 0x4d, 0x49, 0x62, 0x4f, 0xc6, 0x6a, 0x62, 0x47, 0xb1, 0xfb, 0xf7, 0x16, 0x3c, 0x01, 0x62, - 0xcd, 0x93, 0xcc, 0xb2, 0x4b, 0xc4, 0x22, 0xc0, 0xcc, 0x86, 0x05, 0xab, 0x3c, 0x01, 0x8a, 0x9d, - 0xa1, 0x03, 0x0b, 0xc4, 0xca, 0xd7, 0xf7, 0x9e, 0x7b, 0xce, 0xf1, 0xf5, 0x05, 0xf7, 0x5e, 0xe6, - 0x9c, 0x3d, 0xcf, 0xd8, 0x39, 0xce, 0xa3, 0xf2, 0x98, 0xaa, 0x22, 0x8b, 0x12, 0x8a, 0x4f, 0x77, - 0x63, 0xaa, 0xa2, 0x5d, 0x9c, 0x31, 0xa9, 0x18, 0x4f, 0x51, 0x51, 0x0a, 0x25, 0xe0, 0x9d, 0x05, - 0x16, 0x2d, 0x61, 0x51, 0x8b, 0xdd, 0x72, 0x13, 0x21, 0x73, 0x21, 0x71, 0x1c, 0xc9, 0x2b, 0x82, - 0x44, 0x30, 0x6e, 0xba, 0xb7, 0x6e, 0xa6, 0x22, 0x15, 0x3a, 0xc4, 0x4d, 0x64, 0xb2, 0xfe, 0x8f, - 0x0e, 0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, 0xba, 0xf2, 0x36, 0x8d, 0xc2, 0x32, 0xa1, 0x1f, - 0x0e, 0xf4, 0xf5, 0x95, 0xb9, 0xbd, 0xb7, 0xc1, 0xc6, 0x1f, 0xdd, 0xf0, 0x3e, 0xe8, 0x47, 0x26, - 0x34, 0xb3, 0x0f, 0x60, 0x5d, 0x79, 0xeb, 0x86, 0xaa, 0x2d, 0xf8, 0xe1, 0x02, 0x02, 0x0f, 0x41, - 0xef, 0x4c, 0x13, 0xb4, 0x9f, 0xf2, 0xb8, 0xd1, 0xfe, 0x5c, 0x79, 0xdb, 0xff, 0x30, 0xa0, 0x67, - 0x34, 0xb9, 0xfa, 0x42, 0xc3, 0xe2, 0x87, 0x2d, 0xdd, 0xfe, 0xea, 0xf7, 0x0f, 0x9e, 0x1d, 0xbc, - 0x9e, 0x7e, 0x73, 0xad, 0xe9, 0xcc, 0xb5, 0x2f, 0x67, 0xae, 0xfd, 0x75, 0xe6, 0xda, 0xef, 0xe6, - 0xae, 0x75, 0x39, 0x77, 0xad, 0x4f, 0x73, 0xd7, 0x7a, 0xf3, 0x68, 0x49, 0xe4, 0xd7, 0xe2, 0x8a, - 0x9c, 0xb3, 0x71, 0xc6, 0xce, 0x27, 0x27, 0x31, 0x3e, 0x7d, 0x88, 0x7f, 0xdf, 0x64, 0x2d, 0x1c, - 0xf7, 0xf4, 0xb2, 0x3d, 0xf8, 0x19, 0x00, 0x00, 0xff, 0xff, 0x41, 0xfc, 0xd1, 0x03, 0xee, 0x02, - 0x00, 0x00, + // 493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xb6, 0xd3, 0x26, 0x85, 0x4d, 0x69, 0x61, 0xcb, 0xc1, 0xb4, 0xc8, 0x8e, 0x7c, 0x80, 0x08, + 0xd1, 0x5d, 0xb5, 0xfc, 0x1c, 0x7a, 0xc3, 0x20, 0xa4, 0x4a, 0x91, 0x90, 0x0c, 0x12, 0x12, 0x97, + 0x62, 0x7b, 0x37, 0xf6, 0x2a, 0xb6, 0xd7, 0xf2, 0x6e, 0x7f, 0xf2, 0x16, 0x48, 0xbc, 0x00, 0x67, + 0x9e, 0x24, 0xc7, 0x1e, 0x11, 0x07, 0x03, 0xc9, 0x85, 0x03, 0x27, 0x3f, 0x01, 0xf2, 0xae, 0x43, + 0x03, 0x07, 0x4e, 0x3b, 0x3b, 0xf3, 0xcd, 0x37, 0xdf, 0xfc, 0x80, 0x07, 0xaf, 0xb2, 0x9c, 0xbd, + 0x4c, 0xd9, 0x05, 0xce, 0x82, 0x72, 0x42, 0x65, 0x91, 0x06, 0x11, 0xc5, 0x67, 0x07, 0x21, 0x95, + 0xc1, 0x01, 0x4e, 0x99, 0x90, 0x2c, 0x8f, 0x51, 0x51, 0x72, 0xc9, 0xe1, 0xdd, 0x25, 0x16, 0xad, + 0x60, 0x51, 0x8b, 0xdd, 0xb5, 0x23, 0x2e, 0x32, 0x2e, 0x70, 0x18, 0x88, 0x2b, 0x82, 0x88, 0xb3, + 0x5c, 0x67, 0xef, 0xde, 0x8e, 0x79, 0xcc, 0x95, 0x89, 0x1b, 0x4b, 0x7b, 0xdd, 0x5f, 0x1d, 0xb0, + 0x31, 0xd2, 0x55, 0xe0, 0x16, 0xe8, 0x30, 0x62, 0x99, 0x03, 0x73, 0x78, 0xdd, 0xef, 0x30, 0x02, + 0x87, 0xa0, 0x97, 0x8f, 0xe5, 0x09, 0x23, 0x56, 0xa7, 0xf1, 0x79, 0xb7, 0xea, 0xca, 0xb9, 0x31, + 0x0d, 0xb2, 0xf4, 0xc8, 0xd5, 0x7e, 0xd7, 0xef, 0xe6, 0x63, 0x79, 0x4c, 0x20, 0x02, 0xd7, 0x08, + 0xcd, 0x79, 0xd6, 0x60, 0xd7, 0x14, 0x76, 0xa7, 0xae, 0x9c, 0x6d, 0x8d, 0x5d, 0x46, 0x5c, 0x7f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0x07, 0xd1, 0xf4, 0x05, 0x8d, 0xae, 0xf6, 0xa6, 0x53, 0x5d, + 0xbf, 0xe5, 0x38, 0x5a, 0xff, 0xf9, 0xc9, 0x31, 0xbd, 0x37, 0xb3, 0x1f, 0xb6, 0x31, 0x9b, 0xdb, + 0xe6, 0xe5, 0xdc, 0x36, 0xbf, 0xcf, 0x6d, 0xf3, 0xc3, 0xc2, 0x36, 0x2e, 0x17, 0xb6, 0xf1, 0x65, + 0x61, 0x1b, 0xef, 0x9e, 0xae, 0x8c, 0xfe, 0xcf, 0xb5, 0xf2, 0x2c, 0x67, 0xe3, 0x94, 0x5d, 0x24, + 0xa7, 0x21, 0x3e, 0x7b, 0x82, 0xff, 0x3e, 0x5f, 0xb5, 0x8e, 0xb0, 0xa7, 0x2e, 0xec, 0xd1, 0xef, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0x46, 0xb1, 0x98, 0xe3, 0x02, 0x00, 0x00, } func (this *WeightedAddress) Equal(that interface{}) bool { diff --git a/x/marketplace/types/msgs.go b/x/marketplace/types/msgs.go index 2f5b3470..a187e7fd 100644 --- a/x/marketplace/types/msgs.go +++ b/x/marketplace/types/msgs.go @@ -3,6 +3,8 @@ package types import ( "time" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -68,15 +70,6 @@ func (msg MsgListNFT) ValidateBasic() error { ) } -// GetSignBytes Implements Msg. -func (msg MsgListNFT) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgListNFT) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Owner) @@ -106,15 +99,6 @@ func (msg MsgEditListing) ValidateBasic() error { return ValidatePrice(msg.Price) } -// GetSignBytes Implements Msg. -func (msg MsgEditListing) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgEditListing) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Owner) @@ -147,15 +131,6 @@ func (msg MsgDeListNFT) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg MsgDeListNFT) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgDeListNFT) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Owner) @@ -189,15 +164,6 @@ func (msg MsgBuyNFT) ValidateBasic() error { return ValidatePrice(msg.Price) } -// GetSignBytes Implements Msg. -func (msg MsgBuyNFT) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgBuyNFT) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Buyer) @@ -210,7 +176,7 @@ func (msg MsgBuyNFT) GetSigners() []sdk.AccAddress { // Auction messages func NewMsgCreateAuction(denomId, nftId string, startTime time.Time, duration *time.Duration, startPrice sdk.Coin, owner sdk.AccAddress, - incrementPercentage sdk.Dec, whitelistAccounts []string, splitShares []WeightedAddress, + incrementPercentage sdkmath.LegacyDec, whitelistAccounts []string, splitShares []WeightedAddress, ) *MsgCreateAuction { return &MsgCreateAuction{ NftId: nftId, @@ -242,7 +208,7 @@ func (msg MsgCreateAuction) ValidateBasic() error { return err } } - if !msg.IncrementPercentage.IsPositive() || !msg.IncrementPercentage.LTE(sdk.NewDec(1)) { + if !msg.IncrementPercentage.IsPositive() || !msg.IncrementPercentage.LTE(sdkmath.LegacyNewDec(1)) { return errorsmod.Wrapf(ErrInvalidPercentage, "invalid percentage value (%s)", msg.IncrementPercentage.String()) } if err = ValidateSplitShares(msg.SplitShares); err != nil { @@ -264,15 +230,6 @@ func (msg MsgCreateAuction) Validate(now time.Time) error { return nil } -// GetSignBytes Implements Msg. -func (msg MsgCreateAuction) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgCreateAuction) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Owner) @@ -301,15 +258,6 @@ func (msg MsgCancelAuction) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg MsgCancelAuction) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgCancelAuction) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Owner) @@ -342,15 +290,6 @@ func (msg MsgPlaceBid) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg MsgPlaceBid) GetSignBytes() []byte { - b, err := ModuleCdc.MarshalJSON(&msg) - if err != nil { - panic(err) - } - return sdk.MustSortJSON(b) -} - // GetSigners Implements Msg. func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Bidder) @@ -360,13 +299,6 @@ func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -// MsgUpdateParams - -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) diff --git a/x/marketplace/types/params.go b/x/marketplace/types/params.go index cc6ad526..a69a2ca5 100644 --- a/x/marketplace/types/params.go +++ b/x/marketplace/types/params.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) const ( @@ -14,7 +14,7 @@ const ( ) func NewMarketplaceParams( - saleCommission sdk.Dec, + saleCommission sdkmath.LegacyDec, distribution Distribution, bidCloseDuration time.Duration, maxAuctionDuration time.Duration, @@ -30,10 +30,10 @@ func NewMarketplaceParams( // DefaultParams returns default marketplace parameters func DefaultParams() Params { return NewMarketplaceParams( - sdk.NewDecWithPrec(1, 2), // 1% + sdkmath.LegacyNewDecWithPrec(1, 2), // 1% Distribution{ - Staking: sdk.NewDecWithPrec(50, 2), // 50% - CommunityPool: sdk.NewDecWithPrec(50, 2), // 50% + Staking: sdkmath.LegacyNewDecWithPrec(50, 2), // 50% + CommunityPool: sdkmath.LegacyNewDecWithPrec(50, 2), // 50% }, DefaultBidClosePeriod, DefaultMaxAuctionDuration, @@ -58,7 +58,7 @@ func (p Params) ValidateBasic() error { } func validateSaleCommission(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } @@ -69,7 +69,7 @@ func validateSaleCommission(i interface{}) error { if v.IsNegative() { return fmt.Errorf("sale commission must be positive: %s", v) } - if v.GT(sdk.OneDec()) { + if v.GT(sdkmath.LegacyOneDec()) { return fmt.Errorf("sale commission too large: %s", v) } @@ -77,7 +77,7 @@ func validateSaleCommission(i interface{}) error { } func validateStakingDistribution(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } @@ -88,7 +88,7 @@ func validateStakingDistribution(i interface{}) error { if v.IsNegative() { return fmt.Errorf("staking distribution value must be positive: %s", v) } - if v.GT(sdk.OneDec()) { + if v.GT(sdkmath.LegacyOneDec()) { return fmt.Errorf("staking distribution value too large: %s", v) } @@ -96,7 +96,7 @@ func validateStakingDistribution(i interface{}) error { } func validateCommunityPoolDistribution(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } @@ -107,7 +107,7 @@ func validateCommunityPoolDistribution(i interface{}) error { if v.IsNegative() { return fmt.Errorf("community pool distribution value must be positive: %s", v) } - if v.GT(sdk.OneDec()) { + if v.GT(sdkmath.LegacyOneDec()) { return fmt.Errorf("community pool distribution value too large: %s", v) } @@ -127,7 +127,7 @@ func validateMarketplaceDistributionParams(i interface{}) error { if err != nil { return err } - if !v.Staking.Add(v.CommunityPool).Equal(sdk.OneDec()) { + if !v.Staking.Add(v.CommunityPool).Equal(sdkmath.LegacyOneDec()) { return fmt.Errorf("marketplace distribtution commission params sum must be equal to : %d", 1) } return nil diff --git a/x/marketplace/types/params.pb.go b/x/marketplace/types/params.pb.go index 7ad0b445..3eef1155 100644 --- a/x/marketplace/types/params.pb.go +++ b/x/marketplace/types/params.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" github_com_gogo_protobuf_types "github.com/cosmos/gogoproto/types" @@ -29,10 +29,10 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Params struct { - SaleCommission github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=sale_commission,json=saleCommission,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"sale_commission" yaml:"sale_commission"` - Distribution Distribution `protobuf:"bytes,2,opt,name=distribution,proto3" json:"distribution"` - BidCloseDuration time.Duration `protobuf:"bytes,3,opt,name=bid_close_duration,json=bidCloseDuration,proto3,stdduration" json:"bid_close_duration" yaml:"bid_close_duration"` - MaxAuctionDuration time.Duration `protobuf:"bytes,4,opt,name=max_auction_duration,json=maxAuctionDuration,proto3,stdduration" json:"max_auction_duration" yaml:"max_auction_duration"` + SaleCommission cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=sale_commission,json=saleCommission,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"sale_commission" yaml:"sale_commission"` + Distribution Distribution `protobuf:"bytes,2,opt,name=distribution,proto3" json:"distribution"` + BidCloseDuration time.Duration `protobuf:"bytes,3,opt,name=bid_close_duration,json=bidCloseDuration,proto3,stdduration" json:"bid_close_duration" yaml:"bid_close_duration"` + MaxAuctionDuration time.Duration `protobuf:"bytes,4,opt,name=max_auction_duration,json=maxAuctionDuration,proto3,stdduration" json:"max_auction_duration" yaml:"max_auction_duration"` } func (m *Params) Reset() { *m = Params{} } @@ -69,8 +69,8 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo type Distribution struct { - Staking github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=staking,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking" yaml:"staking"` - CommunityPool github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=community_pool,json=communityPool,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_pool" yaml:"community_pool"` + Staking cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=staking,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"staking" yaml:"staking"` + CommunityPool cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=community_pool,json=communityPool,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"community_pool" yaml:"community_pool"` } func (m *Distribution) Reset() { *m = Distribution{} } @@ -116,37 +116,37 @@ func init() { } var fileDescriptor_f06a231652c41f78 = []byte{ - // 470 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6e, 0xd4, 0x30, - 0x14, 0xc6, 0x13, 0x5a, 0x15, 0xd5, 0x94, 0x82, 0xac, 0x82, 0xa6, 0x05, 0x25, 0x55, 0x24, 0xa0, - 0x20, 0x61, 0xab, 0x20, 0x58, 0xb0, 0x82, 0x74, 0x04, 0xec, 0xa8, 0xa2, 0xae, 0xba, 0x89, 0x9c, - 0x3f, 0x4d, 0xad, 0xb1, 0xf3, 0x42, 0xec, 0x54, 0x33, 0xb7, 0x60, 0xc9, 0x4d, 0xb8, 0xc2, 0x2c, - 0xbb, 0x44, 0x5d, 0x0c, 0x30, 0x73, 0x83, 0x9e, 0x00, 0x25, 0x4e, 0x86, 0x19, 0x40, 0xa0, 0xae, - 0x12, 0x3f, 0x7f, 0xef, 0xfb, 0x3d, 0xfb, 0x93, 0xd1, 0xe3, 0x0f, 0x32, 0xe7, 0x6f, 0x05, 0x1f, - 0x52, 0xc9, 0xca, 0x41, 0xaa, 0x0b, 0xc1, 0xe2, 0x94, 0x9e, 0xed, 0x47, 0xa9, 0x66, 0xfb, 0xb4, - 0x60, 0x25, 0x93, 0x8a, 0x14, 0x25, 0x68, 0xc0, 0xf7, 0x3b, 0x29, 0x59, 0x90, 0x92, 0x56, 0xba, - 0xb3, 0x95, 0x41, 0x06, 0x8d, 0x90, 0xd6, 0x7f, 0xa6, 0x67, 0xc7, 0xc9, 0x00, 0x32, 0x91, 0xd2, - 0x66, 0x15, 0x55, 0x27, 0x34, 0xa9, 0x4a, 0xa6, 0x39, 0xe4, 0x66, 0xdf, 0xfb, 0xb2, 0x82, 0xd6, - 0x0e, 0x1b, 0x08, 0xfe, 0x88, 0x6e, 0x29, 0x26, 0xd2, 0x30, 0x06, 0x29, 0xb9, 0x52, 0x1c, 0xf2, - 0x9e, 0xbd, 0x6b, 0xef, 0xad, 0xfb, 0xef, 0xc7, 0x13, 0xd7, 0xba, 0x98, 0xb8, 0x0f, 0x33, 0xae, - 0x4f, 0xab, 0x88, 0xc4, 0x20, 0x69, 0x0c, 0x4a, 0x82, 0x6a, 0x3f, 0x4f, 0x55, 0x32, 0xa0, 0x7a, - 0x54, 0xa4, 0x8a, 0xf4, 0x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37, 0x2f, 0xb8, 0x39, 0x2f, - 0x1c, 0x02, 0x08, 0xff, 0x68, 0xfc, 0xc3, 0xb1, 0xc6, 0x53, 0xc7, 0x3e, 0x9f, 0x3a, 0xf6, 0xf7, - 0xa9, 0x63, 0x7f, 0x9a, 0x39, 0xd6, 0xf9, 0xcc, 0xb1, 0xbe, 0xce, 0x1c, 0xeb, 0xf8, 0xe5, 0x02, - 0x6d, 0xfe, 0x7c, 0x40, 0xe6, 0xfc, 0x44, 0xf0, 0xe1, 0x69, 0x15, 0xd1, 0xb3, 0x17, 0x74, 0xf9, - 0x3d, 0x35, 0x13, 0x44, 0x6b, 0x4d, 0x04, 0xcf, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x45, 0xef, - 0x21, 0x3f, 0x74, 0x03, 0x00, 0x00, + // 474 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x6e, 0xd3, 0x40, + 0x14, 0x86, 0x6d, 0x5a, 0x15, 0xd5, 0x94, 0x80, 0xac, 0x82, 0xd2, 0x16, 0xd9, 0x95, 0x25, 0x44, + 0x61, 0x31, 0xa3, 0x82, 0xca, 0x02, 0xc1, 0x02, 0x37, 0x62, 0x85, 0xd4, 0xca, 0xea, 0x8a, 0x8d, + 0x35, 0xb6, 0x27, 0xce, 0x28, 0x33, 0x7e, 0x96, 0x67, 0x5c, 0x25, 0xb7, 0x60, 0xc9, 0x21, 0x38, + 0x06, 0x8b, 0x2c, 0xbb, 0x44, 0x2c, 0x02, 0x24, 0x37, 0xe8, 0x09, 0x90, 0x3d, 0x76, 0x48, 0x00, + 0xd1, 0xec, 0xec, 0x37, 0xef, 0xff, 0xfe, 0x37, 0xef, 0xd7, 0x58, 0x4f, 0xcf, 0x44, 0xc6, 0xde, + 0x71, 0x36, 0xc2, 0x82, 0x14, 0x43, 0xaa, 0x72, 0x4e, 0x62, 0x8a, 0x2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00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/marketplace/types/tx.pb.go b/x/marketplace/types/tx.pb.go index e737a8c0..ff8a7561 100644 --- a/x/marketplace/types/tx.pb.go +++ b/x/marketplace/types/tx.pb.go @@ -5,9 +5,9 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -341,15 +341,15 @@ func (m *MsgBuyNFTResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgBuyNFTResponse proto.InternalMessageInfo type MsgCreateAuction struct { - NftId string `protobuf:"bytes,1,opt,name=nft_id,json=nftId,proto3" json:"nft_id,omitempty"` - DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` - StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` - StartPrice types.Coin `protobuf:"bytes,4,opt,name=start_price,json=startPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"start_price" yaml:"start_price"` - Duration *time.Duration `protobuf:"bytes,5,opt,name=duration,proto3,stdduration" json:"duration,omitempty"` - IncrementPercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=increment_percentage,json=incrementPercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"increment_percentage" yaml:"increment_percentage"` - WhitelistAccounts []string `protobuf:"bytes,7,rep,name=whitelist_accounts,json=whitelistAccounts,proto3" json:"whitelist_accounts,omitempty" yaml:"whitelist_accounts"` - SplitShares []WeightedAddress `protobuf:"bytes,8,rep,name=split_shares,json=splitShares,proto3" json:"split_shares" yaml:"split_shares"` - Owner string `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` + NftId string `protobuf:"bytes,1,opt,name=nft_id,json=nftId,proto3" json:"nft_id,omitempty"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` + StartPrice types.Coin `protobuf:"bytes,4,opt,name=start_price,json=startPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"start_price" yaml:"start_price"` + Duration *time.Duration `protobuf:"bytes,5,opt,name=duration,proto3,stdduration" json:"duration,omitempty"` + IncrementPercentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=increment_percentage,json=incrementPercentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"increment_percentage" yaml:"increment_percentage"` + WhitelistAccounts []string `protobuf:"bytes,7,rep,name=whitelist_accounts,json=whitelistAccounts,proto3" json:"whitelist_accounts,omitempty" yaml:"whitelist_accounts"` + SplitShares []WeightedAddress `protobuf:"bytes,8,rep,name=split_shares,json=splitShares,proto3" json:"split_shares" yaml:"split_shares"` + Owner string `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` } func (m *MsgCreateAuction) Reset() { *m = MsgCreateAuction{} } @@ -680,83 +680,84 @@ func init() { } var fileDescriptor_a8128523fd16ea70 = []byte{ - // 1208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x53, 0x23, 0x45, - 0x14, 0xcf, 0x04, 0x12, 0x48, 0x67, 0x5d, 0x65, 0x08, 0x6c, 0x98, 0xd5, 0x84, 0x1d, 0x5d, 0x97, - 0xa5, 0x96, 0x19, 0x89, 0x2c, 0x65, 0xe1, 0x89, 0x59, 0x96, 0x2a, 0xaa, 0x36, 0x4a, 0x65, 0xb1, - 0xb4, 0xbc, 0xc4, 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x5a, 0x12, 0x7e, 0x3f, 0x2d, - 0x09, 0xcf, 0xcf, 0x4a, 0xa9, 0xe3, 0xb3, 0x52, 0xea, 0xd7, 0xb3, 0x52, 0xea, 0xf3, 0xe5, 0x84, - 0xf4, 0x71, 0xa1, 0xf2, 0x1c, 0x17, 0x6d, 0x37, 0xd1, 0x7e, 0xa3, 0x6d, 0xa8, 0xbb, 0x0f, 0xd5, - 0x4e, 0xe5, 0x0a, 0xe5, 0xd0, 0xc8, 0x86, 0xaf, 0x8f, 0xf7, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, - 0x9e, 0x1b, 0x51, 0x59, 0x1c, 0x0f, 0x00, 0x00, + // 1218 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x4f, 0xe3, 0xc6, + 0x17, 0x8f, 0x03, 0x09, 0x64, 0xc2, 0x97, 0x6f, 0x31, 0x81, 0x0d, 0xa6, 0x4d, 0x58, 0xb7, 0xab, + 0x65, 0xd1, 0x62, 0x97, 0x94, 0x45, 0x15, 0x3d, 0xe1, 0x65, 0x91, 0x90, 0x48, 0x8b, 0xb2, 0x54, + 0xad, 0x7a, 0x49, 0x1d, 0x7b, 0x70, 0xa6, 0xc4, 0x76, 0xea, 0x99, 0x00, 0xb9, 0xb5, 0xbd, 0xb5, + 0xa7, 0x3d, 0xee, 0xa5, 0x52, 0xcf, 0x3d, 0x71, 0xe8, 0xdf, 0x50, 0x71, 0x44, 0x3d, 0x55, 0x3d, + 0xb0, 0x2d, 0x1c, 0x68, 0xaf, 0x2b, 0xf5, 0x5e, 0xd9, 0x33, 0x1e, 0x3b, 0x84, 0xfc, 0xa0, 0x12, + 0xbd, 0x10, 0xde, 0x9b, 0xcf, 0xfb, 0xe9, 0xf7, 0x3e, 0x33, 0xe0, 0xc1, 0x47, 0xb6, 0x83, 0xb6, + 0x1a, 0xe8, 0x58, 0xb5, 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9e, 0x18, 0xd2, 0xbb, 0xc3, 0x22, 0xf9, 0xde, 0x7c, 0x09, 0xb2, 0xf1, 0x87, 0xc8, 0xe3, 0x81, + 0x0e, 0x62, 0x68, 0x69, 0xf5, 0x36, 0x68, 0x1e, 0xf2, 0x00, 0x64, 0xa2, 0xf7, 0xc0, 0xd2, 0x40, + 0x17, 0x1c, 0x2b, 0x95, 0x86, 0xc7, 0xf2, 0x60, 0x35, 0x90, 0x66, 0xf7, 0xfe, 0xc3, 0x81, 0xd6, + 0x14, 0x28, 0xa9, 0x43, 0x02, 0x79, 0x8c, 0x23, 0xf0, 0xbf, 0xce, 0xdb, 0x57, 0x19, 0xe8, 0xa1, + 0x03, 0x2f, 0xad, 0xdd, 0x0e, 0xdf, 0x11, 0xb8, 0x83, 0xa8, 0x86, 0x08, 0x1c, 0xc7, 0x0f, 0x13, + 0xf8, 0x26, 0xba, 0x11, 0xeb, 0x60, 0x9c, 0x53, 0xcd, 0xa3, 0x81, 0x3e, 0x42, 0xa8, 0xb4, 0x32, + 0x34, 0x94, 0x47, 0x22, 0x60, 0xa2, 0x63, 0x8b, 0x97, 0x07, 0xba, 0x88, 0xc3, 0xa5, 0x27, 0xb7, + 0x82, 0x87, 0x51, 0xa5, 0xd4, 0x57, 0x57, 0x27, 0x4b, 0x82, 0xb6, 0x77, 0xfa, 0x47, 0x21, 0x71, + 0x7a, 0x51, 0x10, 0xce, 0x2e, 0x0a, 0xc2, 0xef, 0x17, 0x05, 0xe1, 0xc5, 0x65, 0x21, 0x71, 0x76, + 0x59, 0x48, 0xfc, 0x7a, 0x59, 0x48, 0x7c, 0xb6, 0x16, 0xa3, 0x3e, 0x4e, 0x54, 0xae, 0xed, 0xa0, + 0xfd, 0x06, 0x3a, 0xae, 0xb7, 0x6a, 0xea, 0xe1, 0x13, 0xb5, 0x93, 0xb9, 0x02, 0x3a, 0xac, 0xa5, + 0x83, 0x17, 0xc7, 0x7b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x87, 0xa8, 0x60, 0x10, 0x0f, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/marketplace/types/validation.go b/x/marketplace/types/validation.go index d775f792..70e88d61 100644 --- a/x/marketplace/types/validation.go +++ b/x/marketplace/types/validation.go @@ -3,6 +3,8 @@ package types import ( "time" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -64,7 +66,7 @@ func ValidateSplitShares(splitShares []WeightedAddress) error { if len(splitShares) > MaxSplits { return errorsmod.Wrapf(ErrInvalidSplits, "number of splits are more than the limit, len must be less than or equal to %d ", MaxSplits) } - totalWeight := sdk.NewDec(0) + totalWeight := sdkmath.LegacyNewDec(0) for _, share := range splitShares { _, err := sdk.AccAddressFromBech32(share.Address) if err != nil { @@ -72,7 +74,7 @@ func ValidateSplitShares(splitShares []WeightedAddress) error { } totalWeight = totalWeight.Add(share.Weight) } - if !totalWeight.LTE(sdk.OneDec()) { + if !totalWeight.LTE(sdkmath.LegacyOneDec()) { return errorsmod.Wrapf(ErrInvalidSplits, "invalid weights, total sum of weights must be less than %d", 1) } return nil @@ -88,8 +90,8 @@ func ValidateWhiteListAccounts(whitelistAccounts []string) error { return nil } -func validateIncrementPercentage(increment sdk.Dec) error { - if !increment.IsPositive() || !increment.LTE(sdk.NewDec(1)) { +func validateIncrementPercentage(increment sdkmath.LegacyDec) error { + if !increment.IsPositive() || !increment.LTE(sdkmath.LegacyNewDec(1)) { return errorsmod.Wrapf(ErrInvalidPercentage, "invalid percentage value (%s)", increment.String()) } return nil diff --git a/x/onft/README.md b/x/onft/README.md index 0ccc765a..b0479982 100644 --- a/x/onft/README.md +++ b/x/onft/README.md @@ -53,7 +53,7 @@ message ONFT { string royalty_share = 9 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"royalty_share\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec" ]; } diff --git a/x/onft/client/cli/tx.go b/x/onft/client/cli/tx.go index 544018b8..7d1e9c16 100644 --- a/x/onft/client/cli/tx.go +++ b/x/onft/client/cli/tx.go @@ -4,6 +4,8 @@ import ( "fmt" "strings" + sdkmath "cosmossdk.io/math" + "github.com/OmniFlix/omniflixhub/v5/x/onft/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -257,9 +259,9 @@ Additional Flags if err != nil { return err } - royaltyShare := sdk.NewDec(0) + royaltyShare := sdkmath.LegacyNewDec(0) if len(royaltyShareStr) > 0 { - royaltyShare, err = sdk.NewDecFromStr(royaltyShareStr) + royaltyShare, err = sdkmath.LegacyNewDecFromStr(royaltyShareStr) if err != nil { return err } @@ -514,7 +516,7 @@ func parseSplitShares(splitSharesStr string) ([]*types.WeightedAddress, error) { if err != nil { return nil, err } - weight, err := sdk.NewDecFromStr(strings.TrimSpace(split[1])) + weight, err := sdkmath.LegacyNewDecFromStr(strings.TrimSpace(split[1])) if err != nil { return nil, err } diff --git a/x/onft/exported/onft.go b/x/onft/exported/onft.go index 05d10469..367aeac8 100644 --- a/x/onft/exported/onft.go +++ b/x/onft/exported/onft.go @@ -3,6 +3,8 @@ package exported import ( "time" + sdkmath "cosmossdk.io/math" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -21,7 +23,7 @@ type ONFTI interface { IsExtensible() bool IsNSFW() bool GetCreatedTime() time.Time - GetRoyaltyShare() sdk.Dec + GetRoyaltyShare() sdkmath.LegacyDec } type ( diff --git a/x/onft/keeper/alias.go b/x/onft/keeper/alias.go index b1067157..036f83ed 100644 --- a/x/onft/keeper/alias.go +++ b/x/onft/keeper/alias.go @@ -3,10 +3,9 @@ package keeper import ( "github.com/OmniFlix/omniflixhub/v5/x/onft/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // GetONFTModuleAccount returns oNFT ModuleAccount -func (k Keeper) GetONFTModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI { +func (k Keeper) GetONFTModuleAccount(ctx sdk.Context) sdk.ModuleAccountI { return k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) } diff --git a/x/onft/keeper/denom.go b/x/onft/keeper/denom.go index 287d7b4c..1709b9ee 100644 --- a/x/onft/keeper/denom.go +++ b/x/onft/keeper/denom.go @@ -2,10 +2,10 @@ package keeper import ( errorsmod "cosmossdk.io/errors" + "cosmossdk.io/x/nft" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/nft" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" ) diff --git a/x/onft/keeper/grpc_query.go b/x/onft/keeper/grpc_query.go index 12359606..cc23d408 100644 --- a/x/onft/keeper/grpc_query.go +++ b/x/onft/keeper/grpc_query.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/cosmos/cosmos-sdk/x/nft" + "cosmossdk.io/x/nft" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/onft/keeper/keeper.go b/x/onft/keeper/keeper.go index 0e675131..7ba3b954 100644 --- a/x/onft/keeper/keeper.go +++ b/x/onft/keeper/keeper.go @@ -5,13 +5,15 @@ import ( errorsmod "cosmossdk.io/errors" - "github.com/cometbft/cometbft/libs/log" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/runtime" + + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + nftkeeper "cosmossdk.io/x/nft/keeper" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" ) @@ -29,7 +31,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, - storeKey storetypes.StoreKey, + storeKey *storetypes.KVStoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, @@ -46,7 +48,7 @@ func NewKeeper( accountKeeper: accountKeeper, bankKeeper: bankKeeper, distributionKeeper: distrKeeper, - nk: nftkeeper.NewKeeper(storeKey, cdc, accountKeeper, bankKeeper), + nk: nftkeeper.NewKeeper(runtime.NewKVStoreService(storeKey), cdc, accountKeeper, bankKeeper), authority: authority, } } diff --git a/x/onft/keeper/keys.go b/x/onft/keeper/keys.go index 4733614e..b2dca9f0 100644 --- a/x/onft/keeper/keys.go +++ b/x/onft/keeper/keys.go @@ -1,7 +1,7 @@ package keeper import ( - nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" + nftkeeper "cosmossdk.io/x/nft/keeper" ) func classStoreKey(classID string) []byte { diff --git a/x/onft/keeper/onft.go b/x/onft/keeper/onft.go index 64d22bab..e02b80d9 100644 --- a/x/onft/keeper/onft.go +++ b/x/onft/keeper/onft.go @@ -3,12 +3,14 @@ package keeper import ( "time" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/x/nft" "github.com/OmniFlix/omniflixhub/v5/x/onft/exported" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/nft" ) func (k Keeper) MintONFT( @@ -25,7 +27,7 @@ func (k Keeper) MintONFT( transferable, extensible, nsfw bool, - royaltyShare sdk.Dec, + royaltyShare sdkmath.LegacyDec, receiver sdk.AccAddress, ) error { nftMetadata := &types.ONFTMetadata{ diff --git a/x/onft/migrations/v2/keeper.go b/x/onft/migrations/v2/keeper.go index e923432b..e28626fd 100644 --- a/x/onft/migrations/v2/keeper.go +++ b/x/onft/migrations/v2/keeper.go @@ -5,14 +5,16 @@ import ( "time" "unsafe" + sdkmath "cosmossdk.io/math" + + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/nft" + nftkeeper "cosmossdk.io/x/nft/keeper" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - "github.com/cosmos/cosmos-sdk/x/nft" - nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" ) @@ -38,7 +40,7 @@ func (k keeper) saveNFT( transferable, nsfw bool, nftCreatedAt time.Time, - nftRoyaltyShare sdk.Dec, + nftRoyaltyShare sdkmath.LegacyDec, recipient sdk.AccAddress, ) error { nftMetadata := &types.ONFTMetadata{ diff --git a/x/onft/migrations/v2/migrate.go b/x/onft/migrations/v2/migrate.go index 31fe849a..c2a77d93 100644 --- a/x/onft/migrations/v2/migrate.go +++ b/x/onft/migrations/v2/migrate.go @@ -1,10 +1,10 @@ package v2 import ( + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/x/onft/exported" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/onft/migrations/v2/store.go b/x/onft/migrations/v2/store.go index 3d20ac57..1538230c 100644 --- a/x/onft/migrations/v2/store.go +++ b/x/onft/migrations/v2/store.go @@ -5,9 +5,9 @@ import ( "strings" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" @@ -23,7 +23,7 @@ func MigrateCollections(ctx sdk.Context, startTime := time.Now() store := ctx.KVStore(storeKey) - iterator := sdk.KVStorePrefixIterator(store, KeyDenomID("")) + iterator := storetypes.KVStorePrefixIterator(store, KeyDenomID("")) defer iterator.Close() var ( @@ -85,7 +85,7 @@ func migrateONFT( logger log.Logger, denomID string, ) (int64, error) { - var iterator sdk.Iterator + var iterator storetypes.Iterator defer func() { if iterator != nil { _ = iterator.Close() @@ -95,7 +95,7 @@ func migrateONFT( store := ctx.KVStore(k.storeKey) total := int64(0) - iterator = sdk.KVStorePrefixIterator(store, KeyONFT(denomID, "")) + iterator = storetypes.KVStorePrefixIterator(store, KeyONFT(denomID, "")) for ; iterator.Valid(); iterator.Next() { var oNFT types.ONFT k.cdc.MustUnmarshal(iterator.Value(), &oNFT) diff --git a/x/onft/migrations/v2/store_test.go b/x/onft/migrations/v2/store_test.go index 9e78292f..930e444e 100644 --- a/x/onft/migrations/v2/store_test.go +++ b/x/onft/migrations/v2/store_test.go @@ -6,14 +6,16 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" "github.com/OmniFlix/omniflixhub/v5/app/apptesting" "github.com/OmniFlix/omniflixhub/v5/x/onft/keeper" v2 "github.com/OmniFlix/omniflixhub/v5/x/onft/migrations/v2" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gogotypes "github.com/cosmos/gogoproto/types" ) @@ -54,7 +56,7 @@ func generateCollectionsData( Transferable: []bool{true, false}[rand.Intn(2)], Extensible: []bool{true, false}[rand.Intn(2)], Nsfw: []bool{true, false}[rand.Intn(2)], - RoyaltyShare: sdk.NewDecWithPrec(5, 2), + RoyaltyShare: sdkmath.LegacyNewDecWithPrec(5, 2), Data: fmt.Sprintf("nftData%d", j), Owner: addrs[rand.Intn(len(addrs))].String(), CreatedAt: time.Time{}, diff --git a/x/onft/module.go b/x/onft/module.go index ffd21f58..8e80cc0f 100644 --- a/x/onft/module.go +++ b/x/onft/module.go @@ -5,6 +5,8 @@ import ( "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" + "github.com/OmniFlix/omniflixhub/v5/x/onft/exported" "github.com/OmniFlix/omniflixhub/v5/x/onft/simulation" @@ -25,7 +27,7 @@ import ( ) var ( - _ module.AppModule = AppModule{} + _ appmodule.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModuleSimulation = AppModule{} ) @@ -37,6 +39,12 @@ type AppModuleBasic struct { cdc codec.Codec } +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType is a marker function just indicates that this is a one-per-module type. +func (am AppModule) IsOnePerModuleType() {} + func (AppModuleBasic) Name() string { return types.ModuleName } func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -137,12 +145,6 @@ func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the onft module. @@ -151,7 +153,8 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // RegisterStoreDecoder registers a decoder for onft module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { + +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) } diff --git a/x/onft/simulation/genesis.go b/x/onft/simulation/genesis.go index 6975758f..15fc0410 100644 --- a/x/onft/simulation/genesis.go +++ b/x/onft/simulation/genesis.go @@ -7,7 +7,7 @@ import ( "strings" "time" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -98,6 +98,6 @@ func RandMetadata(r *rand.Rand) types.Metadata { } } -func RandRoyaltyShare(r *rand.Rand) sdk.Dec { - return simtypes.RandomDecAmount(r, sdk.NewDecWithPrec(999999999999999999, 18)) +func RandRoyaltyShare(r *rand.Rand) sdkmath.LegacyDec { + return simtypes.RandomDecAmount(r, sdkmath.LegacyNewDecWithPrec(999999999999999999, 18)) } diff --git a/x/onft/simulation/operations.go b/x/onft/simulation/operations.go index bec48b37..ab31d858 100644 --- a/x/onft/simulation/operations.go +++ b/x/onft/simulation/operations.go @@ -5,6 +5,8 @@ import ( "math/rand" "strings" + sdkmath "cosmossdk.io/math" + appparams "github.com/OmniFlix/omniflixhub/v5/app/params" "github.com/OmniFlix/omniflixhub/v5/x/onft/keeper" "github.com/OmniFlix/omniflixhub/v5/x/onft/types" @@ -37,46 +39,46 @@ func WeightedOperations( var weightCreateDenom, weightMint, weightEdit, weightTransfer, weightBurn, weightUpdateDenom, weightTransferDenom int appParams.GetOrGenerate( - cdc, OpWeightMsgCreateDenom, &weightCreateDenom, nil, + OpWeightMsgCreateDenom, &weightCreateDenom, nil, func(_ *rand.Rand) { weightCreateDenom = 50 }, ) appParams.GetOrGenerate( - cdc, OpWeightMsgMintONFT, &weightMint, nil, + OpWeightMsgMintONFT, &weightMint, nil, func(_ *rand.Rand) { weightMint = 100 }, ) appParams.GetOrGenerate( - cdc, OpWeightMsgEditONFT, &weightEdit, nil, + OpWeightMsgEditONFT, &weightEdit, nil, func(_ *rand.Rand) { weightEdit = 50 }, ) appParams.GetOrGenerate( - cdc, OpWeightMsgTransferONFT, &weightTransfer, nil, + OpWeightMsgTransferONFT, &weightTransfer, nil, func(_ *rand.Rand) { weightTransfer = 50 }, ) appParams.GetOrGenerate( - cdc, OpWeightMsgBurnONFT, &weightBurn, nil, + OpWeightMsgBurnONFT, &weightBurn, nil, func(_ *rand.Rand) { weightBurn = 10 }, ) appParams.GetOrGenerate( - cdc, OpWeightMsgTransferDenom, &weightTransferDenom, nil, + OpWeightMsgTransferDenom, &weightTransferDenom, nil, func(_ *rand.Rand) { weightTransferDenom = 10 }, ) appParams.GetOrGenerate( - cdc, OpWeightMsgUpdateDenom, &weightUpdateDenom, nil, + OpWeightMsgUpdateDenom, &weightUpdateDenom, nil, func(_ *rand.Rand) { weightUpdateDenom = 10 }, @@ -125,7 +127,7 @@ func SimulateMsgCreateDenom(k keeper.Keeper, ak types.AccountKeeper, bk types.Ba URI := strings.ToLower(simtypes.RandStringOfLength(r, 10)) URIHash := strings.ToLower(simtypes.RandStringOfLength(r, 10)) sender, _ := simtypes.RandomAcc(r, accs) - creationFee := sdk.Coin{Denom: "uflix", Amount: sdk.NewInt(100_000_000)} + creationFee := sdk.Coin{Denom: "uflix", Amount: sdkmath.NewInt(100_000_000)} msg := types.NewMsgCreateDenom( symbol, @@ -157,7 +159,6 @@ func SimulateMsgCreateDenom(k keeper.Keeper, ak types.AccountKeeper, bk types.Ba TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: types.TypeMsgCreateDenom, Context: ctx, SimAccount: sender, AccountKeeper: ak, @@ -212,7 +213,6 @@ func SimulateMsgMintONFT(k keeper.Keeper, ak types.AccountKeeper, bk types.BankK TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: types.TypeMsgMintONFT, Context: ctx, SimAccount: sender, AccountKeeper: ak, @@ -265,7 +265,6 @@ func SimulateMsgTransferONFT(k keeper.Keeper, ak types.AccountKeeper, bk types.B TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: types.TypeMsgTransferONFT, Context: ctx, SimAccount: ownerAccount, AccountKeeper: ak, @@ -281,7 +280,7 @@ func SimulateMsgTransferONFT(k keeper.Keeper, ak types.AccountKeeper, bk types.B return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTransferONFT, err.Error()), nil, err } if !nft.IsTransferable() { - return simtypes.NewOperationMsg(msg, false, "non transferable nft", nil), nil, nil + return simtypes.NewOperationMsg(msg, false, "non transferable nft"), nil, nil } } return simOpMsg, fOps, err @@ -318,7 +317,6 @@ func SimulateMsgBurnONFT(k keeper.Keeper, ak types.AccountKeeper, bk types.BankK TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: types.TypeMsgBurnONFT, Context: ctx, SimAccount: ownerAccount, AccountKeeper: ak, @@ -368,7 +366,6 @@ func SimulateMsgTransferDenom(k keeper.Keeper, ak types.AccountKeeper, bk types. TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: types.TypeMsgTransferDenom, Context: ctx, SimAccount: ownerAccount, AccountKeeper: ak, @@ -419,7 +416,6 @@ func SimulateMsgUpdateDenom(k keeper.Keeper, ak types.AccountKeeper, bk types.Ba TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: types.TypeMsgUpdateDenom, Context: ctx, SimAccount: ownerAccount, AccountKeeper: ak, diff --git a/x/onft/types/builder.go b/x/onft/types/builder.go index db96f087..e55a7605 100644 --- a/x/onft/types/builder.go +++ b/x/onft/types/builder.go @@ -8,10 +8,12 @@ import ( "fmt" "time" + sdkmath "cosmossdk.io/math" + + "cosmossdk.io/x/nft" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/nft" proto "github.com/cosmos/gogoproto/proto" ) @@ -424,7 +426,7 @@ func (nb NFTBuilder) Build(classId, nftID, nftURI, nftData string) (nft.NFT, err data = string(dataBz) } createdTime, _ := time.Parse(time.RFC3339, createdAt) - royalty, _ := sdk.NewDecFromStr(royaltyShare) + royalty, _ := sdkmath.LegacyNewDecFromStr(royaltyShare) metadata, err := codectypes.NewAnyWithValue(&ONFTMetadata{ Name: name, diff --git a/x/onft/types/codec.go b/x/onft/types/codec.go index 7c24db25..a4f38ea6 100644 --- a/x/onft/types/codec.go +++ b/x/onft/types/codec.go @@ -5,11 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" "github.com/cosmos/gogoproto/proto" ) @@ -51,18 +48,3 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } - -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) - // Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be - // used to properly serialize MsgGrant and MsgExec instances - RegisterLegacyAminoCodec(authzcodec.Amino) - RegisterLegacyAminoCodec(govcodec.Amino) -} diff --git a/x/onft/types/expected_keepers.go b/x/onft/types/expected_keepers.go index ea42d075..7600b52a 100644 --- a/x/onft/types/expected_keepers.go +++ b/x/onft/types/expected_keepers.go @@ -1,27 +1,30 @@ package types import ( + "context" + + "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the expected account keeper for query account type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI GetModuleAddress(module string) sdk.AccAddress + AddressCodec() address.Codec } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { BlockedAddr(addr sdk.AccAddress) bool - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + LockedCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins } // DistributionKeeper defines the expected distribution keeper type DistributionKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } diff --git a/x/onft/types/msgs.go b/x/onft/types/msgs.go index 2c0e18f9..999347ef 100644 --- a/x/onft/types/msgs.go +++ b/x/onft/types/msgs.go @@ -4,6 +4,8 @@ import ( "strings" "unicode/utf8" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -94,12 +96,6 @@ func (msg MsgCreateDenom) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg MsgCreateDenom) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgCreateDenom) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -157,12 +153,6 @@ func (msg MsgUpdateDenom) ValidateBasic() error { return nil } -// GetSignBytes Implements Msg. -func (msg MsgUpdateDenom) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgUpdateDenom) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -194,11 +184,6 @@ func (msg MsgTransferDenom) ValidateBasic() error { return nil } -func (msg MsgTransferDenom) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgTransferDenom) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -225,11 +210,6 @@ func (msg MsgPurgeDenom) ValidateBasic() error { return nil } -func (msg MsgPurgeDenom) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgPurgeDenom) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -240,7 +220,7 @@ func (msg MsgPurgeDenom) GetSigners() []sdk.AccAddress { func NewMsgMintONFT( denomId, sender, recipient string, metadata Metadata, data string, - transferable, extensible, nsfw bool, royaltyShare sdk.Dec, + transferable, extensible, nsfw bool, royaltyShare sdkmath.LegacyDec, ) *MsgMintONFT { return &MsgMintONFT{ Id: GenUniqueID(IDPrefix), @@ -280,18 +260,13 @@ func (msg MsgMintONFT) ValidateBasic() error { if err := ValidateURI(msg.Metadata.PreviewURI); err != nil { return err } - if msg.RoyaltyShare.IsNegative() || msg.RoyaltyShare.GTE(sdk.NewDec(1)) { + if msg.RoyaltyShare.IsNegative() || msg.RoyaltyShare.GTE(sdkmath.LegacyNewDec(1)) { return errorsmod.Wrapf(ErrInvalidPercentage, "invalid royalty share percentage decimal value; %d, must be positive and less than 1", msg.RoyaltyShare) } return ValidateONFTID(msg.Id) } -func (msg MsgMintONFT) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgMintONFT) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -328,11 +303,6 @@ func (msg MsgTransferONFT) ValidateBasic() error { return ValidateONFTID(msg.Id) } -func (msg MsgTransferONFT) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgTransferONFT) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -360,11 +330,6 @@ func (msg MsgBurnONFT) ValidateBasic() error { return ValidateONFTID(msg.Id) } -func (msg MsgBurnONFT) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - func (msg MsgBurnONFT) GetSigners() []sdk.AccAddress { from, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { @@ -375,11 +340,6 @@ func (msg MsgBurnONFT) GetSigners() []sdk.AccAddress { // MsgUpdateParams -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) diff --git a/x/onft/types/onft.go b/x/onft/types/onft.go index e3850464..f9939cb1 100644 --- a/x/onft/types/onft.go +++ b/x/onft/types/onft.go @@ -3,6 +3,8 @@ package types import ( "time" + sdkmath "cosmossdk.io/math" + "github.com/OmniFlix/omniflixhub/v5/x/onft/exported" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,7 +26,7 @@ func UnmarshalNFTMetadata(cdc codec.BinaryCodec, bz []byte) (ONFTMetadata, error func NewONFT( id string, metadata Metadata, data string, transferable, extensible bool, owner sdk.AccAddress, - createdTime time.Time, nsfw bool, royaltyShare sdk.Dec, + createdTime time.Time, nsfw bool, royaltyShare sdkmath.LegacyDec, ) ONFT { return ONFT{ Id: id, @@ -92,7 +94,7 @@ func (onft ONFT) IsNSFW() bool { return onft.Nsfw } -func (onft ONFT) GetRoyaltyShare() sdk.Dec { +func (onft ONFT) GetRoyaltyShare() sdkmath.LegacyDec { return onft.RoyaltyShare } diff --git a/x/onft/types/onft.pb.go b/x/onft/types/onft.pb.go index 896efd42..cfbb8ac1 100644 --- a/x/onft/types/onft.pb.go +++ b/x/onft/types/onft.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" github_com_gogo_protobuf_types "github.com/cosmos/gogoproto/types" @@ -197,15 +197,15 @@ var xxx_messageInfo_DenomMetadata proto.InternalMessageInfo // ASSET or ONFT type ONFT struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Metadata Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` - Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` - Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` - CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` - Nsfw bool `protobuf:"varint,8,opt,name=nsfw,proto3" json:"nsfw,omitempty"` - RoyaltyShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=royalty_share,json=royaltyShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"royalty_share" yaml:"royalty_share"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Metadata Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` + Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` + CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` + Nsfw bool `protobuf:"varint,8,opt,name=nsfw,proto3" json:"nsfw,omitempty"` + RoyaltyShare cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=royalty_share,json=royaltyShare,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"royalty_share" yaml:"royalty_share"` } func (m *ONFT) Reset() { *m = ONFT{} } @@ -283,16 +283,16 @@ func (m *Metadata) XXX_DiscardUnknown() { var xxx_messageInfo_Metadata proto.InternalMessageInfo type ONFTMetadata struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - PreviewURI string `protobuf:"bytes,3,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` - Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` - Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` - CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` - Nsfw bool `protobuf:"varint,8,opt,name=nsfw,proto3" json:"nsfw,omitempty"` - RoyaltyShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=royalty_share,json=royaltyShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"royalty_share" yaml:"royalty_share"` - UriHash string `protobuf:"bytes,10,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + PreviewURI string `protobuf:"bytes,3,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` + CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` + Nsfw bool `protobuf:"varint,8,opt,name=nsfw,proto3" json:"nsfw,omitempty"` + RoyaltyShare cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=royalty_share,json=royaltyShare,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"royalty_share" yaml:"royalty_share"` + UriHash string `protobuf:"bytes,10,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` } func (m *ONFTMetadata) Reset() { *m = ONFTMetadata{} } @@ -367,8 +367,8 @@ func (m *Owner) XXX_DiscardUnknown() { var xxx_messageInfo_Owner proto.InternalMessageInfo type WeightedAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight" yaml:"weight"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight" yaml:"weight"` } func (m *WeightedAddress) Reset() { *m = WeightedAddress{} } @@ -419,71 +419,71 @@ func init() { func init() { proto.RegisterFile("OmniFlix/onft/v1beta1/onft.proto", fileDescriptor_de1608f52787b22e) } var fileDescriptor_de1608f52787b22e = []byte{ - // 1009 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4b, 0x6f, 0xe3, 0xd4, - 0x17, 0x8f, 0xf3, 0xee, 0x49, 0xd3, 0x76, 0xee, 0xbf, 0xff, 0x91, 0x29, 0x43, 0x1c, 0xdd, 0x19, - 0x8d, 0x66, 0x01, 0xb6, 0xa6, 0x08, 0x69, 0x34, 0x12, 0x82, 0x9a, 0x52, 0xd1, 0x45, 0x29, 0x32, - 0x33, 0x1a, 0xc4, 0x26, 0x72, 0xec, 0x9b, 0xe4, 0x6a, 0x62, 0x3b, 0xf8, 0x3a, 0x6d, 0xf3, 0x0d, - 0x58, 0x56, 0xb0, 0x61, 0xc9, 0x0a, 0xf1, 0x51, 0xba, 0x9c, 0x25, 0xb0, 0x30, 0x90, 0x6e, 0x58, - 0xe7, 0x13, 0xa0, 0xfb, 0x70, 0x62, 0xf7, 0x31, 0x12, 0x23, 0xb1, 0x63, 0x95, 0x7b, 0x1e, 0xf7, - 0xf8, 0x9c, 0xdf, 0x39, 0xe7, 0x97, 0x0b, 0xdd, 0xe3, 0x20, 0xa4, 0x07, 0x63, 0x7a, 0x66, 0x45, - 0xe1, 0x20, 0xb1, 0x4e, 0x1e, 0xf7, 0x49, 0xe2, 0x3e, 0x16, 0x82, 0x39, 0x89, 0xa3, 0x24, 0x42, - 0xff, 0xcf, 0x3c, 0x4c, 0xa1, 0x54, 0x1e, 0x3b, 0xdb, 0xc3, 0x68, 0x18, 0x09, 0x0f, 0x8b, 0x9f, - 0xa4, 0xf3, 0x8e, 0x31, 0x8c, 0xa2, 0xe1, 0x98, 0x58, 0x42, 0xea, 0x4f, 0x07, 0x56, 0x42, 0x03, - 0xc2, 0x12, 0x37, 0x98, 0x48, 0x07, 0xfc, 0xad, 0x06,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, 0xa0, 0xc1, 0xe6, 0x15, 0xce, 0x45, 0xef, 0x5e, 0xc9, 0xcf, 0x46, 0x8b, 0xd4, - 0xd8, 0x90, 0x41, 0x94, 0x01, 0xaf, 0x72, 0x7e, 0x01, 0xf5, 0x53, 0x11, 0x40, 0xed, 0xe3, 0x47, - 0xff, 0x18, 0xd8, 0xb6, 0x0c, 0x2d, 0xa3, 0x60, 0x47, 0x85, 0xb3, 0x8f, 0x2e, 0xfe, 0xec, 0x94, - 0x2e, 0xe6, 0x1d, 0xed, 0xd5, 0xbc, 0xa3, 0xfd, 0x31, 0xef, 0x68, 0xe7, 0x97, 0x9d, 0xd2, 0xab, - 0xcb, 0x4e, 0xe9, 0x97, 0xcb, 0x4e, 0xe9, 0x6b, 0x2b, 0x17, 0x7e, 0xf5, 0x38, 0x0c, 0x42, 0x3a, - 0x18, 0xd3, 0xb3, 0xd1, 0xb4, 0x6f, 0x9d, 0x7c, 0x60, 0xa9, 0xd7, 0xa2, 0xf8, 0x56, 0xbf, 0x2e, - 0x26, 0xeb, 0xfd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xa0, 0x67, 0x23, 0x4b, 0x0a, 0x00, - 0x00, + // 1012 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xe3, 0x54, + 0x10, 0xaf, 0xf3, 0xbf, 0x93, 0xa6, 0xed, 0x3e, 0xca, 0xca, 0x74, 0x97, 0x38, 0x7a, 0xbb, 0x42, + 0x7b, 0x40, 0x8e, 0xb6, 0x80, 0xb4, 0x5a, 0x84, 0x44, 0x4d, 0x59, 0x51, 0x69, 0x4b, 0x91, 0xd9, + 0x15, 0x88, 0x4b, 0x78, 0xb1, 0x5f, 0x93, 0x27, 0x62, 0x3b, 0xf8, 0x39, 0x6d, 0xf3, 0x0d, 0xb8, + 0x20, 0x55, 0x70, 0x46, 0xe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55, 0xe7, 0xb5, 0x79, + 0x6a, 0x6d, 0x4c, 0x49, 0x30, 0x7a, 0x8c, 0xb3, 0x1b, 0xec, 0xd6, 0xe5, 0x71, 0xdf, 0x17, 0xf6, + 0x22, 0x50, 0x8f, 0xf9, 0x2a, 0x89, 0x82, 0x7d, 0x76, 0x83, 0xdd, 0xba, 0x38, 0xee, 0xfb, 0x1c, + 0xff, 0x50, 0x86, 0xaa, 0x2c, 0x04, 0xad, 0x43, 0x29, 0xfb, 0x86, 0x5b, 0x62, 0x3e, 0xba, 0x0d, + 0x35, 0x3e, 0x0d, 0xfa, 0xd1, 0xc8, 0x2c, 0x49, 0x9d, 0x96, 0x10, 0x82, 0x4a, 0x48, 0x02, 0x6a, + 0x96, 0xa5, 0x56, 0x9e, 0xa5, 0xad, 0x37, 0xa4, 0x01, 0x31, 0x2b, 0xda, 0x56, 0x4a, 0xc8, 0x84, + 0xba, 0x17, 0x53, 0x92, 0x44, 0xb1, 0x59, 0x95, 0x17, 0x99, 0x88, 0x3a, 0xd0, 0xf4, 0x29, 0xf7, + 0x62, 0x36, 0x16, 0x65, 0x9a, 0x35, 0x79, 0x9b, 0x57, 0xa1, 0x8f, 0xa1, 0x39, 0x8e, 0xe9, 0x31, + 0xa3, 0x27, 0xbd, 0x49, 0xcc, 0xcc, 0xba, 0x2c, 0xfe, 0xfe, 0x2c, 0xb5, 0xe0, 0x33, 0xa5, 0x7e, + 0xee, 0xee, 0xcf, 0x53, 0x0b, 0xa9, 0xd2, 0x72, 0xa6, 0xd8, 0x05, 0x2d, 0x3d, 0x8f, 0x19, 0xda, + 0x84, 0xb2, 0x70, 0x6f, 0xc8, 0x0f, 0x88, 0x23, 0x7a, 0x03, 0x1a, 0x93, 0x98, 0xf5, 0x86, 0x84, + 0x0f, 0xcd, 0x55, 0x95, 0xd5, 0x24, 0x66, 0x9f, 0x10, 0x3e, 0x14, 0xb5, 0xf9, 0x24, 0x21, 0x26, + 0xa8, 0xda, 0xc4, 0x19, 0x7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xe3, 0xf7, 0xba, 0xfa, 0x31, 0x98, 0x4c, 0xc7, + 0x94, 0xf7, 0x6b, 0x72, 0x86, 0xde, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x20, 0xfd, 0x52, 0x18, + 0x2a, 0x0a, 0x00, 0x00, } func (this *ONFT) Equal(that interface{}) bool { diff --git a/x/onft/types/tx.pb.go b/x/onft/types/tx.pb.go index 0cd4e268..bd65d319 100644 --- a/x/onft/types/tx.pb.go +++ b/x/onft/types/tx.pb.go @@ -5,9 +5,9 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -345,16 +345,16 @@ func (m *MsgTransferDenomResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTransferDenomResponse proto.InternalMessageInfo type MsgMintONFT struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` - Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` - Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` - Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` - Nsfw bool `protobuf:"varint,7,opt,name=nsfw,proto3" json:"nsfw,omitempty"` - RoyaltyShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=royalty_share,json=royaltyShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"royalty_share" yaml:"royalty_share"` - Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` - Recipient string `protobuf:"bytes,10,opt,name=recipient,proto3" json:"recipient,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` + Nsfw bool `protobuf:"varint,7,opt,name=nsfw,proto3" json:"nsfw,omitempty"` + RoyaltyShare cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=royalty_share,json=royaltyShare,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"royalty_share" yaml:"royalty_share"` + Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,10,opt,name=recipient,proto3" json:"recipient,omitempty"` } func (m *MsgMintONFT) Reset() { *m = MsgMintONFT{} } @@ -684,80 +684,81 @@ func init() { func init() { proto.RegisterFile("OmniFlix/onft/v1beta1/tx.proto", fileDescriptor_adb8c7aefdb74d05) } var fileDescriptor_adb8c7aefdb74d05 = []byte{ - // 1163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xbf, 0x6f, 0xdb, 0xc6, - 0x17, 0x17, 0x25, 0x59, 0x96, 0x4e, 0xb6, 0xe3, 0xd0, 0x76, 0x4c, 0xeb, 0xeb, 0x90, 0x06, 0x91, - 0xaf, 0x63, 0x18, 0xb5, 0x58, 0xbb, 0x68, 0x07, 0x77, 0x8a, 0x92, 0x1a, 0xcd, 0xa0, 0xc6, 0x60, - 0x62, 0x14, 0xc8, 0xa2,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x94, 0x84, 0x0d, 0x61, 0xab, 0xa4, 0x67, - 0x91, 0x29, 0xde, 0x01, 0x05, 0x32, 0xb0, 0x9b, 0x6e, 0x57, 0xca, 0x52, 0x1d, 0x97, 0x44, 0x11, - 0xe4, 0x1d, 0xc3, 0x86, 0x52, 0x8e, 0x6a, 0xe9, 0x5a, 0xdc, 0x00, 0x65, 0x13, 0x92, 0x16, 0x46, - 0x3d, 0x0f, 0xb9, 0x8e, 0x94, 0xa7, 0x5b, 0x51, 0x95, 0xf8, 0x01, 0x28, 0xf7, 0x30, 0x3c, 0x46, - 0xf0, 0x65, 0xa3, 0x8f, 0x91, 0x34, 0xe3, 0x23, 0x6a, 0xf7, 0xce, 0x87, 0x0a, 0x38, 0x64, 0xea, - 0x23, 0xfd, 0xf1, 0xd5, 0x50, 0x11, 0x07, 0x86, 0xdd, 0xdd, 0x57, 0x23, 0x50, 0x55, 0x07, 0x5c, - 0x3a, 0xc2, 0x88, 0x3a, 0xd5, 0xea, 0x40, 0xdb, 0x90, 0x0a, 0xdc, 0x29, 0x2a, 0x51, 0x3d, 0x74, - 0x4c, 0x88, 0xa5, 0x59, 0xae, 0xa7, 0x92, 0xf8, 0x85, 0x00, 0xe6, 0x5a, 0x3e, 0x49, 0xe4, 0x3a, - 0x8d, 0x36, 0x84, 0x52, 0x71, 0x43, 0xd8, 0x2a, 0xef, 0xad, 0x55, 0x79, 0x26, 0xfc, 0xb8, 0x06, - 0x79, 0xad, 0x3e, 0x74, 0x91, 0x53, 0x3b, 0x38, 0x1b, 0x2a, 0x99, 0xab, 0xa1, 0xb2, 0xc4, 0x3c, - 0x89, 0x1e, 0x56, 0xbf, 0xff, 0x55, 0xb9, 0x6f, 0x21, 0xaf, 0xd3, 0x6f, 0x56, 0x5b, 0xae, 0xcd, - 0xb3, 0xc9, 0x7f, 0x76, 0x88, 0xf9, 0x42, 0xf3, 0x06, 0x3d, 0x48, 0xe8, 0x3d, 0x7a, 0x39, 0x38, - 0x79, 0x00, 0xa1, 0xb8, 0x08, 0x72, 0x3e, 0xeb, 0x12, 0xf5, 0xcd, 0x5f, 0x8a, 0x6b, 0xa0, 0xd8, - 0xc7, 0xa8, 0xd1, 0x31, 0x48, 0x47, 0x02, 0x54, 0x3d, 0xdb, 0xc7, 0xe8, 0x43, 0x83, 0x74, 0xfc, - 0x00, 0x9b, 0x86, 0x67, 0x48, 0x65, 0x16, 0x60, 0x7f, 0x2d, 0x7e, 0x0a, 0x6e, 0x63, 0x77, 0x60, - 0x74, 0xbd, 0x41, 0x03, 0xc3, 0x16, 0x44, 0xc7, 0x10, 0x13, 0x69, 0x6e, 0x23, 0xb7, 0x55, 0xde, - 0xdb, 0xac, 0x26, 0x56, 0x69, 0xf5, 0x63, 0x88, 0xac, 0x8e, 0x07, 0xcd, 0x07, 0xa6, 0x89, 0x21, - 0x21, 0xb5, 0xf5, 0xab, 0xa1, 0x22, 0x31, 0x52, 0x63, 0x57, 0xa9, 0xfa, 0x22, 0xd7, 0xe9, 0x81, - 0x6a, 0xff, 0xed, 0x3f, 0xbe, 0x53, 0x32, 0x9f, 0x5f, 0x9e, 0x6e, 0xf3, 0x58, 0x7e, 0x79, 0x79, - 0xba, 0xbd, 0x1e, 0x2f, 0xac, 0x78, 0x05, 0xa9, 0x12, 0xb8, 0x13, 0xd7, 0xe8, 0x90, 0xf4, 0x5c, - 0x87, 0x40, 0xf5, 0x4d, 0x96, 0x96, 0xdb, 0x51, 0xcf, 0x4c, 0x2d, 0xb7, 0xa0, 0xac, 0xb2, 0xe9, - 0x65, 0x95, 0xbb, 0xb1, 0xac, 0xf2, 0x7f, 0xa3, 0xac, 0x58, 0xf9, 0xcc, 0xc4, 0xca, 0x27, 0x31, - 0xec, 0x85, 0xff, 0x40, 0xd8, 0x23, 0x91, 0xe4, 0x61, 0x8f, 0x68, 0xc2, 0xb0, 0x77, 0xc0, 0x7c, - 0x9d, 0x58, 0x87, 0x7d, 0x6c, 0x4d, 0xe8, 0x71, 0xc6, 0x3b, 0x1b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0x3b, 0x7f, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x6a, 0x0d, 0xb7, 0xd8, 0xb5, 0x0d, 0x00, 0x00, + // 1179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xbf, 0x6f, 0xdb, 0x46, + 0x1b, 0x16, 0x25, 0x59, 0x96, 0x4e, 0xb6, 0xe3, 0xd0, 0x76, 0x4c, 0x2b, 0x0e, 0x69, 0x10, 0xf9, + 0x1c, 0xc3, 0xf8, 0x4c, 0xd6, 0x2e, 0xda, 0xc1, 0x99, 0xa2, 0xa4, 0x46, 0x03, 0x54, 0x8d, 0xc1, + 0xc4, 0x28, 0x90, 0x45, 0xa1, 0xc8, 0x13, 0x79, 0x88, 0x48, 0xaa, 0x77, 0x94, 0x63, 0x6d, 0x45, + 0xd1, 0xa9, 0xe8, 0xd0, 0xa1, 0xe8, 0xdc, 0xb9, 0x5d, 0x3c, 0x74, 0xea, 0xda, 0xc5, 0x63, 0x90, + 0xa9, 0xc8, 0xa0, 0xb6, 0xf6, 0xe0, 0xce, 0xfe, 0x0b, 0x0a, 0x1e, 0x8f, 0x14, 0x69, 0x8b, 0xb2, + 0x8a, 0xb6, 0x40, 0x17, 0xeb, 0xee, 0xbd, 0xe7, 0xee, 0x7d, 0x9e, 0x7b, 0x7f, 0xf0, 0x0c, 0xc4, + 0x27, 0x8e, 0x8b, 0xf6, 0x3a, 0xe8, 0x48, 0xf5, 0xdc, 0xb6, 0xaf, 0x1e, 0x6e, 0xb7, 0xa0, 0xaf, + 0x6f, 0xab, 0xfe, 0x91, 0xd2, 0xc5, 0x9e, 0xef, 0xf1, 0x4b, 0xd1, 0xba, 0x12, 0xac, 0x2b, 0x6c, + 0xbd, 0xb6, 0x6c, 0x78, 0xc4, 0xf1, 0x88, 0xea, 0x10, 0x4b, 0x3d, 0xdc, 0x0e, 0x7e, 0x42, 0x7c, + 0xed, 0xa6, 0xee, 0x20, 0xd7, 0x53, 0xe9, 0x5f, 0x66, 0x5a, 0x09, 0xb1, 0x4d, 0x3a, 0x53, 0xc3, + 0x09, 0x5b, 0x92, 0x47, 0x7b, 0xef, 0xea, 0x58, 0x77, 0x22, 0x8c, 0xc8, 0x5c, 0xb5, 0x74, 0x02, + 0x63, 0x84, 0xe1, 0x21, 0x97, 0xad, 0x2f, 0x5a, 0x9e, 0xe5, 0x85, 0x67, 0x07, 0x23, 0x66, 0x5d, + 0x1b, 0x7d, 0x32, 0x15, 0x41, 0x11, 0xf2, 0x9b, 0x22, 0x98, 0x6b, 0x10, 0xeb, 0x21, 0x86, 0xba, + 0x0f, 0x1f, 0x41, 0xd7, 0x73, 0xf8, 0x39, 0x90, 0x47, 0xa6, 0xc0, 0xad, 0x71, 0x1b, 0x15, 0x2d, + 0x8f, 0x4c, 0xfe, 0x16, 0x28, 0x91, 0xbe, 0xd3, 0xf2, 0x3a, 0x42, 0x9e, 0xda, 0xd8, 0x8c, 0xe7, + 0x41, 0xd1, 0xd5, 0x1d, 0x28, 0x14, 0xa8, 0x95, 0x8e, 0xf9, 0x35, 0x50, 0x35, 0x21, 0x31, 0x30, + 0xea, 0xfa, 0xc8, 0x73, 0x85, 0x22, 0x5d, 0x4a, 0x9a, 0xf8, 0x0f, 0x40, 0xb5, 0x8b, 0xe1, 0x21, + 0x82, 0xaf, 0x9a, 0x3d, 0x8c, 0x84, 0xa9, 0x00, 0x51, 0xbf, 0x7b, 0x3a, 0x90, 0xc0, 0x7e, 0x68, + 0x3e, 0xd0, 0x1e, 0x5f, 0x0c, 0x24, 0xbe, 0xaf, 0x3b, 0x9d, 0x5d, 0x39, 0x01, 0x95, 0x35, 0xc0, + 0x66, 0x07, 0x18, 0x51, 0x52, 0x86, 0x0d, 0x1d, 0x5d, 0x28, 0x31, 0x52, 0x74, 0x46, 0xed, 0xd0, + 0x35, 0x21, 0x16, 0xa6, 0x99, 0x9d, 0xce, 0xf8, 0x2f, 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2, 0x02, 0x1e, 0xa3, 0x21, 0xc2, 0x8c, 0xd3, 0x70, 0xb9, 0xe4, 0x02, 0x0d, + 0xa9, 0x72, 0x5b, 0xbf, 0x2e, 0x57, 0x42, 0xdc, 0x38, 0x0d, 0xa3, 0xca, 0xa4, 0x36, 0xf5, 0xd9, + 0xf9, 0xf1, 0x26, 0x57, 0x6f, 0x9c, 0xfc, 0x2e, 0xe6, 0x4e, 0x4e, 0x45, 0xee, 0xf5, 0xa9, 0xc8, + 0xfd, 0x76, 0x2a, 0x72, 0x5f, 0x9f, 0x89, 0xb9, 0xd7, 0x67, 0x62, 0xee, 0x97, 0x33, 0x31, 0xf7, + 0x5c, 0x4d, 0xbc, 0x9e, 0x87, 0xcd, 0xc3, 0x71, 0x51, 0xbb, 0x83, 0x8e, 0xec, 0x5e, 0x4b, 0x3d, + 0x7c, 0x4f, 0x65, 0xdd, 0x84, 0x3e, 0xa5, 0x5b, 0x25, 0xfa, 0xef, 0xca, 0xbb, 0x7f, 0x06, 0x00, + 0x00, 0xff, 0xff, 0xa8, 0xa2, 0xdd, 0x57, 0xaa, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/onft/types/validations.go b/x/onft/types/validations.go index cf37c407..61caa0cb 100644 --- a/x/onft/types/validations.go +++ b/x/onft/types/validations.go @@ -3,6 +3,8 @@ package types import ( "fmt" + sdkmath "cosmossdk.io/math" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -139,7 +141,7 @@ func ValidateWeightedAddresses(i interface{}) error { return nil } - weightSum := sdk.NewDec(0) + weightSum := sdkmath.LegacyNewDec(0) for i, w := range v { _, err := sdk.AccAddressFromBech32(w.Address) if err != nil { @@ -148,13 +150,13 @@ func ValidateWeightedAddresses(i interface{}) error { if !w.Weight.IsPositive() { return fmt.Errorf("non-positive weight at %dth", i) } - if w.Weight.GT(sdk.NewDec(1)) { + if w.Weight.GT(sdkmath.LegacyNewDec(1)) { return fmt.Errorf("more than 1 weight at %dth", i) } weightSum = weightSum.Add(w.Weight) } - if !weightSum.Equal(sdk.NewDec(1)) { + if !weightSum.Equal(sdkmath.LegacyNewDec(1)) { return fmt.Errorf("invalid weight sum: %s", weightSum.String()) } diff --git a/x/tokenfactory/bindings/custom_msg_test.go b/x/tokenfactory/bindings/custom_msg_test.go index c2ad712f..36ea9bef 100644 --- a/x/tokenfactory/bindings/custom_msg_test.go +++ b/x/tokenfactory/bindings/custom_msg_test.go @@ -5,8 +5,10 @@ import ( "fmt" "testing" + sdkmath "cosmossdk.io/math" + "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types" "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" @@ -71,7 +73,7 @@ func TestMintMsg(t *testing.T) { require.NoError(t, err) sunDenom := fmt.Sprintf("factory/%s/%s", reflect.String(), msg.CreateDenom.Subdenom) - amount, ok := sdk.NewIntFromString("808010808") + amount, ok := sdkmath.NewIntFromString("808010808") require.True(t, ok) msg = bindings.TokenFactoryMsg{MintTokens: &bindings.MintTokens{ Denom: sunDenom, @@ -175,60 +177,6 @@ func TestMintMsg(t *testing.T) { require.Equal(t, resp.Denom, coin.Denom) } -func TestForceTransfer(t *testing.T) { - creator := RandomAccountAddress() - customApp, ctx := SetupCustomApp(t, creator) - - lucky := RandomAccountAddress() - rcpt := RandomAccountAddress() - reflect := instantiateReflectContract(t, ctx, customApp, lucky) - require.NotEmpty(t, reflect) - - // Fund reflect contract with 100 base denom creation fees - reflectAmount := sdk.NewCoins(sdk.NewCoin(types.DefaultParams().DenomCreationFee[0].Denom, types.DefaultParams().DenomCreationFee[0].Amount.MulRaw(100))) - fundAccount(t, ctx, customApp, reflect, reflectAmount) - - // lucky was broke - balances := customApp.AppKeepers.BankKeeper.GetAllBalances(ctx, lucky) - require.Empty(t, balances) - - // Create denom for minting - msg := bindings.TokenFactoryMsg{CreateDenom: &bindings.CreateDenom{ - Subdenom: "SUN", - }} - err := executeCustom(t, ctx, customApp, reflect, lucky, msg, sdk.Coin{}) - require.NoError(t, err) - sunDenom := fmt.Sprintf("factory/%s/%s", reflect.String(), msg.CreateDenom.Subdenom) - - amount, ok := sdk.NewIntFromString("808010808") - require.True(t, ok) - - // Mint new tokens to lucky - msg = bindings.TokenFactoryMsg{MintTokens: &bindings.MintTokens{ - Denom: sunDenom, - Amount: amount, - MintToAddress: lucky.String(), - }} - err = executeCustom(t, ctx, customApp, reflect, lucky, msg, sdk.Coin{}) - require.NoError(t, err) - - // Force move 100 tokens from lucky to rcpt - msg = bindings.TokenFactoryMsg{ForceTransfer: &bindings.ForceTransfer{ - Denom: sunDenom, - Amount: sdk.NewInt(100), - FromAddress: lucky.String(), - ToAddress: rcpt.String(), - }} - err = executeCustom(t, ctx, customApp, reflect, lucky, msg, sdk.Coin{}) - require.NoError(t, err) - - // check the balance of rcpt - balances = customApp.AppKeepers.BankKeeper.GetAllBalances(ctx, rcpt) - require.Len(t, balances, 1) - coin := balances[0] - require.Equal(t, sdk.NewInt(100), coin.Amount) -} - func TestBurnMsg(t *testing.T) { creator := RandomAccountAddress() customApp, ctx := SetupCustomApp(t, creator) @@ -253,7 +201,7 @@ func TestBurnMsg(t *testing.T) { require.NoError(t, err) sunDenom := fmt.Sprintf("factory/%s/%s", reflect.String(), msg.CreateDenom.Subdenom) - amount, ok := sdk.NewIntFromString("808010809") + amount, ok := sdkmath.NewIntFromString("808010809") require.True(t, ok) msg = bindings.TokenFactoryMsg{MintTokens: &bindings.MintTokens{ @@ -265,7 +213,7 @@ func TestBurnMsg(t *testing.T) { require.NoError(t, err) // can burn from different address with burnFrom - amt, ok := sdk.NewIntFromString("1") + amt, ok := sdkmath.NewIntFromString("1") require.True(t, ok) msg = bindings.TokenFactoryMsg{BurnTokens: &bindings.BurnTokens{ Denom: sunDenom, @@ -282,7 +230,7 @@ func TestBurnMsg(t *testing.T) { msg = bindings.TokenFactoryMsg{BurnTokens: &bindings.BurnTokens{ Denom: sunDenom, - Amount: amount.Abs().Sub(sdk.NewInt(1)), + Amount: amount.Abs().Sub(sdkmath.NewInt(1)), BurnFromAddress: reflect.String(), }} err = executeCustom(t, ctx, customApp, reflect, lucky, msg, sdk.Coin{}) diff --git a/x/tokenfactory/bindings/custom_query_test.go b/x/tokenfactory/bindings/custom_query_test.go index 595ee0d4..35edd5d6 100644 --- a/x/tokenfactory/bindings/custom_query_test.go +++ b/x/tokenfactory/bindings/custom_query_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types" "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/tokenfactory/bindings/helpers_test.go b/x/tokenfactory/bindings/helpers_test.go index a1097519..4c4a422b 100644 --- a/x/tokenfactory/bindings/helpers_test.go +++ b/x/tokenfactory/bindings/helpers_test.go @@ -5,13 +5,15 @@ import ( "testing" "time" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + sdkmath "cosmossdk.io/math" "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/stretchr/testify/require" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/ed25519" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - sdk "github.com/cosmos/cosmos-sdk/types" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" @@ -20,17 +22,17 @@ import ( func CreateTestInput(t *testing.T) (*app.OmniFlixApp, sdk.Context) { t.Helper() - - omniflix := app.Setup(t) - ctx := omniflix.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "testing", Time: time.Now().UTC()}) + tdir, _ := os.MkdirTemp(os.TempDir(), "omniflixhub-test-home") + omniflix := app.SetupWithCustomHome(false, tdir) + ctx := omniflix.BaseApp.NewContextLegacy(false, tmproto.Header{Height: 1, ChainID: "omniflixhub-1", Time: time.Now().UTC()}) return omniflix, ctx } func FundAccount(t *testing.T, ctx sdk.Context, customApp *app.OmniFlixApp, acct sdk.AccAddress) { t.Helper() - err := banktestutil.FundAccount(customApp.AppKeepers.BankKeeper, ctx, acct, sdk.NewCoins( - sdk.NewCoin("uflix", sdk.NewInt(10000000000)), + err := banktestutil.FundAccount(ctx, customApp.AppKeepers.BankKeeper, acct, sdk.NewCoins( + sdk.NewCoin("uflix", sdkmath.NewInt(10000000000)), )) require.NoError(t, err) } @@ -52,17 +54,26 @@ func RandomBech32AccountAddress() string { return RandomAccountAddress().String() } -func storeReflectCode(t *testing.T, ctx sdk.Context, customApp *app.OmniFlixApp, addr sdk.AccAddress) uint64 { +func storeReflectCode(t *testing.T, ctx sdk.Context, customApp *app.OmniFlixApp, addr sdk.AccAddress) { t.Helper() wasmCode, err := os.ReadFile("./testdata/token_reflect.wasm") require.NoError(t, err) - contractKeeper := keeper.NewDefaultPermissionKeeper(customApp.AppKeepers.WasmKeeper) - codeID, _, err := contractKeeper.Create(ctx, addr, wasmCode, nil) + // Quick hack to allow code upload + originalParams := customApp.WasmKeeper.GetParams(ctx) + temporaryParams := originalParams + temporaryParams.CodeUploadAccess.Permission = wasmtypes.AccessTypeEverybody + _ = customApp.WasmKeeper.SetParams(ctx, temporaryParams) + + msg := wasmtypes.MsgStoreCodeFixture(func(m *wasmtypes.MsgStoreCode) { + m.WASMByteCode = wasmCode + m.Sender = addr.String() + }) + _, err = customApp.MsgServiceRouter().Handler(msg)(ctx, msg) require.NoError(t, err) - return codeID + _ = customApp.WasmKeeper.SetParams(ctx, originalParams) } func instantiateReflectContract(t *testing.T, ctx sdk.Context, customApp *app.OmniFlixApp, funder sdk.AccAddress) sdk.AccAddress { @@ -81,8 +92,8 @@ func fundAccount(t *testing.T, ctx sdk.Context, customApp *app.OmniFlixApp, addr t.Helper() err := banktestutil.FundAccount( - customApp.AppKeepers.BankKeeper, ctx, + customApp.AppKeepers.BankKeeper, addr, coins, ) diff --git a/x/tokenfactory/bindings/message_plugin.go b/x/tokenfactory/bindings/message_plugin.go index 618c4f2e..800f0b0c 100644 --- a/x/tokenfactory/bindings/message_plugin.go +++ b/x/tokenfactory/bindings/message_plugin.go @@ -3,8 +3,10 @@ package bindings import ( "encoding/json" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types" errorsmod "cosmossdk.io/errors" @@ -37,13 +39,18 @@ type CustomMessenger struct { var _ wasmkeeper.Messenger = (*CustomMessenger)(nil) // DispatchMsg executes on the contractMsg. -func (m *CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmvmtypes.CosmosMsg) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) DispatchMsg( + ctx sdk.Context, + contractAddr sdk.AccAddress, + contractIBCPortID string, + msg wasmvmtypes.CosmosMsg, +) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { if msg.Custom != nil { // only handle the happy path where this is really creating / minting / swapping ... // leave everything else for the wrapped version var contractMsg bindingstypes.TokenFactoryMsg if err := json.Unmarshal(msg.Custom, &contractMsg); err != nil { - return nil, nil, errorsmod.Wrap(err, "token factory msg") + return nil, nil, [][]*codectypes.Any{}, errorsmod.Wrap(err, "token factory msg") } if contractMsg.CreateDenom != nil { @@ -69,13 +76,13 @@ func (m *CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddre } // createDenom creates a new token denom -func (m *CustomMessenger) createDenom(ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindingstypes.CreateDenom) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) createDenom(ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindingstypes.CreateDenom) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { bz, err := PerformCreateDenom(m.tokenFactory, m.bank, ctx, contractAddr, createDenom) if err != nil { - return nil, nil, errorsmod.Wrap(err, "perform create denom") + return nil, nil, [][]*codectypes.Any{}, errorsmod.Wrap(err, "perform create denom") } // TODO: double check how this is all encoded to the contract - return nil, [][]byte{bz}, nil + return nil, [][]byte{bz}, [][]*codectypes.Any{}, nil } // PerformCreateDenom is used with createDenom to create a token denom; validates the msgCreateDenom. @@ -94,7 +101,7 @@ func PerformCreateDenom(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx s // Create denom resp, err := msgServer.CreateDenom( - sdk.WrapSDKContext(ctx), + ctx, msgCreateDenom, ) if err != nil { @@ -113,12 +120,12 @@ func PerformCreateDenom(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx s } // mintTokens mints tokens of a specified denom to an address. -func (m *CustomMessenger) mintTokens(ctx sdk.Context, contractAddr sdk.AccAddress, mint *bindingstypes.MintTokens) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) mintTokens(ctx sdk.Context, contractAddr sdk.AccAddress, mint *bindingstypes.MintTokens) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { err := PerformMint(m.tokenFactory, m.bank, ctx, contractAddr, mint) if err != nil { - return nil, nil, errorsmod.Wrap(err, "perform mint") + return nil, nil, nil, errorsmod.Wrap(err, "perform mint") } - return nil, nil, nil + return nil, nil, nil, nil } // PerformMint used with mintTokens to validate the mint message and mint through token factory. @@ -140,7 +147,7 @@ func PerformMint(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Cont // Mint through token factory / message server msgServer := tokenfactorykeeper.NewMsgServerImpl(*f) - _, err = msgServer.Mint(sdk.WrapSDKContext(ctx), sdkMsg) + _, err = msgServer.Mint(ctx, sdkMsg) if err != nil { return errorsmod.Wrap(err, "minting coins from message") } @@ -157,12 +164,12 @@ func PerformMint(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Cont } // changeAdmin changes the admin. -func (m *CustomMessenger) changeAdmin(ctx sdk.Context, contractAddr sdk.AccAddress, changeAdmin *bindingstypes.ChangeAdmin) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) changeAdmin(ctx sdk.Context, contractAddr sdk.AccAddress, changeAdmin *bindingstypes.ChangeAdmin) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { err := ChangeAdmin(m.tokenFactory, ctx, contractAddr, changeAdmin) if err != nil { - return nil, nil, errorsmod.Wrap(err, "failed to change admin") + return nil, nil, nil, errorsmod.Wrap(err, "failed to change admin") } - return nil, nil, nil + return nil, nil, nil, nil } // ChangeAdmin is used with changeAdmin to validate changeAdmin messages and to dispatch. @@ -181,7 +188,7 @@ func ChangeAdmin(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk } msgServer := tokenfactorykeeper.NewMsgServerImpl(*f) - _, err = msgServer.ChangeAdmin(sdk.WrapSDKContext(ctx), changeAdminMsg) + _, err = msgServer.ChangeAdmin(ctx, changeAdminMsg) if err != nil { return errorsmod.Wrap(err, "failed changing admin from message") } @@ -189,12 +196,12 @@ func ChangeAdmin(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk } // burnTokens burns tokens. -func (m *CustomMessenger) burnTokens(ctx sdk.Context, contractAddr sdk.AccAddress, burn *bindingstypes.BurnTokens) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) burnTokens(ctx sdk.Context, contractAddr sdk.AccAddress, burn *bindingstypes.BurnTokens) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { err := PerformBurn(m.tokenFactory, ctx, contractAddr, burn) if err != nil { - return nil, nil, errorsmod.Wrap(err, "perform burn") + return nil, nil, nil, errorsmod.Wrap(err, "perform burn") } - return nil, nil, nil + return nil, nil, nil, nil } // PerformBurn performs token burning after validating tokenBurn message. @@ -215,7 +222,7 @@ func PerformBurn(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk // Burn through token factory / message server msgServer := tokenfactorykeeper.NewMsgServerImpl(*f) - _, err := msgServer.Burn(sdk.WrapSDKContext(ctx), sdkMsg) + _, err := msgServer.Burn(ctx, sdkMsg) if err != nil { return errorsmod.Wrap(err, "burning coins from message") } @@ -223,12 +230,12 @@ func PerformBurn(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk } // forceTransfer moves tokens. -func (m *CustomMessenger) forceTransfer(ctx sdk.Context, contractAddr sdk.AccAddress, forcetransfer *bindingstypes.ForceTransfer) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) forceTransfer(ctx sdk.Context, contractAddr sdk.AccAddress, forcetransfer *bindingstypes.ForceTransfer) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { err := PerformForceTransfer(m.tokenFactory, ctx, contractAddr, forcetransfer) if err != nil { - return nil, nil, errorsmod.Wrap(err, "perform force transfer") + return nil, nil, nil, errorsmod.Wrap(err, "perform force transfer") } - return nil, nil, nil + return nil, nil, nil, nil } // PerformForceTransfer performs token moving after validating tokenForceTransfer message. @@ -256,7 +263,7 @@ func PerformForceTransfer(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contrac // Transfer through token factory / message server msgServer := tokenfactorykeeper.NewMsgServerImpl(*f) - _, err = msgServer.ForceTransfer(sdk.WrapSDKContext(ctx), sdkMsg) + _, err = msgServer.ForceTransfer(ctx, sdkMsg) if err != nil { return errorsmod.Wrap(err, "force transferring from message") } @@ -264,12 +271,12 @@ func PerformForceTransfer(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contrac } // createDenom creates a new token denom -func (m *CustomMessenger) setMetadata(ctx sdk.Context, contractAddr sdk.AccAddress, setMetadata *bindingstypes.SetMetadata) ([]sdk.Event, [][]byte, error) { +func (m *CustomMessenger) setMetadata(ctx sdk.Context, contractAddr sdk.AccAddress, setMetadata *bindingstypes.SetMetadata) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) { err := PerformSetMetadata(m.tokenFactory, m.bank, ctx, contractAddr, setMetadata.Denom, setMetadata.Metadata) if err != nil { - return nil, nil, errorsmod.Wrap(err, "perform create denom") + return nil, nil, nil, errorsmod.Wrap(err, "perform create denom") } - return nil, nil, nil + return nil, nil, nil, nil } // PerformSetMetadata is used with setMetadata to add new metadata diff --git a/x/tokenfactory/bindings/testdata/token_reflect.wasm b/x/tokenfactory/bindings/testdata/token_reflect.wasm old mode 100755 new mode 100644 index 0526f174..8a8dd891 Binary files a/x/tokenfactory/bindings/testdata/token_reflect.wasm and b/x/tokenfactory/bindings/testdata/token_reflect.wasm differ diff --git a/x/tokenfactory/bindings/validate_msg_test.go b/x/tokenfactory/bindings/validate_msg_test.go index 6db49a99..1d36c70d 100644 --- a/x/tokenfactory/bindings/validate_msg_test.go +++ b/x/tokenfactory/bindings/validate_msg_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" @@ -196,7 +198,7 @@ func TestMint(t *testing.T) { balances := app.AppKeepers.BankKeeper.GetAllBalances(ctx, lucky) require.Empty(t, balances) - amount, ok := sdk.NewIntFromString("8080") + amount, ok := sdkmath.NewIntFromString("8080") require.True(t, ok) specs := map[string]struct { @@ -237,7 +239,7 @@ func TestMint(t *testing.T) { "zero amount": { mint: &bindings.MintTokens{ Denom: validDenomStr, - Amount: sdk.ZeroInt(), + Amount: sdkmath.ZeroInt(), MintToAddress: lucky.String(), }, expErr: true, @@ -314,7 +316,7 @@ func TestBurn(t *testing.T) { validDenomStr := fmt.Sprintf("factory/%s/%s", creator.String(), validDenom.Subdenom) emptyDenomStr := fmt.Sprintf("factory/%s/%s", creator.String(), emptyDenom.Subdenom) - mintAmount, ok := sdk.NewIntFromString("8080") + mintAmount, ok := sdkmath.NewIntFromString("8080") require.True(t, ok) specs := map[string]struct { @@ -364,7 +366,7 @@ func TestBurn(t *testing.T) { "zero amount": { burn: &bindings.BurnTokens{ Denom: validDenomStr, - Amount: sdk.ZeroInt(), + Amount: sdkmath.ZeroInt(), BurnFromAddress: creator.String(), }, expErr: true, diff --git a/x/tokenfactory/keeper/admins_test.go b/x/tokenfactory/keeper/admins_test.go index 4f446c07..54367d2f 100644 --- a/x/tokenfactory/keeper/admins_test.go +++ b/x/tokenfactory/keeper/admins_test.go @@ -24,19 +24,19 @@ func (suite *KeeperTestSuite) TestAdminMsgs() { suite.Require().Equal(suite.TestAccs[0].String(), queryRes.AuthorityMetadata.Admin) // Test minting to admins own account - _, err = suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10))) + _, err = suite.msgServer.Mint(suite.Ctx, types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10))) addr0bal += 10 suite.Require().NoError(err) suite.Require().True(bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[0], suite.defaultDenom).Amount.Int64() == addr0bal, bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[0], suite.defaultDenom)) // Test minting to a different account - _, err = suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMintTo(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10), suite.TestAccs[1].String())) + _, err = suite.msgServer.Mint(suite.Ctx, types.NewMsgMintTo(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10), suite.TestAccs[1].String())) addr1bal += 10 suite.Require().NoError(err) suite.Require().True(suite.App.AppKeepers.BankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom).Amount.Int64() == addr1bal, suite.App.AppKeepers.BankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom)) // Test force transferring - _, err = suite.msgServer.ForceTransfer(sdk.WrapSDKContext(suite.Ctx), types.NewMsgForceTransfer(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5), suite.TestAccs[1].String(), suite.TestAccs[0].String())) + _, err = suite.msgServer.ForceTransfer(suite.Ctx, types.NewMsgForceTransfer(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5), suite.TestAccs[1].String(), suite.TestAccs[0].String())) addr1bal -= 5 addr0bal += 5 suite.Require().NoError(err) @@ -44,12 +44,12 @@ func (suite *KeeperTestSuite) TestAdminMsgs() { suite.Require().True(suite.App.AppKeepers.BankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom).Amount.Int64() == addr1bal, suite.App.AppKeepers.BankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom)) // Test burning from own account - _, err = suite.msgServer.Burn(sdk.WrapSDKContext(suite.Ctx), types.NewMsgBurn(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) + _, err = suite.msgServer.Burn(suite.Ctx, types.NewMsgBurn(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) suite.Require().NoError(err) suite.Require().True(bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom).Amount.Int64() == addr1bal) // Test Change Admin - _, err = suite.msgServer.ChangeAdmin(sdk.WrapSDKContext(suite.Ctx), types.NewMsgChangeAdmin(suite.TestAccs[0].String(), suite.defaultDenom, suite.TestAccs[1].String())) + _, err = suite.msgServer.ChangeAdmin(suite.Ctx, types.NewMsgChangeAdmin(suite.TestAccs[0].String(), suite.defaultDenom, suite.TestAccs[1].String())) suite.Require().NoError(err) queryRes, err = suite.queryClient.DenomAuthorityMetadata(suite.Ctx.Context(), &types.QueryDenomAuthorityMetadataRequest{ Denom: suite.defaultDenom, @@ -58,17 +58,17 @@ func (suite *KeeperTestSuite) TestAdminMsgs() { suite.Require().Equal(suite.TestAccs[1].String(), queryRes.AuthorityMetadata.Admin) // Make sure old admin can no longer do actions - _, err = suite.msgServer.Burn(sdk.WrapSDKContext(suite.Ctx), types.NewMsgBurn(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) + _, err = suite.msgServer.Burn(suite.Ctx, types.NewMsgBurn(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) suite.Require().Error(err) // Make sure the new admin works - _, err = suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMint(suite.TestAccs[1].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) + _, err = suite.msgServer.Mint(suite.Ctx, types.NewMsgMint(suite.TestAccs[1].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) addr1bal += 5 suite.Require().NoError(err) suite.Require().True(bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom).Amount.Int64() == addr1bal) // Try setting admin to empty - _, err = suite.msgServer.ChangeAdmin(sdk.WrapSDKContext(suite.Ctx), types.NewMsgChangeAdmin(suite.TestAccs[1].String(), suite.defaultDenom, "")) + _, err = suite.msgServer.ChangeAdmin(suite.Ctx, types.NewMsgChangeAdmin(suite.TestAccs[1].String(), suite.defaultDenom, "")) suite.Require().NoError(err) queryRes, err = suite.queryClient.DenomAuthorityMetadata(suite.Ctx.Context(), &types.QueryDenomAuthorityMetadataRequest{ Denom: suite.defaultDenom, @@ -132,7 +132,7 @@ func (suite *KeeperTestSuite) TestMintDenom() { } { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { tc := tc - _, err := suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), &tc.mintMsg) + _, err := suite.msgServer.Mint(suite.Ctx, &tc.mintMsg) if tc.expectPass { suite.Require().NoError(err) balances[tc.mintMsg.MintToAddress] += tc.mintMsg.Amount.Amount.Int64() @@ -154,7 +154,7 @@ func (suite *KeeperTestSuite) TestBurnDenom() { // mint 1000 default token for all testAccs balances := make(map[string]int64) for _, acc := range suite.TestAccs { - _, err := suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMintTo(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 1000), acc.String())) + _, err := suite.msgServer.Mint(suite.Ctx, types.NewMsgMintTo(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 1000), acc.String())) suite.Require().NoError(err) balances[acc.String()] = 1000 } @@ -209,7 +209,7 @@ func (suite *KeeperTestSuite) TestBurnDenom() { } { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { tc := tc - _, err := suite.msgServer.Burn(sdk.WrapSDKContext(suite.Ctx), &tc.burnMsg) + _, err := suite.msgServer.Burn(suite.Ctx, &tc.burnMsg) if tc.expectPass { suite.Require().NoError(err) balances[tc.burnMsg.BurnFromAddress] -= tc.burnMsg.Amount.Amount.Int64() @@ -231,7 +231,7 @@ func (suite *KeeperTestSuite) TestForceTransferDenom() { // mint 1000 default token for all testAccs balances := make(map[string]int64) for _, acc := range suite.TestAccs { - _, err := suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMintTo(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 1000), acc.String())) + _, err := suite.msgServer.Mint(suite.Ctx, types.NewMsgMintTo(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 1000), acc.String())) suite.Require().NoError(err) balances[acc.String()] = 1000 } @@ -284,7 +284,7 @@ func (suite *KeeperTestSuite) TestForceTransferDenom() { } { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { tc := tc - _, err := suite.msgServer.ForceTransfer(sdk.WrapSDKContext(suite.Ctx), &tc.forceTransferMsg) + _, err := suite.msgServer.ForceTransfer(suite.Ctx, &tc.forceTransferMsg) if tc.expectPass { suite.Require().NoError(err) @@ -354,15 +354,15 @@ func (suite *KeeperTestSuite) TestChangeAdminDenom() { suite.SetupTest() // Create a denom and mint - res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + res, err := suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) testDenom := res.GetNewTokenDenom() - _, err = suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(testDenom, 10))) + _, err = suite.msgServer.Mint(suite.Ctx, types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(testDenom, 10))) suite.Require().NoError(err) - _, err = suite.msgServer.ChangeAdmin(sdk.WrapSDKContext(suite.Ctx), tc.msgChangeAdmin(testDenom)) + _, err = suite.msgServer.ChangeAdmin(suite.Ctx, tc.msgChangeAdmin(testDenom)) if tc.expectedChangeAdminPass { suite.Require().NoError(err) } else { @@ -384,7 +384,7 @@ func (suite *KeeperTestSuite) TestChangeAdminDenom() { // we test mint to test if admin authority is performed properly after admin change. if tc.msgMint != nil { - _, err := suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), tc.msgMint(testDenom)) + _, err := suite.msgServer.Mint(suite.Ctx, tc.msgMint(testDenom)) if tc.expectedMintPass { suite.Require().NoError(err) } else { @@ -510,7 +510,7 @@ func (suite *KeeperTestSuite) TestSetDenomMetaData() { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { tc := tc bankKeeper := suite.App.AppKeepers.BankKeeper - res, err := suite.msgServer.SetDenomMetadata(sdk.WrapSDKContext(suite.Ctx), &tc.msgSetDenomMetadata) + res, err := suite.msgServer.SetDenomMetadata(suite.Ctx, &tc.msgSetDenomMetadata) if tc.expectedPass { suite.Require().NoError(err) suite.Require().NotNil(res) diff --git a/x/tokenfactory/keeper/bankactions.go b/x/tokenfactory/keeper/bankactions.go index b033126e..9095d237 100644 --- a/x/tokenfactory/keeper/bankactions.go +++ b/x/tokenfactory/keeper/bankactions.go @@ -3,9 +3,8 @@ package keeper import ( "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) func (k Keeper) mintTo(ctx sdk.Context, amount sdk.Coin, mintTo string) error { diff --git a/x/tokenfactory/keeper/createdenom.go b/x/tokenfactory/keeper/createdenom.go index e5572e5c..ed38cb47 100644 --- a/x/tokenfactory/keeper/createdenom.go +++ b/x/tokenfactory/keeper/createdenom.go @@ -7,7 +7,7 @@ import ( "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" ) -// ConvertToBaseToken converts a fee amount in a whitelisted fee token to the base fee token amount +// CreateDenom creates a denom func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, subdenom string) (newTokenDenom string, err error) { denom, err := k.validateCreateDenom(ctx, creatorAddr, subdenom) if err != nil { @@ -84,7 +84,7 @@ func (k Keeper) chargeForCreateDenom(ctx sdk.Context, creatorAddr string, _ stri return err } - if err := k.communityPoolKeeper.FundCommunityPool(ctx, params.DenomCreationFee, accAddr); err != nil { + if err := k.distrKeeper.FundCommunityPool(ctx, params.DenomCreationFee, accAddr); err != nil { return err } } diff --git a/x/tokenfactory/keeper/createdenom_test.go b/x/tokenfactory/keeper/createdenom_test.go index ff8824a7..506cbce6 100644 --- a/x/tokenfactory/keeper/createdenom_test.go +++ b/x/tokenfactory/keeper/createdenom_test.go @@ -3,6 +3,8 @@ package keeper_test import ( "fmt" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -21,7 +23,7 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { preCreateBalance := bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[0], denomCreationFee[0].Denom) // Creating a denom should work - res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + res, err := suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) suite.Require().NotEmpty(res.GetNewTokenDenom()) @@ -44,11 +46,11 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { suite.Require().True(preCreateBalance.Sub(postCreateBalance).IsEqual(denomCreationFee[0])) // Make sure that a second version of the same denom can't be recreated - _, err = suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + _, err = suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().Error(err) // Creating a second denom should work - res, err = suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "litecoin")) + res, err = suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "litecoin")) suite.Require().NoError(err) suite.Require().NotEmpty(res.GetNewTokenDenom()) @@ -60,12 +62,12 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { suite.Require().Len(queryRes2.Denoms, 2) // Make sure that a second account can create a denom with the same subdenom - res, err = suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[1].String(), "bitcoin")) + res, err = suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[1].String(), "bitcoin")) suite.Require().NoError(err) suite.Require().NotEmpty(res.GetNewTokenDenom()) // Make sure that an address with a "/" in it can't create denoms - _, err = suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom("osmosis.eth/creator", "bitcoin")) + _, err = suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom("osmosis.eth/creator", "bitcoin")) suite.Require().Error(err) } @@ -73,10 +75,10 @@ func (suite *KeeperTestSuite) TestCreateDenom() { var ( primaryDenom = types.DefaultParams().DenomCreationFee[0].Denom secondaryDenom = apptesting.SecondaryDenom - defaultDenomCreationFee = types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin(primaryDenom, sdk.NewInt(50000000)))} - twoDenomCreationFee = types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin(primaryDenom, sdk.NewInt(50000000)), sdk.NewCoin(secondaryDenom, sdk.NewInt(50000000)))} + defaultDenomCreationFee = types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin(primaryDenom, sdkmath.NewInt(50000000)))} + twoDenomCreationFee = types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin(primaryDenom, sdkmath.NewInt(50000000)), sdk.NewCoin(secondaryDenom, sdkmath.NewInt(50000000)))} nilCreationFee = types.Params{DenomCreationFee: nil} - largeCreationFee = types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin(primaryDenom, sdk.NewInt(50000000000)))} + largeCreationFee = types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin(primaryDenom, sdkmath.NewInt(50000000000)))} ) for _, tc := range []struct { @@ -96,7 +98,7 @@ func (suite *KeeperTestSuite) TestCreateDenom() { desc: "subdenom and creator pair already exists", denomCreationFee: defaultDenomCreationFee, setup: func() { - _, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + _, err := suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) }, subdenom: "bitcoin", @@ -150,7 +152,7 @@ func (suite *KeeperTestSuite) TestCreateDenom() { // note balance, create a tokenfactory denom, then note balance again // preCreateBalance := bankKeeper.GetAllBalances(suite.Ctx, suite.TestAccs[0]) preCreateBalance := bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[0], "uflix") - res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), tc.subdenom)) + res, err := suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), tc.subdenom)) // postCreateBalance := bankKeeper.GetAllBalances(suite.Ctx, suite.TestAccs[0]) postCreateBalance := bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[0], "uflix") if tc.valid { diff --git a/x/tokenfactory/keeper/creators.go b/x/tokenfactory/keeper/creators.go index d200c060..0eaba14c 100644 --- a/x/tokenfactory/keeper/creators.go +++ b/x/tokenfactory/keeper/creators.go @@ -1,6 +1,7 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -22,7 +23,7 @@ func (k Keeper) GetDenomsFromCreator(ctx sdk.Context, creator string) []string { return denoms } -func (k Keeper) GetAllDenomsIterator(ctx sdk.Context) sdk.Iterator { +func (k Keeper) GetAllDenomsIterator(ctx sdk.Context) storetypes.Iterator { return k.GetCreatorsPrefixStore(ctx).Iterator(nil, nil) } diff --git a/x/tokenfactory/keeper/genesis_test.go b/x/tokenfactory/keeper/genesis_test.go index cf331b47..ddfdbfc3 100644 --- a/x/tokenfactory/keeper/genesis_test.go +++ b/x/tokenfactory/keeper/genesis_test.go @@ -12,21 +12,21 @@ func (suite *KeeperTestSuite) TestGenesis() { Params: types.DefaultParams(), FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ - Admin: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + Admin: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", }, }, { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/diff-admin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/diff-admin", AuthorityMetadata: types.DenomAuthorityMetadata{ - Admin: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + Admin: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", }, }, { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/litecoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/litecoin", AuthorityMetadata: types.DenomAuthorityMetadata{ - Admin: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + Admin: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", }, }, }, diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index 7f067e66..63c217a4 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -3,15 +3,13 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" ) type ( @@ -19,9 +17,9 @@ type ( cdc codec.BinaryCodec storeKey storetypes.StoreKey - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper - communityPoolKeeper types.CommunityPoolKeeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + distrKeeper types.DistributionKeeper enabledCapabilities []string @@ -37,7 +35,7 @@ func NewKeeper( storeKey storetypes.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, - communityPoolKeeper types.CommunityPoolKeeper, + distrKeeper types.DistributionKeeper, enabledCapabilities []string, authority string, ) Keeper { @@ -45,9 +43,9 @@ func NewKeeper( cdc: cdc, storeKey: storeKey, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - communityPoolKeeper: communityPoolKeeper, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + distrKeeper: distrKeeper, enabledCapabilities: enabledCapabilities, @@ -66,19 +64,19 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { } // GetDenomPrefixStore returns the substore for a specific denom -func (k Keeper) GetDenomPrefixStore(ctx sdk.Context, denom string) sdk.KVStore { +func (k Keeper) GetDenomPrefixStore(ctx sdk.Context, denom string) storetypes.KVStore { store := ctx.KVStore(k.storeKey) return prefix.NewStore(store, types.GetDenomPrefixStore(denom)) } // GetCreatorPrefixStore returns the substore for a specific creator address -func (k Keeper) GetCreatorPrefixStore(ctx sdk.Context, creator string) sdk.KVStore { +func (k Keeper) GetCreatorPrefixStore(ctx sdk.Context, creator string) storetypes.KVStore { store := ctx.KVStore(k.storeKey) return prefix.NewStore(store, types.GetCreatorPrefix(creator)) } // GetCreatorsPrefixStore returns the substore that contains a list of creators -func (k Keeper) GetCreatorsPrefixStore(ctx sdk.Context) sdk.KVStore { +func (k Keeper) GetCreatorsPrefixStore(ctx sdk.Context) storetypes.KVStore { store := ctx.KVStore(k.storeKey) return prefix.NewStore(store, types.GetCreatorsPrefix()) } @@ -88,6 +86,5 @@ func (k Keeper) GetCreatorsPrefixStore(ctx sdk.Context) sdk.KVStore { // it purely mints and burns them on behalf of the admin of respective denoms, // and sends to the relevant address. func (k Keeper) CreateModuleAccount(ctx sdk.Context) { - moduleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner) - k.accountKeeper.SetModuleAccount(ctx, moduleAcc) + k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) } diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index 80a011e3..dde6afd3 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -5,8 +5,6 @@ import ( "github.com/stretchr/testify/suite" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -44,7 +42,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func (suite *KeeperTestSuite) CreateDefaultDenom() { - res, _ := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.Ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + res, _ := suite.msgServer.CreateDenom(suite.Ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.defaultDenom = res.GetNewTokenDenom() } @@ -56,7 +54,7 @@ func (suite *KeeperTestSuite) TestCreateModuleAccount() { app.AppKeepers.AccountKeeper.RemoveAccount(suite.Ctx, tokenfactoryModuleAccount) // ensure module account was removed - suite.Ctx = app.BaseApp.NewContext(false, tmproto.Header{ChainID: "testing"}) + suite.Ctx = app.BaseApp.NewContext(false) tokenfactoryModuleAccount = app.AppKeepers.AccountKeeper.GetAccount(suite.Ctx, app.AppKeepers.AccountKeeper.GetModuleAddress(types.ModuleName)) suite.Require().Nil(tokenfactoryModuleAccount) diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 637d9aa2..2af4691c 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -3,6 +3,8 @@ package keeper_test import ( "fmt" + sdkmath "cosmossdk.io/math" + "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -42,7 +44,7 @@ func (suite *KeeperTestSuite) TestMintDenomMsg() { ctx := suite.Ctx.WithEventManager(sdk.NewEventManager()) suite.Require().Equal(0, len(ctx.EventManager().Events())) // Test mint message - suite.msgServer.Mint(sdk.WrapSDKContext(ctx), types.NewMsgMint(tc.admin, sdk.NewInt64Coin(tc.mintDenom, 10))) //nolint:errcheck + suite.msgServer.Mint(ctx, types.NewMsgMint(tc.admin, sdk.NewInt64Coin(tc.mintDenom, 10))) //nolint:errcheck // Ensure current number and type of event is emitted suite.AssertEventEmitted(ctx, types.TypeMsgMint, tc.expectedMessageEvents) }) @@ -54,7 +56,7 @@ func (suite *KeeperTestSuite) TestBurnDenomMsg() { // Create a denom. suite.CreateDefaultDenom() // mint 10 default token for testAcc[0] - suite.msgServer.Mint(sdk.WrapSDKContext(suite.Ctx), types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10))) //nolint:errcheck + suite.msgServer.Mint(suite.Ctx, types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10))) //nolint:errcheck for _, tc := range []struct { desc string @@ -82,7 +84,7 @@ func (suite *KeeperTestSuite) TestBurnDenomMsg() { ctx := suite.Ctx.WithEventManager(sdk.NewEventManager()) suite.Require().Equal(0, len(ctx.EventManager().Events())) // Test burn message - suite.msgServer.Burn(sdk.WrapSDKContext(ctx), types.NewMsgBurn(tc.admin, sdk.NewInt64Coin(tc.burnDenom, 10))) //nolint:errcheck + suite.msgServer.Burn(ctx, types.NewMsgBurn(tc.admin, sdk.NewInt64Coin(tc.burnDenom, 10))) //nolint:errcheck // Ensure current number and type of event is emitted suite.AssertEventEmitted(ctx, types.TypeMsgBurn, tc.expectedMessageEvents) }) @@ -91,7 +93,7 @@ func (suite *KeeperTestSuite) TestBurnDenomMsg() { // TestCreateDenomMsg tests TypeMsgCreateDenom message is emitted on a successful denom creation func (suite *KeeperTestSuite) TestCreateDenomMsg() { - defaultDenomCreationFee := types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin("uflix", sdk.NewInt(50000000)))} + defaultDenomCreationFee := types.Params{DenomCreationFee: sdk.NewCoins(sdk.NewCoin("uflix", sdkmath.NewInt(50000000)))} for _, tc := range []struct { desc string denomCreationFee types.Params @@ -123,7 +125,7 @@ func (suite *KeeperTestSuite) TestCreateDenomMsg() { suite.Require().NoError(err) } // Test create denom message - denom, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), tc.subdenom)) //nolint:errcheck + denom, err := suite.msgServer.CreateDenom(ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), tc.subdenom)) //nolint:errcheck if err != nil { fmt.Println(denom, err) } @@ -172,12 +174,12 @@ func (suite *KeeperTestSuite) TestChangeAdminDenomMsg() { ctx := suite.Ctx.WithEventManager(sdk.NewEventManager()) suite.Require().Equal(0, len(ctx.EventManager().Events())) // Create a denom and mint - res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(ctx), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + res, err := suite.msgServer.CreateDenom(ctx, types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) testDenom := res.GetNewTokenDenom() - suite.msgServer.Mint(sdk.WrapSDKContext(ctx), types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(testDenom, 10))) //nolint:errcheck + suite.msgServer.Mint(ctx, types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(testDenom, 10))) //nolint:errcheck // Test change admin message - suite.msgServer.ChangeAdmin(sdk.WrapSDKContext(ctx), tc.msgChangeAdmin(testDenom)) //nolint:errcheck + suite.msgServer.ChangeAdmin(ctx, tc.msgChangeAdmin(testDenom)) //nolint:errcheck // Ensure current number and type of event is emitted suite.AssertEventEmitted(ctx, types.TypeMsgChangeAdmin, tc.expectedMessageEvents) }) @@ -245,7 +247,7 @@ func (suite *KeeperTestSuite) TestSetDenomMetaDataMsg() { ctx := suite.Ctx.WithEventManager(sdk.NewEventManager()) suite.Require().Equal(0, len(ctx.EventManager().Events())) // Test set denom metadata message - suite.msgServer.SetDenomMetadata(sdk.WrapSDKContext(ctx), &tc.msgSetDenomMetadata) //nolint:errcheck + suite.msgServer.SetDenomMetadata(ctx, &tc.msgSetDenomMetadata) //nolint:errcheck // Ensure current number and type of event is emitted suite.AssertEventEmitted(ctx, types.TypeMsgSetDenomMetadata, tc.expectedMessageEvents) }) @@ -259,7 +261,7 @@ func (s *KeeperTestSuite) TestForceTransferMsg() { s.Run("test force transfer", func() { mintAmt := sdk.NewInt64Coin(s.defaultDenom, 10) - _, _ = s.msgServer.Mint(sdk.WrapSDKContext(s.Ctx), types.NewMsgMint(s.TestAccs[0].String(), mintAmt)) + _, _ = s.msgServer.Mint(s.Ctx, types.NewMsgMint(s.TestAccs[0].String(), mintAmt)) govModAcc := s.App.AccountKeeper.GetModuleAccount(s.Ctx, govtypes.ModuleName) @@ -278,7 +280,7 @@ func (s *KeeperTestSuite) TestForceTransferMsgAccToModule() { s.Run("test force transfer account to module", func() { mintAmt := sdk.NewInt64Coin(s.defaultDenom, 10) - _, _ = s.msgServer.Mint(sdk.WrapSDKContext(s.Ctx), types.NewMsgMint(s.TestAccs[0].String(), mintAmt)) + _, _ = s.msgServer.Mint(s.Ctx, types.NewMsgMint(s.TestAccs[0].String(), mintAmt)) govModAcc := s.App.AccountKeeper.GetModuleAccount(s.Ctx, govtypes.ModuleName) diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index 4a7da715..dabf10c0 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -13,12 +13,12 @@ import ( "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" + "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -33,8 +33,13 @@ import ( ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModuleBasic{} + _ module.HasGenesisBasics = AppModuleBasic{} + + _ appmodule.AppModule = AppModule{} + _ module.HasConsensusVersion = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} ) // ConsensusVersion defines the current x/tokenfactory module consensus version. @@ -51,6 +56,12 @@ func NewAppModuleBasic() AppModuleBasic { return AppModuleBasic{} } +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType is a marker function just indicates that this is a one-per-module type. +func (am AppModule) IsOnePerModuleType() {} + // Name returns the x/tokenfactory module's name. func (AppModuleBasic) Name() string { return types.ModuleName @@ -145,13 +156,11 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the x/tokenfactory module's genesis initialization. It // returns no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState cdc.MustUnmarshalJSON(gs, &genState) am.keeper.InitGenesis(ctx, genState) - - return []abci.ValidatorUpdate{} } // ExportGenesis returns the x/tokenfactory module's exported genesis state as raw @@ -166,15 +175,6 @@ func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } -// BeginBlock executes all ABCI BeginBlock logic respective to the tokenfactory module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock executes all ABCI EndBlock logic respective to the tokenfactory module. It -// returns no validator updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // ___________________________________________________________________________ // AppModuleSimulationV2 functions @@ -182,7 +182,7 @@ func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Valid // // GenerateGenesisState creates a randomized GenState of the tokenfactory module. // func (am AppModule) SimulatorGenesisState(simState *module.SimulationState, s *simtypes.SimCtx) { // tfDefaultGen := types.DefaultGenesis() -// tfDefaultGen.Params.DenomCreationFee = sdk.NewCoins(sdk.NewCoin(appparams.BondDenom, sdk.NewInt(10000000))) +// tfDefaultGen.Params.DenomCreationFee = sdk.NewCoins(sdk.NewCoin(appparams.BondDenom, sdkmath.NewInt(10000000))) // tfDefaultGenJson := simState.Cdc.MustMarshalJSON(tfDefaultGen) // simState.GenState[types.ModuleName] = tfDefaultGenJson // } @@ -208,12 +208,3 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } - -// RegisterStoreDecoder registers a decoder for supply module's types -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { -} - -// WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { - return simulation.WeightedOperations(&simState, am.keeper, am.accountKeeper, am.bankKeeper) -} diff --git a/x/tokenfactory/simulation/genesis.go b/x/tokenfactory/simulation/genesis.go index 41dee5fe..c3340a17 100644 --- a/x/tokenfactory/simulation/genesis.go +++ b/x/tokenfactory/simulation/genesis.go @@ -3,6 +3,8 @@ package simulation import ( "math/rand" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -12,7 +14,7 @@ import ( func RandDenomCreationFeeParam(r *rand.Rand) sdk.Coins { amount := r.Int63n(10_000_000) - return sdk.NewCoins(sdk.NewCoin(appparams.BondDenom, sdk.NewInt(amount))) + return sdk.NewCoins(sdk.NewCoin(appparams.BondDenom, sdkmath.NewInt(amount))) } func RandomizedGenState(simstate *module.SimulationState) { diff --git a/x/tokenfactory/simulation/operations.go b/x/tokenfactory/simulation/operations.go index a364ac76..47f8bef9 100644 --- a/x/tokenfactory/simulation/operations.go +++ b/x/tokenfactory/simulation/operations.go @@ -3,6 +3,9 @@ package simulation import ( "math/rand" + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -27,7 +30,7 @@ const ( type TokenfactoryKeeper interface { GetParams(ctx sdk.Context) (params types.Params) GetAuthorityMetadata(ctx sdk.Context, denom string) (types.DenomAuthorityMetadata, error) - GetAllDenomsIterator(ctx sdk.Context) sdk.Iterator + GetAllDenomsIterator(ctx sdk.Context) storetypes.Iterator GetDenomsFromCreator(ctx sdk.Context, creator string) []string } @@ -52,32 +55,32 @@ func WeightedOperations( weightMsgForceTransfer int ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgCreateDenom, &weightMsgCreateDenom, nil, + simstate.AppParams.GetOrGenerate(OpWeightMsgCreateDenom, &weightMsgCreateDenom, nil, func(_ *rand.Rand) { weightMsgCreateDenom = appparams.DefaultWeightMsgCreateDenom }, ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgMint, &weightMsgMint, nil, + simstate.AppParams.GetOrGenerate(OpWeightMsgMint, &weightMsgMint, nil, func(_ *rand.Rand) { weightMsgMint = appparams.DefaultWeightMsgMint }, ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgBurn, &weightMsgBurn, nil, + simstate.AppParams.GetOrGenerate(OpWeightMsgBurn, &weightMsgBurn, nil, func(_ *rand.Rand) { weightMsgBurn = appparams.DefaultWeightMsgBurn }, ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgChangeAdmin, &weightMsgChangeAdmin, nil, + simstate.AppParams.GetOrGenerate(OpWeightMsgChangeAdmin, &weightMsgChangeAdmin, nil, func(_ *rand.Rand) { weightMsgChangeAdmin = appparams.DefaultWeightMsgChangeAdmin }, ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgSetDenomMetadata, &weightMsgSetDenomMetadata, nil, + simstate.AppParams.GetOrGenerate(OpWeightMsgSetDenomMetadata, &weightMsgSetDenomMetadata, nil, func(_ *rand.Rand) { weightMsgSetDenomMetadata = appparams.DefaultWeightMsgSetDenomMetadata }, ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgForceTransfer, &weightMsgForceTransfer, nil, + simstate.AppParams.GetOrGenerate(OpWeightMsgForceTransfer, &weightMsgForceTransfer, nil, func(_ *rand.Rand) { weightMsgForceTransfer = appparams.DefaultWeightMsgForceTransfer }, @@ -281,7 +284,7 @@ func SimulateMsgBurn( // Check if admin account balance = 0 accountBalance := bk.GetBalance(ctx, adminAccount.Address, denom) - if accountBalance.Amount.LTE(sdk.ZeroInt()) { + if accountBalance.Amount.LTE(sdkmath.ZeroInt()) { return simtypes.NoOpMsg(types.ModuleName, types.MsgBurn{}.Type(), "sim account have no balance"), nil, nil } @@ -334,7 +337,7 @@ func SimulateMsgMint( } // Rand mint amount - mintAmount, _ := simtypes.RandPositiveInt(r, sdk.NewIntFromUint64(100_000_000)) + mintAmount, _ := simtypes.RandPositiveInt(r, sdkmath.NewIntFromUint64(100_000_000)) // Create msg mint msg := types.MsgMint{ @@ -398,7 +401,6 @@ func BuildOperationInput( TxGen: appparams.MakeEncodingConfig().TxConfig, Cdc: nil, Msg: msg, - MsgType: msg.Type(), Context: ctx, SimAccount: simAccount, AccountKeeper: ak, diff --git a/x/tokenfactory/testhelpers/authz.go b/x/tokenfactory/testhelpers/authz.go index dfa78658..bcaebc93 100644 --- a/x/tokenfactory/testhelpers/authz.go +++ b/x/tokenfactory/testhelpers/authz.go @@ -9,21 +9,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/authz" ) -var ( - Amino = codec.NewLegacyAmino() - AuthzModuleCdc = codec.NewAminoCodec(Amino) -) - -func init() { - cryptocodec.RegisterCrypto(Amino) - codec.RegisterEvidences(Amino) - sdk.RegisterLegacyAminoCodec(Amino) -} +var AuthzModuleCdc = codec.NewLegacyAmino() func TestMessageAuthzSerialization(t *testing.T, msg sdk.Msg) { someDate := time.Date(1, 1, 1, 1, 1, 1, 1, time.UTC) diff --git a/x/tokenfactory/types/codec.go b/x/tokenfactory/types/codec.go index 3e82f26e..bac82d08 100644 --- a/x/tokenfactory/types/codec.go +++ b/x/tokenfactory/types/codec.go @@ -4,12 +4,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" - groupcodec "github.com/cosmos/cosmos-sdk/x/group/codec" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -35,21 +31,3 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } - -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) - amino.Seal() - - // Register all Amino interfaces and concrete types on the authz and gov Amino codec so that this can later be - // used to properly serialize MsgGrant, MsgExec and MsgSubmitProposal instances - RegisterLegacyAminoCodec(authzcodec.Amino) - RegisterLegacyAminoCodec(govcodec.Amino) - RegisterLegacyAminoCodec(groupcodec.Amino) -} diff --git a/x/tokenfactory/types/denoms_test.go b/x/tokenfactory/types/denoms_test.go index 92ca40ab..fd209944 100644 --- a/x/tokenfactory/types/denoms_test.go +++ b/x/tokenfactory/types/denoms_test.go @@ -26,37 +26,37 @@ func TestDeconstructDenom(t *testing.T) { }, { desc: "normal", - denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", expectedSubdenom: "bitcoin", }, { desc: "multiple slashes in subdenom", - denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin/1", + denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin/1", expectedSubdenom: "bitcoin/1", }, { desc: "no subdenom", - denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/", + denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/", expectedSubdenom: "", }, { desc: "incorrect prefix", - denom: "ibc/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + denom: "ibc/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", err: types.ErrInvalidDenom, }, { desc: "subdenom of only slashes", - denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/////", + denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/////", expectedSubdenom: "////", }, { desc: "too long name", - denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/adsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsf", + denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/adsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsf", err: types.ErrInvalidDenom, }, } { t.Run(tc.desc, func(t *testing.T) { - expectedCreator := "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8" + expectedCreator := "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e" creator, subdenom, err := types.DeconstructDenom(tc.denom) if tc.err != nil { require.ErrorContains(t, err, tc.err.Error()) @@ -79,43 +79,43 @@ func TestGetTokenDenom(t *testing.T) { }{ { desc: "normal", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", subdenom: "bitcoin", valid: true, }, { desc: "multiple slashes in subdenom", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", subdenom: "bitcoin/1", valid: true, }, { desc: "no subdenom", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", subdenom: "", valid: true, }, { desc: "subdenom of only slashes", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", subdenom: "/////", valid: true, }, { desc: "too long name", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", subdenom: "adsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsfadsf", valid: false, }, { desc: "subdenom is exactly max length", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", subdenom: "bitcoinfsadfsdfeadfsafwefsefsefsdfsdafasefsf", valid: true, }, { desc: "creator is exactly max length", - creator: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8jhgjhgkhjklhkjhkjhgjhgjgjghelu", + creator: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5ejhgjhgkhjklhkjhkjhgjhgjgjglu", subdenom: "bitcoin", valid: true, }, diff --git a/x/tokenfactory/types/expected_keepers.go b/x/tokenfactory/types/expected_keepers.go index ff384232..c341b49e 100644 --- a/x/tokenfactory/types/expected_keepers.go +++ b/x/tokenfactory/types/expected_keepers.go @@ -1,39 +1,35 @@ package types import ( + context "context" + sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) type BankKeeper interface { // Methods imported from bank should be defined here - GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) - SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata) - - HasSupply(ctx sdk.Context, denom string) bool - IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bool) + GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool) + SetDenomMetaData(ctx context.Context, denomMetaData banktypes.Metadata) - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + HasSupply(ctx context.Context, denom string) bool - SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error - HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error + HasBalance(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) bool BlockedAddr(addr sdk.AccAddress) bool } type AccountKeeper interface { - SetModuleAccount(ctx sdk.Context, macc authtypes.ModuleAccountI) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + GetAccount(context.Context, sdk.AccAddress) sdk.AccountI + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI } -// CommunityPoolKeeper defines the contract needed to be fulfilled for community pool interactions. -type CommunityPoolKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error +// DistributionKeeper defines the contract needed to be fulfilled for community pool interactions. +type DistributionKeeper interface { + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } diff --git a/x/tokenfactory/types/genesis_test.go b/x/tokenfactory/types/genesis_test.go index 13960e6a..e3a42b83 100644 --- a/x/tokenfactory/types/genesis_test.go +++ b/x/tokenfactory/types/genesis_test.go @@ -3,12 +3,15 @@ package types_test import ( "testing" + "github.com/OmniFlix/omniflixhub/v5/app" + "github.com/stretchr/testify/require" "github.com/OmniFlix/omniflixhub/v5/x/tokenfactory/types" ) func TestGenesisState_Validate(t *testing.T) { + app.SetConfig() for _, tc := range []struct { desc string genState *types.GenesisState @@ -24,9 +27,9 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ - Admin: "cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8", + Admin: "omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e", }, }, }, @@ -38,9 +41,9 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ - Admin: "cosmos1ft6e5esdtdegnvcr3djd3ftk4kwpcr6jta8eyh", + Admin: "omniflix1yca6mlzq9xvnmmylw0asfjhz0q483pw57pj79v", }, }, }, @@ -52,7 +55,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: "", }, @@ -66,7 +69,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", }, }, }, @@ -77,7 +80,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: "moose", }, @@ -91,13 +94,13 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: "", }, }, { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/litecoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/litecoin", AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: "", }, @@ -111,13 +114,13 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ FactoryDenoms: []types.GenesisDenom{ { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: "", }, }, { - Denom: "factory/cosmos1t7egva48prqmzl59x5ngv4zx0dtrwewcdqdjr8/bitcoin", + Denom: "factory/omniflix1t7egva48prqmzl59x5ngv4zx0dtrwewcs7ut5e/bitcoin", AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: "", }, diff --git a/x/tokenfactory/types/msgs.go b/x/tokenfactory/types/msgs.go index 0a1dd5c2..53ba2545 100644 --- a/x/tokenfactory/types/msgs.go +++ b/x/tokenfactory/types/msgs.go @@ -2,6 +2,7 @@ package types import ( errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -43,10 +44,6 @@ func (m MsgCreateDenom) ValidateBasic() error { return nil } -func (m MsgCreateDenom) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgCreateDenom) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} @@ -85,17 +82,13 @@ func (m MsgMint) ValidateBasic() error { } } - if !m.Amount.IsValid() || m.Amount.Amount.Equal(sdk.ZeroInt()) { + if !m.Amount.IsValid() || m.Amount.Amount.Equal(sdkmath.ZeroInt()) { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) } return nil } -func (m MsgMint) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgMint) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} @@ -128,7 +121,7 @@ func (m MsgBurn) ValidateBasic() error { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) } - if !m.Amount.IsValid() || m.Amount.Amount.Equal(sdk.ZeroInt()) { + if !m.Amount.IsValid() || m.Amount.Amount.Equal(sdkmath.ZeroInt()) { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) } @@ -142,10 +135,6 @@ func (m MsgBurn) ValidateBasic() error { return nil } -func (m MsgBurn) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgBurn) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} @@ -187,10 +176,6 @@ func (m MsgForceTransfer) ValidateBasic() error { return nil } -func (m MsgForceTransfer) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgForceTransfer) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} @@ -228,10 +213,6 @@ func (m MsgChangeAdmin) ValidateBasic() error { return nil } -func (m MsgChangeAdmin) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgChangeAdmin) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} @@ -268,10 +249,6 @@ func (m MsgSetDenomMetadata) ValidateBasic() error { return nil } -func (m MsgSetDenomMetadata) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgSetDenomMetadata) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} @@ -279,11 +256,6 @@ func (m MsgSetDenomMetadata) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgUpdateParams{} -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) diff --git a/x/tokenfactory/types/msgs_test.go b/x/tokenfactory/types/msgs_test.go index 154bac56..51bc20aa 100644 --- a/x/tokenfactory/types/msgs_test.go +++ b/x/tokenfactory/types/msgs_test.go @@ -4,6 +4,8 @@ import ( fmt "fmt" "testing" + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" "github.com/cometbft/cometbft/crypto/ed25519" @@ -20,7 +22,7 @@ func TestAuthzMsg(t *testing.T) { t.Skip("TODO: figure out how to register authz interfaces for tests") pk1 := ed25519.GenPrivKey().PubKey() addr1 := sdk.AccAddress(pk1.Address()).String() - coin := sdk.NewCoin("denom", sdk.NewInt(1)) + coin := sdk.NewCoin("denom", sdkmath.NewInt(1)) testCases := []struct { name string @@ -138,7 +140,7 @@ func TestMsgMint(t *testing.T) { createMsg := func(after func(msg types.MsgMint) types.MsgMint) types.MsgMint { properMsg := *types.NewMsgMint( addr1.String(), - sdk.NewCoin("bitcoin", sdk.NewInt(500000000)), + sdk.NewCoin("bitcoin", sdkmath.NewInt(500000000)), ) return after(properMsg) @@ -177,7 +179,7 @@ func TestMsgMint(t *testing.T) { { name: "zero amount", msg: createMsg(func(msg types.MsgMint) types.MsgMint { - msg.Amount = sdk.NewCoin("bitcoin", sdk.ZeroInt()) + msg.Amount = sdk.NewCoin("bitcoin", sdkmath.ZeroInt()) return msg }), expectPass: false, @@ -185,7 +187,7 @@ func TestMsgMint(t *testing.T) { { name: "negative amount", msg: createMsg(func(msg types.MsgMint) types.MsgMint { - msg.Amount.Amount = sdk.NewInt(-10000000) + msg.Amount.Amount = sdkmath.NewInt(-10000000) return msg }), expectPass: false, @@ -210,7 +212,7 @@ func TestMsgBurn(t *testing.T) { // make a proper burn message baseMsg := types.NewMsgBurn( addr1.String(), - sdk.NewCoin("bitcoin", sdk.NewInt(500000000)), + sdk.NewCoin("bitcoin", sdkmath.NewInt(500000000)), ) // validate burn message was created as intended @@ -246,7 +248,7 @@ func TestMsgBurn(t *testing.T) { name: "zero amount", msg: func() *types.MsgBurn { msg := baseMsg - msg.Amount.Amount = sdk.ZeroInt() + msg.Amount.Amount = sdkmath.ZeroInt() return msg }, expectPass: false, @@ -255,7 +257,7 @@ func TestMsgBurn(t *testing.T) { name: "negative amount", msg: func() *types.MsgBurn { msg := baseMsg - msg.Amount.Amount = sdk.NewInt(-10000000) + msg.Amount.Amount = sdkmath.NewInt(-10000000) return msg }, expectPass: false,