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

930 lines 33 kB
{ "contractName": "Traceable", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "creationTimestamp", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "creationBlock", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50426000819055504360018190555060dd8061002d6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631763451414604e578063b3311086146076575b600080fd5b348015605957600080fd5b506060609e565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50608860a8565b6040518082815260200191505060405180910390f35b6000600154905090565b600080549050905600a165627a7a72305820c2316ea600292aa1cac17354e5e0bb7acca804c47145e3c73a0f51998f18e2010029", "deployedBytecode": "0x6080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631763451414604e578063b3311086146076575b600080fd5b348015605957600080fd5b506060609e565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50608860a8565b6040518082815260200191505060405180910390f35b6000600154905090565b600080549050905600a165627a7a72305820c2316ea600292aa1cac17354e5e0bb7acca804c47145e3c73a0f51998f18e2010029", "sourceMap": "182:462:1:-;;;314:115;8:9:-1;5:2;;;30:1;27;20:12;5:2;314:115:1;366:15;345:18;:36;;;;408:12;391:14;:29;;;;182:462;;;;;;", "deployedSourceMap": "182:462:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;543:94;;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;;;;;;;;;;;;;;;;;;;;;;;543:94;589:7;615:14;;608:21;;543:94;:::o;435:102::-;485:7;512:18;;505:25;;435:102;:::o", "source": "pragma solidity 0.4.24;\n\n/**\n * 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.\n */\n\ncontract Traceable {\n\n uint256 private _creationTimestamp;\n uint256 private _creationBlock;\n uint256 private _offset;\n\n constructor() 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" }