Skip to content

bugc: test token-registry example at every level - #395

Merged
gnidan merged 1 commit into
mainfrom
bugc-followups
Oct 15, 2026
Merged

gnidan merged 1 commit into
mainfrom
bugc-followups

Conversation

@gnidan

@gnidan gnidan commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

With #388 (optimizer fixes) and #391 (bytes and string == by contents) in, examples/advanced/token-registry.bug compiles at every optimization level and runs the same at each. This drops its @wip marker, 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 constantBytes and at foldCast in constant folding: a string constant's bytes follow its type, so a future fold of a string constant across as bytes must re-encode the value as "0x" + hex, not only retype it.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-15 02:51 UTC

Now that #388 and #391 are in, the example compiles and runs the same at O0-O3, so drop its @wip marker. Also note in constantBytes and foldCast that a string constant's bytes follow its type.
@gnidan
gnidan merged commit 17f4d5f into main Oct 15, 2026
8 checks passed
@gnidan
gnidan deleted the bugc-followups branch October 15, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant