MCPcopy Create free account
hub / github.com/circlefin/arc-node / verifyBatchEvents

Function verifyBatchEvents

tests/localdev/NativeFiatToken.test.ts:200–210  ·  view source on GitHub ↗
(receipt: ReceiptVerifier)

Source from the content-addressed store, hash-verified

198 const calls = [call, call]
199
200 const verifyBatchEvents = (receipt: ReceiptVerifier) => {
201 receipt.verifyEvents((ev) => {
202 ev.expectNativeTransfer({ from: helper.address, to: recipient.address, amount: USDC.toNative(amount) })
203 .expectUSDCTransfer({ from: helper.address, to: recipient.address, value: amount })
204 .expectExecutionResult({ helper, success: true, result: toBytes32(1n) })
205 .expectNativeTransfer({ from: helper.address, to: recipient.address, amount: USDC.toNative(amount) })
206 .expectUSDCTransfer({ from: helper.address, to: recipient.address, value: amount })
207 .expectExecutionResult({ helper, success: true, result: toBytes32(1n) })
208 .expectAllEventsMatched()
209 })
210 }
211
212 const firstBatchReceipt = await helperContract.write.executeBatch([calls]).then(ReceiptVerifier.waitSuccess)
213 verifyBatchEvents(firstBatchReceipt)

Callers 1

Calls 2

toBytes32Function · 0.90
toNativeMethod · 0.80

Tested by

no test coverage detected