dethcrypto / dethcrypto/eth-sdk
eth-sdk fails to fetch ABI for some contracts: invalid ABI fetched instead
- Dominant language
- JavaScript
- Stars
- 428
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
I've created a sample repo: https://github.com/Pzixel/eth-sdk-test
What's happens there: I have a simple sdk:
```ts
import { defineConfig } from '@dethcrypto/eth-sdk'
export default defineConfig({
contracts: {
mainnet: {
curveRegistry3: '0xB9fC157394Af804a3578134A6585C0dc9cc990d4',
},
},
})
```
Then I'm running `yarn eth-sdk` and check output json file https://github.com/Pzixel/eth-sdk-test/blob/master/eth-sdk/abis/mainnet/curveRegistry3.json
The problem is that it's unrelated to contract `0xB9fC157394Af804a3578134A6585C0dc9cc990d4`. For example, fetched JSON suggests that there is a function integrate_checkpoint which doesn't exist on real contract:

Meanwhile contract has a function `metapool_implementations` which is missing in generated ABI:

Contract: https://etherscan.io/address/0xB9fC157394Af804a3578134A6585C0dc9cc990d4#code
Contributor guide
Research direction
Start with the sample repository and run `yarn eth-sdk`; inspect `eth-sdk/abis/mainnet/curveRegistry3.json` and compare it with the verified ABI for the contract on Etherscan. Done means the generated ABI matches `0xB9fC157394Af804a3578134A6585C0dc9cc990d4`, including `metapool_implementations` and excluding unrelated functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity, typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100