eth-sdk fails to fetch ABI for some contracts: invalid ABI fetched instead
I've created a sample repo: https://github.com/Pzixel/eth-sdk-test
What's happens there: I have a simple sdk:
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
Ping?
This might be a problem with how we try to follow proxies and so on. Thanks for bringing this up.
Quick fix is to manually overwrite abi file with whatever you need. Once it's there, eth-sdk won't try to overwrite it.