()
| 1697 | .then(ReceiptVerifier.waitSuccess) |
| 1698 | |
| 1699 | const verifySuccess = async () => { |
| 1700 | if (tc.fn === 'mint') { |
| 1701 | receipt.verifyEvents((ev) => { |
| 1702 | ev.expectNativeMint({ recipient: receiver, amount: USDC.toNative(amount) }) |
| 1703 | .expectUSDCMint({ minter: helper, to: receiver, amount: amount }) |
| 1704 | .expectUSDCTransfer({ from: zeroAddress, to: receiver, value: amount }) |
| 1705 | .expectExecutionResult({ helper, success: true, result: toBytes32(1n) }) |
| 1706 | .expectAllEventsMatched() |
| 1707 | }) |
| 1708 | await balances |
| 1709 | .decrease({ sender: receipt.totalFee() }) |
| 1710 | .increase({ receiverUSDC: amount, totalSupply: USDC.toNative(amount) }) |
| 1711 | .verify() |
| 1712 | } else { |
| 1713 | receipt.verifyEvents((ev) => { |
| 1714 | ev.expectNativeTransfer({ from: helper, to: receiver, amount: USDC.toNative(amount) }) |
| 1715 | .expectUSDCTransfer({ from: helper, to: receiver, value: amount }) |
| 1716 | .expectExecutionResult({ helper, success: true, result: toBytes32(1n) }) |
| 1717 | .expectAllEventsMatched() |
| 1718 | }) |
| 1719 | await balances |
| 1720 | .decrease({ sender: receipt.totalFee(), helper: USDC.toNative(amount) }) |
| 1721 | .increase({ receiverUSDC: amount }) |
| 1722 | .verify() |
| 1723 | } |
| 1724 | } |
| 1725 | |
| 1726 | return { receipt, balances, helper, amount, sender, receiver, verifySuccess } |
| 1727 | } |
no test coverage detected