diff --git a/app/ante/cosmos/txsize_gas.go b/app/ante/cosmos/txsize_gas.go index 7ccd8d2bc..846c9e502 100644 --- a/app/ante/cosmos/txsize_gas.go +++ b/app/ante/cosmos/txsize_gas.go @@ -1,7 +1,6 @@ package cosmos import ( - "github.com/ExocoreNetwork/exocore/app/ante/utils" anteutils "github.com/ExocoreNetwork/exocore/app/ante/utils" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -40,8 +39,8 @@ func (cgts ConsumeTxSizeGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim // Skip gas consumption if tx is an OracleCreatePriceTx if anteutils.IsOracleCreatePriceTx(tx) { - if len(ctx.TxBytes()) > utils.TxSizeLimit { - return ctx, sdkerrors.ErrTxTooLarge.Wrapf("oracle create-price tx has exceeds size limit, limit:%d, got:%d", utils.TxSizeLimit, len(ctx.TxBytes())) + if len(ctx.TxBytes()) > anteutils.TxSizeLimit { + return ctx, sdkerrors.ErrTxTooLarge.Wrapf("oracle create-price tx has exceeds size limit, limit:%d, got:%d", anteutils.TxSizeLimit, len(ctx.TxBytes())) } return next(ctx, tx, simulate) } @@ -71,7 +70,7 @@ func (cgts ConsumeTxSizeGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim // use placeholder simSecp256k1Pubkey if sig is nil if acc == nil || acc.GetPubKey() == nil { - pubkey = simSecp256k1Pubkey + pubkey = simSecp256k1Pubkey //gitleaks:allow } else { pubkey = acc.GetPubKey() } diff --git a/precompiles/avs/avs_test.go b/precompiles/avs/avs_test.go index 1171d328e..5ea6480a7 100644 --- a/precompiles/avs/avs_test.go +++ b/precompiles/avs/avs_test.go @@ -141,7 +141,6 @@ func (suite *AVSManagerPrecompileSuite) TestRegisterAVS() { for _, tc := range testcases { tc := tc suite.Run(tc.name, func() { - baseFee := suite.App.FeeMarketKeeper.GetBaseFee(suite.Ctx) // malleate testcase diff --git a/precompiles/avs/query_test.go b/precompiles/avs/query_test.go index f6f677258..4fcf4749c 100644 --- a/precompiles/avs/query_test.go +++ b/precompiles/avs/query_test.go @@ -1,16 +1,18 @@ package avs_test import ( - sdkmath "cosmossdk.io/math" "fmt" + "math/big" + "time" + + sdkmath "cosmossdk.io/math" + avsManagerPrecompile "github.com/ExocoreNetwork/exocore/precompiles/avs" exocmn "github.com/ExocoreNetwork/exocore/precompiles/common" assetstype "github.com/ExocoreNetwork/exocore/x/assets/types" operatorKeeper "github.com/ExocoreNetwork/exocore/x/operator/keeper" "github.com/ExocoreNetwork/exocore/x/operator/types" "github.com/ethereum/go-ethereum/common" - "math/big" - "time" "github.com/ethereum/go-ethereum/core/vm" ) @@ -107,7 +109,6 @@ func (suite *AVSManagerPrecompileSuite) TestGetOptedInOperatorAccAddrs() { suite.Require().NoError(err, "failed to unpack output", err) suite.Require().Equal(1, len(out)) suite.Require().Equal(operatorAddress, out[0]) - }, 100000, false, @@ -197,7 +198,6 @@ func (suite *AVSManagerPrecompileSuite) TestAVSUSDValue() { err := s.precompile.UnpackIntoInterface(&out, avsManagerPrecompile.MethodGetAVSUSDValue, bz) s.Require().NoError(err, "failed to unpack output", err) s.Require().Equal(expectedUSDvalue.BigInt(), out) - }, 100000, false, diff --git a/precompiles/avs/setup_test.go b/precompiles/avs/setup_test.go index ea02896b5..385b52a8c 100644 --- a/precompiles/avs/setup_test.go +++ b/precompiles/avs/setup_test.go @@ -1,10 +1,11 @@ package avs_test import ( + "testing" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "testing" "github.com/ExocoreNetwork/exocore/precompiles/avs" "github.com/ExocoreNetwork/exocore/testutil" diff --git a/precompiles/avs/tx.go b/precompiles/avs/tx.go index e8b248ccd..67c09410e 100644 --- a/precompiles/avs/tx.go +++ b/precompiles/avs/tx.go @@ -48,7 +48,7 @@ func (p Precompile) RegisterAVS( avsParams.AvsAddress = contract.CallerAddress.String() avsParams.Action = avskeeper.RegisterAction // Finally, update the AVS information in the keeper. - err = p.avsKeeper.AVSInfoUpdate(ctx, avsParams) + err = p.avsKeeper.UpdateAVSInfo(ctx, avsParams) if err != nil { fmt.Println("Failed to update AVS info", err) return nil, err @@ -81,7 +81,7 @@ func (p Precompile) DeregisterAVS( // validates that this is owner avsParams.CallerAddress = sdk.AccAddress(origin[:]).String() - err := p.avsKeeper.AVSInfoUpdate(ctx, avsParams) + err := p.avsKeeper.UpdateAVSInfo(ctx, avsParams) if err != nil { return nil, err } @@ -105,7 +105,15 @@ func (p Precompile) UpdateAVS( avsParams.AvsAddress = contract.CallerAddress.String() avsParams.CallerAddress = sdk.AccAddress(origin[:]).String() avsParams.Action = avskeeper.UpdateAction - err = p.avsKeeper.AVSInfoUpdate(ctx, avsParams) + previousAVSInfo, err := p.avsKeeper.GetAVSInfo(ctx, avsParams.AvsAddress) + if err != nil { + return nil, err + } + // If avs UpdateAction check CallerAddress + if !slices.Contains(previousAVSInfo.Info.AvsOwnerAddress, avsParams.CallerAddress) { + return nil, fmt.Errorf("this caller not qualified to update %s", avsParams.CallerAddress) + } + err = p.avsKeeper.UpdateAVSInfo(ctx, avsParams) if err != nil { return nil, err } diff --git a/precompiles/avs/utils_test.go b/precompiles/avs/utils_test.go index 5bbbaceaa..916b590c2 100644 --- a/precompiles/avs/utils_test.go +++ b/precompiles/avs/utils_test.go @@ -94,7 +94,7 @@ func (suite *AVSManagerPrecompileSuite) prepare() { } func (suite *AVSManagerPrecompileSuite) prepareAvs(assetIDs []string) { - err := suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, &avstypes.AVSRegisterOrDeregisterParams{ + err := suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, &avstypes.AVSRegisterOrDeregisterParams{ Action: avskeeper.RegisterAction, EpochIdentifier: epochstypes.HourEpochID, AvsAddress: suite.avsAddr, @@ -173,7 +173,6 @@ func (suite *AVSManagerPrecompileSuite) TestOptInList() { suite.NoError(err) suite.Contains(avsList, suite.avsAddr) - } func (suite *AVSManagerPrecompileSuite) TestOptOut() { diff --git a/precompiles/delegation/tx.go b/precompiles/delegation/tx.go index 458d63115..14c83a05d 100644 --- a/precompiles/delegation/tx.go +++ b/precompiles/delegation/tx.go @@ -125,6 +125,7 @@ func (p Precompile) AssociateOperatorWithStaker( if !ok || staker == nil { return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 1, "[]byte", args[1]) } + // #nosec G115 if uint32(len(staker)) < clientChainAddrLength { return nil, fmt.Errorf(exocmn.ErrInvalidAddrLength, len(staker), clientChainAddrLength) } @@ -176,6 +177,7 @@ func (p Precompile) DissociateOperatorFromStaker( if !ok || staker == nil { return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 1, "[]byte", args[1]) } + // #nosec G115 if uint32(len(staker)) < clientChainAddrLength { return nil, fmt.Errorf(exocmn.ErrInvalidAddrLength, len(staker), clientChainAddrLength) } diff --git a/precompiles/testutil/logs.go b/precompiles/testutil/logs.go index 1f587f80a..d31de57cf 100644 --- a/precompiles/testutil/logs.go +++ b/precompiles/testutil/logs.go @@ -37,7 +37,6 @@ func CheckLogs(logArgs LogCheckArgs) error { int64(float64(logArgs.Res.GasUsed)/float64(logArgs.Res.GasWanted)*100), ) } - // nolint if err := CheckVMError(logArgs.Res, logArgs.ErrContains); err != nil { return err } diff --git a/x/avs/keeper/avs.go b/x/avs/keeper/avs.go index d09895e52..508ad8526 100644 --- a/x/avs/keeper/avs.go +++ b/x/avs/keeper/avs.go @@ -150,7 +150,7 @@ func (k Keeper) RegisterAVSWithChainID( params.AvsAddress = avsAddr.String() params.Action = RegisterAction - if err := k.AVSInfoUpdate(ctx, params); err != nil { + if err := k.UpdateAVSInfo(ctx, params); err != nil { return common.Address{}, err } return avsAddr, nil diff --git a/x/avs/keeper/avs_test.go b/x/avs/keeper/avs_test.go index 857313152..3430102dd 100644 --- a/x/avs/keeper/avs_test.go +++ b/x/avs/keeper/avs_test.go @@ -56,10 +56,9 @@ func (suite *AVSTestSuite) TestAVS() { suite.Equal(found, true) suite.Equal(epoch.CurrentEpoch, int64(2)) suite.CommitAfter(48*time.Hour + time.Nanosecond) - } -func (suite *AVSTestSuite) TestAVSInfoUpdate_Register() { +func (suite *AVSTestSuite) TestUpdateAVSInfo_Register() { avsName, avsAddres, slashAddress, rewardAddress := "avsTest", "exo18cggcpvwspnd5c6ny8wrqxpffj5zmhklprtnph", "0xDF907c29719154eb9872f021d21CAE6E5025d7aB", "0xDF907c29719154eb9872f021d21CAE6E5025d7aB" avsOwnerAddress := []string{"exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkjr", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj1", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj2"} assetID := []string{"11", "22", "33"} @@ -77,7 +76,7 @@ func (suite *AVSTestSuite) TestAVSInfoUpdate_Register() { EpochIdentifier: epochstypes.DayEpochID, } - err := suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, avsParams) + err := suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, avsParams) suite.NoError(err) info, err := suite.App.AVSManagerKeeper.GetAVSInfo(suite.Ctx, avsAddres) @@ -85,12 +84,12 @@ func (suite *AVSTestSuite) TestAVSInfoUpdate_Register() { suite.NoError(err) suite.Equal(avsAddres, info.GetInfo().AvsAddress) - err = suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, avsParams) + err = suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, avsParams) suite.Error(err) suite.Contains(err.Error(), types.ErrAlreadyRegistered.Error()) } -func (suite *AVSTestSuite) TestAVSInfoUpdate_DeRegister() { +func (suite *AVSTestSuite) TestUpdateAVSInfo_DeRegister() { // Test case setup avsName, avsAddres, slashAddress := "avsTest", suite.avsAddress.String(), "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutash" avsOwnerAddress := []string{"exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkjr", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj1", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj2"} @@ -108,26 +107,26 @@ func (suite *AVSTestSuite) TestAVSInfoUpdate_DeRegister() { EpochIdentifier: epochstypes.DayEpochID, } - err := suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, avsParams) + err := suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, avsParams) suite.Error(err) suite.Contains(err.Error(), types.ErrUnregisterNonExistent.Error()) avsParams.Action = avstypes.RegisterAction - err = suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, avsParams) + err = suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, avsParams) suite.NoError(err) info, err := suite.App.AVSManagerKeeper.GetAVSInfo(suite.Ctx, avsAddres) suite.Equal(avsAddres, info.GetInfo().AvsAddress) avsParams.Action = avstypes.DeRegisterAction avsParams.CallerAddress = "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkjr" - err = suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, avsParams) + err = suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, avsParams) suite.NoError(err) info, err = suite.App.AVSManagerKeeper.GetAVSInfo(suite.Ctx, avsAddres) suite.Error(err) suite.Contains(err.Error(), types.ErrNoKeyInTheStore.Error()) } -func (suite *AVSTestSuite) TestAVSInfoUpdateWithOperator_Register() { +func (suite *AVSTestSuite) TestUpdateAVSInfoWithOperator_Register() { avsAddress := suite.avsAddress operatorAddress := sdk.AccAddress(utiltx.GenerateAddress().Bytes()).String() @@ -157,5 +156,4 @@ func (suite *AVSTestSuite) TestAVSInfoUpdateWithOperator_Register() { err = suite.App.AVSManagerKeeper.OperatorOptAction(suite.Ctx, operatorParams) suite.NoError(err) - } diff --git a/x/avs/keeper/keeper.go b/x/avs/keeper/keeper.go index d4e325937..551c02b2b 100644 --- a/x/avs/keeper/keeper.go +++ b/x/avs/keeper/keeper.go @@ -57,7 +57,7 @@ func (k Keeper) GetOperatorKeeper() types.OperatorKeeper { return k.operatorKeeper } -func (k Keeper) AVSInfoUpdate(ctx sdk.Context, params *types.AVSRegisterOrDeregisterParams) error { +func (k Keeper) UpdateAVSInfo(ctx sdk.Context, params *types.AVSRegisterOrDeregisterParams) error { avsInfo, _ := k.GetAVSInfo(ctx, params.AvsAddress) action := params.Action epochIdentifier := params.EpochIdentifier @@ -123,15 +123,11 @@ func (k Keeper) AVSInfoUpdate(ctx sdk.Context, params *types.AVSRegisterOrDeregi if avsInfo == nil { return errorsmod.Wrap(types.ErrUnregisterNonExistent, fmt.Sprintf("the avsaddress is :%s", params.AvsAddress)) } + // TODO: The AvsUnbondingPeriod is used for undelegation, but this check currently blocks updates to AVS information. Remove this check to allow AVS updates, while detailed control mechanisms for updates should be considered and implemented in the future. // If avs UpdateAction check UnbondingPeriod - // #nosec G115 - if int64(avsInfo.Info.AvsUnbondingPeriod) < (epoch.CurrentEpoch - int64(avsInfo.GetInfo().StartingEpoch)) { - return errorsmod.Wrap(types.ErrUnbondingPeriod, fmt.Sprintf("not qualified to deregister %s", avsInfo)) - } - // If avs UpdateAction check CallerAddress - if !slices.Contains(avsInfo.Info.AvsOwnerAddress, params.CallerAddress) { - return errorsmod.Wrap(types.ErrCallerAddressUnauthorized, fmt.Sprintf("this caller not qualified to update %s", params.CallerAddress)) - } + /* if int64(avsInfo.Info.AvsUnbondingPeriod) < (epoch.CurrentEpoch - int64(avsInfo.GetInfo().StartingEpoch)) { + return errorsmod.Wrap(types.ErrUnbondingPeriod, fmt.Sprintf("not qualified to update %s", avsInfo)) + }*/ avs := avsInfo.Info if params.AvsName != "" { @@ -244,7 +240,7 @@ func (k Keeper) OperatorOptAction(ctx sdk.Context, params *OperatorOptParams) er } if !k.operatorKeeper.IsOperator(ctx, opAccAddr) { - return errorsmod.Wrap(delegationtypes.ErrOperatorNotExist, fmt.Sprintf("AVSInfoUpdate: invalid operator address:%s", operatorAddress)) + return errorsmod.Wrap(delegationtypes.ErrOperatorNotExist, fmt.Sprintf("UpdateAVSInfo: invalid operator address:%s", operatorAddress)) } f, err := k.IsAVS(ctx, params.AvsAddress) diff --git a/x/dogfood/client/cli/tx.go b/x/dogfood/client/cli/tx.go index 39e86142d..324d7c3a5 100644 --- a/x/dogfood/client/cli/tx.go +++ b/x/dogfood/client/cli/tx.go @@ -73,7 +73,7 @@ func CmdUpdateParams() *cobra.Command { f.Uint32( FlagHistoricalEntries, 0, "The number of historical entries stored for IBC", ) - f.StringArray( + f.StringSlice( FlagAssetIDs, []string{}, "The asset ids to consider for the module", ) f.Uint64( @@ -101,7 +101,7 @@ func newBuildUpdateParamsMsg( // #nosec G703 // this only errors if the flag isn't defined. historicalEntries, _ := fs.GetUint32(FlagHistoricalEntries) // #nosec G703 // this only errors if the flag isn't defined. - assetIDs, _ := fs.GetStringArray(FlagAssetIDs) + assetIDs, _ := fs.GetStringSlice(FlagAssetIDs) // #nosec G703 // this only errors if the flag isn't defined. minSelfDelegation, _ := fs.GetUint64(FlagMinSelfDelegation) msg := &types.MsgUpdateParams{ diff --git a/x/dogfood/keeper/impl_epochs_hooks_test.go b/x/dogfood/keeper/impl_epochs_hooks_test.go index f157545f0..a7c4b6b79 100644 --- a/x/dogfood/keeper/impl_epochs_hooks_test.go +++ b/x/dogfood/keeper/impl_epochs_hooks_test.go @@ -306,7 +306,7 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{nil}, expUpdatesCount: []int{1}, powers: [][]int64{ - []int64{amountUSD}, + {amountUSD}, }, validatorKeys: []operatortypes.WrappedConsKey{oldKey}, ultimateKey: oldKey, @@ -320,7 +320,7 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{operatortypes.ErrNotOptedIn}, expUpdatesCount: []int{0}, powers: [][]int64{ - []int64{}, + {}, }, validatorKeys: []operatortypes.WrappedConsKey{nil}, ultimateKey: nil, @@ -334,7 +334,7 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{operatortypes.ErrNotOptedIn}, expUpdatesCount: []int{0}, powers: [][]int64{ - []int64{}, + {}, }, validatorKeys: []operatortypes.WrappedConsKey{nil}, ultimateKey: nil, @@ -348,8 +348,8 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{nil, nil}, expUpdatesCount: []int{1, 2}, powers: [][]int64{ - []int64{amountUSD}, - []int64{amountUSD, 0}, + {amountUSD}, + {amountUSD, 0}, }, validatorKeys: []operatortypes.WrappedConsKey{ oldKey, newKey, @@ -365,8 +365,8 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{nil, nil}, expUpdatesCount: []int{1, 1}, powers: [][]int64{ - []int64{amountUSD}, - []int64{0}, + {amountUSD}, + {0}, }, validatorKeys: []operatortypes.WrappedConsKey{oldKey, nil}, ultimateKey: nil, @@ -380,9 +380,9 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{nil, nil, nil}, expUpdatesCount: []int{1, 2, 1}, powers: [][]int64{ - []int64{amountUSD}, - []int64{amountUSD, 0}, - []int64{0}, + {amountUSD}, + {amountUSD, 0}, + {0}, }, validatorKeys: []operatortypes.WrappedConsKey{oldKey, newKey, nil}, ultimateKey: nil, @@ -396,9 +396,9 @@ func (suite *KeeperTestSuite) TestDifferentEpochOperations() { errValues: []error{nil, nil, operatortypes.ErrAlreadyRemovingKey}, expUpdatesCount: []int{1, 1, 0}, powers: [][]int64{ - []int64{amountUSD}, - []int64{0}, - []int64{}, + {amountUSD}, + {0}, + {}, }, validatorKeys: []operatortypes.WrappedConsKey{oldKey, nil, nil}, ultimateKey: nil, diff --git a/x/dogfood/keeper/msg_server.go b/x/dogfood/keeper/msg_server.go index ba20207dc..666bc717c 100644 --- a/x/dogfood/keeper/msg_server.go +++ b/x/dogfood/keeper/msg_server.go @@ -4,6 +4,10 @@ import ( "context" "strings" + "cosmossdk.io/errors" + avskeeper "github.com/ExocoreNetwork/exocore/x/avs/keeper" + avstypes "github.com/ExocoreNetwork/exocore/x/avs/types" + "github.com/ExocoreNetwork/exocore/x/dogfood/types" sdk "github.com/cosmos/cosmos-sdk/types" epochstypes "github.com/evmos/evmos/v14/x/epochs/types" @@ -104,5 +108,24 @@ func (k Keeper) UpdateParams( nextParams.AssetIDs = prevParams.AssetIDs } k.SetParams(c, nextParams) + + // update the related info in the AVS module + isAVS, avsAddr := k.avsKeeper.IsAVSByChainID(c, avstypes.ChainIDWithoutRevision(c.ChainID())) + if !isAVS { + return nil, errors.Wrapf(types.ErrNotAVSByChainID, "chainID:%s avsAddr:%s", c.ChainID(), avsAddr) + } + err := k.avsKeeper.UpdateAVSInfo(c, &avstypes.AVSRegisterOrDeregisterParams{ + AvsName: c.ChainID(), + AvsAddress: avsAddr.String(), + AssetID: nextParams.AssetIDs, + UnbondingPeriod: uint64(nextParams.EpochsUntilUnbonded), + MinSelfDelegation: nextParams.MinSelfDelegation.Uint64(), + EpochIdentifier: nextParams.EpochIdentifier, + ChainID: c.ChainID(), + Action: avskeeper.UpdateAction, + }) + if err != nil { + return nil, errors.Wrap(types.ErrUpdateAVSInfo, err.Error()) + } return &types.MsgUpdateParamsResponse{}, nil } diff --git a/x/dogfood/types/errors.go b/x/dogfood/types/errors.go index 093219712..4216f180e 100644 --- a/x/dogfood/types/errors.go +++ b/x/dogfood/types/errors.go @@ -8,3 +8,13 @@ var ErrInvalidGenesisData = errorsmod.Register( ModuleName, 2, "the genesis data supplied is invalid", ) + +var ErrNotAVSByChainID = errorsmod.Register( + ModuleName, 3, + "AVS doesn't exist by chain ID", +) + +var ErrUpdateAVSInfo = errorsmod.Register( + ModuleName, 4, + "failed to update AVS information", +) diff --git a/x/dogfood/types/expected_keepers.go b/x/dogfood/types/expected_keepers.go index d5b0a1511..41c6886cd 100644 --- a/x/dogfood/types/expected_keepers.go +++ b/x/dogfood/types/expected_keepers.go @@ -94,4 +94,5 @@ type AssetsKeeper interface { type AVSKeeper interface { RegisterAVSWithChainID(sdk.Context, *avstypes.AVSRegisterOrDeregisterParams) (common.Address, error) IsAVSByChainID(ctx sdk.Context, chainID string) (bool, common.Address) + UpdateAVSInfo(ctx sdk.Context, params *avstypes.AVSRegisterOrDeregisterParams) error } diff --git a/x/operator/keeper/opt_test.go b/x/operator/keeper/opt_test.go index 9d12c0a31..1b68e2988 100644 --- a/x/operator/keeper/opt_test.go +++ b/x/operator/keeper/opt_test.go @@ -94,7 +94,7 @@ func (suite *OperatorTestSuite) prepare() { } func (suite *OperatorTestSuite) prepareAvs(assetIDs []string) { - err := suite.App.AVSManagerKeeper.AVSInfoUpdate(suite.Ctx, &avstypes.AVSRegisterOrDeregisterParams{ + err := suite.App.AVSManagerKeeper.UpdateAVSInfo(suite.Ctx, &avstypes.AVSRegisterOrDeregisterParams{ Action: avskeeper.RegisterAction, EpochIdentifier: epochstypes.HourEpochID, AvsAddress: suite.avsAddr,