Feat: Add support for Foundry output ABI format#466
Closed
diyahir wants to merge 2 commits into
Closed
Conversation
Foundry outputs have the json in an "abi" child which causes an early breaking of the code
Member
|
Good morning. Thank you for your contribution! Really appreciated 🙏 Here's the existing code: hyperindex/codegenerator/cli/src/config_parsing/system_config.rs Lines 1075 to 1114 in 2e52973 |
Author
|
Updated |
Member
|
@diyahir, thank you for your contribution. I reimplemented your changes in another PR to fit it into the next release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Foundry output ABI format, which places the ABI definition in an "abi" child field within the JSON file. Previously, the code would fail early when trying to parse these files, as it expected the ABI to be at the root level of the JSON.
Changes
LocalImportArgs::parse_contract_abito handle nested ABI structuresTest Coverage
Added two test cases to verify the functionality:
test_parse_contract_abi_direct: Tests parsing a standard ABI filetest_parse_contract_abi_nested: Tests parsing an ABI file with the "abi" field at the root level (Foundry format)Also added test fixtures:
Contract3.json) with the ABI in an "abi" child fieldnested-abi.yaml) to test the system config parsing