Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Auction V3 Storage Slot Optimization #152

@iainnash

Description

@iainnash

One way to save 2 slots would be to limit the size of a few fields to a more reasonable number.

Duration can easily be uint32 (probably not a great idea to have an auction beyond 100 years etc).

uint32+uint16+address is still less than uint256 (one storage slot)

firstBidTime and startTime can both be uint126 to save one slot as well

address
uint16 finderFeeBps
uint32 duration
uint128 firstBidTime
uint128 startTime

saves two slots over the current configuration.

Originally posted by @iainnash in #122 (comment)

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