Skip to content

Save gas, precompute hashed value #249

Open
@antonio-fr

Description

I'm not expert in how the EVM works internally and counts gaz. I just think the method abi.encodeWithSignature is internally computing a Keccak256 hash, which is very computational intensive. That costs 36 units of gaz, and a basic static value would be way more efficient.
Why not replacing the balanceOf(address) method (and same L54) with its corresponding hash key 70a08231, and also building the argument in a lazy way, using a simple packing way ?

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