Only allow valid denoms in bank's denom Metadata #12026
Open
Description
opened on May 24, 2022
Summary of Bug
ref: #10701 (comment)
Only allow valid denoms in bank's denom Metadata.
The denom regex we use is
Line 856 in 23baecf
But it seems to me we don't do a regex check when writing the metadata to state.
Version
v0.46.0-rc1
Steps to Reproduce
Currently, the denom metadata is set in InitGenesis, by reading a genesis JSON file. This json file can contain denom strings that don't adhere to the regex above. But they are still written to state:
cosmos-sdk/x/bank/keeper/keeper.go
Lines 305 to 312 in 5505428
Proposed fix
A validate basic function on Metadata to verify that all denoms match the regex.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Metadata
Assignees
Type
Projects
Status
📋 Backlog
Activity