CI rehearsal only (do not merge) - #18
Closed
michael-moffett wants to merge 1 commit into
Closed
michael-moffett wants to merge 1 commit into
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.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
michael-moffett
commented
Sep 24, 2026
Comment on lines
+1449
to
+1455
| /// Build the raw account data for a Token-2022 mint that carries the | ||
| /// confidential-transfer mint extension. | ||
| /// | ||
| /// Test-only helper backing the `surfnet_setMint` cheatcode: it writes the | ||
| /// extension directly, bypassing the on-chain | ||
| /// `ConfidentialTransferInitializeMint`. An absent `authority` or | ||
| /// `auditor_elgamal_pubkey` is written as the extension's null value. |
Member
Author
There was a problem hiding this comment.
heavy comments here
michael-moffett
commented
Sep 24, 2026
| /// The auditor key has to be real ElGamal material: a well-formed 32-byte | ||
| /// string that is not a curve point is refused just like a short one, so a | ||
| /// mint never ships an auditor key no client can encrypt to. | ||
| #[test] |
Member
Author
There was a problem hiding this comment.
comments here too long
michael-moffett
commented
Sep 24, 2026
Comment on lines
+1
to
+26
| // @generated by ts-rs from the Rust types in crates/types. | ||
| // Do not edit; run `npm run generate:kit-types` in crates/sdk-node instead. | ||
| // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
|
||
| /** | ||
| * Writes the Token-2022 `ConfidentialTransferMint` extension on a mint created | ||
| * via `surfnet_setMint`. | ||
| * | ||
| * This is a test-only cheatcode: it writes the extension directly, bypassing | ||
| * the real on-chain `ConfidentialTransferInitializeMint` instruction, so a mint | ||
| * with a chosen auditor can be created without forking one from mainnet. | ||
| */ | ||
| export type ConfidentialTransferMintUpdate = { | ||
| /** | ||
| * The authority that approves new confidential accounts and updates this | ||
| * config (base58). Omitted leaves it null. | ||
| */ | ||
| authority?: string, | ||
| /** | ||
| * The auditor's ElGamal public key (base58 or base64, 32 bytes), which every | ||
| * confidential transfer on this mint also encrypts its amount to. Omitted | ||
| * leaves it null, i.e. no auditor. | ||
| */ | ||
| auditorElgamalPubkey?: string, | ||
| /** | ||
| * Whether new confidential accounts are approved on creation (default true). |
Member
Author
There was a problem hiding this comment.
why all these comments?
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.
Fork CI only. Do not merge.