Skip to content
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

Allow list. Token factory changes #1844

Merged
merged 30 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
97b6e55
untested draft
dssei Sep 6, 2024
aa36e63
manual merge
dssei Sep 6, 2024
0153ea4
go.sum updated
dssei Sep 6, 2024
ba61c39
formatting
dssei Sep 6, 2024
0055a81
more testing
dssei Sep 6, 2024
1490c3a
grcp tests
dssei Sep 6, 2024
002a05c
convert 0x addresses to sei
dssei Sep 9, 2024
373924b
Merge branch 'main' of github.com:sei-protocol/sei-chain into feature…
dssei Sep 9, 2024
a7a936d
remove dups from the list
dssei Sep 10, 2024
6513d88
fix lint comment
dssei Sep 10, 2024
7777720
goimported
dssei Sep 10, 2024
bdf110d
update denom support
dssei Sep 11, 2024
4f191f7
- limit allow list size
dssei Sep 12, 2024
d73f8a6
Merge branch 'main' of github.com:sei-protocol/sei-chain into feature…
dssei Sep 12, 2024
4a91cc3
more tests
dssei Sep 12, 2024
4d143d1
update denom tests
dssei Sep 12, 2024
0dedac5
add negative tests for gRPC
dssei Sep 12, 2024
8bbf14a
update test formatting
dssei Sep 12, 2024
91cb04b
add tests for new command
dssei Sep 12, 2024
19dbcce
Update denom message tests
dssei Sep 12, 2024
b411285
Merge branch 'main' into feature/token_allow_list
dssei Sep 13, 2024
0479611
Add proto comments
dssei Sep 13, 2024
c17e144
Merge branch 'feature/token_allow_list' of github.com:sei-protocol/se…
dssei Sep 13, 2024
5617009
return error if address is not associated
dssei Sep 13, 2024
0e78349
update command to accept denom instead of subdenom
dssei Sep 17, 2024
1733b86
update proto form subdenom to denom
dssei Sep 17, 2024
2b2bfef
manual merge
dssei Sep 17, 2024
62a988c
point back to custom sei-cosmos
dssei Sep 17, 2024
e1583ef
bump sei-cosmos version
dssei Sep 20, 2024
5db6498
Merge branch 'main' of github.com:sei-protocol/sei-chain into feature…
dssei Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,13 +532,19 @@
).SetHooks(epochmoduletypes.NewMultiEpochHooks(
app.MintKeeper.Hooks()))

tokenFactoryConfig, err := tokenfactorykeeper.ReadConfig(appOpts)
if err != nil {
panic(fmt.Sprintf("error reading token factory config due to %s", err))

Check warning on line 537 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L537

Added line #L537 was not covered by tests
}

app.TokenFactoryKeeper = tokenfactorykeeper.NewKeeper(
appCodec,
app.keys[tokenfactorytypes.StoreKey],
app.GetSubspace(tokenfactorytypes.ModuleName),
app.AccountKeeper,
app.BankKeeper.(bankkeeper.BaseKeeper).WithMintCoinsRestriction(tokenfactorytypes.NewTokenFactoryDenomMintCoinsRestriction()),
app.DistrKeeper,
tokenFactoryConfig,
)

// The last arguments can contain custom message handlers, and custom query handlers,
Expand Down
4 changes: 4 additions & 0 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
"github.com/cosmos/cosmos-sdk/x/staking/teststaking"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
tokenfactorykeeper "github.com/sei-protocol/sei-chain/x/tokenfactory/keeper"
"github.com/stretchr/testify/suite"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/config"
Expand Down Expand Up @@ -55,6 +56,9 @@ func (t TestAppOpts) Get(s string) interface{} {
if s == FlagSCEnable {
return t.useSc
}
if s == tokenfactorykeeper.FlagDenomAllowListMaxSize {
return 3
}
return nil
}

Expand Down
Loading
Loading