@aragon/apps-payroll
Version:
_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)
1,078 lines (1,077 loc) • 159 kB
JSON
{
"contractName": "TimeHelpersMock",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "mockSetTimestamp",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_seconds",
"type": "uint256"
}
],
"name": "mockIncreaseTime",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_seconds",
"type": "uint256"
}
],
"name": "mockDecreaseTime",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_number",
"type": "uint256"
}
],
"name": "mockAdvanceBlocks",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getTimestampPublic",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getBlockNumberPublic",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506104b4806100206000396000f3006080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166360be675f811461007c5780636958839e146100965780636da1dfac146100ae5780637750db14146100d55780637e365950146100ed5780638f49e12f1461011f575b600080fd5b34801561008857600080fd5b50610094600435610137565b005b3480156100a257600080fd5b50610094600435610171565b3480156100ba57600080fd5b506100c3610176565b60408051918252519081900360200190f35b3480156100e157600080fd5b50610094600435610186565b3480156100f957600080fd5b506101026101bf565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561012b57600080fd5b506100946004356101c9565b6000541561015a57600054610152908263ffffffff6101f416565b60005561016e565b61016a428263ffffffff6101f416565b6000555b50565b600055565b60006101806102db565b90505b90565b600154156101a9576001546101a1908263ffffffff6102f716565b60015561016e565b6101b9438263ffffffff6102f716565b60015550565b60006101806103a4565b600054156101e457600054610152908263ffffffff6102f716565b61016a428263ffffffff6102f716565b60408051808201909152601281527f4d4154485f5355425f554e444552464c4f57000000000000000000000000000060208201526000908190848411156102d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610298578181015183820152602001610280565b50505050905090810190601f1680156102c55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600154600090156102ef5750600154610183565b6101806103b6565b60408051808201909152601181527f4d4154485f4144445f4f564552464c4f570000000000000000000000000000006020820152600090838301908482101561039c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015610298578181015183820152602001610280565b509392505050565b60006101806103b16103ba565b6103d4565b4390565b60008054156103cc5750600054610183565b610180610484565b60408051808201909152601581527f55494e5436345f4e554d4245525f544f4f5f4249470000000000000000000000602082015260009067ffffffffffffffff83111561047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015610298578181015183820152602001610280565b5090919050565b42905600a165627a7a7230582069b461e854a44a20bb1ae3b272d2911f6c8012b15d12ed76d54624488f7811dc0029",
"deployedBytecode": "0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166360be675f811461007c5780636958839e146100965780636da1dfac146100ae5780637750db14146100d55780637e365950146100ed5780638f49e12f1461011f575b600080fd5b34801561008857600080fd5b50610094600435610137565b005b3480156100a257600080fd5b50610094600435610171565b3480156100ba57600080fd5b506100c3610176565b60408051918252519081900360200190f35b3480156100e157600080fd5b50610094600435610186565b3480156100f957600080fd5b506101026101bf565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561012b57600080fd5b506100946004356101c9565b6000541561015a57600054610152908263ffffffff6101f416565b60005561016e565b61016a428263ffffffff6101f416565b6000555b50565b600055565b60006101806102db565b90505b90565b600154156101a9576001546101a1908263ffffffff6102f716565b60015561016e565b6101b9438263ffffffff6102f716565b60015550565b60006101806103a4565b600054156101e457600054610152908263ffffffff6102f716565b61016a428263ffffffff6102f716565b60408051808201909152601281527f4d4154485f5355425f554e444552464c4f57000000000000000000000000000060208201526000908190848411156102d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610298578181015183820152602001610280565b50505050905090810190601f1680156102c55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600154600090156102ef5750600154610183565b6101806103b6565b60408051808201909152601181527f4d4154485f4144445f4f564552464c4f570000000000000000000000000000006020820152600090838301908482101561039c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015610298578181015183820152602001610280565b509392505050565b60006101806103b16103ba565b6103d4565b4390565b60008054156103cc5750600054610183565b610180610484565b60408051808201909152601581527f55494e5436345f4e554d4245525f544f4f5f4249470000000000000000000000602082015260009067ffffffffffffffff83111561047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015610298578181015183820152602001610280565b5090919050565b42905600a165627a7a7230582069b461e854a44a20bb1ae3b272d2911f6c8012b15d12ed76d54624488f7811dc0029",
"sourceMap": "190:2150:66:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;190:2150:66;;;;;;;",
"deployedSourceMap": "190:2150:66:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;954:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;954:203:66;;;;;;;451:98;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;451:98:66;;;;;1702:102;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1702:102:66;;;;;;;;;;;;;;;;;;;;1260:206;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1260:206:66;;;;;1533:99;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1533:99:66;;;;;;;;;;;;;;;;;;;;;;;650:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;650:203:66;;;;;954;1019:15;;:20;1015:135;;1059:15;;:29;;1079:8;1059:29;:19;:29;:::i;:::-;1041:15;:47;1015:135;;;1121:29;:15;1141:8;1121:29;:19;:29;:::i;:::-;1103:15;:47;1015:135;954:203;:::o;451:98::-;514:15;:28;451:98::o;1702:102::-;1755:7;1781:16;:14;:16::i;:::-;1774:23;;1702:102;;:::o;1260:206::-;1325:17;;:22;1321:138;;1369:17;;:30;;1391:7;1369:30;:21;:30;:::i;:::-;1349:17;:50;1321:138;;;1434:25;:12;1451:7;1434:25;:16;:25;:::i;:::-;1414:17;:45;1260:206;:::o;1533:99::-;1584:6;1609:16;:14;:16::i;650:203::-;715:15;;:20;711:135;;755:15;;:29;;775:8;755:29;:19;:29;:::i;711:135::-;817:29;:15;837:8;817:29;:19;:29;:::i;1685:172:59:-;1782:19;;;;;;;;;;;;;;;;;1745:7;;;;1772:8;;;;1764:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1764:38:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1824:7:59;;;1685:172::o;2172:166:66:-;2244:17;;2221:7;;2244:22;2240:52;;-1:-1:-1;2275:17:66;;2268:24;;2240:52;2309:22;:20;:22::i;1928:170:59:-;2053:18;;;;;;;;;;;;;;;;;1988:7;;2019;;;;2044;;;;2036:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;2036:36:59;-1:-1:-1;2090:1:59;1928:170;-1:-1:-1;;;1928:170:59:o;1261:106:37:-;1310:6;1335:25;:14;:12;:14::i;:::-;:23;:25::i;347:94::-;422:12;347:94;:::o;1909:158:66:-;1956:7;1979:15;;:20;1975:48;;-1:-1:-1;2008:15:66;;2001:22;;1975:48;2040:20;:18;:20::i;188:149:38:-;283:20;;;;;;;;;;;;;;;;;240:6;;271:10;266:15;;;258:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;258:46:38;-1:-1:-1;328:1:38;;188:149;-1:-1:-1;188:149:38:o;926:144:37:-;999:15;926:144;:::o",
"source": "pragma solidity ^0.4.24;\n\nimport \"@aragon/os/contracts/common/TimeHelpers.sol\";\nimport \"@aragon/os/contracts/lib/math/SafeMath.sol\";\nimport \"@aragon/os/contracts/lib/math/SafeMath64.sol\";\n\n\ncontract TimeHelpersMock is TimeHelpers {\n using SafeMath for uint256;\n using SafeMath64 for uint64;\n\n uint256 mockedTimestamp;\n uint256 mockedBlockNumber;\n\n /**\n * @dev Sets a mocked timestamp value, used only for testing purposes\n */\n function mockSetTimestamp(uint256 _timestamp) public {\n mockedTimestamp = _timestamp;\n }\n\n /**\n * @dev Increases the mocked timestamp value, used only for testing purposes\n */\n function mockIncreaseTime(uint256 _seconds) public {\n if (mockedTimestamp != 0) mockedTimestamp = mockedTimestamp.add(_seconds);\n else mockedTimestamp = block.timestamp.add(_seconds);\n }\n\n /**\n * @dev Decreases the mocked timestamp value, used only for testing purposes\n */\n function mockDecreaseTime(uint256 _seconds) public {\n if (mockedTimestamp != 0) mockedTimestamp = mockedTimestamp.sub(_seconds);\n else mockedTimestamp = block.timestamp.sub(_seconds);\n }\n\n /**\n * @dev Advances the mocked block number value, used only for testing purposes\n */\n function mockAdvanceBlocks(uint256 _number) public {\n if (mockedBlockNumber != 0) mockedBlockNumber = mockedBlockNumber.add(_number);\n else mockedBlockNumber = block.number.add(_number);\n }\n\n /**\n * @dev Returns the mocked timestamp value\n */\n function getTimestampPublic() public view returns (uint64) {\n return getTimestamp64();\n }\n\n /**\n * @dev Returns the mocked block number value\n */\n function getBlockNumberPublic() public view returns (uint256) {\n return getBlockNumber();\n }\n\n /**\n * @dev Returns the mocked timestamp if it was set, or current `block.timestamp`\n */\n function getTimestamp() internal view returns (uint256) {\n if (mockedTimestamp != 0) return mockedTimestamp;\n return super.getTimestamp();\n }\n\n /**\n * @dev Returns the mocked block number if it was set, or current `block.number`\n */\n function getBlockNumber() internal view returns (uint256) {\n if (mockedBlockNumber != 0) return mockedBlockNumber;\n return super.getBlockNumber();\n }\n}\n",
"sourcePath": "@aragon/test-helpers/contracts/TimeHelpersMock.sol",
"ast": {
"absolutePath": "@aragon/test-helpers/contracts/TimeHelpersMock.sol",
"exportedSymbols": {
"TimeHelpersMock": [
15138
]
},
"id": 15139,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 14987,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:66"
},
{
"absolutePath": "@aragon/os/contracts/common/TimeHelpers.sol",
"file": "@aragon/os/contracts/common/TimeHelpers.sol",
"id": 14988,
"nodeType": "ImportDirective",
"scope": 15139,
"sourceUnit": 11201,
"src": "26:53:66",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/lib/math/SafeMath.sol",
"file": "@aragon/os/contracts/lib/math/SafeMath.sol",
"id": 14989,
"nodeType": "ImportDirective",
"scope": 15139,
"sourceUnit": 14065,
"src": "80:52:66",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@aragon/os/contracts/lib/math/SafeMath64.sol",
"file": "@aragon/os/contracts/lib/math/SafeMath64.sol",
"id": 14990,
"nodeType": "ImportDirective",
"scope": 15139,
"sourceUnit": 14207,
"src": "133:54:66",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 14991,
"name": "TimeHelpers",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11200,
"src": "218:11:66",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TimeHelpers_$11200",
"typeString": "contract TimeHelpers"
}
},
"id": 14992,
"nodeType": "InheritanceSpecifier",
"src": "218:11:66"
}
],
"contractDependencies": [
11200
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 15138,
"linearizedBaseContracts": [
15138,
11200
],
"name": "TimeHelpersMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 14995,
"libraryName": {
"contractScope": null,
"id": 14993,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 14064,
"src": "242:8:66",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$14064",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "236:27:66",
"typeName": {
"id": 14994,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "255:7:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"id": 14998,
"libraryName": {
"contractScope": null,
"id": 14996,
"name": "SafeMath64",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 14206,
"src": "274:10:66",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath64_$14206",
"typeString": "library SafeMath64"
}
},
"nodeType": "UsingForDirective",
"src": "268:28:66",
"typeName": {
"id": 14997,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "289:6:66",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
}
},
{
"constant": false,
"id": 15000,
"name": "mockedTimestamp",
"nodeType": "VariableDeclaration",
"scope": 15138,
"src": "302:23:66",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 14999,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "302:7:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15002,
"name": "mockedBlockNumber",
"nodeType": "VariableDeclaration",
"scope": 15138,
"src": "331:25:66",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15001,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "331:7:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 15011,
"nodeType": "Block",
"src": "504:45:66",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 15009,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 15007,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "514:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 15008,
"name": "_timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15004,
"src": "532:10:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "514:28:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15010,
"nodeType": "ExpressionStatement",
"src": "514:28:66"
}
]
},
"documentation": "@dev Sets a mocked timestamp value, used only for testing purposes",
"id": 15012,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "mockSetTimestamp",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 15005,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15004,
"name": "_timestamp",
"nodeType": "VariableDeclaration",
"scope": 15012,
"src": "477:18:66",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15003,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "477:7:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "476:20:66"
},
"payable": false,
"returnParameters": {
"id": 15006,
"nodeType": "ParameterList",
"parameters": [],
"src": "504:0:66"
},
"scope": 15138,
"src": "451:98:66",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 15036,
"nodeType": "Block",
"src": "701:152:66",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 15019,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 15017,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "715:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 15018,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "734:1:66",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "715:20:66",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"expression": {
"argumentTypes": null,
"id": 15033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 15027,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "799:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 15031,
"name": "_seconds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15014,
"src": "837:8:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 15028,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15143,
"src": "817:5:66",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 15029,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "817:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15030,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 14042,
"src": "817:19:66",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 15032,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "817:29:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "799:47:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15034,
"nodeType": "ExpressionStatement",
"src": "799:47:66"
},
"id": 15035,
"nodeType": "IfStatement",
"src": "711:135:66",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 15025,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 15020,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "737:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 15023,
"name": "_seconds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15014,
"src": "775:8:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 15021,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "755:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15022,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 14042,
"src": "755:19:66",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 15024,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "755:29:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "737:47:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15026,
"nodeType": "ExpressionStatement",
"src": "737:47:66"
}
}
]
},
"documentation": "@dev Increases the mocked timestamp value, used only for testing purposes",
"id": 15037,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "mockIncreaseTime",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 15015,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15014,
"name": "_seconds",
"nodeType": "VariableDeclaration",
"scope": 15037,
"src": "676:16:66",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15013,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "676:7:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "675:18:66"
},
"payable": false,
"returnParameters": {
"id": 15016,
"nodeType": "ParameterList",
"parameters": [],
"src": "701:0:66"
},
"scope": 15138,
"src": "650:203:66",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 15061,
"nodeType": "Block",
"src": "1005:152:66",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 15044,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 15042,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "1019:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 15043,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1038:1:66",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1019:20:66",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"expression": {
"argumentTypes": null,
"id": 15058,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 15052,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "1103:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 15056,
"name": "_seconds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15039,
"src": "1141:8:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 15053,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15143,
"src": "1121:5:66",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 15054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1121:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 14017,
"src": "1121:19:66",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 15057,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1121:29:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1103:47:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15059,
"nodeType": "ExpressionStatement",
"src": "1103:47:66"
},
"id": 15060,
"nodeType": "IfStatement",
"src": "1015:135:66",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 15050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 15045,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "1041:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 15048,
"name": "_seconds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15039,
"src": "1079:8:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 15046,
"name": "mockedTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15000,
"src": "1059:15:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 14017,
"src": "1059:19:66",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 15049,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1059:29:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1041:47:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 15051,
"nodeType": "ExpressionStatement",
"src": "1041:47:66"
}
}
]
},
"documentation": "@dev Decreases the mocked timestamp value, used only for testing purposes",
"id": 15062,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "mockDecreaseTime",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 15040,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15039,
"name": "_seconds",
"nodeType": "VariableDeclaration",
"scope": 15062,
"src": "980:16:66",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15038,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "980:7:66",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "979:18:66"
},
"payable": false,
"returnParameters": {
"id": 15041,
"nodeType": "ParameterList",
"parameters": [],
"src": "1005:0:66"
},
"scope": 15138,
"src": "954:203:66",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 15086,
"nodeType": "Block",
"src": "1311:155:66",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 15069,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 15067,
"name": "mockedBlockNumber",