UNPKG

solidity-cron

Version:

[![Build Status](https://travis-ci.com/Frontier-project/cron.svg?token=DJeMzxJJncp3nRaEUuxH&branch=master)](https://travis-ci.com/Frontier-project/cron) [![codecov](https://codecov.io/gh/Frontier-project/cron/branch/master/graph/badge.svg?token=BGbU5Q6IRV

1,189 lines 44.3 kB
{ "contractName": "Yearly", "abi": [ { "constant": true, "inputs": [], "name": "creationBlock", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "creationTimestamp", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getLength", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_timestamp", "type": "uint256" } ], "name": "heightOf", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "height", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x60806040524260008190555043600181905550610275806100216000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ef2674314610072578063176345141461009d578063b3311086146100c8578063be1c766b146100f3578063c23c39d31461011e575b600080fd5b34801561007e57600080fd5b5061008761015f565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b261016f565b6040518082815260200191505060405180910390f35b3480156100d457600080fd5b506100dd610179565b6040518082815260200191505060405180910390f35b3480156100ff57600080fd5b50610108610182565b6040518082815260200191505060405180910390f35b34801561012a57600080fd5b506101496004803603810190808035906020019092919050505061018b565b6040518082815260200191505060405180910390f35b600061016a4261018b565b905090565b6000600154905090565b60008054905090565b60006001905090565b600073__DateTime______________________________63ff2258cb836101b0610179565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561020757600080fd5b505af415801561021b573d6000803e3d6000fd5b505050506040513d602081101561023157600080fd5b810190808051906020019092919050505090509190505600a165627a7a72305820e4d94e3dbaaebe2ed2cda1ba4bbe980ec5738f2dc9a7e390151033f0df03a3290029", "deployedBytecode": "0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ef2674314610072578063176345141461009d578063b3311086146100c8578063be1c766b146100f3578063c23c39d31461011e575b600080fd5b34801561007e57600080fd5b5061008761015f565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b261016f565b6040518082815260200191505060405180910390f35b3480156100d457600080fd5b506100dd610179565b6040518082815260200191505060405180910390f35b3480156100ff57600080fd5b50610108610182565b6040518082815260200191505060405180910390f35b34801561012a57600080fd5b506101496004803603810190808035906020019092919050505061018b565b6040518082815260200191505060405180910390f35b600061016a4261018b565b905090565b6000600154905090565b60008054905090565b60006001905090565b600073__DateTime______________________________63ff2258cb836101b0610179565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561020757600080fd5b505af415801561021b573d6000803e3d6000fd5b505050506040513d602081101561023157600080fd5b810190808051906020019092919050505090509190505600a165627a7a72305820e4d94e3dbaaebe2ed2cda1ba4bbe980ec5738f2dc9a7e390151033f0df03a3290029", "sourceMap": "103:403:5:-;;;366:15:1;345:18;:36;;;;408:12;391:14;:29;;;;103:403:5;;;;;;", "deployedSourceMap": "103:403:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;407:97;;8:9:-1;5:2;;;30:1;27;20:12;5:2;407:97:5;;;;;;;;;;;;;;;;;;;;;;;543:94:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;543:94:1;;;;;;;;;;;;;;;;;;;;;;;435:102;;8:9:-1;5:2;;;30:1;27;20:12;5:2;435:102:1;;;;;;;;;;;;;;;;;;;;;;;178:75:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;178:75:5;;;;;;;;;;;;;;;;;;;;;;;259:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;259:142:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;407:97;446:7;472:25;481:15;472:8;:25::i;:::-;465:32;;407:97;:::o;543:94:1:-;589:7;615:14;;608:21;;543:94;:::o;435:102::-;485:7;512:18;;505:25;;435:102;:::o;178:75:5:-;219:7;245:1;238:8;;178:75;:::o;259:142::-;317:7;343:8;:18;362:10;374:19;:17;:19::i;:::-;343:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;343:51:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;343:51:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;343:51:5;;;;;;;;;;;;;;;;336:58;;259:142;;;:::o", "source": "pragma solidity 0.4.24;\n\nimport \"./DateTime.sol\";\nimport \"../IPeriod.sol\";\nimport \"../Traceable.sol\";\n\ncontract Yearly is IPeriod, Traceable {\n using DateTime for *;\n \n function getLength() public view returns(uint256) {\n return 1;\n }\n\n function heightOf(uint256 _timestamp) public view returns(uint256) {\n return DateTime.diffYears(_timestamp, creationTimestamp());\n }\n\n function height() public view returns (uint256) {\n return heightOf(block.timestamp);\n }\n}", "sourcePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/Yearly.sol", "ast": { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/Yearly.sol", "exportedSymbols": { "Yearly": [ 875 ] }, "id": 876, "nodeType": "SourceUnit", "nodes": [ { "id": 831, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:23:5" }, { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/DateTime.sol", "file": "./DateTime.sol", "id": 832, "nodeType": "ImportDirective", "scope": 876, "sourceUnit": 777, "src": "25:24:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/IPeriod.sol", "file": "../IPeriod.sol", "id": 833, "nodeType": "ImportDirective", "scope": 876, "sourceUnit": 20, "src": "50:24:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/Traceable.sol", "file": "../Traceable.sol", "id": 834, "nodeType": "ImportDirective", "scope": 876, "sourceUnit": 59, "src": "75:26:5", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 835, "name": "IPeriod", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 19, "src": "122:7:5", "typeDescriptions": { "typeIdentifier": "t_contract$_IPeriod_$19", "typeString": "contract IPeriod" } }, "id": 836, "nodeType": "InheritanceSpecifier", "src": "122:7:5" }, { "arguments": null, "baseName": { "contractScope": null, "id": 837, "name": "Traceable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 58, "src": "131:9:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Traceable_$58", "typeString": "contract Traceable" } }, "id": 838, "nodeType": "InheritanceSpecifier", "src": "131:9:5" } ], "contractDependencies": [ 19, 58 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 875, "linearizedBaseContracts": [ 875, 58, 19 ], "name": "Yearly", "nodeType": "ContractDefinition", "nodes": [ { "id": 840, "libraryName": { "contractScope": null, "id": 839, "name": "DateTime", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 776, "src": "153:8:5", "typeDescriptions": { "typeIdentifier": "t_contract$_DateTime_$776", "typeString": "library DateTime" } }, "nodeType": "UsingForDirective", "src": "147:21:5", "typeName": null }, { "body": { "id": 847, "nodeType": "Block", "src": "228:25:5", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "31", "id": 845, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "245:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "functionReturnParameters": 844, "id": 846, "nodeType": "Return", "src": "238:8:5" } ] }, "documentation": null, "id": 848, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "getLength", "nodeType": "FunctionDefinition", "parameters": { "id": 841, "nodeType": "ParameterList", "parameters": [], "src": "196:2:5" }, "payable": false, "returnParameters": { "id": 844, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 843, "name": "", "nodeType": "VariableDeclaration", "scope": 848, "src": "219:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 842, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "219:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "218:9:5" }, "scope": 875, "src": "178:75:5", "stateMutability": "view", "superFunction": 6, "visibility": "public" }, { "body": { "id": 862, "nodeType": "Block", "src": "326:75:5", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 857, "name": "_timestamp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 850, "src": "362:10:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 858, "name": "creationTimestamp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 49, "src": "374:17:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 859, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "374:19:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 855, "name": "DateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 776, "src": "343:8:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DateTime_$776_$", "typeString": "type(library DateTime)" } }, "id": 856, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diffYears", "nodeType": "MemberAccess", "referencedDeclaration": 416, "src": "343:18:5", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 860, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "343:51:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 854, "id": 861, "nodeType": "Return", "src": "336:58:5" } ] }, "documentation": null, "id": 863, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "heightOf", "nodeType": "FunctionDefinition", "parameters": { "id": 851, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 850, "name": "_timestamp", "nodeType": "VariableDeclaration", "scope": 863, "src": "277:18:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 849, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "277:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "276:20:5" }, "payable": false, "returnParameters": { "id": 854, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 853, "name": "", "nodeType": "VariableDeclaration", "scope": 863, "src": "317:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 852, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "317:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "316:9:5" }, "scope": 875, "src": "259:142:5", "stateMutability": "view", "superFunction": 13, "visibility": "public" }, { "body": { "id": 873, "nodeType": "Block", "src": "455:49:5", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 869, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1803, "src": "481:5:5", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 870, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "481:15:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 868, "name": "heightOf", "nodeType": "Identifier", "overloadedDeclarations": [ 863 ], "referencedDeclaration": 863, "src": "472:8:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 871, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "472:25:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 867, "id": 872, "nodeType": "Return", "src": "465:32:5" } ] }, "documentation": null, "id": 874, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "height", "nodeType": "FunctionDefinition", "parameters": { "id": 864, "nodeType": "ParameterList", "parameters": [], "src": "422:2:5" }, "payable": false, "returnParameters": { "id": 867, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 866, "name": "", "nodeType": "VariableDeclaration", "scope": 874, "src": "446:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 865, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "446:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "445:9:5" }, "scope": 875, "src": "407:97:5", "stateMutability": "view", "superFunction": 18, "visibility": "public" } ], "scope": 876, "src": "103:403:5" } ], "src": "0:506:5" }, "legacyAST": { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/Yearly.sol", "exportedSymbols": { "Yearly": [ 875 ] }, "id": 876, "nodeType": "SourceUnit", "nodes": [ { "id": 831, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:23:5" }, { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/DateTime.sol", "file": "./DateTime.sol", "id": 832, "nodeType": "ImportDirective", "scope": 876, "sourceUnit": 777, "src": "25:24:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/IPeriod.sol", "file": "../IPeriod.sol", "id": 833, "nodeType": "ImportDirective", "scope": 876, "sourceUnit": 20, "src": "50:24:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/Traceable.sol", "file": "../Traceable.sol", "id": 834, "nodeType": "ImportDirective", "scope": 876, "sourceUnit": 59, "src": "75:26:5", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 835, "name": "IPeriod", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 19, "src": "122:7:5", "typeDescriptions": { "typeIdentifier": "t_contract$_IPeriod_$19", "typeString": "contract IPeriod" } }, "id": 836, "nodeType": "InheritanceSpecifier", "src": "122:7:5" }, { "arguments": null, "baseName": { "contractScope": null, "id": 837, "name": "Traceable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 58, "src": "131:9:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Traceable_$58", "typeString": "contract Traceable" } }, "id": 838, "nodeType": "InheritanceSpecifier", "src": "131:9:5" } ], "contractDependencies": [ 19, 58 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 875, "linearizedBaseContracts": [ 875, 58, 19 ], "name": "Yearly", "nodeType": "ContractDefinition", "nodes": [ { "id": 840, "libraryName": { "contractScope": null, "id": 839, "name": "DateTime", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 776, "src": "153:8:5", "typeDescriptions": { "typeIdentifier": "t_contract$_DateTime_$776", "typeString": "library DateTime" } }, "nodeType": "UsingForDirective", "src": "147:21:5", "typeName": null }, { "body": { "id": 847, "nodeType": "Block", "src": "228:25:5", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "31", "id": 845, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "245:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "functionReturnParameters": 844, "id": 846, "nodeType": "Return", "src": "238:8:5" } ] }, "documentation": null, "id": 848, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "getLength", "nodeType": "FunctionDefinition", "parameters": { "id": 841, "nodeType": "ParameterList", "parameters": [], "src": "196:2:5" }, "payable": false, "returnParameters": { "id": 844, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 843, "name": "", "nodeType": "VariableDeclaration", "scope": 848, "src": "219:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 842, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "219:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "218:9:5" }, "scope": 875, "src": "178:75:5", "stateMutability": "view", "superFunction": 6, "visibility": "public" }, { "body": { "id": 862, "nodeType": "Block", "src": "326:75:5", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 857, "name": "_timestamp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 850, "src": "362:10:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 858, "name": "creationTimestamp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 49, "src": "374:17:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 859, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "374:19:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 855, "name": "DateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 776, "src": "343:8:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DateTime_$776_$", "typeString": "type(library DateTime)" } }, "id": 856, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diffYears", "nodeType": "MemberAccess", "referencedDeclaration": 416, "src": "343:18:5", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 860, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "343:51:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 854, "id": 861, "nodeType": "Return", "src": "336:58:5" } ] }, "documentation": null, "id": 863, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "heightOf", "nodeType": "FunctionDefinition", "parameters": { "id": 851, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 850, "name": "_timestamp", "nodeType": "VariableDeclaration", "scope": 863, "src": "277:18:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 849, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "277:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "276:20:5" }, "payable": false, "returnParameters": { "id": 854, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 853, "name": "", "nodeType": "VariableDeclaration", "scope": 863, "src": "317:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 852, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "317:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "316:9:5" }, "scope": 875, "src": "259:142:5", "stateMutability": "view", "superFunction": 13, "visibility": "public" }, { "body": { "id": 873, "nodeType": "Block", "src": "455:49:5", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 869, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1803, "src": "481:5:5", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 870, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "481:15:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 868, "name": "heightOf", "nodeType": "Identifier", "overloadedDeclarations": [ 863 ], "referencedDeclaration": 863, "src": "472:8:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 871, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "472:25:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 867, "id": 872, "nodeType": "Return", "src": "465:32:5" } ] }, "documentation": null, "id": 874, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "height", "nodeType": "FunctionDefinition", "parameters": { "id": 864, "nodeType": "ParameterList", "parameters": [], "src": "422:2:5" }, "payable": false, "returnParameters": { "id": 867, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 866, "name": "", "nodeType": "VariableDeclaration", "scope": 874, "src": "446:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 865, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "446:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "445:9:5" }, "scope": 875, "src": "407:97:5", "stateMutability": "view", "superFunction": 18, "visibility": "public" } ], "scope": 876, "src": "103:403:5" } ], "src": "0:506:5" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.0", "updatedAt": "2018-11-28T10:24:51.853Z" }