This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Conversation
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
fix some typos
Conflicts: src/cairoUtilFuncGen/abi/abiDecode.ts src/cairoUtilFuncGen/abi/abiEncode.ts src/cairoUtilFuncGen/abi/indexEncode.ts src/cairoUtilFuncGen/calldata/calldataToStorage.ts src/cairoUtilFuncGen/memory/arrayConcat.ts src/cairoUtilFuncGen/memory/memoryWrite.ts src/cairoUtilFuncGen/storage/storageWrite.ts
piwonskp
reviewed
Feb 23, 2023
piwonskp
reviewed
Feb 23, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
reviewed
Feb 27, 2023
piwonskp
approved these changes
Feb 28, 2023
cicr99
reviewed
Feb 28, 2023
cicr99
approved these changes
Mar 1, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Big update to
cairoUtilFuncGen
that make generated functions part of the AST and their code is stored inside this nodesFix #855
Fix #843
Before this PR:
Cairo generated functions raw string were stored in mappings outside of the solc-typed ast. Dummy functions definitions where created with empty bodies and function calls to this function definitions. When removing unnecessary function definitions the raw strings remained because there are outside of the AST.
After this PR:
Raw strings functions are part of the AST, so when deleting one, generated raw code is deleted accordingly.
Imports are treated as function definitions as well, so they get pruned when no one is using it.
To accomplish (1) and (2) there are now two new Cairo-AST nodes:
CairoGeneratedFunctionDefintion
andCairoImportFunctionDefinition
.Also on this PR:
All raw string cairo functions signatures gets parsed instead of being written by hand.
Refactorization in all util function generations (some more than others) to make them all have all the same external interface.
Warplib function signatures (name and implicits) are parsed from the generated code.