Skip to content

Commit

Permalink
Improve inline comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Zhang <[email protected]>
  • Loading branch information
jimthematrix committed Jul 30, 2024
1 parent 0255683 commit b9d10af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion solidity/contracts/erc20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import "hardhat/console.sol";
/// @title A sample implementation of a Zeto based fungible token with anonymity and no encryption
/// @author Kaleido, Inc.
/// @dev The proof has the following statements:
/// - each value in the output commitments must be a positive number in the range 0 ~ (2\*\*40 - 1)
/// - each value in the output commitments must be a positive number in the range 0 ~ (2^40 - 1)
/// - the sum of the input values match the sum of output values
/// - the hashes in the input and output match the `hash(value, salt, owner public key)` formula
/// - the sender possesses the private BabyJubjub key, whose public key is part of the pre-image of the input commitment hashes
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon_enc_nullifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ contract Zeto_AnonEncNullifier is
publicInputs[2] = nullifiers[0];
publicInputs[3] = nullifiers[1];
publicInputs[4] = root;
publicInputs[5] = (nullifiers[0] == 0) ? 0 : 1; // enable MT proof for the first nullifier
publicInputs[6] = (nullifiers[1] == 0) ? 0 : 1; // enable MT proof for the second nullifier
publicInputs[5] = (nullifiers[0] == 0) ? 0 : 1; // if the first nullifier is empty, disable its MT proof verification
publicInputs[6] = (nullifiers[1] == 0) ? 0 : 1; // if the second nullifier is empty, disable its MT proof verification
publicInputs[7] = outputs[0];
publicInputs[8] = outputs[1];
publicInputs[9] = encryptionNonce;
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon_nullifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ contract Zeto_AnonNullifier is
publicInputs[0] = nullifiers[0];
publicInputs[1] = nullifiers[1];
publicInputs[2] = root;
publicInputs[3] = (nullifiers[0] == 0) ? 0 : 1; // enable MT proof for the first nullifier
publicInputs[4] = (nullifiers[1] == 0) ? 0 : 1; // enable MT proof for the second nullifier
publicInputs[3] = (nullifiers[0] == 0) ? 0 : 1; // if the first nullifier is empty, disable its MT proof verification
publicInputs[4] = (nullifiers[1] == 0) ? 0 : 1; // if the second nullifier is empty, disable its MT proof verification
publicInputs[5] = outputs[0];
publicInputs[6] = outputs[1];

Expand Down

0 comments on commit b9d10af

Please sign in to comment.