Repository navigation
Conversation
The token's own admin calls drop the caller argument that made the admin sign twice. pause, unpause, set_compliance and set_identity_verifier keep the argument their OpenZeppelin trait fixes: they refuse any account but the admin with AdminRequired and ask it to sign once.
The vault's own admin calls drop the caller argument that made the admin sign twice. unpause keeps the caller the Pausable trait fixes: it refuses any account but the admin with AdminRequired and asks it to sign once.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hpmaxi
marked this pull request as ready for review
October 20, 2026 02:21
Brings main into this branch through feedback. Conflict in docs/TESTING.md: keep main's two layers of authorization tests, and add this branch's signature tests to the second one: signing as another account only, and reading `e.auths()` for the exact signers a call needs.
luchobonatti
approved these changes
Oct 23, 2026
9 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 #325
Admin calls asked the admin to sign twice. In the vault, the share token, the oracle and the identity verifier, 28 entrypoints checked the stored admin's signature with
#[only_admin], then asked theircallerargument to sign too, without comparing it with the admin. The admin signed each call twice, and any othercallerpassed as long as both signed. Tests checked that a call without the admin's signature fails, not what each call asks to sign.Now each admin call asks for one signature. The kit's own admin entrypoints take no caller argument, and the stored admin signs.
pause,unpause,set_complianceandset_identity_verifierkeep the argument their OpenZeppelin trait fixes: they refuse any other account withAdminRequiredand ask the admin to sign once. Each contract has tests that record what every privileged call asks to sign.Changes
#[only_admin]asks the stored admin to signunpauseand the token'spause,unpause,set_complianceandset_identity_verifierrefuse a caller other than the admin withAdminRequired, then ask it to sign oncecaller_is_adminguard in the vault and the token makes that check, with a unit testAdminRequired's doc in the vault and the token covers the new refusalmigrateof the token and oracle probes takes no caller eitherDeviations
operator, as before: they already ask for one signature, and the matrix says why.renounce_roleincluded), the co-signedlegal_transferandrecover_balance, hand-overs and the compliance hooks, not only the 28.AdminRequired).accept_admin_transferrow named acallerthe call does not take; it now says the pending admin signs. Its runbook'sgrant_roleandbind_tokenlines now show every argument.Acceptance criteria
Test plan
Automated tests
cargo test --locked: 677 passed (431 vault, 98 oracle, 80 token, 36 compliance, 7 identity verifier, 19 timelock, 6 storage), 16 of them new. Each of the six commits passes on its own.cargo clippy --locked --all-targets --workspace -- -D warnings, and on the vault with--features short_wind_down: clean.cargo test -p async-vault -p nav-oracle --features upgrade_wasm with_wasm, after the builds indocs/TESTING.md): vault 5 and oracle 2 pass against the new builds and probes.Manual verification
docker run --rm -d -p 8000:8000 --name stellar-local stellar/quickstart --local --enable core,rpc.stellar contract build, thenCARGO_TARGET_DIR=target/short-wind-down stellar contract build --package async-vault --features short_wind_down.npm run build:clients, thenHARNESS_NETWORK=local npm run deploy -w scripts/harness.test:happy-path,test:guardsandtest:wind-downwithnpm run <script> -w scripts/harness.Breaking changes
Fresh deployments only. These entrypoints lose their last argument,
caller:async_vault:set_deposit_cap(cap),set_custodian(custodian),set_wind_down_delay(secs),propose_wind_down(),cancel_wind_down_proposal(),set_notice(secs),finish_setup(),propose_change(change),cancel_change(id),apply_change(id)share_token:bind_vault(vault),finish_setup(),propose_change(change),cancel_change(id),apply_change(id)nav_oracle:bind_vault(vault),finish_setup(),propose_change(change),cancel_change(id),apply_change(id),set_nav_paused(paused),clear_latest()compliance:bind_vault(vault),finish_setup(),propose_change(change),cancel_change(id),apply_change(id)identity_verifier:allow(account, allowed)The vault's
unpauseand the token'spause,unpause,set_complianceandset_identity_verifierkeep their arguments, but now refuse a caller other than the admin withAdminRequired(6040 on the vault, 7000 on the token), even when it signs. Each admin call now carries one admin authorization entry instead of two. No event changes. The console is not changed here; its calls to these entrypoints still passcaller.Checklist
Screenshots
None.