-
Notifications
You must be signed in to change notification settings - Fork 829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove token factory config #1971
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1971 +/- ##
==========================================
+ Coverage 61.71% 61.85% +0.14%
==========================================
Files 264 263 -1
Lines 23498 23503 +5
==========================================
+ Hits 14501 14538 +37
+ Misses 7985 7951 -34
- Partials 1012 1014 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor comments
proto/tokenfactory/params.proto
Outdated
@@ -4,4 +4,6 @@ package seiprotocol.seichain.tokenfactory; | |||
option go_package = "github.com/sei-protocol/sei-chain/x/tokenfactory/types"; | |||
|
|||
// Params defines the parameters for the tokenfactory module. | |||
message Params {} | |||
message Params { | |||
int32 denom_allowlist_max_size = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: consider using uint32 for easier validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -51,6 +51,10 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { | |||
} | |||
|
|||
func (suite *KeeperTestSuite) TestCreateDenom() { | |||
largeAllowList := make([]string, 2001) | |||
for i := 0; i < 2001; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should we make this size (2001) relative to the MaxAllowListSize stored in params? (Ie MaxAlowListSize + 1).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -158,6 +156,10 @@ func (suite *KeeperTestSuite) TestCreateDenom() { | |||
} | |||
|
|||
func (suite *KeeperTestSuite) TestUpdateDenom() { | |||
largeAllowList := make([]string, 2001) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as above wrt making this exceed the MaxAllowListSize param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
x/tokenfactory/keeper/keeper.go
Outdated
@@ -86,3 +81,9 @@ func (k Keeper) CreateModuleAccount(ctx sdk.Context) { | |||
moduleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner) | |||
k.accountKeeper.SetModuleAccount(ctx, moduleAcc) | |||
} | |||
|
|||
func (k Keeper) GetDenomAllowListMaxSize(ctx sdk.Context) int32 { | |||
var demomAllowListMaxSize int32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: denomAllowListMaxSize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
x/tokenfactory/types/params.go
Outdated
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
) | ||
|
||
// ParamTable for tokenfactory module. | ||
const DenomAllowListMaxSize = 2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefaultDenomAllowListMaxSize? To make it clearer that this is just the default and might be changed by future gov proposals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed and added comment
Describe your changes and provide context
Move allowlist size app setting to gov params.
Testing performed to validate your change