From 045a2e292fb35a719d9ee396e1dd07f0eb5c0fd7 Mon Sep 17 00:00:00 2001 From: Brandon Weng Date: Fri, 23 Sep 2022 00:23:25 -0700 Subject: [PATCH 1/4] Add accesscontrol module to app.go --- app/ante.go | 5 +---- app/app.go | 26 ++++++++++++++++++++++++++ go.mod | 6 +++--- go.sum | 14 ++++++++------ wasmbinding/bindings/msg.go | 16 ++++++++-------- x/oracle/simulation/operations.go | 7 ++++--- 6 files changed, 50 insertions(+), 24 deletions(-) mode change 100755 => 100644 x/oracle/simulation/operations.go diff --git a/app/ante.go b/app/ante.go index 9e2edcc61f..2571f86781 100644 --- a/app/ante.go +++ b/app/ante.go @@ -8,7 +8,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/ante" ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" - "github.com/sei-protocol/sei-chain/app/antedecorators" "github.com/sei-protocol/sei-chain/utils/tracing" "github.com/sei-protocol/sei-chain/x/dex" dexkeeper "github.com/sei-protocol/sei-chain/x/dex/keeper" @@ -66,11 +65,9 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { // sigVerifyDecorator = ante.NewBatchSigVerificationDecorator(options.BatchVerifier, sequentialVerifyDecorator) // } - memPoolDecorator := ante.NewMempoolFeeDecorator() anteDecorators := []sdk.AnteDecorator{ ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first // TODO: have dex antehandler separate, and then call the individual antehandlers FROM the gasless antehandler decorator wrapper - antedecorators.NewGaslessDecorator([]sdk.AnteDecorator{&memPoolDecorator}, *options.OracleKeeper), wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), // after setup context to enforce limits early wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey), ante.NewRejectExtensionOptionsDecorator(), @@ -79,7 +76,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(options.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewSetPubKeyDecorator(options.AccountKeeper), ante.NewValidateSigCountDecorator(options.AccountKeeper), diff --git a/app/app.go b/app/app.go index cf25735ecb..81d51cff10 100644 --- a/app/app.go +++ b/app/app.go @@ -33,6 +33,10 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" + + aclmodule "github.com/cosmos/cosmos-sdk/x/accesscontrol" + aclkeeper "github.com/cosmos/cosmos-sdk/x/accesscontrol/keeper" + acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types" authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" @@ -152,6 +156,7 @@ var ( // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( + aclmodule.AppModuleBasic{}, auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, @@ -179,6 +184,7 @@ var ( // module account permissions maccPerms = map[string][]string{ + acltypes.ModuleName: nil, authtypes.FeeCollectorName: nil, distrtypes.ModuleName: nil, minttypes.ModuleName: {authtypes.Minter}, @@ -267,6 +273,7 @@ type App struct { memKeys map[string]*sdk.MemoryStoreKey // keepers + AccessControlKeeper aclkeeper.Keeper AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper @@ -386,6 +393,11 @@ func New( // this line is used by starport scaffolding # stargate/app/scopedKeeper // add keepers + app.AccessControlKeeper = aclkeeper.NewKeeper( + appCodec, + app.keys[acltypes.StoreKey], + app.GetSubspace(acltypes.ModuleName), + ) app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, ) @@ -548,6 +560,7 @@ func New( app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encodingConfig.TxConfig, ), + aclmodule.NewAppModule(appCodec, app.AccessControlKeeper), auth.NewAppModule(appCodec, app.AccountKeeper, nil), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), @@ -599,6 +612,7 @@ func New( dexmoduletypes.ModuleName, wasm.ModuleName, tokenfactorytypes.ModuleName, + acltypes.ModuleName, ) app.mm.SetOrderEndBlockers( @@ -624,6 +638,7 @@ func New( dexmoduletypes.ModuleName, wasm.ModuleName, tokenfactorytypes.ModuleName, + acltypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -654,6 +669,7 @@ func New( epochmoduletypes.ModuleName, dexmoduletypes.ModuleName, wasm.ModuleName, + acltypes.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis ) @@ -782,6 +798,15 @@ func (app *App) SetStoreUpgradeHandlers() { // configure store loader that checks if version == upgradeHeight and applies store upgrades app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } + + if upgradeInfo.Name == "2.0.0beta" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + storeUpgrades := storetypes.StoreUpgrades{ + Added: []string{acltypes.StoreKey}, + } + + // configure store loader that checks if version == upgradeHeight and applies store upgrades + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) + } } // AppName returns the name of the App @@ -1077,6 +1102,7 @@ func GetMaccPerms() map[string][]string { func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) + paramsKeeper.Subspace(acltypes.ModuleName) paramsKeeper.Subspace(authtypes.ModuleName) paramsKeeper.Subspace(banktypes.ModuleName) paramsKeeper.Subspace(stakingtypes.ModuleName) diff --git a/go.mod b/go.mod index 157cbde10b..872887f0fe 100644 --- a/go.mod +++ b/go.mod @@ -17,14 +17,14 @@ require ( github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.4.0 - github.com/stretchr/testify v1.7.2 + github.com/stretchr/testify v1.8.0 github.com/tendermint/tendermint v0.37.0-dev github.com/tendermint/tm-db v0.6.8-0.20220519162814-e24b96538a12 go.opentelemetry.io/otel v1.9.0 go.opentelemetry.io/otel/exporters/jaeger v1.9.0 go.opentelemetry.io/otel/sdk v1.9.0 go.opentelemetry.io/otel/trace v1.9.0 - google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 + google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 @@ -129,7 +129,7 @@ require ( ) replace ( - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.1.20 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.1.65 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.1.13 diff --git a/go.sum b/go.sum index 0e4844c03b..ba19787777 100644 --- a/go.sum +++ b/go.sum @@ -1095,8 +1095,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sei-protocol/sei-cosmos v0.1.20 h1:QqYntfddnFBRLGCOVdIlwDg5Xa3TlfmhSEcg9ehx1Ys= -github.com/sei-protocol/sei-cosmos v0.1.20/go.mod h1:9JV9q6Ds2FpU409zu8sw8feCaOiGZApUMjaHvXQOmc8= +github.com/sei-protocol/sei-cosmos v0.1.65 h1:rJiYrqPOzxZ6PTQo92nlF5chlPfj+CycsStA0hGJuus= +github.com/sei-protocol/sei-cosmos v0.1.65/go.mod h1:3uCdb2FCio9uVQRPdZxZ1GqHqyb1moYH93xtTMa7DL8= github.com/sei-protocol/sei-tendermint v0.1.13 h1:uaMXhi+zpaqcUDlshxjqmPmUI/zSZla2a2ZmOtDK5RM= github.com/sei-protocol/sei-tendermint v0.1.13/go.mod h1:Olwbjyagrpoxj5DAUhHxMTWDVEfQ3FYdpypaJ3+6Hs8= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -1166,8 +1166,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1177,8 +1178,9 @@ 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 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= @@ -1901,8 +1903,8 @@ google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno= -google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc h1:Nf+EdcTLHR8qDNN/KfkQL0u0ssxt9OhbaWCl5C0ucEI= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= diff --git a/wasmbinding/bindings/msg.go b/wasmbinding/bindings/msg.go index cb5be442ce..3f1f3fd0ed 100644 --- a/wasmbinding/bindings/msg.go +++ b/wasmbinding/bindings/msg.go @@ -5,18 +5,18 @@ import ( "github.com/sei-protocol/sei-chain/x/dex/types" ) -/// CreateDenom creates a new factory denom, of denomination: -/// factory/{creating contract address}/{Subdenom} -/// Subdenom can be of length at most 44 characters, in [0-9a-zA-Z./] -/// The (creating contract address, subdenom) pair must be unique. -/// The created denom's admin is the creating contract address, -/// but this admin can be changed using the ChangeAdmin binding. +// / CreateDenom creates a new factory denom, of denomination: +// / factory/{creating contract address}/{Subdenom} +// / Subdenom can be of length at most 44 characters, in [0-9a-zA-Z./] +// / The (creating contract address, subdenom) pair must be unique. +// / The created denom's admin is the creating contract address, +// / but this admin can be changed using the ChangeAdmin binding. type CreateDenom struct { Subdenom string `json:"subdenom"` } -/// ChangeAdmin changes the admin for a factory denom. -/// If the NewAdminAddress is empty, the denom has no admin. +// / ChangeAdmin changes the admin for a factory denom. +// / If the NewAdminAddress is empty, the denom has no admin. type ChangeAdmin struct { Denom string `json:"denom"` NewAdminAddress string `json:"new_admin_address"` diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go old mode 100755 new mode 100644 index 3353458a3c..e7af90f2a9 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -20,6 +20,7 @@ import ( ) // Simulation operation weights constants +// //nolint:gosec const ( OpWeightMsgAggregateExchangeRatePrevote = "op_weight_msg_exchange_rate_aggregate_prevote" @@ -82,7 +83,7 @@ func WeightedOperations( } // SimulateMsgAggregateExchangeRatePrevote generates a MsgAggregateExchangeRatePrevote with random values. -//nolint: funlen +// nolint: funlen func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -145,7 +146,7 @@ func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.Ba } // SimulateMsgAggregateExchangeRateVote generates a MsgAggregateExchangeRateVote with random values. -//nolint: funlen +// nolint: funlen func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -212,7 +213,7 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK } // SimulateMsgDelegateFeedConsent generates a MsgDelegateFeedConsent with random values. -//nolint: funlen +// nolint: funlen func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, From f16484f4912e43b84fe4328f30ee8058da66227d Mon Sep 17 00:00:00 2001 From: Brandon Weng Date: Fri, 23 Sep 2022 00:40:41 -0700 Subject: [PATCH 2/4] Fix --- app/app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/app.go b/app/app.go index 81d51cff10..18d5b7fb43 100644 --- a/app/app.go +++ b/app/app.go @@ -344,7 +344,7 @@ func New( bApp.SetInterfaceRegistry(interfaceRegistry) keys := sdk.NewKVStoreKeys( - authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, + "aclaccesscontrol", authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, wasm.StoreKey, @@ -395,7 +395,7 @@ func New( // add keepers app.AccessControlKeeper = aclkeeper.NewKeeper( appCodec, - app.keys[acltypes.StoreKey], + app.keys["aclaccesscontrol"], app.GetSubspace(acltypes.ModuleName), ) app.AccountKeeper = authkeeper.NewAccountKeeper( From 8c92f3b05bd4c4a628e136f33ee5a303dd8f29c0 Mon Sep 17 00:00:00 2001 From: Brandon Weng Date: Fri, 23 Sep 2022 00:42:28 -0700 Subject: [PATCH 3/4] bump version --- app/app.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/app.go b/app/app.go index 18d5b7fb43..4213dbcd3d 100644 --- a/app/app.go +++ b/app/app.go @@ -344,7 +344,7 @@ func New( bApp.SetInterfaceRegistry(interfaceRegistry) keys := sdk.NewKVStoreKeys( - "aclaccesscontrol", authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, + acltypes.StoreKey, authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, wasm.StoreKey, @@ -395,7 +395,7 @@ func New( // add keepers app.AccessControlKeeper = aclkeeper.NewKeeper( appCodec, - app.keys["aclaccesscontrol"], + app.keys[acltypes.StoreKey], app.GetSubspace(acltypes.ModuleName), ) app.AccountKeeper = authkeeper.NewAccountKeeper( diff --git a/go.mod b/go.mod index 872887f0fe..980c742f99 100644 --- a/go.mod +++ b/go.mod @@ -129,7 +129,7 @@ require ( ) replace ( - github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.1.65 + github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.1.66 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.1.13 diff --git a/go.sum b/go.sum index ba19787777..deff6c322a 100644 --- a/go.sum +++ b/go.sum @@ -1095,8 +1095,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sei-protocol/sei-cosmos v0.1.65 h1:rJiYrqPOzxZ6PTQo92nlF5chlPfj+CycsStA0hGJuus= -github.com/sei-protocol/sei-cosmos v0.1.65/go.mod h1:3uCdb2FCio9uVQRPdZxZ1GqHqyb1moYH93xtTMa7DL8= +github.com/sei-protocol/sei-cosmos v0.1.66 h1:ow4z4wKm1iN1GoZAaz+kCB6nv+BKSLnhpFvyale785M= +github.com/sei-protocol/sei-cosmos v0.1.66/go.mod h1:3uCdb2FCio9uVQRPdZxZ1GqHqyb1moYH93xtTMa7DL8= github.com/sei-protocol/sei-tendermint v0.1.13 h1:uaMXhi+zpaqcUDlshxjqmPmUI/zSZla2a2ZmOtDK5RM= github.com/sei-protocol/sei-tendermint v0.1.13/go.mod h1:Olwbjyagrpoxj5DAUhHxMTWDVEfQ3FYdpypaJ3+6Hs8= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= From 1eafe891d5dcdcb130c93fe4ee2d67453688833d Mon Sep 17 00:00:00 2001 From: Brandon Weng Date: Fri, 23 Sep 2022 09:05:19 -0700 Subject: [PATCH 4/4] linting --- app/app.go | 36 +++++++++++++++---------------- app/export.go | 3 ++- x/oracle/simulation/operations.go | 6 +++--- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/app/app.go b/app/app.go index 4213dbcd3d..a66f9d353a 100644 --- a/app/app.go +++ b/app/app.go @@ -184,7 +184,7 @@ var ( // module account permissions maccPerms = map[string][]string{ - acltypes.ModuleName: nil, + acltypes.ModuleName: nil, authtypes.FeeCollectorName: nil, distrtypes.ModuleName: nil, minttypes.ModuleName: {authtypes.Minter}, @@ -274,23 +274,23 @@ type App struct { // keepers AccessControlKeeper aclkeeper.Keeper - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - WasmKeeper wasm.Keeper - OracleKeeper oraclekeeper.Keeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + CapabilityKeeper *capabilitykeeper.Keeper + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + MintKeeper mintkeeper.Keeper + DistrKeeper distrkeeper.Keeper + GovKeeper govkeeper.Keeper + CrisisKeeper crisiskeeper.Keeper + UpgradeKeeper upgradekeeper.Keeper + ParamsKeeper paramskeeper.Keeper + IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly + EvidenceKeeper evidencekeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper + WasmKeeper wasm.Keeper + OracleKeeper oraclekeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper diff --git a/app/export.go b/app/export.go index 908b5ed5b9..e038181efc 100644 --- a/app/export.go +++ b/app/export.go @@ -49,7 +49,8 @@ func (app *App) ExportAppStateAndValidators( // 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 +// +// in favour of export at a block height func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { applyAllowedAddrs := false diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go index e7af90f2a9..6b3dc6c946 100644 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -83,7 +83,7 @@ func WeightedOperations( } // SimulateMsgAggregateExchangeRatePrevote generates a MsgAggregateExchangeRatePrevote with random values. -// nolint: funlen +//nolint: funlen func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -146,7 +146,7 @@ func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.Ba } // SimulateMsgAggregateExchangeRateVote generates a MsgAggregateExchangeRateVote with random values. -// nolint: funlen +//nolint: funlen func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -213,7 +213,7 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK } // SimulateMsgDelegateFeedConsent generates a MsgDelegateFeedConsent with random values. -// nolint: funlen +//nolint: funlen func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,