generateModifier(Defined in: src/codeGeneration/generate-solidity.ts:55 Generates Solidity modifiers and inserts them into a template file. This function takes a JSON string representing rule data and generates two Solidity modifiers:policyS,outputFileName):void
checkRulesBefore and checkRulesAfter. These modifiers are then inserted into a Solidity
template file at the placeholder // Modifier Here. The modified Solidity code is written
to the specified output file.
Parameters
| Parameter | Type | Description |
|---|---|---|
policyS | string | A JSON string representing the policy data. It must include an encodedValues property containing the argument list for the modifiers. |
outputFileName | string | The path to the output file where the modified Solidity code will be written. |
Returns
void