Function: _handleRefundNote(EncodedAsset encodedAsset, CompressedStealthAddress refundAddr, uint256 value)
This creates an encoded note out and adds refund note to queue to be added to off-chain Merkle tree by subtree update.
Inputs
encodedAsset
Control: Arbitrarily set by authorized deposit source calling
Teller.depositFunds
.Constraints: After decoding, address must be on whitelist. ERC-20 transfer of this value later must succeed.
Impact: Stored in enqueued note. Emitted in the
RefundProcessed
event.
refundAddr
Control: Arbitrarily set by authorized deposit source calling
Teller.depositFunds
.Constraints: The
encodedAsset.encodedAssetAddr
must be a valid field element and not have bits set outsideENCODED_ASSET_ADDR_MASK
. TheencodedAsset.encodedAssetId
must be a valid field element and less thanMAX_ASSET_ID
. TherefundAddr.h1
andrefundAddr.h2
must be valid field elements if the X-sign bit is unset.Impact: Stored in enqueued note. Emitted in the
RefundProcessed
event.
value
Control: Arbitrarily set by authorized deposit source calling
Teller.depositFunds
.Constraints: Must be less than
MAX_NOTE_VALUE
. ERC-20 transfer of this value later must succeed.Impact: Stored in enqueued note. Emitted in the
RefundProcessed
event.
Branches and code coverage
Intended branches
Inserts note into queue.
Negative behavior
Note fails validation.