CI rehearsal only (do not merge) - #29
michael-moffett wants to merge 1 commit into
Conversation
Add a `surfnet_setMint` cheatcode that creates or patches a mint, optionally writing the Token-2022 `ConfidentialTransferMint` extension (authority, auditor ElGamal pubkey, auto-approve). Lead 3 of : builders must fork a mainnet mint today because there is no way to spin up a confidential-capable mint with a chosen auditor and decimals.
|
| account.data = final_mint_bytes.clone(); | ||
| Ok(()) | ||
| })?; | ||
| svm_locker.apply_account_update(mint_account, AccountUpdatePolicy::Authoritative)?; |
There was a problem hiding this comment.
Concurrent mint changes are lost
If a transaction changes the mint after setMint reads it but before this authoritative write, setMint replaces the whole account with its earlier copy. For example, a decimals-only update can restore the old supply after a concurrent mintTo, losing the supply increase. Coordinate the read and write so fields outside the requested update are preserved.
Fork CI only. Do not merge.