Function transactionSenderClaimant

  • Creates an ActionClaimant object that represents the transaction sender as the claimant. This function is useful when you want to set up an action where the transaction sender is always considered the valid claimant, regardless of the event or function parameters.

    The returned ActionClaimant has the following properties:

    • signatureType: Set to SignatureType.EVENT (though it doesn't matter for this case)
    • signature: Set to zeroHash (0x0000...0000)
    • fieldIndex: Set to 255, indicating "any" field using CheatCodes enum
    • targetContract: Set to zeroAddress (0x0000...0000)
    • chainid: The chain ID on which the transaction is sent, should match the chain ID for the action's ActionStep

    Parameters

    • chainId: number

      The chain ID on which the transaction is sent, should match the chain ID for the action's ActionStep

    Returns ActionClaimant

    An ActionClaimant object representing the msg.sender

    const eventAction = new EventAction();
    const payload: EventActionPayload = {
    actionClaimant: transactionSenderClaimant(),
    actionSteps: [
    // ... define your action steps here
    ]
    };
    await eventAction.deploy(payload);