This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Abigen descriptor for function Call objects has incorrect function selector in comments #2771
Labels
bug
Something isn't working
Version
├── ethers v2.0.13
│ ├── ethers-addressbook v2.0.13
│ │ ├── ethers-core v2.0.13
│ ├── ethers-contract v2.0.13
│ │ ├── ethers-contract-abigen v2.0.13
│ │ │ ├── ethers-core v2.0.13 ()
│ │ ├── ethers-contract-derive v2.0.13 (proc-macro)
│ │ │ ├── ethers-contract-abigen v2.0.13
│ │ │ │ ├── ethers-core v2.0.13 ()
│ │ │ ├── ethers-core v2.0.13 ()
│ │ ├── ethers-core v2.0.13 ()
│ │ ├── ethers-providers v2.0.13
│ │ │ ├── ethers-core v2.0.13 ()
│ ├── ethers-core v2.0.13 ()
│ ├── ethers-etherscan v2.0.13
│ │ ├── ethers-core v2.0.13 ()
│ ├── ethers-middleware v2.0.13
│ │ ├── ethers-contract v2.0.13 ()
│ │ ├── ethers-core v2.0.13 ()
│ │ ├── ethers-etherscan v2.0.13 ()
│ │ ├── ethers-providers v2.0.13 ()
│ │ ├── ethers-signers v2.0.13
│ │ │ ├── ethers-core v2.0.13 ()
│ ├── ethers-providers v2.0.13 ()
│ └── ethers-signers v2.0.13 ()
├── ethers-core v2.0.13 ()
├── ethers-flashbots v0.15.0
│ ├── ethers v2.0.13 ()
├── ethers-providers v2.0.13 (*)
Platform
5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Description
When generating an abigen file using the macro, I've just discovered the comments on the function Call container types for input parameters has the function selectors mixed up.
The actual functions to call these functions have the correct selectors in their commentsEDIT: Turns out these are also mixed up, but when cross-referencing these, the selector is referenced in a totally different Call container type. Only discovered when using the selectors as a match case to parse input parameters for validation.I've attached the rs file containing this incorrect output - had to rename it to a .txt.
ToadRouter04.rs.txt
The correct function selectors for each call are here https://etherscan.io/address/0xb62bdeda5d1e7a03a615b793e949c19d158c6b46#writeProxyContract
in particular check SwapExactTokensForTokensSupportingFeeOnTransferTokens
The text was updated successfully, but these errors were encountered: