injectModifier(Injects a modifier into a Solidity contract file by modifying its content. This function performs the following operations:funcName
,variables
,userFilePath
,diffPath
,modifierFile
):void
RulesEngineClientCustom
after the pragma line.RulesEngineClientCustom
.checkRulesBefore
modifier to the specified function with the provided arguments.Parameter | Type | Description |
---|---|---|
funcName | string | The name of the function to which the modifier will be added. |
variables | string | A comma-separated string of variables to be passed to the modifier. Supported types include address , uint256 , string , bool , and bytes . |
userFilePath | string | The file path of the Solidity contract to be modified. |
diffPath | string | The file path where the diff of the changes will be saved. |
modifierFile | string | - |
void
checkRulesBefore
modifier is added to the calling function with the provided arguments.userFilePath
cannot be read or written.