-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
"constants" expressions are expressions, not constants. #9232
Comments
drortirosh
changed the title
"constants" expressions are not optimized
"constants" expressions are expressions, not constants.
Jun 18, 2020
Ah and by the way: You could use |
TomAFrench
added a commit
to balancer/balancer-v2-monorepo
that referenced
this issue
Oct 27, 2021
nventuro
added a commit
to balancer/balancer-v2-monorepo
that referenced
this issue
Nov 3, 2021
* Add temp storage read/writes * Add chained reference detection and key extraction * Add chained reference functions * Add chained references to simple swap * Add Math.abs * Add chained references to batch swap * Add some docs * Remove unnecessary distinction between references and keys * Copy toChainedReference helper * refactor: make _TEMP_STORAGE_PREFIX constant and use as a prefix * fix: revert swapping ref and _TEMP_STORAGE_PREFIX and rename to _TEMP_STORAGE_SUFFIX Swapping the order meant that we were no longer replicating the standard mapping mechanism * revert: change _TEMP_STORAGE_SUFFIX to immutable see: ethereum/solidity#9232 * Add joinPool output chained reference * Add join support * Add more join tests * Add test helpers * Fix linter * Update pkg/standalone-utils/contracts/relayer/VaultActions.sol Co-authored-by: Tom French <[email protected]> * refactor: remove unused imports Co-authored-by: Tom French <[email protected]> Co-authored-by: Tom French <[email protected]>
This was referenced Nov 18, 2021
This was referenced Nov 29, 2021
This was referenced Dec 6, 2021
This was referenced Dec 19, 2021
This was referenced Jan 4, 2022
This was referenced Sep 15, 2022
This was referenced Oct 10, 2022
This was referenced Nov 10, 2022
This was referenced Nov 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Constant expressions are left as expressions, not constants.
Description
a constant declared as:
Is re-calculated each time it is in use.
expected
the value should be converted into a constant value at compile time.
###a ctual
The expression is re-calculated each time the constant is referenced.
consequences:
Environment
-- solc 0.6.10
-- checked in remix, with optimization enabled.
The text was updated successfully, but these errors were encountered: