Skip to content

Commit

Permalink
fix(iro): missing StartTimeAfterSettlement in IRO default params (#…
Browse files Browse the repository at this point in the history
…1704)

* fixed missing StartTimeAfterSettlement in incentives params

* linter
  • Loading branch information
mtsitrin authored Jan 8, 2025
1 parent 4ebef89 commit 10edf97
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/iro/types/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ func (p Plan) GetIRODenom() string {

func DefaultIncentivePlanParams() IncentivePlanParams {
return IncentivePlanParams{
NumEpochsPaidOver: 43200, // 1 month in minute epoch
NumEpochsPaidOver: 43200, // 1 month in minute epoch
StartTimeAfterSettlement: DefaultIncentivePlanMinimumStartTimeAfterSettlement,
}
}

Expand Down
21 changes: 21 additions & 0 deletions x/rollapp/keeper/msg_server_update_rollapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,16 @@ func (s *RollappTestSuite) TestUpdateRollappLaunched() {
},
expError: types.ErrImmutableFieldUpdateAfterLaunched,
},
// update min sequencer bond
{
name: "Update sealed rollapp: fail - min sequencer bond update",
update: &types.MsgUpdateRollappInformation{
Owner: alice,
RollappId: rollappId,
MinSequencerBond: types.DefaultMinSequencerBondGlobalCoin,
},
expError: types.ErrImmutableFieldUpdateAfterLaunched,
},
{
name: "Update sealed rollapp: fail - try to update genesis checksum when sealed",
update: &types.MsgUpdateRollappInformation{
Expand All @@ -401,6 +411,17 @@ func (s *RollappTestSuite) TestUpdateRollappLaunched() {
},
expError: types.ErrImmutableFieldUpdateAfterLaunched,
},
// TODO: should return error, but now it doesn't (https://github.com/dymensionxyz/dymension/issues/1703)
{
name: "Update rollapp: success - set non valid min denom ignores this field",
update: &types.MsgUpdateRollappInformation{
Owner: alice,
RollappId: rollappId,
MinSequencerBond: sdk.Coin{Denom: "no_valid_1243", Amount: sdk.NewInt(100)},
},
mallete: func(expected *types.Rollapp) {},
expError: nil,
},
}

for _, tc := range tests {
Expand Down
2 changes: 2 additions & 0 deletions x/rollapp/types/message_update_rollapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func (msg *MsgUpdateRollappInformation) ValidateBasic() error {
}
}

// TODO: validate min seq bond (https://github.com/dymensionxyz/dymension/issues/1703)

if msg.Metadata != nil {
if err := msg.Metadata.Validate(); err != nil {
return errors.Join(ErrInvalidMetadata, err)
Expand Down

0 comments on commit 10edf97

Please sign in to comment.