From 3a091f48b55c5b834978552f995ecded10f36bde Mon Sep 17 00:00:00 2001 From: Giuseppe Natale <12249307+giunatale@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:43:16 +0100 Subject: [PATCH 1/2] removal of oversight DAO cannot be vetoed --- x/coredaos/keeper/msg_server.go | 2 +- x/coredaos/keeper/msg_server_test.go | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/x/coredaos/keeper/msg_server.go b/x/coredaos/keeper/msg_server.go index 54215bb9..bef644c9 100644 --- a/x/coredaos/keeper/msg_server.go +++ b/x/coredaos/keeper/msg_server.go @@ -385,7 +385,7 @@ func (ms MsgServer) VetoProposal(goCtx context.Context, msg *types.MsgVetoPropos return nil, err } - if updateParamsMsg.Params.OversightDaoAddress != "" && updateParamsMsg.Params.OversightDaoAddress != params.OversightDaoAddress { + if updateParamsMsg.Params.OversightDaoAddress != params.OversightDaoAddress { logger.Error( "proposal contains a change of the oversight DAO address, vetoing it would prevent the replacement of the current oversight DAO", "proposal", proposal.Id, diff --git a/x/coredaos/keeper/msg_server_test.go b/x/coredaos/keeper/msg_server_test.go index 86a10916..79dd54a3 100644 --- a/x/coredaos/keeper/msg_server_test.go +++ b/x/coredaos/keeper/msg_server_test.go @@ -709,6 +709,20 @@ func TestMsgServerVetoProposal(t *testing.T) { Status: govtypesv1.StatusVotingPeriod, Messages: proposalWithChangeOversightDAOMsgs, } + proposalWithEmptyOversightDAOMsgs, err := sdktx.SetMsgs([]sdk.Msg{&types.MsgUpdateParams{ + Authority: "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", + Params: types.Params{ + OversightDaoAddress: "", + }, + }}) + require.NoError(t, err) + proposalWithEmptyOversightDAO := govtypesv1.Proposal{ + Title: "Test Proposal", + Summary: "A proposal to set empty oversight DAO address", + Id: 5, + Status: govtypesv1.StatusVotingPeriod, + Messages: proposalWithEmptyOversightDAOMsgs, + } tests := []struct { name string msg *types.MsgVetoProposal @@ -840,6 +854,18 @@ func TestMsgServerVetoProposal(t *testing.T) { }, setOversightDAO: true, }, + { + name: "veto proposal with disablement of oversight DAO", + msg: &types.MsgVetoProposal{ + Vetoer: oversightDAOAcc, + ProposalId: 5, + }, + expectedErr: "proposal with ID 5 contains a change of the oversight DAO address, vetoing it would prevent the replacement of the current oversight DAO: oversight DAO cannot veto this proposal", + setupMocks: func(ctx sdk.Context, m *testutil.Mocks) { + m.GovKeeper.EXPECT().GetProposal(ctx, uint64(5)).Return(proposalWithEmptyOversightDAO, true) + }, + setOversightDAO: true, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { From 8374d56845c41b2462adc4feb1f0a7d43aa9d542 Mon Sep 17 00:00:00 2001 From: Giuseppe Natale <12249307+giunatale@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:57:30 +0100 Subject: [PATCH 2/2] update CL --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a75f6041..61aa71aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ - Migrate `x/gov` fork from Atom One to Atom One SDK [#248](https://github.com/atomone-hub/atomone/pull/248) - Add governors to `x/gov` module [#258](https://github.com/atomone-hub/atomone/pull/258) -- Prevent Oversight DAO from vetoing proposals that include a change to the Oversight DAO address [#275](https://github.com/atomone-hub/atomone/pull/275) +- Prevent Oversight DAO from vetoing proposals that include a change to the Oversight DAO address [#275](https://github.com/atomone-hub/atomone/pull/275) [#299](https://github.com/atomone-hub/atomone/pull/299) ### STATE BREAKING