Skip to content

Add newtype wrappers for StateGas and RegularGas #3015

Description

@SamWilsn

We should do something like:

from typing import NewType

StateGas = NewType(Uint)
RegularGas = NewType(Uint)

class StateGasPerByte(Uint):
    @overload
    def __mul__(self, other: Uint) -> StateGas:
        ...

So we don't mix up state-gas with regular-gas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-spec-specsArea: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)C-refactorCategory: refactorE-easyExperience: easy, good for newcomersP-lowS-needs-attentionStatus: needs attention

    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