From ba3ca5f7498f1b44555dd846c35b41fb86a2e834 Mon Sep 17 00:00:00 2001 From: Brandon Weng <18161326+BrandonWeng@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:54:00 -0400 Subject: [PATCH 1/5] test run --- aclmapping/oracle/mappings_test.go | 109 ++++++++++++++++++++++++++++- aclmapping/utils/test_utils.go | 9 +++ 2 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 aclmapping/utils/test_utils.go diff --git a/aclmapping/oracle/mappings_test.go b/aclmapping/oracle/mappings_test.go index 0e7a6d29de..1c4dab6906 100644 --- a/aclmapping/oracle/mappings_test.go +++ b/aclmapping/oracle/mappings_test.go @@ -1,16 +1,119 @@ -package acloraclemapping +package acloraclemapping_test import ( + "fmt" "testing" "time" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkacltypes "github.com/cosmos/cosmos-sdk/types/accesscontrol" + oracleacl "github.com/sei-protocol/sei-chain/aclmapping/oracle" + aclutils "github.com/sei-protocol/sei-chain/aclmapping/utils" + utils "github.com/sei-protocol/sei-chain/aclmapping/utils" + "github.com/sei-protocol/sei-chain/app/apptesting" + oraclekeeper "github.com/sei-protocol/sei-chain/x/oracle/keeper" + oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types" "github.com/sei-protocol/sei-chain/app" - oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" ) +type KeeperTestSuite struct { + apptesting.KeeperTestHelper + + queryClient oracletypes.QueryClient + msgServer oracletypes.MsgServer + // defaultDenom is on the suite, as it depends on the creator test address. + defaultDenom string + + initalBalance sdk.Coins +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} + +// Runs before each test case +func (suite *KeeperTestSuite) SetupTest() { + suite.Setup() +} + +// Explicitly only run once during setup +func (suite *KeeperTestSuite) PrepareTest() { + suite.defaultDenom = "usei" + suite.initalBalance = sdk.Coins{sdk.NewInt64Coin(suite.defaultDenom, 100000000000)} + suite.FundAcc(suite.TestAccs[0], suite.initalBalance) + + suite.SetupTokenFactory() + suite.queryClient = oracletypes.NewQueryClient(suite.QueryHelper) + suite.msgServer = oraclekeeper.NewMsgServerImpl(suite.App.OracleKeeper) + + msgValidator := sdkacltypes.NewMsgValidator(aclutils.StoreKeyToResourceTypePrefixMap) + suite.Ctx = suite.Ctx.WithMsgValidator(msgValidator) +} + +func (suite *KeeperTestSuite) TestMsgBurnDependencies() { + suite.PrepareTest() + tests := []struct { + name string + expectedError error + msg *oracletypes.MsgAggregateExchangeRateVote + dynamicDep bool + }{ + { + name: "default vote", + msg: &oracletypes.MsgAggregateExchangeRateVote{ + ExchangeRates: "1usei", + Feeder: "test", + Validator: "validator", + }, + expectedError: nil, + dynamicDep: true, + }, + { + name: "dont check synchronous", + msg: &oracletypes.MsgAggregateExchangeRateVote{ + ExchangeRates: "1usei", + Feeder: "test", + Validator: "validator", + }, + expectedError: nil, + dynamicDep: false, + }, + } + for _, tc := range tests { + suite.Run(fmt.Sprintf("Test Case: %s", tc.name), func() { + handlerCtx, cms := utils.CacheTxContext(suite.Ctx) + _, err := suite.msgServer.AggregateExchangeRateVote( + sdk.WrapSDKContext(handlerCtx), + tc.msg, + ) + suite.App.BankKeeper.WriteDeferredOperations(suite.Ctx) + + depdenencies , _ := oracleacl.MsgVoteDependencyGenerator( + suite.App.AccessControlKeeper, + handlerCtx, + tc.msg, + ) + + if !tc.dynamicDep { + depdenencies = sdkacltypes.SynchronousAccessOps() + } + + if tc.expectedError != nil { + suite.Require().EqualError(err, tc.expectedError.Error()) + } else { + suite.Require().NoError(err) + } + + missing := handlerCtx.MsgValidator().ValidateAccessOperations(depdenencies, cms.GetEvents()) + suite.Require().Empty(missing) + }) + } +} func TestMsgVoteDependencyGenerator(t *testing.T) { tm := time.Now().UTC() valPub := secp256k1.GenPrivKey().PubKey() @@ -23,7 +126,7 @@ func TestMsgVoteDependencyGenerator(t *testing.T) { Validator: "validator", } - accessOps, err := MsgVoteDependencyGenerator(testWrapper.App.AccessControlKeeper, testWrapper.Ctx, &oracleVote) + accessOps, err := oracleacl.MsgVoteDependencyGenerator(testWrapper.App.AccessControlKeeper, testWrapper.Ctx, &oracleVote) require.NoError(t, err) err = acltypes.ValidateAccessOps(accessOps) require.NoError(t, err) diff --git a/aclmapping/utils/test_utils.go b/aclmapping/utils/test_utils.go new file mode 100644 index 0000000000..5b39275708 --- /dev/null +++ b/aclmapping/utils/test_utils.go @@ -0,0 +1,9 @@ +package utils + +import sdk "github.com/cosmos/cosmos-sdk/types" + +func CacheTxContext(ctx sdk.Context) (sdk.Context, sdk.CacheMultiStore) { + ms := ctx.MultiStore() + msCache := ms.CacheMultiStore() + return ctx.WithMultiStore(msCache), msCache +} From 9a68d7fbd088d4f8adda0674c863350c072ecfdc Mon Sep 17 00:00:00 2001 From: Brandon Weng <18161326+BrandonWeng@users.noreply.github.com> Date: Sat, 29 Oct 2022 09:26:47 -0400 Subject: [PATCH 2/5] test running e2e but missing ops --- aclmapping/oracle/mappings_test.go | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/aclmapping/oracle/mappings_test.go b/aclmapping/oracle/mappings_test.go index 1c4dab6906..0e3246475c 100644 --- a/aclmapping/oracle/mappings_test.go +++ b/aclmapping/oracle/mappings_test.go @@ -16,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sei-protocol/sei-chain/app" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -28,8 +29,10 @@ type KeeperTestSuite struct { msgServer oracletypes.MsgServer // defaultDenom is on the suite, as it depends on the creator test address. defaultDenom string - + defaultExchangeRate string initalBalance sdk.Coins + + validator sdk.ValAddress } func TestKeeperTestSuite(t *testing.T) { @@ -44,15 +47,24 @@ func (suite *KeeperTestSuite) SetupTest() { // Explicitly only run once during setup func (suite *KeeperTestSuite) PrepareTest() { suite.defaultDenom = "usei" + suite.defaultExchangeRate = fmt.Sprintf("%dusei", sdk.NewDec(1700)) + suite.initalBalance = sdk.Coins{sdk.NewInt64Coin(suite.defaultDenom, 100000000000)} suite.FundAcc(suite.TestAccs[0], suite.initalBalance) - suite.SetupTokenFactory() suite.queryClient = oracletypes.NewQueryClient(suite.QueryHelper) suite.msgServer = oraclekeeper.NewMsgServerImpl(suite.App.OracleKeeper) + // testInput := oraclekeeper.CreateTestInput(suite.T()) + // suite.Ctx = testInput.Ctx + msgValidator := sdkacltypes.NewMsgValidator(aclutils.StoreKeyToResourceTypePrefixMap) suite.Ctx = suite.Ctx.WithMsgValidator(msgValidator) + suite.Ctx = suite.Ctx.WithBlockHeight(1) + suite.validator = suite.SetupValidator(stakingtypes.Bonded) + + suite.App.OracleKeeper.SetFeederDelegation(suite.Ctx, suite.validator, suite.TestAccs[0]) + suite.App.OracleKeeper.SetVoteTarget(suite.Ctx, suite.defaultDenom) } func (suite *KeeperTestSuite) TestMsgBurnDependencies() { @@ -66,9 +78,9 @@ func (suite *KeeperTestSuite) TestMsgBurnDependencies() { { name: "default vote", msg: &oracletypes.MsgAggregateExchangeRateVote{ - ExchangeRates: "1usei", - Feeder: "test", - Validator: "validator", + ExchangeRates: suite.defaultExchangeRate, + Feeder: suite.TestAccs[0].String(), + Validator: suite.validator.String(), }, expectedError: nil, dynamicDep: true, @@ -76,9 +88,9 @@ func (suite *KeeperTestSuite) TestMsgBurnDependencies() { { name: "dont check synchronous", msg: &oracletypes.MsgAggregateExchangeRateVote{ - ExchangeRates: "1usei", - Feeder: "test", - Validator: "validator", + ExchangeRates: suite.defaultExchangeRate, + Feeder: suite.TestAccs[0].String(), + Validator: suite.validator.String(), }, expectedError: nil, dynamicDep: false, @@ -91,8 +103,6 @@ func (suite *KeeperTestSuite) TestMsgBurnDependencies() { sdk.WrapSDKContext(handlerCtx), tc.msg, ) - suite.App.BankKeeper.WriteDeferredOperations(suite.Ctx) - depdenencies , _ := oracleacl.MsgVoteDependencyGenerator( suite.App.AccessControlKeeper, handlerCtx, From 8f4056144b5c95fa5c2c3b842231c1013f3d9f42 Mon Sep 17 00:00:00 2001 From: Brandon Weng <18161326+BrandonWeng@users.noreply.github.com> Date: Sat, 29 Oct 2022 09:39:36 -0400 Subject: [PATCH 3/5] Test run --- aclmapping/oracle/mappings.go | 20 ++++++++++---------- go.mod | 2 ++ go.sum | 4 ++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/aclmapping/oracle/mappings.go b/aclmapping/oracle/mappings.go index adce4da9b4..e94cf385ee 100644 --- a/aclmapping/oracle/mappings.go +++ b/aclmapping/oracle/mappings.go @@ -7,6 +7,7 @@ import ( sdkacltypes "github.com/cosmos/cosmos-sdk/types/accesscontrol" aclkeeper "github.com/cosmos/cosmos-sdk/x/accesscontrol/keeper" acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" utils "github.com/sei-protocol/sei-chain/aclmapping/utils" oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" ) @@ -28,6 +29,7 @@ func MsgVoteDependencyGenerator(keeper aclkeeper.Keeper, ctx sdk.Context, msg sd if !ok { return []sdkacltypes.AccessOperation{}, ErrorInvalidMsgType } + valAddr, _ := sdk.ValAddressFromBech32(msgVote.Validator) accessOperations := []sdkacltypes.AccessOperation{ // validate feeder @@ -35,16 +37,17 @@ func MsgVoteDependencyGenerator(keeper aclkeeper.Keeper, ctx sdk.Context, msg sd { ResourceType: sdkacltypes.ResourceType_KV_ORACLE_FEEDERS, AccessType: sdkacltypes.AccessType_READ, - IdentifierTemplate: msgVote.Validator, + IdentifierTemplate: string(oracletypes.GetFeederDelegationKey(valAddr)), }, // read validator from staking - READ // validator is bonded check - READ // (both covered by below) { - ResourceType: sdkacltypes.ResourceType_KV_STAKING, + ResourceType: sdkacltypes.ResourceType_KV_STAKING_VALIDATOR, AccessType: sdkacltypes.AccessType_READ, - IdentifierTemplate: msgVote.Validator, + IdentifierTemplate: string(stakingtypes.GetValidatorKey(valAddr)), }, + // get vote target (for all exchange rate tuples) -> blanket read on that prefix - READ { ResourceType: sdkacltypes.ResourceType_KV_ORACLE_VOTE_TARGETS, @@ -55,15 +58,12 @@ func MsgVoteDependencyGenerator(keeper aclkeeper.Keeper, ctx sdk.Context, msg sd // set exchange rate vote - WRITE { ResourceType: sdkacltypes.ResourceType_KV_ORACLE_AGGREGATE_VOTES, - AccessType: sdkacltypes.AccessType_READ, - IdentifierTemplate: msgVote.Validator, + AccessType: sdkacltypes.AccessType_WRITE, + IdentifierTemplate: string(oracletypes.GetAggregateExchangeRateVoteKey(valAddr)), }, + // Last Operation should always be a commit - { - ResourceType: sdkacltypes.ResourceType_ANY, - AccessType: sdkacltypes.AccessType_COMMIT, - IdentifierTemplate: utils.DefaultIDTemplate, - }, + *acltypes.CommitAccessOp(), } return accessOperations, nil } diff --git a/go.mod b/go.mod index 13cc490cb8..94aa0a6a6f 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/k0kubun/pp/v3 v3.2.0 github.com/pkg/errors v0.9.1 github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.5.0 @@ -88,6 +89,7 @@ require ( github.com/lib/pq v1.10.6 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect diff --git a/go.sum b/go.sum index b775b82ddb..fc1894a5bc 100644 --- a/go.sum +++ b/go.sum @@ -734,6 +734,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/k0kubun/pp/v3 v3.2.0 h1:h33hNTZ9nVFNP3u2Fsgz8JXiF5JINoZfFq4SvKJwNcs= +github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -800,6 +802,8 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope 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-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= From 92af12c93c683182bd32379d1bced110c97a55d5 Mon Sep 17 00:00:00 2001 From: Brandon Weng <18161326+BrandonWeng@users.noreply.github.com> Date: Sat, 29 Oct 2022 09:47:54 -0400 Subject: [PATCH 4/5] done --- go.mod | 2 -- go.sum | 4 ---- 2 files changed, 6 deletions(-) diff --git a/go.mod b/go.mod index 94aa0a6a6f..13cc490cb8 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/k0kubun/pp/v3 v3.2.0 github.com/pkg/errors v0.9.1 github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.5.0 @@ -89,7 +88,6 @@ require ( github.com/lib/pq v1.10.6 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/magiconair/properties v1.8.6 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect diff --git a/go.sum b/go.sum index fc1894a5bc..b775b82ddb 100644 --- a/go.sum +++ b/go.sum @@ -734,8 +734,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/k0kubun/pp/v3 v3.2.0 h1:h33hNTZ9nVFNP3u2Fsgz8JXiF5JINoZfFq4SvKJwNcs= -github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -802,8 +800,6 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope 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-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= From 6cb776b61d07fe3e4f3e11c6b309ec342e641afe Mon Sep 17 00:00:00 2001 From: Brandon Weng <18161326+BrandonWeng@users.noreply.github.com> Date: Sat, 29 Oct 2022 09:50:18 -0400 Subject: [PATCH 5/5] lint --- aclmapping/oracle/mappings.go | 4 ++-- x/oracle/simulation/operations.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aclmapping/oracle/mappings.go b/aclmapping/oracle/mappings.go index e94cf385ee..778bc5bf6b 100644 --- a/aclmapping/oracle/mappings.go +++ b/aclmapping/oracle/mappings.go @@ -37,7 +37,7 @@ func MsgVoteDependencyGenerator(keeper aclkeeper.Keeper, ctx sdk.Context, msg sd { ResourceType: sdkacltypes.ResourceType_KV_ORACLE_FEEDERS, AccessType: sdkacltypes.AccessType_READ, - IdentifierTemplate: string(oracletypes.GetFeederDelegationKey(valAddr)), + IdentifierTemplate: string(oracletypes.GetFeederDelegationKey(valAddr)), }, // read validator from staking - READ // validator is bonded check - READ @@ -59,7 +59,7 @@ func MsgVoteDependencyGenerator(keeper aclkeeper.Keeper, ctx sdk.Context, msg sd { ResourceType: sdkacltypes.ResourceType_KV_ORACLE_AGGREGATE_VOTES, AccessType: sdkacltypes.AccessType_WRITE, - IdentifierTemplate: string(oracletypes.GetAggregateExchangeRateVoteKey(valAddr)), + IdentifierTemplate: string(oracletypes.GetAggregateExchangeRateVoteKey(valAddr)), }, // Last Operation should always be a commit diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go index 3988c4b164..2028e73625 100644 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -65,7 +65,7 @@ func WeightedOperations( } // 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, @@ -122,7 +122,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,