buildAnOnChainRule(Defined in: src/modules/contract-interaction-utils.ts:116 Constructs a rule structure based on the provided policy ID, rule syntax, foreign call mappings, effect data, and tracker mappings. This function processes the rule syntax to generate a structured representation of the rule, including placeholders, effects, and associated metadata.ruleSyntax,foreignCallNameToID,effect,trackerNameToID,encodedValues,additionalForeignCalls,additionalEffectForeignCalls):Maybe<RuleOnChain>
Parameters
| Parameter | Type | Description |
|---|---|---|
ruleSyntax | RuleJSON | The JSON representation of the rule syntax, including conditions and effects. |
foreignCallNameToID | NameToID[] | An array of mappings between foreign call names and their corresponding IDs. |
effect | EffectsOnChain | An object containing the positive and negative effects of the rule. |
trackerNameToID | NameToID[] | An array of mappings between tracker names and their corresponding IDs. |
encodedValues | string | - |
additionalForeignCalls | string[] | - |
additionalEffectForeignCalls | string[] | - |
Returns
Maybe<RuleOnChain>
A structured representation of the rule, including its instruction set, placeholders,
effect placeholders, and associated effects.