Skip to content

Commit

Permalink
Merge pull request #255 from notional-labs/dang/update-duration-hour
Browse files Browse the repository at this point in the history
change duration hour to 1
  • Loading branch information
vuong177 authored Oct 16, 2023
2 parents 8344108 + f8747e2 commit 65c55da
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions app/upgrades/v6/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func CreateUpgradeHandler(
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 24,
DurationHours: 1,
}
flow := types.Flow{
Inflow: math.ZeroInt(),
Expand All @@ -91,6 +91,12 @@ func CreateUpgradeHandler(
}
rlKeeper.SetRateLimit(ctx, uatomRateLimit)
} else {
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 1,
}
uatomRateLimit.Quota = &quota
uatomRateLimit.MinRateLimitAmount = sdk.NewInt(1282_000_000 * 5)
rlKeeper.SetRateLimit(ctx, uatomRateLimit)
}
Expand All @@ -106,7 +112,7 @@ func CreateUpgradeHandler(
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 24,
DurationHours: 1,
}
flow := types.Flow{
Inflow: math.ZeroInt(),
Expand All @@ -121,6 +127,12 @@ func CreateUpgradeHandler(
}
rlKeeper.SetRateLimit(ctx, dotRateLimit)
} else {
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 1,
}
dotRateLimit.Quota = &quota
dotRateLimit.MinRateLimitAmount = sdk.NewInt(22_670_000_000_000 * 5)
rlKeeper.SetRateLimit(ctx, dotRateLimit)
}
Expand All @@ -136,7 +148,7 @@ func CreateUpgradeHandler(
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 24,
DurationHours: 1,
}
flow := types.Flow{
Inflow: math.ZeroInt(),
Expand All @@ -151,6 +163,12 @@ func CreateUpgradeHandler(
}
rlKeeper.SetRateLimit(ctx, ksmRateLimit)
} else {
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 1,
}
ksmRateLimit.Quota = &quota
ksmRateLimit.MinRateLimitAmount = sdk.NewInt(510_000_000_000_000 * 5)
rlKeeper.SetRateLimit(ctx, ksmRateLimit)
}
Expand All @@ -166,7 +184,7 @@ func CreateUpgradeHandler(
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 24,
DurationHours: 1,
}
flow := types.Flow{
Inflow: math.ZeroInt(),
Expand All @@ -181,6 +199,12 @@ func CreateUpgradeHandler(
}
rlKeeper.SetRateLimit(ctx, usdtRateLimit)
} else {
quota := types.Quota{
MaxPercentSend: sdk.NewInt(30),
MaxPercentRecv: sdk.NewInt(30),
DurationHours: 1,
}
usdtRateLimit.Quota = &quota
usdtRateLimit.MinRateLimitAmount = sdk.NewInt(10_000_000_000 * 5)
rlKeeper.SetRateLimit(ctx, usdtRateLimit)
}
Expand Down

0 comments on commit 65c55da

Please sign in to comment.