@aragon/apps-payroll
Version:
_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)
1,081 lines (1,080 loc) • 205 kB
JSON
{
"contractName": "EVMScriptRunner",
"abi": [
{
"constant": true,
"inputs": [],
"name": "hasInitialized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "appId",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getInitializationBlock",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "kernel",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "executor",
"type": "address"
},
{
"indexed": false,
"name": "script",
"type": "bytes"
},
{
"indexed": false,
"name": "input",
"type": "bytes"
},
{
"indexed": false,
"name": "returnData",
"type": "bytes"
}
],
"name": "ScriptResult",
"type": "event"
},
{
"constant": true,
"inputs": [
{
"name": "_script",
"type": "bytes"
}
],
"name": "getEVMScriptExecutor",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getEVMScriptRegistry",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5061043e806100206000396000f3006080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac0811461007c5780632914b9bd146100a557806380afdea8146101275780638b3dd7491461014e578063a479e50814610163578063d4aae0c414610178575b600080fd5b34801561008857600080fd5b5061009161018d565b604080519115158252519081900360200190f35b3480156100b157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100fe9436949293602493928401919081908401838280828437509497506101b69650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561013357600080fd5b5061013c6102c2565b60408051918252519081900360200190f35b34801561015a57600080fd5b5061013c6102f2565b34801561016f57600080fd5b506100fe61031d565b34801561018457600080fd5b506100fe6103df565b6000806101986102f2565b905080158015906101b05750806101ad61040a565b10155b91505090565b60006101c061031d565b73ffffffffffffffffffffffffffffffffffffffff166304bf2a7f836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561024457818101518382015260200161022c565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561029057600080fd5b505af11580156102a4573d6000803e3d6000fd5b505050506040513d60208110156102ba57600080fd5b505192915050565b60006102ed7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b61040e565b905090565b60006102ed7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e61040e565b6000806103286103df565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb60048201527fddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd616024820152905173ffffffffffffffffffffffffffffffffffffffff929092169163be00bbd8916044808201926020929091908290030181600087803b15801561029057600080fd5b60006102ed7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b61040e565b4390565b54905600a165627a7a72305820cc3974bb373b20c68d9d38e5662eb330134cf93b21e3f1b51d1698267b3f39630029",
"deployedBytecode": "0x6080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac0811461007c5780632914b9bd146100a557806380afdea8146101275780638b3dd7491461014e578063a479e50814610163578063d4aae0c414610178575b600080fd5b34801561008857600080fd5b5061009161018d565b604080519115158252519081900360200190f35b3480156100b157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100fe9436949293602493928401919081908401838280828437509497506101b69650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561013357600080fd5b5061013c6102c2565b60408051918252519081900360200190f35b34801561015a57600080fd5b5061013c6102f2565b34801561016f57600080fd5b506100fe61031d565b34801561018457600080fd5b506100fe6103df565b6000806101986102f2565b905080158015906101b05750806101ad61040a565b10155b91505090565b60006101c061031d565b73ffffffffffffffffffffffffffffffffffffffff166304bf2a7f836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561024457818101518382015260200161022c565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561029057600080fd5b505af11580156102a4573d6000803e3d6000fd5b505050506040513d60208110156102ba57600080fd5b505192915050565b60006102ed7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b61040e565b905090565b60006102ed7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e61040e565b6000806103286103df565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb60048201527fddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd616024820152905173ffffffffffffffffffffffffffffffffffffffff929092169163be00bbd8916044808201926020929091908290030181600087803b15801561029057600080fd5b60006102ed7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b61040e565b4390565b54905600a165627a7a72305820cc3974bb373b20c68d9d38e5662eb330134cf93b21e3f1b51d1698267b3f39630029",
"sourceMap": "254:4465:42:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;254:4465:42;;;;;;;",
"deployedSourceMap": "254:4465:42:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1128:208:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1128:208:32;;;;;;;;;;;;;;;;;;;;;;795:179:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;795:179:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;795:179:42;;-1:-1:-1;795:179:42;;-1:-1:-1;;;;;;;795:179:42;;;;;;;;;;;;;;;;;;;;796:106:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;796:106:22;;;;;;;;;;;;;;;;;;;;881:137:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;881:137:32;;;;980:231:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;980:231:42;;;;674:116:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;674:116:22;;;;1128:208:32;1175:4;1191:27;1221:24;:22;:24::i;:::-;1191:54;-1:-1:-1;1262:24:32;;;;;:67;;;1310:19;1290:16;:14;:16::i;:::-;:39;;1262:67;1255:74;;1128:208;;:::o;795:179:42:-;861:18;917:22;:20;:22::i;:::-;:40;;;958:7;917:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;917:49:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;917:49:42;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;917:49:42;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;917:49:42;;795:179;-1:-1:-1;;795:179:42:o;796:106:22:-;834:7;860:35;601:66;860:33;:35::i;:::-;853:42;;796:106;:::o;881:137:32:-;936:7;962:49;345:66;962:47;:49::i;980:231:42:-;1033:18;1063:20;1086:8;:6;:8::i;:::-;:69;;;;;;1368:66:53;1086:69:42;;;;330:66:44;1086:69:42;;;;;;:15;;;;;;;;:69;;;;;;;;;;;;;;;;:15;:69;;;5:2:-1;;;;30:1;27;20:12;674:116:22;713:7;747:35;485:66;747:33;:35::i;347:94:37:-;422:12;347:94;:::o;379:134:39:-;490:15;;480:27::o",
"source": "/*\n * SPDX-License-Identitifer: MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./IEVMScriptExecutor.sol\";\nimport \"./IEVMScriptRegistry.sol\";\n\nimport \"../apps/AppStorage.sol\";\nimport \"../kernel/KernelConstants.sol\";\nimport \"../common/Initializable.sol\";\n\n\ncontract EVMScriptRunner is AppStorage, Initializable, EVMScriptRegistryConstants, KernelNamespaceConstants {\n string private constant ERROR_EXECUTOR_UNAVAILABLE = \"EVMRUN_EXECUTOR_UNAVAILABLE\";\n string private constant ERROR_PROTECTED_STATE_MODIFIED = \"EVMRUN_PROTECTED_STATE_MODIFIED\";\n\n /* This is manually crafted in assembly\n string private constant ERROR_EXECUTOR_INVALID_RETURN = \"EVMRUN_EXECUTOR_INVALID_RETURN\";\n */\n\n event ScriptResult(address indexed executor, bytes script, bytes input, bytes returnData);\n\n function getEVMScriptExecutor(bytes _script) public view returns (IEVMScriptExecutor) {\n return IEVMScriptExecutor(getEVMScriptRegistry().getScriptExecutor(_script));\n }\n\n function getEVMScriptRegistry() public view returns (IEVMScriptRegistry) {\n address registryAddr = kernel().getApp(KERNEL_APP_ADDR_NAMESPACE, EVMSCRIPT_REGISTRY_APP_ID);\n return IEVMScriptRegistry(registryAddr);\n }\n\n function runScript(bytes _script, bytes _input, address[] _blacklist)\n internal\n isInitialized\n protectState\n returns (bytes)\n {\n IEVMScriptExecutor executor = getEVMScriptExecutor(_script);\n require(address(executor) != address(0), ERROR_EXECUTOR_UNAVAILABLE);\n\n bytes4 sig = executor.execScript.selector;\n bytes memory data = abi.encodeWithSelector(sig, _script, _input, _blacklist);\n\n bytes memory output;\n assembly {\n let success := delegatecall(\n gas, // forward all gas\n executor, // address\n add(data, 0x20), // calldata start\n mload(data), // calldata length\n 0, // don't write output (we'll handle this ourselves)\n 0 // don't write output\n )\n\n output := mload(0x40) // free mem ptr get\n\n switch success\n case 0 {\n // If the call errored, forward its full error data\n returndatacopy(output, 0, returndatasize)\n revert(output, returndatasize)\n }\n default {\n switch gt(returndatasize, 0x3f)\n case 0 {\n // Need at least 0x40 bytes returned for properly ABI-encoded bytes values,\n // revert with \"EVMRUN_EXECUTOR_INVALID_RETURN\"\n // See remix: doing a `revert(\"EVMRUN_EXECUTOR_INVALID_RETURN\")` always results in\n // this memory layout\n mstore(output, 0x08c379a000000000000000000000000000000000000000000000000000000000) // error identifier\n mstore(add(output, 0x04), 0x0000000000000000000000000000000000000000000000000000000000000020) // starting offset\n mstore(add(output, 0x24), 0x000000000000000000000000000000000000000000000000000000000000001e) // reason length\n mstore(add(output, 0x44), 0x45564d52554e5f4558454355544f525f494e56414c49445f52455455524e0000) // reason\n\n revert(output, 100) // 100 = 4 + 3 * 32 (error identifier + 3 words for the ABI encoded error)\n }\n default {\n // Copy result\n //\n // Needs to perform an ABI decode for the expected `bytes` return type of\n // `executor.execScript()` as solidity will automatically ABI encode the returned bytes as:\n // [ position of the first dynamic length return value = 0x20 (32 bytes) ]\n // [ output length (32 bytes) ]\n // [ output content (N bytes) ]\n //\n // Perform the ABI decode by ignoring the first 32 bytes of the return data\n let copysize := sub(returndatasize, 0x20)\n returndatacopy(output, 0x20, copysize)\n\n mstore(0x40, add(output, copysize)) // free mem ptr set\n }\n }\n }\n\n emit ScriptResult(address(executor), _script, _input, output);\n\n return output;\n }\n\n modifier protectState {\n address preKernel = address(kernel());\n bytes32 preAppId = appId();\n _; // exec\n require(address(kernel()) == preKernel, ERROR_PROTECTED_STATE_MODIFIED);\n require(appId() == preAppId, ERROR_PROTECTED_STATE_MODIFIED);\n }\n}\n",
"sourcePath": "@aragon/os/contracts/evmscript/EVMScriptRunner.sol",
"ast": {
"absolutePath": "@aragon/os/contracts/evmscript/EVMScriptRunner.sol",
"exportedSymbols": {
"EVMScriptRunner": [
11823
]
},
"id": 11824,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 11659,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "44:24:42"
},
{
"absolutePath": "@aragon/os/contracts/evmscript/IEVMScriptExecutor.sol",
"file": "./IEVMScriptExecutor.sol",
"id": 11660,
"nodeType": "ImportDirective",
"scope": 11824,
"sourceUnit": 11844,
"src": "70:34:42",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/evmscript/IEVMScriptRegistry.sol",
"file": "./IEVMScriptRegistry.sol",
"id": 11661,
"nodeType": "ImportDirective",
"scope": 11824,
"sourceUnit": 11871,
"src": "105:34:42",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/apps/AppStorage.sol",
"file": "../apps/AppStorage.sol",
"id": 11662,
"nodeType": "ImportDirective",
"scope": 11824,
"sourceUnit": 10366,
"src": "141:32:42",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/kernel/KernelConstants.sol",
"file": "../kernel/KernelConstants.sol",
"id": 11663,
"nodeType": "ImportDirective",
"scope": 11824,
"sourceUnit": 13115,
"src": "174:39:42",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/common/Initializable.sol",
"file": "../common/Initializable.sol",
"id": 11664,
"nodeType": "ImportDirective",
"scope": 11824,
"sourceUnit": 10811,
"src": "214:37:42",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11665,
"name": "AppStorage",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10365,
"src": "282:10:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_AppStorage_$10365",
"typeString": "contract AppStorage"
}
},
"id": 11666,
"nodeType": "InheritanceSpecifier",
"src": "282:10:42"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11667,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10810,
"src": "294:13:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$10810",
"typeString": "contract Initializable"
}
},
"id": 11668,
"nodeType": "InheritanceSpecifier",
"src": "294:13:42"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11669,
"name": "EVMScriptRegistryConstants",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11850,
"src": "309:26:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EVMScriptRegistryConstants_$11850",
"typeString": "contract EVMScriptRegistryConstants"
}
},
"id": 11670,
"nodeType": "InheritanceSpecifier",
"src": "309:26:42"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11671,
"name": "KernelNamespaceConstants",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13114,
"src": "337:24:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_KernelNamespaceConstants_$13114",
"typeString": "contract KernelNamespaceConstants"
}
},
"id": 11672,
"nodeType": "InheritanceSpecifier",
"src": "337:24:42"
}
],
"contractDependencies": [
10365,
10810,
11200,
11850,
13114
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 11823,
"linearizedBaseContracts": [
11823,
13114,
11850,
10810,
11200,
10365
],
"name": "EVMScriptRunner",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 11675,
"name": "ERROR_EXECUTOR_UNAVAILABLE",
"nodeType": "VariableDeclaration",
"scope": 11823,
"src": "368:82:42",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 11673,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "368:6:42",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "45564d52554e5f4558454355544f525f554e415641494c41424c45",
"id": 11674,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "421:29:42",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8eaa9277b7a571cc4e32be0346d713d2afa465c007646deacfabeba4f629e0be",
"typeString": "literal_string \"EVMRUN_EXECUTOR_UNAVAILABLE\""
},
"value": "EVMRUN_EXECUTOR_UNAVAILABLE"
},
"visibility": "private"
},
{
"constant": true,
"id": 11678,
"name": "ERROR_PROTECTED_STATE_MODIFIED",
"nodeType": "VariableDeclaration",
"scope": 11823,
"src": "456:90:42",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 11676,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "456:6:42",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "45564d52554e5f50524f5445435445445f53544154455f4d4f444946494544",
"id": 11677,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "513:33:42",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_93fe2db835b78d0be70801a075eae0aab8d5496824b1a06caec0dd78db98ba92",
"typeString": "literal_string \"EVMRUN_PROTECTED_STATE_MODIFIED\""
},
"value": "EVMRUN_PROTECTED_STATE_MODIFIED"
},
"visibility": "private"
},
{
"anonymous": false,
"documentation": null,
"id": 11688,
"name": "ScriptResult",
"nodeType": "EventDefinition",
"parameters": {
"id": 11687,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11680,
"indexed": true,
"name": "executor",
"nodeType": "VariableDeclaration",
"scope": 11688,
"src": "718:24:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "718:7:42",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11682,
"indexed": false,
"name": "script",
"nodeType": "VariableDeclaration",
"scope": 11688,
"src": "744:12:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 11681,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "744:5:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11684,
"indexed": false,
"name": "input",
"nodeType": "VariableDeclaration",
"scope": 11688,
"src": "758:11:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 11683,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "758:5:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11686,
"indexed": false,
"name": "returnData",
"nodeType": "VariableDeclaration",
"scope": 11688,
"src": "771:16:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 11685,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "771:5:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "717:71:42"
},
"src": "699:90:42"
},
{
"body": {
"id": 11703,
"nodeType": "Block",
"src": "881:93:42",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11699,
"name": "_script",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11690,
"src": "958:7:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11696,
"name": "getEVMScriptRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11723,
"src": "917:20:42",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IEVMScriptRegistry_$11870_$",
"typeString": "function () view returns (contract IEVMScriptRegistry)"
}
},
"id": 11697,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "917:22:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptRegistry_$11870",
"typeString": "contract IEVMScriptRegistry"
}
},
"id": 11698,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getScriptExecutor",
"nodeType": "MemberAccess",
"referencedDeclaration": 11869,
"src": "917:40:42",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes_memory_ptr_$returns$_t_contract$_IEVMScriptExecutor_$11843_$",
"typeString": "function (bytes memory) view external returns (contract IEVMScriptExecutor)"
}
},
"id": 11700,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "917:49:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
}
],
"id": 11695,
"name": "IEVMScriptExecutor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11843,
"src": "898:18:42",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IEVMScriptExecutor_$11843_$",
"typeString": "type(contract IEVMScriptExecutor)"
}
},
"id": 11701,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "898:69:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
}
},
"functionReturnParameters": 11694,
"id": 11702,
"nodeType": "Return",
"src": "891:76:42"
}
]
},
"documentation": null,
"id": 11704,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getEVMScriptExecutor",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11691,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11690,
"name": "_script",
"nodeType": "VariableDeclaration",
"scope": 11704,
"src": "825:13:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 11689,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "825:5:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "824:15:42"
},
"payable": false,
"returnParameters": {
"id": 11694,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11693,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11704,
"src": "861:18:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
},
"typeName": {
"contractScope": null,
"id": 11692,
"name": "IEVMScriptExecutor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11843,
"src": "861:18:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "860:20:42"
},
"scope": 11823,
"src": "795:179:42",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 11722,
"nodeType": "Block",
"src": "1053:158:42",
"statements": [
{
"assignments": [
11710
],
"declarations": [
{
"constant": false,
"id": 11710,
"name": "registryAddr",
"nodeType": "VariableDeclaration",
"scope": 11723,
"src": "1063:20:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11709,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1063:7:42",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11717,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11714,
"name": "KERNEL_APP_ADDR_NAMESPACE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13113,
"src": "1102:25:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 11715,
"name": "EVMSCRIPT_REGISTRY_APP_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11849,
"src": "1129:25:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11711,
"name": "kernel",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10328,
"src": "1086:6:42",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IKernel_$12600_$",
"typeString": "function () view returns (contract IKernel)"
}
},
"id": 11712,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1086:8:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IKernel_$12600",
"typeString": "contract IKernel"
}
},
"id": 11713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getApp",
"nodeType": "MemberAccess",
"referencedDeclaration": 12599,
"src": "1086:15:42",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32,bytes32) view external returns (address)"
}
},
"id": 11716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1086:69:42",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1063:92:42"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11719,
"name": "registryAddr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11710,
"src": "1191:12:42",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 11718,
"name": "IEVMScriptRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11870,
"src": "1172:18:42",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IEVMScriptRegistry_$11870_$",
"typeString": "type(contract IEVMScriptRegistry)"
}
},
"id": 11720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1172:32:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptRegistry_$11870",
"typeString": "contract IEVMScriptRegistry"
}
},
"functionReturnParameters": 11708,
"id": 11721,
"nodeType": "Return",
"src": "1165:39:42"
}
]
},
"documentation": null,
"id": 11723,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getEVMScriptRegistry",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 11705,
"nodeType": "ParameterList",
"parameters": [],
"src": "1009:2:42"
},
"payable": false,
"returnParameters": {
"id": 11708,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11707,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 11723,
"src": "1033:18:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptRegistry_$11870",
"typeString": "contract IEVMScriptRegistry"
},
"typeName": {
"contractScope": null,
"id": 11706,
"name": "IEVMScriptRegistry",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11870,
"src": "1033:18:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptRegistry_$11870",
"typeString": "contract IEVMScriptRegistry"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1032:20:42"
},
"scope": 11823,
"src": "980:231:42",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 11787,
"nodeType": "Block",
"src": "1375:3054:42",
"statements": [
{
"assignments": [
11740
],
"declarations": [
{
"constant": false,
"id": 11740,
"name": "executor",
"nodeType": "VariableDeclaration",
"scope": 11788,
"src": "1385:27:42",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
},
"typeName": {
"contractScope": null,
"id": 11739,
"name": "IEVMScriptExecutor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11843,
"src": "1385:18:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 11744,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 11742,
"name": "_script",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11725,
"src": "1436:7:42",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 11741,
"name": "getEVMScriptExecutor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11704,
"src": "1415:20:42",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$returns$_t_contract$_IEVMScriptExecutor_$11843_$",
"typeString": "function (bytes memory) view returns (contract IEVMScriptExecutor)"
}
},
"id": 11743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1415:29:42",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEVMScriptExecutor_$11843",
"typeString": "contract IEVMScriptExecutor"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1385:59:42"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},