solidity-cron
Version:
[](https://travis-ci.com/Frontier-project/cron) [ public {\n _creationTimestamp = block.timestamp;\n _creationBlock = block.number; \n }\n\n function creationTimestamp() public view returns (uint256) { \n return _creationTimestamp;\n }\n\n function creationBlock() public view returns (uint256) {\n return _creationBlock;\n }\n \n}",
"sourcePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/Traceable.sol",
"ast": {
"absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/Traceable.sol",
"exportedSymbols": {
"Traceable": [
58
]
},
"id": 59,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 21,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:1"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "Every Standard period is able to return a height based on the creation block of the smart contract, given a time unit used to make calculations.",
"fullyImplemented": true,
"id": 58,
"linearizedBaseContracts": [
58
],
"name": "Traceable",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 23,
"name": "_creationTimestamp",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "208:34:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "208:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 25,
"name": "_creationBlock",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "248:30:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "248:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 27,
"name": "_offset",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "284:23:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 26,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "284:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 40,
"nodeType": "Block",
"src": "335:94:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 30,
"name": "_creationTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23,
"src": "345:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 31,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "366:5:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "366:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "345:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 34,
"nodeType": "ExpressionStatement",
"src": "345:36:1"
},
{
"expression": {
"argumentTypes": null,
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 35,
"name": "_creationBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "391:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 36,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "408:5:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "number",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "408:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "391:29:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 39,
"nodeType": "ExpressionStatement",
"src": "391:29:1"
}
]
},
"documentation": null,
"id": 41,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 28,
"nodeType": "ParameterList",
"parameters": [],
"src": "325:2:1"
},
"payable": false,
"returnParameters": {
"id": 29,
"nodeType": "ParameterList",
"parameters": [],
"src": "335:0:1"
},
"scope": 58,
"src": "314:115:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 48,
"nodeType": "Block",
"src": "494:43:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 46,
"name": "_creationTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23,
"src": "512:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 45,
"id": 47,
"nodeType": "Return",
"src": "505:25:1"
}
]
},
"documentation": null,
"id": 49,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "creationTimestamp",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 42,
"nodeType": "ParameterList",
"parameters": [],
"src": "461:2:1"
},
"payable": false,
"returnParameters": {
"id": 45,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 44,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 49,
"src": "485:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 43,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "484:9:1"
},
"scope": 58,
"src": "435:102:1",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 56,
"nodeType": "Block",
"src": "598:39:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 54,
"name": "_creationBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "615:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 53,
"id": 55,
"nodeType": "Return",
"src": "608:21:1"
}
]
},
"documentation": null,
"id": 57,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "creationBlock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 50,
"nodeType": "ParameterList",
"parameters": [],
"src": "565:2:1"
},
"payable": false,
"returnParameters": {
"id": 53,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 52,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "589:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 51,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "589:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "588:9:1"
},
"scope": 58,
"src": "543:94:1",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 59,
"src": "182:462:1"
}
],
"src": "0:644:1"
},
"legacyAST": {
"absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/Traceable.sol",
"exportedSymbols": {
"Traceable": [
58
]
},
"id": 59,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 21,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:1"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "Every Standard period is able to return a height based on the creation block of the smart contract, given a time unit used to make calculations.",
"fullyImplemented": true,
"id": 58,
"linearizedBaseContracts": [
58
],
"name": "Traceable",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 23,
"name": "_creationTimestamp",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "208:34:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "208:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 25,
"name": "_creationBlock",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "248:30:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "248:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 27,
"name": "_offset",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "284:23:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 26,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "284:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 40,
"nodeType": "Block",
"src": "335:94:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 30,
"name": "_creationTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23,
"src": "345:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 31,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "366:5:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "366:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "345:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 34,
"nodeType": "ExpressionStatement",
"src": "345:36:1"
},
{
"expression": {
"argumentTypes": null,
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 35,
"name": "_creationBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "391:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 36,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "408:5:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "number",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "408:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "391:29:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 39,
"nodeType": "ExpressionStatement",
"src": "391:29:1"
}
]
},
"documentation": null,
"id": 41,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 28,
"nodeType": "ParameterList",
"parameters": [],
"src": "325:2:1"
},
"payable": false,
"returnParameters": {
"id": 29,
"nodeType": "ParameterList",
"parameters": [],
"src": "335:0:1"
},
"scope": 58,
"src": "314:115:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 48,
"nodeType": "Block",
"src": "494:43:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 46,
"name": "_creationTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23,
"src": "512:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 45,
"id": 47,
"nodeType": "Return",
"src": "505:25:1"
}
]
},
"documentation": null,
"id": 49,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "creationTimestamp",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 42,
"nodeType": "ParameterList",
"parameters": [],
"src": "461:2:1"
},
"payable": false,
"returnParameters": {
"id": 45,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 44,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 49,
"src": "485:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 43,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "484:9:1"
},
"scope": 58,
"src": "435:102:1",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 56,
"nodeType": "Block",
"src": "598:39:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 54,
"name": "_creationBlock",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "615:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 53,
"id": 55,
"nodeType": "Return",
"src": "608:21:1"
}
]
},
"documentation": null,
"id": 57,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "creationBlock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 50,
"nodeType": "ParameterList",
"parameters": [],
"src": "565:2:1"
},
"payable": false,
"returnParameters": {
"id": 53,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 52,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "589:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 51,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "589:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "588:9:1"
},
"scope": 58,
"src": "543:94:1",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 59,
"src": "182:462:1"
}
],
"src": "0:644:1"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.0",
"updatedAt": "2018-11-28T10:24:51.853Z"
}