Skip to content

Avoid magic number #1

Description

@ryu9827

uint256 public constant TOTAL_SUPPLY = 1400000000 * (10 ** 18); // 1.4 billion SPO

We recommend avoiding the use of magic numbers, using a variable here would improve readability and make the code more maintainable for the future.
e.g1 add uint256 public constant ONE_TOKEN = 10 ** 18; and then replace all the 10 ** 18 with ONE_TOKEN
e.g2 add uint256 public constant ONE_MILLION = 10 ** 24; and then carefully replace those numbers with new numbers (for instance, 1400000000 * 10 ** 18 becomes 1400 * ONE_MILLION)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions