Creates an IncentiveCriteria object representing a gas rebate incentive.
This object defines a variable incentive criteria where the criteria will be the gas spent.
The criteria uses a signatureType of EVENT, with a special fieldIndex of 255 (using CheatCodes enum), which indicates
that the entire gas cost of the transaction will be used as the scalar value. If you don't want to
rebate the entire gas cost, you can use a reward value on the incentive..
criteriaType: EVENT, indicating it's based on event logs.
signature: A zeroed signature (0x0000...0000), matching any event.
fieldIndex: 255, indicating the use of transaction gas cost using CheatCodes enum.
targetContract: A zeroed address (0x0000...0000), applicable to any contract.
Returns an IncentiveCriteria object for a gas rebate.
Example
constincentive = gasRebateIncentiveCriteria(); constactionPayload = { criteria:incentive, asset:"0xAssetAddress", reward:0, // Set to zero to rebate the entire gas cost limit:BigInt(1000) // This is the total spend limit for the incentive }; deployIncentive(actionPayload);
Creates an IncentiveCriteria object representing a gas rebate incentive. This object defines a variable incentive criteria where the criteria will be the gas spent.
The criteria uses a signatureType of EVENT, with a special
fieldIndex
of 255 (using CheatCodes enum), which indicates that the entire gas cost of the transaction will be used as the scalar value. If you don't want to rebate the entire gas cost, you can use a reward value on the incentive..criteriaType
: EVENT, indicating it's based on event logs.signature
: A zeroed signature (0x0000...0000), matching any event.fieldIndex
: 255, indicating the use of transaction gas cost using CheatCodes enum.targetContract
: A zeroed address (0x0000...0000), applicable to any contract.