@aragon/apps-payroll
Version:
_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)
820 lines • 210 kB
JSON
{
"contractName": "CallsScript",
"abi": [
{
"constant": true,
"inputs": [],
"name": "hasInitialized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"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": "isPetrified",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "sender",
"type": "address"
},
{
"indexed": true,
"name": "src",
"type": "address"
},
{
"indexed": true,
"name": "dst",
"type": "address"
}
],
"name": "LogScriptCall",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_script",
"type": "bytes"
},
{
"name": "",
"type": "bytes"
},
{
"name": "_blacklist",
"type": "address[]"
}
],
"name": "execScript",
"outputs": [
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "executorType",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x608060405261001564010000000061001a810204565b610223565b61002b64010000000061011a810204565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a4544000000000000000060208201529015610103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156100c85781810151838201526020016100b0565b50505050905090810190601f1680156100f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50610118600019640100000000610145810204565b565b6000610140600080516020610a7a83398151915264010000000061080c61021b82021704565b905090565b61015664010000000061011a810204565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156101f2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156100c85781810151838201526020016100b0565b50610218600080516020610a7a8339815191528264010000000061081861021f82021704565b50565b5490565b9055565b610848806102326000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac08114610071578063279cea351461009a5780638333d9b2146101475780638b3dd7491461016e578063de4796ed14610183575b600080fd5b34801561007d57600080fd5b50610086610198565b604080519115158252519081900360200190f35b3480156100a657600080fd5b506100d260246004803582810192908201359181358083019290820135916044359182019101356101c1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010c5781810151838201526020016100f4565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015357600080fd5b5061015c6106dc565b60408051918252519081900360200190f35b34801561017a57600080fd5b5061015c610700565b34801561018f57600080fd5b50610086610730565b6000806101a3610700565b905080158015906101bb5750806101b8610761565b10155b91505090565b606060008060008060008060006101d6610198565b60408051808201909152601481527f494e49545f4e4f545f494e495449414c495a454400000000000000000000000060208201529015156102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600496505b8c8710156106cb5760408051808201909152601781527f45564d43414c4c535f494e56414c49445f4c454e47544800000000000000000060208201526018888f03101561035e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561027457818101518382015260200161025c565b506103a2878f8f8080601f01602080910402602001604051908101604052809392919081815260200183838082843750949594505063ffffffff6107651692505050565b9550600094505b888510156104b4578989868181106103bd57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156040805190810160405280601981526020017f45564d43414c4c535f424c41434b4c49535445445f43414c4c000000000000008152509015156104a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561027457818101518382015260200161025c565b506001909401936103a9565b60405173ffffffffffffffffffffffffffffffffffffffff871690309033907f9dcff9d94fbfdb4622d11edb383005f95e78efb446c72d92f8e615c6025c470390600090a461053f876014018f8f8080601f01602080910402602001604051908101604052809392919081815260200183838082843750949594505063ffffffff6107ad1692505050565b63ffffffff169350866014016004019250610593838f8f8080601f01602080910402602001604051908101604052809392919081815260200183838082843750949594505063ffffffff6108051692505050565b60408051808201909152601781527f45564d43414c4c535f494e56414c49445f4c454e475448000000000000000000602082015284860198509092508d881115610639576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561027457818101518382015260200161025c565b50600080858460008a6113885a03f19050808015610656576106c5565b6040513d8015610669573d6000833e3d82fd5b7f08c379a000000000000000000000000000000000000000000000000000000000825260206004830152601660248301527f45564d43414c4c535f43414c4c5f5245564552544544000000000000000000006044830152606482fd5b506102b5565b505050505050509695505050505050565b7f2dc858a00f3e417be1394b87c07158e989ec681ce8cc68a9093680ac1a87030290565b600061072b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e61080c565b905090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61075b610700565b14905090565b4390565b6000806107728484610810565b6c010000000000000000000000007fffffffffffffffffffffffffffffffffffffffff00000000000000000000000090911604949350505050565b6000806107ba8484610810565b7c01000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000090911604949350505050565b0160200190565b5490565b016020015190565b90555600a165627a7a72305820ab9e75a00e63cfcfbd1642fb842561c2da9bc206c48478d9b37a4ec20a9ea6170029ebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e",
"deployedBytecode": "0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac08114610071578063279cea351461009a5780638333d9b2146101475780638b3dd7491461016e578063de4796ed14610183575b600080fd5b34801561007d57600080fd5b50610086610198565b604080519115158252519081900360200190f35b3480156100a657600080fd5b506100d260246004803582810192908201359181358083019290820135916044359182019101356101c1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010c5781810151838201526020016100f4565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015357600080fd5b5061015c6106dc565b60408051918252519081900360200190f35b34801561017a57600080fd5b5061015c610700565b34801561018f57600080fd5b50610086610730565b6000806101a3610700565b905080158015906101bb5750806101b8610761565b10155b91505090565b606060008060008060008060006101d6610198565b60408051808201909152601481527f494e49545f4e4f545f494e495449414c495a454400000000000000000000000060208201529015156102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600496505b8c8710156106cb5760408051808201909152601781527f45564d43414c4c535f494e56414c49445f4c454e47544800000000000000000060208201526018888f03101561035e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561027457818101518382015260200161025c565b506103a2878f8f8080601f01602080910402602001604051908101604052809392919081815260200183838082843750949594505063ffffffff6107651692505050565b9550600094505b888510156104b4578989868181106103bd57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156040805190810160405280601981526020017f45564d43414c4c535f424c41434b4c49535445445f43414c4c000000000000008152509015156104a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561027457818101518382015260200161025c565b506001909401936103a9565b60405173ffffffffffffffffffffffffffffffffffffffff871690309033907f9dcff9d94fbfdb4622d11edb383005f95e78efb446c72d92f8e615c6025c470390600090a461053f876014018f8f8080601f01602080910402602001604051908101604052809392919081815260200183838082843750949594505063ffffffff6107ad1692505050565b63ffffffff169350866014016004019250610593838f8f8080601f01602080910402602001604051908101604052809392919081815260200183838082843750949594505063ffffffff6108051692505050565b60408051808201909152601781527f45564d43414c4c535f494e56414c49445f4c454e475448000000000000000000602082015284860198509092508d881115610639576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561027457818101518382015260200161025c565b50600080858460008a6113885a03f19050808015610656576106c5565b6040513d8015610669573d6000833e3d82fd5b7f08c379a000000000000000000000000000000000000000000000000000000000825260206004830152601660248301527f45564d43414c4c535f43414c4c5f5245564552544544000000000000000000006044830152606482fd5b506102b5565b505050505050509695505050505050565b7f2dc858a00f3e417be1394b87c07158e989ec681ce8cc68a9093680ac1a87030290565b600061072b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e61080c565b905090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61075b610700565b14905090565b4390565b6000806107728484610810565b6c010000000000000000000000007fffffffffffffffffffffffffffffffffffffffff00000000000000000000000090911604949350505050565b6000806107ba8484610810565b7c01000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000090911604949350505050565b0160200190565b5490565b016020015190565b90555600a165627a7a72305820ab9e75a00e63cfcfbd1642fb842561c2da9bc206c48478d9b37a4ec20a9ea6170029",
"sourceMap": "153:4489:47:-;;;344:9:24;:7;;;;:9;:::i;:::-;153:4489:47;;590:84:34;615:24:32;:22;;;;:24;:::i;:::-;646:25;;;;;;;;;;;;;;;;;;615:29;607:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;607:65:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;637:30:34;-1:-1:-1;;637:13:34;;;;:30;:::i;:::-;590:84::o;881:137:32:-;936:7;962:49;-1:-1:-1;;;;;;;;;;;962:47:32;;;;;;:49;:::i;:::-;955:56;;881:137;:::o;1751:141::-;615:24;:22;;;;:24;:::i;:::-;646:25;;;;;;;;;;;;;;;;;;615:29;607:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;607:65:32;-1:-1:-1;1824:61:32;-1:-1:-1;;;;;;;;;;;1872:12:32;1824:47;;;;;;:61;:::i;:::-;1751:141;:::o;519:134:39:-;630:15;;620:27::o;1028:119::-;1117:22;;1115:26::o;153:4489:47:-;;;;;;;",
"deployedSourceMap": "153:4489:47:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1128:208:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1128:208:32;;;;;;;;;;;;;;;;;;;;;;1226:3315:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1226:3315:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1226:3315:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4547:93;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4547:93:47;;;;;;;;;;;;;;;;;;;;881:137:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;881:137:32;;;;287:117:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;287:117:34;;;;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;1226:3315:47:-;1322:5;1339:16;1618:23;1749:9;2121:22;2202:19;2260:21;2508:12;737:16:32;:14;:16::i;:::-;755:21;;;;;;;;;;;;;;;;;;729:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;729:48:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;273:1:46;1339:40:47;;1418:2965;1425:25;;;1418:2965;;;1582:20;;;;;;;;;;;;;;;;;1576:4;1547:25;;;:33;;1539:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;1539:64:47;;1644:27;1662:8;1644:7;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1644:17:47;;:27;-1:-1:-1;;1644:27:47;:17;:27;;-1:-1:-1;;;1644:27:47:i;:::-;1618:53;;1761:1;1749:13;;1744:146;1764:21;;;1744:146;;;1837:10;;1848:1;1837:13;;;;;;;;;;;;;;;1818:32;;:15;:32;;;;1852:22;;;;;;;;;;;;;;;;;;1810:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;1810:65:47;-1:-1:-1;1787:3:47;;;;;1744:146;;;2049:57;;;;;;2083:4;;2063:10;;2049:57;;;;;2154:33;2171:8;2182:4;2171:15;2154:7;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2154:16:47;;:33;-1:-1:-1;;2154:33:47;:16;:33;;-1:-1:-1;;;2154:33:47:i;:::-;2146:42;;2121:67;;2224:8;2235:4;2224:15;2242:4;2224:22;2202:44;;2284:31;2303:11;2284:7;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2284:18:47;;:31;-1:-1:-1;;2284:31:47;:18;:31;;-1:-1:-1;;;2284:31:47:i;:::-;2472:20;;;;;;;;;;;;;;;;;2394:28;;;;-1:-1:-1;2260:55:47;;-1:-1:-1;2444:26:47;;;;2436:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;2436:57:47;;2959:1;2895;2834:14;2774:13;2720:1;2667:15;2607:4;2602:3;2598:14;2572:448;2561:459;-1:-1:-1;2561:459:47;3069:1262;;;;3038:1321;;3069:1262;3115:4;3109:11;3149:14;3184:907;;;;4224:14;4221:1;4216:3;4201:38;4276:14;4271:3;4264:27;3184:907;3466:66;3461:3;3454:79;3609:66;3602:4;3597:3;3593:14;3586:90;3743:66;3736:4;3731:3;3727:14;3720:90;3875:66;3868:4;3863:3;3859:14;3852:90;3990:3;3985;3978:16;3038:1321;;2543:1830;;;1226:3315;;;;;;;;;;;;;;;:::o;4547:93::-;402:66;4547:93;:::o;881:137:32:-;936:7;962:49;345:66;962:47;:49::i;:::-;955:56;;881:137;:::o;287:117:34:-;331:4;277:2;354:24;:22;:24::i;:::-;:43;347:50;;287:117;:::o;347:94:37:-;422:12;347:94;:::o;408:325:45:-;482:14;508:12;523:27;533:5;540:9;523;:27::i;:::-;689;608:66;598:77;;;594:123;;570:157;-1:-1:-1;;;;570:157:45:o;739:355::-;812:13;837:12;852:27;862:5;869:9;852;:27::i;:::-;1018:59;937:66;927:77;;;923:155;;899:189;-1:-1:-1;;;;899:189:45:o;1100:182::-;1234:32;1249:4;1234:32;;1210:66::o;519:134:39:-;630:15;;620:27::o;214:188:45:-;353:32;368:4;353:32;347:39;;323:73::o;1028:119:39:-;1117:22;;1115:26::o",
"source": "pragma solidity 0.4.24;\n\n// Inspired by https://github.com/reverendus/tx-manager\n\nimport \"../ScriptHelpers.sol\";\nimport \"./BaseEVMScriptExecutor.sol\";\n\n\ncontract CallsScript is BaseEVMScriptExecutor {\n using ScriptHelpers for bytes;\n\n /* Hardcoded constants to save gas\n bytes32 internal constant EXECUTOR_TYPE = keccak256(\"CALLS_SCRIPT\");\n */\n bytes32 internal constant EXECUTOR_TYPE = 0x2dc858a00f3e417be1394b87c07158e989ec681ce8cc68a9093680ac1a870302;\n\n string private constant ERROR_BLACKLISTED_CALL = \"EVMCALLS_BLACKLISTED_CALL\";\n string private constant ERROR_INVALID_LENGTH = \"EVMCALLS_INVALID_LENGTH\";\n\n /* This is manually crafted in assembly\n string private constant ERROR_CALL_REVERTED = \"EVMCALLS_CALL_REVERTED\";\n */\n\n event LogScriptCall(address indexed sender, address indexed src, address indexed dst);\n\n /**\n * @notice Executes a number of call scripts\n * @param _script [ specId (uint32) ] many calls with this structure ->\n * [ to (address: 20 bytes) ] [ calldataLength (uint32: 4 bytes) ] [ calldata (calldataLength bytes) ]\n * @param _blacklist Addresses the script cannot call to, or will revert.\n * @return Always returns empty byte array\n */\n function execScript(bytes _script, bytes, address[] _blacklist) external isInitialized returns (bytes) {\n uint256 location = SCRIPT_START_LOCATION; // first 32 bits are spec id\n while (location < _script.length) {\n // Check there's at least address + calldataLength available\n require(_script.length - location >= 0x18, ERROR_INVALID_LENGTH);\n\n address contractAddress = _script.addressAt(location);\n // Check address being called is not blacklist\n for (uint256 i = 0; i < _blacklist.length; i++) {\n require(contractAddress != _blacklist[i], ERROR_BLACKLISTED_CALL);\n }\n\n // logged before execution to ensure event ordering in receipt\n // if failed entire execution is reverted regardless\n emit LogScriptCall(msg.sender, address(this), contractAddress);\n\n uint256 calldataLength = uint256(_script.uint32At(location + 0x14));\n uint256 startOffset = location + 0x14 + 0x04;\n uint256 calldataStart = _script.locationOf(startOffset);\n\n // compute end of script / next location\n location = startOffset + calldataLength;\n require(location <= _script.length, ERROR_INVALID_LENGTH);\n\n bool success;\n assembly {\n success := call(\n sub(gas, 5000), // forward gas left - 5000\n contractAddress, // address\n 0, // no value\n calldataStart, // calldata start\n calldataLength, // calldata length\n 0, // don't write output\n 0 // don't write output\n )\n\n switch success\n case 0 {\n let ptr := mload(0x40)\n\n switch returndatasize\n case 0 {\n // No error data was returned, revert with \"EVMCALLS_CALL_REVERTED\"\n // See remix: doing a `revert(\"EVMCALLS_CALL_REVERTED\")` always results in\n // this memory layout\n mstore(ptr, 0x08c379a000000000000000000000000000000000000000000000000000000000) // error identifier\n mstore(add(ptr, 0x04), 0x0000000000000000000000000000000000000000000000000000000000000020) // starting offset\n mstore(add(ptr, 0x24), 0x0000000000000000000000000000000000000000000000000000000000000016) // reason length\n mstore(add(ptr, 0x44), 0x45564d43414c4c535f43414c4c5f524556455254454400000000000000000000) // reason\n\n revert(ptr, 100) // 100 = 4 + 3 * 32 (error identifier + 3 words for the ABI encoded error)\n }\n default {\n // Forward the full error data\n returndatacopy(ptr, 0, returndatasize)\n revert(ptr, returndatasize)\n }\n }\n default { }\n }\n }\n // No need to allocate empty bytes for the return as this can only be called via an delegatecall\n // (due to the isInitialized modifier)\n }\n\n function executorType() external pure returns (bytes32) {\n return EXECUTOR_TYPE;\n }\n}\n",
"sourcePath": "@aragon/os/contracts/evmscript/executors/CallsScript.sol",
"ast": {
"absolutePath": "@aragon/os/contracts/evmscript/executors/CallsScript.sol",
"exportedSymbols": {
"CallsScript": [
12126
]
},
"id": 12127,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 11976,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:47"
},
{
"absolutePath": "@aragon/os/contracts/evmscript/ScriptHelpers.sol",
"file": "../ScriptHelpers.sol",
"id": 11977,
"nodeType": "ImportDirective",
"scope": 12127,
"sourceUnit": 11963,
"src": "82:30:47",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/evmscript/executors/BaseEVMScriptExecutor.sol",
"file": "./BaseEVMScriptExecutor.sol",
"id": 11978,
"nodeType": "ImportDirective",
"scope": 12127,
"sourceUnit": 11975,
"src": "113:37:47",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11979,
"name": "BaseEVMScriptExecutor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11974,
"src": "177:21:47",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BaseEVMScriptExecutor_$11974",
"typeString": "contract BaseEVMScriptExecutor"
}
},
"id": 11980,
"nodeType": "InheritanceSpecifier",
"src": "177:21:47"
}
],
"contractDependencies": [
10502,
10810,
10871,
11200,
11843,
11974
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 12126,
"linearizedBaseContracts": [
12126,
11974,
10502,
10871,
10810,
11200,
11843
],
"name": "CallsScript",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 11983,
"libraryName": {
"contractScope": null,
"id": 11981,
"name": "ScriptHelpers",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11962,
"src": "211:13:47",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ScriptHelpers_$11962",
"typeString": "library ScriptHelpers"
}
},
"nodeType": "UsingForDirective",
"src": "205:30:47",
"typeName": {
"id": 11982,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "229:5:47",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
{
"constant": true,
"id": 11986,
"name": "EXECUTOR_TYPE",
"nodeType": "VariableDeclaration",
"scope": 12126,
"src": "360:108:47",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11984,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "360:7:47",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307832646338353861303066336534313762653133393462383763303731353865393839656336383163653863633638613930393336383061633161383730333032",
"id": 11985,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "402:66:47",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_20708059268077943580677606616711462293513402141599588069272609168866821997314_by_1",
"typeString": "int_const 2070...(69 digits omitted)...7314"
},
"value": "0x2dc858a00f3e417be1394b87c07158e989ec681ce8cc68a9093680ac1a870302"
},
"visibility": "internal"
},
{
"constant": true,
"id": 11989,
"name": "ERROR_BLACKLISTED_CALL",
"nodeType": "VariableDeclaration",
"scope": 12126,
"src": "475:76:47",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 11987,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "475:6:47",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "45564d43414c4c535f424c41434b4c49535445445f43414c4c",
"id": 11988,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "524:27:47",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_820e7bc5a5dbe3fe12a354732308daec36659428c18b63a8bd98d3e1a1aa880c",
"typeString": "literal_string \"EVMCALLS_BLACKLISTED_CALL\""
},
"value": "EVMCALLS_BLACKLISTED_CALL"
},
"visibility": "private"
},
{
"constant": true,
"id": 11992,
"name": "ERROR_INVALID_LENGTH",
"nodeType": "VariableDeclaration",
"scope": 12126,
"src": "557:72:47",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 11990,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "557:6:47",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "45564d43414c4c535f494e56414c49445f4c454e475448",
"id": 11991,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "604:25:47",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b74cfdfb5c338a9838591e3a37b6a9b307874ae00970d0ccb03700cda2f9a5e1",
"typeString": "literal_string \"EVMCALLS_INVALID_LENGTH\""
},
"value": "EVMCALLS_INVALID_LENGTH"
},
"visibility": "private"
},
{
"anonymous": false,
"documentation": null,
"id": 12000,
"name": "LogScriptCall",
"nodeType": "EventDefinition",
"parameters": {
"id": 11999,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11994,
"indexed": true,
"name": "sender",
"nodeType": "VariableDeclaration",
"scope": 12000,
"src": "784:22:47",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11993,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "784:7:47",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11996,
"indexed": true,
"name": "src",
"nodeType": "VariableDeclaration",
"scope": 12000,
"src": "808:19:47",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11995,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "808:7:47",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11998,
"indexed": true,
"name": "dst",
"nodeType": "VariableDeclaration",
"scope": 12000,
"src": "829:19:47",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11997,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "829:7:47",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "783:66:47"
},
"src": "764:86:47"
},
{
"body": {
"id": 12116,
"nodeType": "Block",
"src": "1329:3212:47",
"statements": [
{
"assignments": [
12015
],
"declarations": [
{
"constant": false,
"id": 12015,
"name": "location",
"nodeType": "VariableDeclaration",
"scope": 12117,
"src": "1339:16:47",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12014,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1339:7:47",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12017,
"initialValue": {
"argumentTypes": null,
"id": 12016,
"name": "SCRIPT_START_LOCATION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11973,
"src": "1358:21:47",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1339:40:47"
},
{
"body": {
"id": 12114,
"nodeType": "Block",
"src": "1452:2931:47",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 12028,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 12026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12023,
"name": "_script",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12002,
"src": "1547:7:47",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 12024,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1547:14:47",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 12025,
"name": "location",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12015,
"src": "1564:8:47",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1547:25:47",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783138",
"id": 12027,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1576:4:47",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_24_by_1",
"typeString": "int_const 24"
},
"value": "0x18"
},
"src": "1547:33:47",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 12029,
"name": "ERROR_INVALID_LENGTH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11992,
"src": "1582:20:47",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory",
"typeString": "string memory"
}
],
"id": 12022,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
15156,
15157
],
"referencedDeclaration": 15157,
"src": "1539:7:47",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 12030,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1539:64:47",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12031,
"nodeType": "ExpressionStatement",
"src": "1539:64:47"
},
{
"assignments": [
12033
],
"declarations": [
{
"constant": false,
"id": 12033,
"name": "contractAddress",
"nodeType": "VariableDeclaration",
"scope": 12117,
"src": "1618:23:47",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12032,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1618:7:47",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12038,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12036,
"name": "location",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12015,
"src": "1662:8:47",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12034,
"name": "_script",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12002,
"src": "1644:7:47",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 12035,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addressAt",
"nodeType": "MemberAccess",
"referencedDeclaration": 11914,
"src": "1644:17:47",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (address)"
}
},
"id": 12037,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1644:27:47",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1618:53:47"
},
{
"body": {
"id": 12059,
"nodeType": "Block",
"src": "1792:98:47",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 12055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12051,
"name": "contractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12033,
"src": "1818:15:47",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 12052,
"name": "_blacklist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 120