Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding AnyABI loader #156

Closed
wants to merge 1 commit into from
Closed

Adding AnyABI loader #156

wants to merge 1 commit into from

Conversation

k-thornton
Copy link
Contributor

Adding AnyABI to the list of ABI loaders

Resolves #90

@k-thornton
Copy link
Contributor Author

I ran a couple of tests with loadAbi, and autoLoad with loadContractResult = true and false. Seemed to work ok.

For testing, I found a valid contract address that AnyABI wasn't aware of
ChainId: 8453, address: 0x5525a074fcfae303d5fcc1ee6ed6c40f5ff8811a

I tested that it loaded ABIs successfully from Ethereum and Base, but didn't test much further.

@shazow
Copy link
Owner

shazow commented Nov 22, 2024

Thank you, I'll try to get this reviewed soon!

@shazow shazow self-requested a review November 22, 2024 21:44
Copy link
Owner

@shazow shazow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for doing the leg work on this!!

I'll merge once we have some tests to exercise it (welcome to add some here or I can work on it in another PR), just so it doesn't fall between the cracks. :)

@@ -602,6 +601,68 @@ export type BlockscoutContractResult = {
has_methods_write_proxy?: boolean;
};


function isAnyABINotFound(error: any): boolean {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting to think we need an ABILoader.isNotFound(error:any): boolean that we can inherit/override, but maybe premature?

@shazow
Copy link
Owner

shazow commented Dec 2, 2024

Merged via #163

@shazow shazow closed this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

loaders: Add anyabi.xyz
2 participants