Repository navigation
Conversation
OpenZeppelin extends a module list or a bound-token entry when it reads it, not when it creates it, so a new one started at the network's minimum lifetime. bind_token, add_module_to and the applied BindToken and AddModule changes now read back what they wrote through OpenZeppelin's own reads, so each new entry reaches its target in the transaction that creates it.
The stub now reads back its modules and bound tokens when it writes them. The kit spec lists those read-backs instead of naming the stub as the one exception, and the testing guide lists the new tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hpmaxi
marked this pull request as ready for review
October 22, 2026 12:34
7 tasks done
2 tasks
This branch was successfully deployed
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.
Summary
Closes #330
The compliance stub's
bind_tokenandadd_module_to, and the appliedBindTokenandAddModulechanges, created persistent entries at the network's minimum lifetime, about seven days on testnet. OpenZeppelin extends these entries only when it reads them, so the next call that read them, such as a mint, transfer or burn through the token's hooks, paid to extend them. #276 made the share token read back what it creates; the kit spec named the stub as the one exception.Now the stub reads back the bound tokens and the hook's modules after each of these calls, through OpenZeppelin's own reads. Each new entry reaches its extend target in the transaction that creates it, and the spec lists no exception.
Changes
bind_tokenand an appliedBindTokenchange read back the bound tokens: the count and every bucket, including the one that holds the new tokenadd_module_toand an appliedAddModulechange read back that hook's moduleslinked_tokens,get_modules_for_hook), so its 30-day target and threshold apply unchangedDeviations
Acceptance criteria
bind_token,add_module_toand their applied changes leave each new entry at its extend target, tested with testnet's minimum lifetimeTest plan
Automated tests
SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2=1 cargo test --locked: 720 passed, 0 failed (446 vault, 101 oracle, 97 token, 41 compliance, 7 identity verifier, 19 timelock, 6 storage, 1 spec-doc check, 2 doctests). 5 are new. Before the fix all five fail, each new entry at 120,959 ledgers (the testnet minimum) against a target of 518,400.cargo clippy --locked --all-targets -p compliance -- -D warnings: clean.cargo fmt --all -- --check: clean.Manual verification
stellar contract buildon the base and on this branch.compliance.wasmgrow from 30,667 to 30,713 bytes (+46). The vault, token, oracle and identity verifier Wasm files keep their hashes.Breaking changes
None. No entrypoint, argument, event or error changes. Fees move: on testnet, the call that binds a token or adds a module now pays for 30 days instead of about 7, and the next call that reads the entry no longer pays the difference. The compliance Wasm hash changes.
Checklist
Screenshots
None.