Repository navigation
bugc: test token-registry example at every level - #395
Merged
Merged
Conversation
gnidan
force-pushed
the
bugc-followups
branch
from
October 15, 2026 02:32
0a12afa to
394cc56
Compare
Contributor
|
gnidan
force-pushed
the
bugc-followups
branch
from
October 15, 2026 02:39
394cc56 to
2f34a12
Compare
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.
With #388 (optimizer fixes) and #391 (bytes and string
==by contents) in,examples/advanced/token-registry.bugcompiles at every optimization level and runs the same at each. This drops its@wipmarker, so the example suite now compiles it and checks its programs at O0–O3. It is the largest example, and validating its programs takes over 10 seconds on CI, so the program validity test's timeout goes from 10 to 30 seconds.To check behavior, I deployed it at each level and sent the same 29 transactions (every selector, from the owner, an admin and other accounts, including paused, frozen, over-limit and short-calldata cases), then compared the token, balance, admin and frozen storage after each one. All four levels agree, and the results are what the source says.
It also adds a short note at
constantBytesand atfoldCastin constant folding: a string constant's bytes follow its type, so a future fold of a string constant acrossas bytesmust re-encode the value as "0x" + hex, not only retype it.