Skip to content

Gas inefficiencies in KittyMinting #6

@Arachnid

Description

@Arachnid

Description

There are a couple of gas inefficiencies in KittyMinting that could be resolved for significantly lower gas consumption:

  • promoCreationLimit and gen0CreationLimit are both defined as variables. Making them constant would allow the compiler to optimise them out, saving 40k of deployment-time gas, and ~200 gas each time they are read.
  • createPromoKitty increments both variables, costing ~10k. Incrementing only promoCreatedCount, and checking the sum of the two variables instead of each separately, would save ~5k gas at update time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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