buildAnEffectStruct(Builds a structured representation of positive and negative effects based on the provided rule syntax and tracker mappings.ruleSyntax,trackerNameToID,foreignCallNameToID,encodedValues,additionalForeignCalls,additionalEffectForeignCalls):EffectStructs
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[] | An array mapping foreign call names to their corresponding IDs. |
encodedValues | string | - |
additionalForeignCalls | string[] | - |
additionalEffectForeignCalls | string[] | - |
Returns
EffectStructs
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.
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.