Class EventAction

A generic event action

EventAction

Hierarchy (view full)

Constructors

Properties

bases: Record<number, `0x${string}`> = ...

A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.

registryType: RegistryType = RegistryType.ACTION

The target's registry type.

abi: readonly [{
    type: "constructor";
    inputs: readonly [];
    stateMutability: "nonpayable";
}, {
    type: "error";
    inputs: readonly [];
    name: "CloneAlreadyInitialized";
}, {
    type: "error";
    inputs: readonly [];
    name: "InitializerNotImplemented";
}, {
    type: "error";
    inputs: readonly [];
    name: "InvalidInitialization";
}, {
    type: "error";
    inputs: readonly [];
    name: "InvalidInitializationData";
}, {
    type: "error";
    inputs: readonly [];
    name: "NotImplemented";
}, {
    type: "error";
    inputs: readonly [];
    name: "NotInitializing";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "executor";
        internalType: "address";
        type: "address";
        indexed: true;
    }, {
        name: "caller";
        internalType: "address";
        type: "address";
        indexed: false;
    }, {
        name: "success";
        internalType: "bool";
        type: "bool";
        indexed: false;
    }, {
        name: "data";
        internalType: "bytes";
        type: "bytes";
        indexed: false;
    }];
    name: "ActionExecuted";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "user";
        internalType: "address";
        type: "address";
        indexed: true;
    }, {
        name: "isValidated";
        internalType: "bool";
        type: "bool";
        indexed: false;
    }, {
        name: "data";
        internalType: "bytes";
        type: "bytes";
        indexed: false;
    }];
    name: "ActionValidated";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "version";
        internalType: "uint64";
        type: "uint64";
        indexed: false;
    }];
    name: "Initialized";
}, {
    type: "function";
    inputs: readonly [];
    name: "VALIDATOR";
    outputs: readonly [{
        name: "";
        internalType: "contract AValidator";
        type: "address";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "";
        internalType: "bytes";
        type: "bytes";
    }];
    name: "execute";
    outputs: readonly [{
        name: "";
        internalType: "bool";
        type: "bool";
    }, {
        name: "";
        internalType: "bytes";
        type: "bytes";
    }];
    stateMutability: "payable";
}, {
    type: "function";
    inputs: readonly [];
    name: "getActionClaimant";
    outputs: readonly [{
        name: "";
        internalType: "struct AEventAction.ActionClaimant";
        type: "tuple";
        components: readonly [{
            name: "signatureType";
            internalType: "enum AEventAction.SignatureType";
            type: "uint8";
        }, {
            name: "signature";
            internalType: "bytes32";
            type: "bytes32";
        }, {
            name: "fieldIndex";
            internalType: "uint8";
            type: "uint8";
        }, {
            name: "targetContract";
            internalType: "address";
            type: "address";
        }, {
            name: "chainid";
            internalType: "uint256";
            type: "uint256";
        }];
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "index";
        internalType: "uint256";
        type: "uint256";
    }];
    name: "getActionStep";
    outputs: readonly [{
        name: "";
        internalType: "struct AEventAction.ActionStep";
        type: "tuple";
        components: readonly [{
            name: "signature";
            internalType: "bytes32";
            type: "bytes32";
        }, {
            name: "signatureType";
            internalType: "enum AEventAction.SignatureType";
            type: "uint8";
        }, {
            name: "actionType";
            internalType: "uint8";
            type: "uint8";
        }, {
            name: "targetContract";
            internalType: "address";
            type: "address";
        }, {
            name: "chainid";
            internalType: "uint256";
            type: "uint256";
        }, {
            name: "actionParameter";
            internalType: "struct AEventAction.Criteria";
            type: "tuple";
            components: readonly [{
                name: "filterType";
                internalType: "enum AEventAction.FilterType";
                type: "uint8";
            }, {
                name: "fieldType";
                internalType: "enum AEventAction.PrimitiveType";
                type: "uint8";
            }, {
                name: "fieldIndex";
                internalType: "uint8";
                type: "uint8";
            }, {
                name: "filterData";
                internalType: "bytes";
                type: "bytes";
            }];
        }];
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "getActionSteps";
    outputs: readonly [{
        name: "";
        internalType: "struct AEventAction.ActionStep[]";
        type: "tuple[]";
        components: readonly [{
            name: "signature";
            internalType: "bytes32";
            type: "bytes32";
        }, {
            name: "signatureType";
            internalType: "enum AEventAction.SignatureType";
            type: "uint8";
        }, {
            name: "actionType";
            internalType: "uint8";
            type: "uint8";
        }, {
            name: "targetContract";
            internalType: "address";
            type: "address";
        }, {
            name: "chainid";
            internalType: "uint256";
            type: "uint256";
        }, {
            name: "actionParameter";
            internalType: "struct AEventAction.Criteria";
            type: "tuple";
            components: readonly [{
                name: "filterType";
                internalType: "enum AEventAction.FilterType";
                type: "uint8";
            }, {
                name: "fieldType";
                internalType: "enum AEventAction.PrimitiveType";
                type: "uint8";
            }, {
                name: "fieldIndex";
                internalType: "uint8";
                type: "uint8";
            }, {
                name: "filterData";
                internalType: "bytes";
                type: "bytes";
            }];
        }];
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "getActionStepsCount";
    outputs: readonly [{
        name: "";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "getComponentInterface";
    outputs: readonly [{
        name: "";
        internalType: "bytes4";
        type: "bytes4";
    }];
    stateMutability: "pure";
}, {
    type: "function";
    inputs: readonly [{
        name: "data_";
        internalType: "bytes";
        type: "bytes";
    }];
    name: "initialize";
    outputs: readonly [];
    stateMutability: "nonpayable";
}, {
    type: "function";
    inputs: readonly [{
        name: "";
        internalType: "bytes";
        type: "bytes";
    }];
    name: "prepare";
    outputs: readonly [{
        name: "";
        internalType: "bytes";
        type: "bytes";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "interfaceId";
        internalType: "bytes4";
        type: "bytes4";
    }];
    name: "supportsInterface";
    outputs: readonly [{
        name: "";
        internalType: "bool";
        type: "bool";
    }];
    stateMutability: "view";
}] = eventActionAbi
_isBase: boolean = true

A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.

_payload: undefined | EventActionPayload

The deployable payload used either for contract construction or initialization

_config: Config
_address: undefined | `0x${string}`

The internally managed address for this contract

_account?: Account

If it exists, Viem Local Account, if in a Node environment

Accessors

  • get bases(): Record<number, `0x${string}`>
  • A getter that will return the base implementation's static addresses by numerical chain ID

    Returns Record<number, `0x${string}`>

  • get address(): undefined | `0x${string}`
  • A getter returning this contract's deployed address, if it exists.

    Returns undefined | `0x${string}`

Methods

  • Gets a specific action event by index

    Parameters

    • index: number

      The index of the action event to retrieve

    • Optionalparams: Partial<Omit<ReadContractParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "getActionStep">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<undefined | ActionStep>

  • Gets all action events

    Parameters

    • Optionalparams: Partial<Omit<ReadContractParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "getActionSteps">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<ActionStep[]>

  • Gets the count of action events

    Parameters

    • Optionalparams: Partial<Omit<ReadContractParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "getActionStepsCount">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<number>

  • Retrieves the payload describing how claimants can be identified from logs or function calls.

    Parameters

    • Optionalparams: Partial<Omit<ReadContractParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "getActionClaimant">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<ActionClaimant>

  • Executes a prepared event action

    Parameters

    • data: `0x${string}`
    • Optionalparams: Partial<Omit<WriteContractParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "execute">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<readonly [boolean, `0x${string}`]>

  • Executes a prepared event action

    Parameters

    • data: `0x${string}`
    • Optionalparams: Partial<Omit<WriteContractParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "execute">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<{
        hash: `0x${string}`;
        result: readonly [boolean, `0x${string}`];
    }>

  • Derives the action claimant address from a transaction based on the provided ActionClaimant configuration. This method supports both event-based and function-based claimant derivation. Important: The claimant is considered to be transaction.from when claimant.fieldIndex is 255 using CheatCodes enum. This may have unintended side effects for bridged transactions and SCW transactions, so these are considered unsupported use cases for the time being.

    Parameters

    • claimant: ActionClaimant

      The configuration specifying how to derive the claimant.

    • params:
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              logs: EventLogs;
          }
          | never
          | never
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              hash: `0x${string}`;
              blockHash?: undefined;
              blockNumber?: undefined;
              blockTag?: undefined;
              index?: number;
          } & {
              hash: `0x${string}`;
          }
          | never

      Parameters for validation, including transaction hash, known signatures, logs, and chain ID.

    Returns Promise<undefined | `0x${string}`>

    The derived claimant address if found, undefined otherwise.

    // Example usage
    const eventAction = boost.action as EventAction
    const claimant = await eventAction.getActionClaimant() // {
    signatureType: SignatureType.EVENT,
    signature: '0x1234...',
    fieldIndex: 2,
    targetContract: '0xabcd...',
    chainid: 1
    };
    const params: ValidateActionStepParams = {
    hash: '0x5678...',
    chainId: 1,
    knownSignatures: {
    '0x1234...': {
    type: 'event',
    name: 'Transfer(...)'
    }
    }
    };
    const claimantAddress = await eventAction.deriveActionClaimantFromTransaction(claimant, params);

    If the ABI for the specified signature is not found.

    If there's an error decoding function data (for function-based derivation).

  • Validates the action claimant against the arguments of a log or function data.

    Parameters

    • claimant: ActionClaimant

      The action claimant to validate.

    • OptionallogOrFnData: {
          args: readonly unknown[] | Record<string, unknown> | unknown[];
      }

      Optional object containing the arguments to validate against.

      • args: readonly unknown[] | Record<string, unknown> | unknown[]

        The arguments from the log or function data.

    Returns undefined | `0x${string}`

    The validated address if found and valid, otherwise undefined.

  • Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature. If logs are provided in the optional params argument, then those logs will be used instead of fetched with the configured client.

    Parameters

    • params:
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              logs: EventLogs;
          }
          | never
          | never
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              hash: `0x${string}`;
              blockHash?: undefined;
              blockNumber?: undefined;
              blockTag?: undefined;
              index?: number;
          } & {
              hash: `0x${string}`;
          }
          | never

    Returns Promise<boolean>

  • Validates a single action step with a given criteria against logs or function calls. If logs are provided in the optional params argument, then those logs will be used instead of being fetched with the configured client. For functions a hash is required.

    Parameters

    • actionStep: ActionStep

      The action step to validate. Can be a function of event step.

    • params:
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              logs: EventLogs;
          }
          | never
          | never
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              hash: `0x${string}`;
              blockHash?: undefined;
              blockNumber?: undefined;
              blockTag?: undefined;
              index?: number;
          } & {
              hash: `0x${string}`;
          }
          | never

      Additional parameters for validation, including hash, known events, logs, and chain ID.

    Returns Promise<boolean>

  • Validates a single action event with a given criteria against logs. If logs are provided in the optional params argument, then those logs will be used instead of being fetched with the configured client.

    Parameters

    • actionStep: ActionStep

      The action step containing the event to validate.

    • logs: EventLogs

      Event logs to validate the given step against

    Returns boolean

    Resolves to true if the action event is valid, throws if input is invalid, otherwise false.

  • Validates a single action function with a given criteria against the transaction input.

    Parameters

    • actionStep: ActionStep

      The action step containing the function to validate.

    • transaction: Transaction

      The transaction that will be validated against.

    • Optionalparams: Pick<
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              logs: EventLogs;
          }
          | never
          | never
          | {
              knownSignatures: Record<`0x${string}`, AbiEvent | AbiFunction>;
              abiItem?: AbiEvent | AbiFunction;
              notBeforeBlockNumber?: bigint;
          } & {
              hash: `0x${string}`;
              blockHash?: undefined;
              blockNumber?: undefined;
              blockTag?: undefined;
              index?: number;
          } & {
              hash: `0x${string}`;
          }
          | never, "knownSignatures" | "abiItem">

      Parameters for validation.

    Returns boolean

    Returns true if the action function is valid, false otherwise.

    Throws if the ABI for the function signature is not found.

    Throws if there's an error decoding the function data.

  • Validates a field against a given criteria.

    Parameters

    • criteria: Criteria

      The criteria to validate against.

    • fieldValue: string | bigint

      The field value to validate.

    • input: {
          log: Log<bigint, number, false, AbiEvent, true, AbiEvent[], string>;
      } | {
          decodedArgs: readonly (string | bigint)[];
      }

      Additional context for validation.

    Returns boolean

    • Returns true if the field passes the criteria, false otherwise.
  • Validates a Log against a given criteria. If the criteria's fieldIndex is 255 (using CheatCodes enum), it is reserved for anyValidation

    Parameters

    • criteria: Criteria

      The criteria to validate against.

    • log: Log<bigint, number, false, AbiEvent, true, AbiEvent[], string>

      The Viem event log.

    Returns boolean

    • Returns true if the log passes the criteria, false otherwise.
  • Validates a function's decoded arguments against a given criteria. If the criteria's fieldIndex is 255 (using CheatCodes enum), it is reserved for anyValidation

    Parameters

    • criteria: Criteria

      The criteria to validate against.

    • decodedArgs: readonly (string | bigint)[]

      The decoded arguments of the function call.

    Returns boolean

    • Returns true if the decoded argument passes the criteria, false otherwise.
  • High level deployment function to deploy and await the contract address. This is mainly a convenience method to easily deploy a contract, but will not initialize a Cloneable, which makes it useless for Boost components. Obviously you can ignore the TS warnings and use this, but you shouldn't in most all cases.

    Parameters

    Returns Promise<EventAction>

  • Check if the contract supports the given interface

    Parameters

    • interfaceId: `0x${string}`

      The interface identifier

    • Optionalparams: Partial<Omit<ReadContractParameters<readonly [{
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "supportsInterface">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<boolean>

    • True if the contract supports the interface
  • Return a cloneable's unique identifier for downstream consumers to differentiate various targets All implementations must override this function

    Parameters

    • Optionalparams: Partial<Omit<ReadContractParameters<readonly [{
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], "getComponentInterface">,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<`0x${string}`>

  • A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs]. Accepts eventName and eventNames as optional parameters to narrow the returned log types.

    Type Parameters

    • event extends "Initialized" | "ActionExecuted" | "ActionValidated"
    • const abiEvent extends {
          name: event;
      } & {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      } | {
          name: event;
      } & {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      } | {
          name: event;
      } & {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      } = Extract<{
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          name: event;
      }> | Extract<{
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          name: event;
      }> | Extract<{
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          name: event;
      }>

    Parameters

    • Optionalparams: Omit<GetLogsParams<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: "";
              internalType: "contract AValidator";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "execute";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }, {
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionClaimant";
              type: "tuple";
              components: readonly [{
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "fieldIndex";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "index";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep";
              type: "tuple";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: "";
              internalType: "struct AEventAction.ActionStep[]";
              type: "tuple[]";
              components: readonly [{
                  name: "signature";
                  internalType: "bytes32";
                  type: "bytes32";
              }, {
                  name: "signatureType";
                  internalType: "enum AEventAction.SignatureType";
                  type: "uint8";
              }, {
                  name: "actionType";
                  internalType: "uint8";
                  type: "uint8";
              }, {
                  name: "targetContract";
                  internalType: "address";
                  type: "address";
              }, {
                  name: "chainid";
                  internalType: "uint256";
                  type: "uint256";
              }, {
                  name: "actionParameter";
                  internalType: "struct AEventAction.Criteria";
                  type: "tuple";
                  components: readonly [(...), (...), (...), (...)];
              }];
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "prepare";
          outputs: readonly [{
              name: "";
              internalType: "bytes";
              type: "bytes";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }], event, abiEvent, abiEvent[]>, "event" | "events"> & {
          eventName?: event;
          eventNames?: event[];
      }

    Returns Promise<GetLogsReturnType<abiEvent, abiEvent[]>>

    const logs = contract.getLogs({ eventName: 'EventName' })
    const logs = contract.getLogs({ eventNames: ['EventName'] })

    @public
    @async
    @template {ContractEvent} event
    @template {ExtractAbiEvent<
    ContractAbi,
    event
    >} [abiEvent=ExtractAbiEvent<ContractAbi, event>]
    @param {?Omit<
    GetLogsParams<ContractAbi, event, abiEvent, abiEvent[]>,
    'event' | 'events'
    > & {
    eventName?: event;
    eventNames?: event[];
    }} [params]
    @returns {Promise<GetLogsReturnType<abiEvent, abiEvent
  • A typed wrapper for wagmi.watchContractEvent

    Type Parameters

    • event extends "Initialized" | "ActionExecuted" | "ActionValidated"

    Parameters

    • cb: ((log: Log<bigint, number, false, Extract<{
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "executor";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "caller";
              internalType: "address";
              type: "address";
              indexed: false;
          }, {
              name: "success";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionExecuted";
      }, {
          name: event;
      }> | Extract<{
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "user";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "isValidated";
              internalType: "bool";
              type: "bool";
              indexed: false;
          }, {
              name: "data";
              internalType: "bytes";
              type: "bytes";
              indexed: false;
          }];
          name: "ActionValidated";
      }, {
          name: event;
      }> | Extract<{
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          name: event;
      }>, true>) => unknown)
        • (log): unknown
        • Parameters

          • log: Log<bigint, number, false, Extract<{
                type: "event";
                anonymous: false;
                inputs: readonly [{
                    name: "executor";
                    internalType: "address";
                    type: "address";
                    indexed: true;
                }, {
                    name: "caller";
                    internalType: "address";
                    type: "address";
                    indexed: false;
                }, {
                    name: "success";
                    internalType: "bool";
                    type: "bool";
                    indexed: false;
                }, {
                    name: "data";
                    internalType: "bytes";
                    type: "bytes";
                    indexed: false;
                }];
                name: "ActionExecuted";
            }, {
                name: event;
            }> | Extract<{
                type: "event";
                anonymous: false;
                inputs: readonly [{
                    name: "user";
                    internalType: "address";
                    type: "address";
                    indexed: true;
                }, {
                    name: "isValidated";
                    internalType: "bool";
                    type: "bool";
                    indexed: false;
                }, {
                    name: "data";
                    internalType: "bytes";
                    type: "bytes";
                    indexed: false;
                }];
                name: "ActionValidated";
            }, {
                name: event;
            }> | Extract<{
                type: "event";
                anonymous: false;
                inputs: readonly [{
                    name: "version";
                    internalType: "uint64";
                    type: "uint64";
                    indexed: false;
                }];
                name: "Initialized";
            }, {
                name: event;
            }>, true>

          Returns unknown

    • Optionalparams: Partial<Omit<UnionCompute<WatchContractEventParameters<readonly [{
          type: "constructor";
          inputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "ActionExecuted";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "ActionValidated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "Initialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "VALIDATOR";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "execute";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionClaimant";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              components: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "getActionStep";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              components: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionSteps";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              components: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getActionStepsCount";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "prepare";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }], event, undefined, WebSocketTransport> & ChainIdParameter<Config, number> & SyncConnectedChainParameter>, "address" | "abi">> & {
          eventName?: event;
      }

    Returns (() => void)

      • (): void
      • Returns void

  • Protected

    Internal function to attach the connected account to write methods to avoid manually passing in an account each call.

    Parameters

    • Optionalaccount: Account

    Returns {
        account: Account;
    } | {
        account: undefined;
    }