Closed EWCunha closed 1 month ago
this will be possible very shortly
@mattsse is the current recommended way of handling this via vm.etch
?
https://book.getfoundry.sh/cheatcodes/etch#using-vmetch-for-enabling-custom-precompiles
@EWCunha this should be available in latest forge build, please retest and reopen if issues. thank you!
hey @grandizzy , i just updated Foundry with the version:
forge 0.2.0 (a428ba6 2024-10-29T00:21:52.576754000Z)
But it still seems that Foundry isn't able to locate the P256 precompile when running cast call
, this is what I am getting from my call trace:
│ ├─ [0] 0x0000000000000000000000000000000000000100::1b9195f8(67e494c27ec1e6cc1d58139dc82effad48936cb8e8bb872aadedee03dc78b64ceb56213ee8a004be5b49f758325ba9558ea549057c8a1c5ca3e3f9d7e778a3246dc745091f5b05a4479c626bf1e9e9c20affd6cd04bdf8b220dfec5335207feeddb595748ed82bb3a71c3be1e241ef61320c6816e6b5c2b71dad5532eaea12a4eb3f948916429ea47ba6c3af82a15e4b19664e52657939a2d96633de) [staticcall]
│ │ └─ ← [Stop]
│ └─ ← [Revert] EvmError: Revert
Component
Forge
Describe the feature you would like
There is a new precompiled contract for SECP256R1 signature verifications on Polygon networks. The precompiled address is 0x0000000000000000000000000000000000000100.
Additional context
While testing, I tried forking Mumbai and Polygon networks to test the new precompiled contract and verify a SECP256R1 signature, but the test was not working. I realized that maybe forge is not aware of this new precompiled address.
For more context: https://forum.polygon.technology/t/pip-27-precompiled-for-secp256r1-curve-support/13049/5?u=manuechanove https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md