forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements json abi with call paths for structs and enums. (FuelLabs#…
…4137) ## Description Reference to external dependency struct now looks like: `"type": "struct abi_with_tuples::Person",` `"type": "enum std::option::Option",` Struct reference in root module still looks like: `"type": "struct MyStruct",` Struct reference in sub modules looks like: `"type": "struct dep_1::MyStruct1",` ` forc build` will not generate json ABI with call path by default to do so we have to use the flag `--json-abi-with-callpaths`, one example is: ```cargo run --bin forc build --json-abi-with-callpaths --path `pwd`/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_same_name_types/``` This will generate `test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_same_name_types/out/debug/abi_with_same_name_types-abi.json` with call paths for structs and enums. This is related to: FuelLabs/fuel-specs#450 FuelLabs/fuels-rs#791 ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
- Loading branch information
Showing
28 changed files
with
436 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.