Skip to content

eth-sdk fails to fetch ABI for some contracts: invalid ABI fetched instead #105

@Pzixel

Description

@Pzixel

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:
img

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

img

Contract: https://etherscan.io/address/0xB9fC157394Af804a3578134A6585C0dc9cc990d4#code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions