-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
A-cheatcodesArea: cheatcodesArea: cheatcodesC-forgeCommand: forgeCommand: forgeT-featureType: featureType: featurefirst issueA good way to start contributingA good way to start contributing
Description
Component
Forge
Describe the feature you would like
Forge provides a cheatcode to receive the address of a private key, see forge-std/Vm.sol::addr(uint)(address).
It would be great if we could get a cheatcode to receive the public key too. The public key should be returned in affine coordinates, e.g. vm.pubKey(uint privkey)(uint xCoordinate, unit yCoordinate).
To receive the public key of a private key, you currently either have to implement an ecMul function in solidity, quickly leading to out-of-gas errors or use ffi, leading to big overhead and long-running testsuites.
Additional context
Issue initially opened in forge-std repo: foundry-rs/forge-std#356
andyrobert3 and El-Ku
Metadata
Metadata
Assignees
Labels
A-cheatcodesArea: cheatcodesArea: cheatcodesC-forgeCommand: forgeCommand: forgeT-featureType: featureType: featurefirst issueA good way to start contributingA good way to start contributing
Type
Projects
Status
Done