Currently emitWithArgs only accepts a Promise (the raw write call).
Requested behavior: accept either a Promise<0x${string}> or a resolved `0x${string}` hash directly, so a single transaction can be checked multiple times:
const tx = await contract.write.foo([...]);
await viem.assertions.emitWithArgs(tx, contract, 'Event1', [...]);
await viem.assertions.emitWithArgs(tx, contract, 'Event2', [...]);
The signature change could look like:
emitWithArgs(tx: Promise<`0x${string}`> | `0x${string}`, ...): Promise<void>
Currently
emitWithArgsonly accepts aPromise(the raw write call).Requested behavior: accept either a
Promise<0x${string}>or a resolved`0x${string}`hash directly, so a single transaction can be checked multiple times:The signature change could look like: