from glider import*defquery(): functions =Functions().exec(100) conditional = []for function in functions:for if_instruction in function.end_if_instructions().exec():# For each function, return the conditional (if) instructions conditional.append(if_instruction)return conditional
Example output
[ {"contract":"0x0c16f70dBBbCB63a81de06eB2fc2ABE4a19f89F2","contract_name":"Pausable","sol_function": `// Formatted for the examplefunctionsetPaused(bool_paused) externalonlyOwner {if (_paused == paused) {return; } paused = _paused;if (paused) { lastPauseTime = block.timestamp; }emitPauseChanged(paused); } `,"sol_instruction": `// Formatted for the exampleif (_paused == paused) {return; } `, }, { ..."sol_instruction": `// Formatted for the exampleif (paused) { lastPauseTime = block.timestamp; } `, } ...]