buildOnChainEffects(Defined in: src/modules/contract-interaction-utils.ts:210 Builds a structured representation of positive and negative effects based on the provided rule syntax and tracker mappings.ruleSyntax,trackerNameToID,foreignCallNameToID,encodedValues,additionalForeignCalls,additionalEffectForeignCalls):Maybe<EffectsOnChain>
Parameters
| Parameter | Type | Description |
|---|---|---|
ruleSyntax | RuleJSON | The JSON representation of the rule syntax to parse. |
trackerNameToID | NameToID[] | An array mapping tracker names to their corresponding IDs. |
foreignCallNameToID | NameToID[] | An array mapping foreign call names to their corresponding IDs. |
encodedValues | string | - |
additionalForeignCalls | string[] | - |
additionalEffectForeignCalls | string[] | - |
Returns
Maybe<EffectsOnChain>
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.