Skip to content

set reasonable bounds for PalletString everywhere #343

@brenzi

Description

@brenzi

PalletString should have a type argument defining the size of the bounded vec

pub type PalletString = BoundedVec<u8, ConstU32<256>>;

256 by default is a lot because I suspect the chain DB blows it up to the bound (TBV)

Then we should allocate reasonable bounds everywhere. Especially these here should be reconsidered:

if self.name.len() > 20 {

if self.symbol.len() != 3 {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions