@boostxyz/sdk 8.0.0-canary.7 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -566,6 +566,12 @@ export class EventAction extends DeployableTarget<
566
566
 
567
567
  const signature = claimant.signature;
568
568
 
569
+ // zeroAddress acts as a wildcard, allowing matches from any contract address
570
+ const targetContractIsWildcard = isAddressEqual(
571
+ claimant.targetContract,
572
+ zeroAddress,
573
+ );
574
+
569
575
  if (claimant.signatureType === SignatureType.EVENT) {
570
576
  let event: AbiEvent;
571
577
  if (params.abiItem) event = params.abiItem as AbiEvent;
@@ -583,7 +589,11 @@ export class EventAction extends DeployableTarget<
583
589
  .map((log) => decodeAndReorderLogArgs(event, log));
584
590
 
585
591
  for (const log of signatureMatchingLogs) {
586
- if (!isAddressEqual(log.address, claimant.targetContract)) continue;
592
+ if (
593
+ !targetContractIsWildcard &&
594
+ !isAddressEqual(log.address, claimant.targetContract)
595
+ )
596
+ continue;
587
597
  const addressCandidate = this.validateClaimantAgainstArgs(
588
598
  claimant,
589
599
  log,
@@ -617,7 +627,11 @@ export class EventAction extends DeployableTarget<
617
627
  }
618
628
 
619
629
  for (let log of decodedLogs) {
620
- if (!isAddressEqual(log.address, claimant.targetContract)) continue;
630
+ if (
631
+ !targetContractIsWildcard &&
632
+ !isAddressEqual(log.address, claimant.targetContract)
633
+ )
634
+ continue;
621
635
  let addressCandidate = this.validateClaimantAgainstArgs(claimant, log);
622
636
  if (addressCandidate) return addressCandidate;
623
637
  }
@@ -633,7 +647,11 @@ export class EventAction extends DeployableTarget<
633
647
  ) {
634
648
  return undefined;
635
649
  }
636
- if (!isAddressEqual(transaction.to!, claimant.targetContract)) return;
650
+ if (
651
+ !targetContractIsWildcard &&
652
+ !isAddressEqual(transaction.to!, claimant.targetContract)
653
+ )
654
+ return;
637
655
  let func: AbiFunction;
638
656
  if (params.abiItem) func = params.abiItem as AbiFunction;
639
657
  else {