Skip to content

feat(cheatcodes): add vm.ec{Add, Mul?, AddP256, MulP256?} (elliptic-curve cryptography) #10868

Open
@StackOverflowExcept1on

Description

@StackOverflowExcept1on

Component

Forge

Describe the feature you would like

It would be great to have such methods in vm since in rollups we could see more complex smart contracts that use secp256k1 / secp256r1 elliptic-curves. Intended use case - multi-signature schemes, ECDH on-chain, etc.

Additional context

Mul is marked with a question mark because we already have vm.createWallet(uint256 privateKey) and vm.publicKeyP256(uint256 privateKey), but we don't have any generic method like add/mul that returns struct PublicKey { uint256 x, y; }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-featureType: featureT-needs-triageType: this issue needs to be labelled

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions