We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d71a62 commit a46685fCopy full SHA for a46685f
program/src/extension/confidential_mint_burn/processor.rs
@@ -268,6 +268,13 @@ fn process_confidential_mint(
268
.map_err(|_| ProgramError::InvalidAccountData)?,
269
)
270
.ok_or(TokenError::CiphertextArithmeticFailed)?;
271
+
272
+ // Check that the computed supply ciphertext is consistent with what was
273
+ // actually used to generate the zkp on the client side.
274
+ if mint_burn_extension.confidential_supply != proof_context.new_supply_ciphertext {
275
+ return Err(TokenError::ConfidentialTransferBalanceMismatch.into());
276
+ }
277
278
mint_burn_extension.decryptable_supply = data.new_decryptable_supply;
279
280
Ok(())
0 commit comments