Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for signing and verifying signatures #257

Merged
merged 9 commits into from
Mar 20, 2024
Merged

Commits on Mar 13, 2024

  1. Configuration menu
    Copy the full SHA
    ca7981c View commit details
    Browse the repository at this point in the history
  2. feat: add support for vm.sign()

    + a bunch of tests for vm.addr()
    + move the known_keys and known_sigs to the Exec object, making it part of cheatcodes meant that tests could interfere with each other
    
    Still a WIP, the output of vm.sign() is not connected to ecrecover() yet
    karmacoma-eth committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    c596a01 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. use uninterpreted functions for vm.addr and vm.sign

    avoids relying on counters for name collisions and repeated vm.addr(x) applications are implicitly equal, no need to add explicit constraints
    karmacoma-eth committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    6aa8fac View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. feat: ecrecover can now return the right address

    (under the right circumstances)
    karmacoma-eth committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    b9c1f2b View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2024

  1. Configuration menu
    Copy the full SHA
    585c2af View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. simplify sign/recover constraints

    calling vm.sign(key, digest) will now:
    - generate (v, r, s)
    - generate a constraint that ecrecover(digest, v, r, s) == vm.addr(key)
    - generate the same constraint for the equivalent signature
    
    this is simpler and more efficient than the previous way to do it entirely as constraints between ecrecover calls
    karmacoma-eth committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    449149f View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2024

  1. Configuration menu
    Copy the full SHA
    86d40fd View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Configuration menu
    Copy the full SHA
    84343fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bdfd518 View commit details
    Browse the repository at this point in the history