buildAnEffectStruct
buildAnEffectStruct(
ruleSyntax
,trackerNameToID
,foreignCallNameToID
):object
Builds a structured representation of positive and negative effects based on the provided rule syntax and tracker mappings.
Parameters
Parameter | Type | Description |
---|---|---|
ruleSyntax | ruleJSON | The JSON representation of the rule syntax to parse. |
trackerNameToID | FCNameToID [] | An array mapping tracker names to their corresponding IDs. |
foreignCallNameToID | FCNameToID [] | - |
Returns
object
An object containing arrays of positive and negative effects, each represented as structured objects.
The returned object has the following structure:
positiveEffects
: An array of objects representing the positive effects.negativeEffects
: An array of objects representing the negative effects.
Each effect object includes:
valid
: A boolean indicating whether the effect is valid.dynamicParam
: A boolean indicating whether the parameter is dynamic.effectType
: The type of the effect.pType
: The parameter type (e.g., address, string, bytes, uint).param
: The encoded parameter value.text
: A hexadecimal representation of the effect’s text.errorMessage
: The error message associated with the effect.instructionSet
: The cleaned instruction set for the effect.
negativeEffects
negativeEffects:
object
[] =nEffects
positiveEffects
positiveEffects:
object
[] =pEffects