Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Benchmark/Cases/UnlinkXyz/Pool/Contract.lean
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,11 @@ verity_contract UnlinkPool where
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ciphertextCount
startIndex
let realNullifierCount ← countNonZero txn.nullifierHashes
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
emit "Transferred"
[newRoot, startIndex, ciphertextCount,
arrayLength txn.nullifierHashes,
realNullifierCount,
arrayLength txn.ciphertexts])

/- `_executeWithdrawal(WithdrawalTransaction calldata _txn, bool _emergency)`
Expand Down Expand Up @@ -554,14 +556,16 @@ verity_contract UnlinkPool where
let startIndex ← nextLeafIndex
let newRoot ← insertFilteredLeaves txn.newCommitments wSlot ciphertextCount startIndex
settleWithdrawalTransfer txn.withdrawal.token recipient txn.withdrawal.amount
let realNullifierCount ← countNonZero txn.nullifierHashes
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
if emergency then
emit "EmergencyWithdrawn"
[addressToWord recipient,
txn.withdrawal.npk,
addressToWord txn.withdrawal.token,
txn.withdrawal.amount,
newRoot, startIndex, ciphertextCount,
arrayLength txn.nullifierHashes,
realNullifierCount,
arrayLength txn.ciphertexts]
else
emit "Withdrawn"
Expand All @@ -570,7 +574,7 @@ verity_contract UnlinkPool where
addressToWord txn.withdrawal.token,
txn.withdrawal.amount,
newRoot, startIndex, ciphertextCount,
arrayLength txn.nullifierHashes,
realNullifierCount,
arrayLength txn.ciphertexts]

/- `function withdraw(WithdrawalTransaction[] calldata _transactions)
Expand Down
Loading