hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.25k stars 208 forks source link

Parse and resolve error: unknown function or type 'ecrecover' #1536

Closed bkushigian closed 11 months ago

bkushigian commented 11 months ago

I believe the ecrecover function should be supported, at least in parsing? I don't have a minimal example, but if you clone Solemate and try to parse and resolve the file src/utils/SafeTransferLib.sol with import path src, then you will get the following error:

error: unknown function or type 'ecrecover'
    ┌─ /Users/benku/Certora/tests/solmate/src/tokens/ERC20.sol:130:40
    │
130 │             address recoveredAddress = ecrecover(
    │                                        ^^^^^^^^^

I used the solang_parser binary produced by this testing repo and ran the following command:

solang_parser src/utils/SafeTransferLib.sol --import_paths src