solidity-cron
Version:
[](https://travis-ci.com/Frontier-project/cron) [ • 786 kB
JSON
{
"contractName": "DateTime",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getYear",
"outputs": [
{
"name": "",
"type": "uint16"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getMonth",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getDay",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getHour",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getMinute",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getSecond",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_timestamp",
"type": "uint256"
}
],
"name": "getWeekday",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_month",
"type": "uint16"
},
{
"name": "_year",
"type": "uint16"
}
],
"name": "getDaysInMonth",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_x",
"type": "uint256"
},
{
"name": "_y",
"type": "uint256"
}
],
"name": "diffYears",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_x",
"type": "uint256"
},
{
"name": "_y",
"type": "uint256"
}
],
"name": "diffMonths",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_x",
"type": "uint256"
},
{
"name": "_y",
"type": "uint256"
}
],
"name": "diffDays",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "year",
"type": "uint16"
}
],
"name": "isLeapYear",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "originYear",
"outputs": [
{
"name": "",
"type": "uint16"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "dayInSeconds",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "yearInSeconds",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "leapYearInSeconds",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "minuteInSeconds",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "hourInSeconds",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_year",
"type": "uint256"
}
],
"name": "leapYearsBefore",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x610c9d610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f300730000000000000000000000000000000000000000301460806040526004361061011e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dde95231461012357806316e652ea1461016f57806336206a911461018d5780633e239e1a146101ab5780634059d596146101e55780634ac1ad7814610203578063558538571461023d57806365c72840146102635780637be341091461029d5780638aa001fc146102db57806392d6631314610315578063a324ad2414610351578063a6f0e5771461038b578063ae63586c146103c7578063b1999937146103e5578063c9d3462214610419578063d371132e14610457578063fa93f88314610475578063ff2258cb146104af575b600080fd5b610153600480360381019080803561ffff169060200190929190803561ffff1690602001909291905050506104ed565b604051808260ff1660ff16815260200191505060405180910390f35b6101776105c4565b6040518082815260200191505060405180910390f35b6101956105cd565b6040518082815260200191505060405180910390f35b6101c9600480360381019080803590602001909291905050506105d7565b604051808260ff1660ff16815260200191505060405180910390f35b6101ed610604565b6040518082815260200191505060405180910390f35b61022160048036038101908080359060200190929190505050610610565b604051808260ff1660ff16815260200191505060405180910390f35b61024561063b565b604051808261ffff1661ffff16815260200191505060405180910390f35b61028160048036038101908080359060200190929190505050610645565b604051808260ff1660ff16815260200191505060405180910390f35b6102c5600480360381019080803590602001909291908035906020019092919050505061065b565b6040518082815260200191505060405180910390f35b6102f96004803603810190808035906020019092919050505061076f565b604051808260ff1660ff16815260200191505060405180910390f35b61033360048036038101908080359060200190929190505050610785565b604051808261ffff1661ffff16815260200191505060405180910390f35b61036f6004803603810190808035906020019092919050505061084e565b604051808260ff1660ff16815260200191505060405180910390f35b6103ad600480360381019080803561ffff169060200190929190505050610864565b604051808215151515815260200191505060405180910390f35b6103cf6108e5565b6040518082815260200191505060405180910390f35b610403600480360381019080803590602001909291905050506108f0565b6040518082815260200191505060405180910390f35b6104416004803603810190808035906020019092919080359060200190929190505050610929565b6040518082815260200191505060405180910390f35b61045f610956565b6040518082815260200191505060405180910390f35b61049360048036038101908080359060200190929190505050610962565b604051808260ff1660ff16815260200191505060405180910390f35b6104d76004803603810190808035906020019092919080359060200190929190505050610983565b6040518082815260200191505060405180910390f35b600060018361ffff161480610506575060038361ffff16145b80610515575060058361ffff16145b80610524575060078361ffff16145b80610533575060088361ffff16145b806105425750600a8361ffff16145b806105515750600c8361ffff16145b1561055f57601f90506105be565b60048361ffff161480610576575060068361ffff16145b80610585575060098361ffff16145b806105945750600b8361ffff16145b156105a257601e90506105be565b6105ab82610864565b156105b957601d90506105be565b601c90505b92915050565b6000603c905090565b6000610e10905090565b60006018603c80848115156105e857fe5b048115156105f257fe5b048115156105fc57fe5b069050919050565b60006301e13380905090565b60006007600461061e6108e5565b8481151561062857fe5b040181151561063357fe5b069050919050565b60006107b2905090565b600061065082610a5a565b604001519050919050565b60008061066783610785565b61ffff1661067485610785565b61ffff1610151515610714576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f466972737420617267756d656e742070726f7669646564206d7573742062652081526020017f3e207365636f6e6420617267756d656e7400000000000000000000000000000081525060400191505060405180910390fd5b61071d8361084e565b60ff166107298561084e565b60ff161161073857600061073b565b60015b90506107468361084e565b61074f8561084e565b0360ff16600c8260ff166107638787610983565b03020191505092915050565b6000603c8281151561077d57fe5b069050919050565b60008060008060009250610797610604565b858115156107a157fe5b046107aa61063b565b61ffff160191506107c56107bc61063b565b61ffff166108f0565b6107d28361ffff166108f0565b039050806107de610956565b0283019250806107ec61063b565b830361ffff16036107fb610604565b02830192505b848311156108435761081560018303610864565b1561082b57610822610956565b83039250610838565b610833610604565b830392505b600182039150610801565b819350505050919050565b600061085982610a5a565b602001519050919050565b60008060048361ffff1681151561087757fe5b0661ffff1614151561088c57600090506108e0565b600060648361ffff1681151561089e57fe5b0661ffff161415156108b357600190506108e0565b60006101908361ffff168115156108c657fe5b0661ffff161415156108db57600090506108e0565b600190505b919050565b600062015180905090565b60006001820391506101908281151561090557fe5b0460648381151561091257fe5b0460048481151561091f57fe5b0403019050919050565b6000818311151561093957600080fd5b6109416108e5565b82840381151561094d57fe5b04905092915050565b60006301e28500905090565b6000603c808381151561097157fe5b0481151561097b57fe5b069050919050565b600061098e82610785565b61ffff1661099b84610785565b61ffff1610151515610a3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f466972737420617267756d656e742070726f7669646564206d7573742062652081526020017f3e207365636f6e6420617267756d656e7400000000000000000000000000000081525060400191505060405180910390fd5b610a4482610785565b610a4d84610785565b0361ffff16905092915050565b610a62610c1d565b60008060008060009350610a7586610785565b856000019061ffff16908161ffff1681525050610a9c610a9361063b565b61ffff166108f0565b610aad866000015161ffff166108f0565b03925082610ab9610956565b028401935082610ac761063b565b86600001510361ffff1603610ada610604565b0284019350600191505b600c8260ff16111515610b4357610b028260ff1686600001516104ed565b60ff16610b0d6108e5565b029050858482011115610b315781856020019060ff16908160ff1681525050610b43565b80840193508180600101925050610ae4565b600191505b610b5d856020015160ff1686600001516104ed565b60ff168260ff16111515610bac578584610b756108e5565b011115610b935781856040019060ff16908160ff1681525050610bac565b610b9b6108e5565b840193508180600101925050610b48565b610bb5866105d7565b856060019060ff16908160ff1681525050610bcf86610962565b856080019060ff16908160ff1681525050610be98661076f565b8560a0019060ff16908160ff1681525050610c0386610610565b8560c0019060ff16908160ff168152505050505050919050565b60e060405190810160405280600061ffff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff16815250905600a165627a7a72305820af3a68e41a112b32a5acd11ef026c999ada3aeb925bfb9ae5e0d411a9f39edec0029",
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061011e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dde95231461012357806316e652ea1461016f57806336206a911461018d5780633e239e1a146101ab5780634059d596146101e55780634ac1ad7814610203578063558538571461023d57806365c72840146102635780637be341091461029d5780638aa001fc146102db57806392d6631314610315578063a324ad2414610351578063a6f0e5771461038b578063ae63586c146103c7578063b1999937146103e5578063c9d3462214610419578063d371132e14610457578063fa93f88314610475578063ff2258cb146104af575b600080fd5b610153600480360381019080803561ffff169060200190929190803561ffff1690602001909291905050506104ed565b604051808260ff1660ff16815260200191505060405180910390f35b6101776105c4565b6040518082815260200191505060405180910390f35b6101956105cd565b6040518082815260200191505060405180910390f35b6101c9600480360381019080803590602001909291905050506105d7565b604051808260ff1660ff16815260200191505060405180910390f35b6101ed610604565b6040518082815260200191505060405180910390f35b61022160048036038101908080359060200190929190505050610610565b604051808260ff1660ff16815260200191505060405180910390f35b61024561063b565b604051808261ffff1661ffff16815260200191505060405180910390f35b61028160048036038101908080359060200190929190505050610645565b604051808260ff1660ff16815260200191505060405180910390f35b6102c5600480360381019080803590602001909291908035906020019092919050505061065b565b6040518082815260200191505060405180910390f35b6102f96004803603810190808035906020019092919050505061076f565b604051808260ff1660ff16815260200191505060405180910390f35b61033360048036038101908080359060200190929190505050610785565b604051808261ffff1661ffff16815260200191505060405180910390f35b61036f6004803603810190808035906020019092919050505061084e565b604051808260ff1660ff16815260200191505060405180910390f35b6103ad600480360381019080803561ffff169060200190929190505050610864565b604051808215151515815260200191505060405180910390f35b6103cf6108e5565b6040518082815260200191505060405180910390f35b610403600480360381019080803590602001909291905050506108f0565b6040518082815260200191505060405180910390f35b6104416004803603810190808035906020019092919080359060200190929190505050610929565b6040518082815260200191505060405180910390f35b61045f610956565b6040518082815260200191505060405180910390f35b61049360048036038101908080359060200190929190505050610962565b604051808260ff1660ff16815260200191505060405180910390f35b6104d76004803603810190808035906020019092919080359060200190929190505050610983565b6040518082815260200191505060405180910390f35b600060018361ffff161480610506575060038361ffff16145b80610515575060058361ffff16145b80610524575060078361ffff16145b80610533575060088361ffff16145b806105425750600a8361ffff16145b806105515750600c8361ffff16145b1561055f57601f90506105be565b60048361ffff161480610576575060068361ffff16145b80610585575060098361ffff16145b806105945750600b8361ffff16145b156105a257601e90506105be565b6105ab82610864565b156105b957601d90506105be565b601c90505b92915050565b6000603c905090565b6000610e10905090565b60006018603c80848115156105e857fe5b048115156105f257fe5b048115156105fc57fe5b069050919050565b60006301e13380905090565b60006007600461061e6108e5565b8481151561062857fe5b040181151561063357fe5b069050919050565b60006107b2905090565b600061065082610a5a565b604001519050919050565b60008061066783610785565b61ffff1661067485610785565b61ffff1610151515610714576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f466972737420617267756d656e742070726f7669646564206d7573742062652081526020017f3e207365636f6e6420617267756d656e7400000000000000000000000000000081525060400191505060405180910390fd5b61071d8361084e565b60ff166107298561084e565b60ff161161073857600061073b565b60015b90506107468361084e565b61074f8561084e565b0360ff16600c8260ff166107638787610983565b03020191505092915050565b6000603c8281151561077d57fe5b069050919050565b60008060008060009250610797610604565b858115156107a157fe5b046107aa61063b565b61ffff160191506107c56107bc61063b565b61ffff166108f0565b6107d28361ffff166108f0565b039050806107de610956565b0283019250806107ec61063b565b830361ffff16036107fb610604565b02830192505b848311156108435761081560018303610864565b1561082b57610822610956565b83039250610838565b610833610604565b830392505b600182039150610801565b819350505050919050565b600061085982610a5a565b602001519050919050565b60008060048361ffff1681151561087757fe5b0661ffff1614151561088c57600090506108e0565b600060648361ffff1681151561089e57fe5b0661ffff161415156108b357600190506108e0565b60006101908361ffff168115156108c657fe5b0661ffff161415156108db57600090506108e0565b600190505b919050565b600062015180905090565b60006001820391506101908281151561090557fe5b0460648381151561091257fe5b0460048481151561091f57fe5b0403019050919050565b6000818311151561093957600080fd5b6109416108e5565b82840381151561094d57fe5b04905092915050565b60006301e28500905090565b6000603c808381151561097157fe5b0481151561097b57fe5b069050919050565b600061098e82610785565b61ffff1661099b84610785565b61ffff1610151515610a3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f466972737420617267756d656e742070726f7669646564206d7573742062652081526020017f3e207365636f6e6420617267756d656e7400000000000000000000000000000081525060400191505060405180910390fd5b610a4482610785565b610a4d84610785565b0361ffff16905092915050565b610a62610c1d565b60008060008060009350610a7586610785565b856000019061ffff16908161ffff1681525050610a9c610a9361063b565b61ffff166108f0565b610aad866000015161ffff166108f0565b03925082610ab9610956565b028401935082610ac761063b565b86600001510361ffff1603610ada610604565b0284019350600191505b600c8260ff16111515610b4357610b028260ff1686600001516104ed565b60ff16610b0d6108e5565b029050858482011115610b315781856020019060ff16908160ff1681525050610b43565b80840193508180600101925050610ae4565b600191505b610b5d856020015160ff1686600001516104ed565b60ff168260ff16111515610bac578584610b756108e5565b011115610b935781856040019060ff16908160ff1681525050610bac565b610b9b6108e5565b840193508180600101925050610b48565b610bb5866105d7565b856060019060ff16908160ff1681525050610bcf86610962565b856080019060ff16908160ff1681525050610be98661076f565b8560a0019060ff16908160ff1681525050610c0386610610565b8560c0019060ff16908160ff168152505050505050919050565b60e060405190810160405280600061ffff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff16815250905600a165627a7a72305820af3a68e41a112b32a5acd11ef026c999ada3aeb925bfb9ae5e0d411a9f39edec0029",
"sourceMap": "272:5206:3:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
"deployedSourceMap": "272:5206:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2039:486;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3929:82;;;;;;;;;;;;;;;;;;;;;;;4021:83;;;;;;;;;;;;;;;;;;;;;;;1523:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3730:87;;;;;;;;;;;;;;;;;;;;;;;1897:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3549:78;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2766:328;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1778:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;477:788;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1271:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3253:286;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3637:83;;;;;;;;;;;;;;;;;;;;;;;4110:151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3100:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3827:92;;;;;;;;;;;;;;;;;;;;;;;1652:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2531:229;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2039:486;2113:5;2144:1;2134:6;:11;;;:26;;;;2159:1;2149:6;:11;;;2134:26;:41;;;;2174:1;2164:6;:11;;;2134:41;:56;;;;2189:1;2179:6;:11;;;2134:56;:71;;;;2204:1;2194:6;:11;;;2134:71;:87;;;;2219:2;2209:6;:12;;;2134:87;:103;;;;2235:2;2225:6;:12;;;2134:103;2130:389;;;2264:2;2257:9;;;;2130:389;2305:1;2295:6;:11;;;:26;;;;2320:1;2310:6;:11;;;2295:26;:41;;;;2335:1;2325:6;:11;;;2295:41;:57;;;;2350:2;2340:6;:12;;;2295:57;2291:228;;;2379:2;2372:9;;;;2291:228;2410:17;2421:5;2410:10;:17::i;:::-;2406:113;;;2454:2;2447:9;;;;2406:113;2506:2;2499:9;;2039:486;;;;;:::o;3929:82::-;3976:7;4002:2;3995:9;;3929:82;:::o;4021:83::-;4066:7;4093:4;4086:11;;4021:83;:::o;1523:123::-;1581:5;1636:2;1630;1625;1612:10;:15;;;;;;;;:20;;;;;;;;1611:27;;;;;;;;1598:41;;1523:123;;;:::o;3730:87::-;3776:7;3802:8;3795:15;;3730:87;:::o;1897:136::-;1958:5;2024:1;2019;2002:14;:12;:14::i;:::-;1989:10;:27;;;;;;;;:31;1988:37;;;;;;;;1975:51;;1897:136;;;:::o;3549:78::-;3591:6;3616:4;3609:11;;3549:78;:::o;1399:118::-;1456:5;1480:26;1495:10;1480:14;:26::i;:::-;:30;;;1473:37;;1399:118;;;:::o;2766:328::-;2831:7;2948:11;2873;2881:2;2873:7;:11::i;:::-;2858:26;;:11;2866:2;2858:7;:11::i;:::-;:26;;;;2850:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2977:12;2986:2;2977:8;:12::i;:::-;2962:27;;:12;2971:2;2962:8;:12::i;:::-;:27;;;:35;;2996:1;2962:35;;;2992:1;2962:35;2948:49;;3073:12;3082:2;3073:8;:12::i;:::-;3058;3067:2;3058:8;:12::i;:::-;:27;3050:36;;3044:2;3035:5;3015:25;;:17;3025:2;3029;3015:9;:17::i;:::-;:25;3014:32;:72;3007:79;;2766:328;;;;;:::o;1778:113::-;1838:5;1881:2;1868:10;:15;;;;;;;;1855:29;;1778:113;;;:::o;477:788::-;532:6;550:27;591:11;612:20;580:1;550:31;;684:15;:13;:15::i;:::-;671:10;:28;;;;;;;;656:12;:10;:12::i;:::-;:43;;;642:58;;749:29;765:12;:10;:12::i;:::-;749:29;;:15;:29::i;:::-;725:21;741:4;725:21;;:15;:21::i;:::-;:53;710:68;;834:12;812:19;:17;:19::i;:::-;:34;789:57;;;;920:12;905;:10;:12::i;:::-;898:4;:19;:34;;;879:15;:13;:15::i;:::-;:54;856:77;;;;944:294;973:10;951:19;:32;944:294;;;1003:28;1028:1;1021:4;:8;1003:10;:28::i;:::-;999:206;;;1078:19;:17;:19::i;:::-;1055:42;;;;999:206;;;1175:15;:13;:15::i;:::-;1152:38;;;;999:206;1226:1;1218:9;;;;944:294;;;1254:4;1247:11;;477:788;;;;;;:::o;1271:122::-;1330:5;1354:26;1369:10;1354:14;:26::i;:::-;:32;;;1347:39;;1271:122;;;:::o;3253:286::-;3307:4;3339:1;3334;3327:4;:8;;;;;;;;;;:13;;;;3323:56;;;3363:5;3356:12;;;;3323:56;3406:1;3399:3;3392:4;:10;;;;;;;;;;:15;;;;3388:57;;;3430:4;3423:11;;;;3388:57;3472:1;3465:3;3458:4;:10;;;;;;;;;;:15;;;;3454:58;;;3496:5;3489:12;;;;3454:58;3528:4;3521:11;;3253:286;;;;:::o;3637:83::-;3682:7;3708:5;3701:12;;3637:83;:::o;4110:151::-;4171:7;4199:1;4190:10;;;;4251:3;4243:5;:11;;;;;;;;4237:3;4229:5;:11;;;;;;;;4225:1;4217:5;:9;;;;;;;;:23;:37;4210:44;;4110:151;;;:::o;3100:147::-;3163:7;3195:2;3190;:7;3182:16;;;;;;;;3226:14;:12;:14::i;:::-;3220:2;3215;:7;3214:26;;;;;;;;3208:32;;3100:147;;;;:::o;3827:92::-;3877:7;3904:8;3897:15;;3827:92;:::o;1652:120::-;1712:5;1762:2;1756;1743:10;:15;;;;;;;;1742:22;;;;;;;;1729:36;;1652:120;;;:::o;2531:229::-;2595:7;2637:11;2645:2;2637:7;:11::i;:::-;2622:26;;:11;2630:2;2622:7;:11::i;:::-;:26;;;;2614:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2741:11;2749:2;2741:7;:11::i;:::-;2727;2735:2;2727:7;:11::i;:::-;:25;2719:34;;2712:41;;2531:229;;;;:::o;4268:1208::-;4335:12;;:::i;:::-;4359:27;4400:11;4421:7;4690:22;4389:1;4359:31;;4449:19;4457:10;4449:7;:19::i;:::-;4439:2;:7;;:29;;;;;;;;;;;4511;4527:12;:10;:12::i;:::-;4511:29;;:15;:29::i;:::-;4484:24;4500:2;:7;;;4484:24;;:15;:24::i;:::-;:56;4478:62;;4596:3;4574:19;:17;:19::i;:::-;:25;4551:48;;;;4676:3;4661:12;:10;:12::i;:::-;4651:2;:7;;;:22;:28;;;4632:15;:13;:15::i;:::-;:48;4609:71;;;;4731:1;4727:5;;4722:306;4739:2;4734:1;:7;;;;4722:306;;;4796:26;4811:1;4796:26;;4814:2;:7;;;4796:14;:26::i;:::-;4779:43;;:14;:12;:14::i;:::-;:43;4762:60;;4879:10;4857:19;4840:14;:36;:49;4836:131;;;4924:1;4913:2;:8;;:12;;;;;;;;;;;4947:5;;4836:131;5003:14;4980:37;;;;4743:3;;;;;;;4722:306;;;5047:1;5043:5;;5038:261;5055:33;5070:2;:8;;;5055:33;;5080:2;:7;;;5055:14;:33::i;:::-;5050:38;;:1;:38;;;;5038:261;;;5152:10;5130:19;5113:14;:12;:14::i;:::-;:36;:49;5109:129;;;5195:1;5186:2;:6;;:10;;;;;;;;;;;5218:5;;5109:129;5274:14;:12;:14::i;:::-;5251:37;;;;5090:3;;;;;;;5038:261;;;5319:19;5327:10;5319:7;:19::i;:::-;5309:2;:7;;:29;;;;;;;;;;;5360:21;5370:10;5360:9;:21::i;:::-;5348:2;:9;;:33;;;;;;;;;;;5403:21;5413:10;5403:9;:21::i;:::-;5391:2;:9;;:33;;;;;;;;;;;5447:22;5458:10;5447;:22::i;:::-;5434:2;:10;;:35;;;;;;;;;;;4268:1208;;;;;;;:::o;272:5206::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o",
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * Contract code based on pipemerrian's Date Time Smart contract, now available as a library.\n * https://github.com/pipermerriam/ethereum-datetime/blob/master/contracts/DateTime.sol\n * Provide Datetime utils on Ethereum Smart Contracts\n */\n\nlibrary DateTime {\n \n struct _DateTime {\n uint16 year;\n uint8 month;\n uint8 day;\n uint8 hour;\n uint8 minute;\n uint8 second;\n uint8 weekday;\n }\n\n function getYear(uint _timestamp) public pure returns (uint16) {\n uint256 secondsAccountedFor = 0;\n uint16 year;\n uint256 numLeapYears;\n year = uint16(originYear() + _timestamp / yearInSeconds());\n numLeapYears = leapYearsBefore(year) - leapYearsBefore(originYear());\n\n secondsAccountedFor += leapYearInSeconds() * numLeapYears;\n secondsAccountedFor += yearInSeconds() * (year - originYear() - numLeapYears);\n\n while (secondsAccountedFor > _timestamp) {\n if (isLeapYear(uint16(year - 1))) {\n secondsAccountedFor -= leapYearInSeconds();\n }\n else {\n secondsAccountedFor -= yearInSeconds();\n }\n year -= 1;\n }\n return year;\n }\n\n function getMonth(uint256 _timestamp) public pure returns (uint8) {\n return parseTimestamp(_timestamp).month;\n }\n\n function getDay(uint256 _timestamp) public pure returns (uint8) {\n return parseTimestamp(_timestamp).day;\n }\n\n function getHour(uint256 _timestamp) public pure returns (uint8) {\n return uint8((_timestamp / 60 / 60) % 24);\n }\n\n function getMinute(uint256 _timestamp) public pure returns (uint8) {\n return uint8((_timestamp / 60) % 60);\n }\n\n function getSecond(uint256 _timestamp) public pure returns (uint8) {\n return uint8(_timestamp % 60);\n }\n\n function getWeekday(uint256 _timestamp) public pure returns (uint8) {\n return uint8((_timestamp / dayInSeconds() + 4) % 7);\n }\n\n function getDaysInMonth(uint16 _month, uint16 _year) public pure returns (uint8) {\n if (_month == 1 || _month == 3 || _month == 5 || _month == 7 || _month == 8 || _month == 10 || _month == 12) {\n return 31;\n }\n else if (_month == 4 || _month == 6 || _month == 9 || _month == 11) {\n return 30;\n }\n else if (isLeapYear(_year)) {\n return 29;\n }\n else {\n return 28;\n }\n }\n\n function diffYears(uint256 _x, uint256 _y) public pure returns (uint256) {\n require(getYear(_x) >= getYear(_y), 'First argument provided must be > second argument');\n return uint256(getYear(_x) - getYear(_y));\n }\n\n function diffMonths(uint256 _x, uint256 _y) public pure returns (uint256) {\n require(getYear(_x) >= getYear(_y), 'First argument provided must be > second argument');\n uint8 delta = getMonth(_x) > getMonth(_y) ? 1 : 0;\n return (diffYears(_x, _y) - delta) * 12 + uint256(getMonth(_x) - getMonth(_y)) ;\n }\n\n function diffDays(uint256 _x, uint256 _y) public pure returns (uint256) {\n require(_x > _y);\n return(_x - _y) / dayInSeconds();\n }\n\n function isLeapYear(uint16 year) public pure returns (bool) {\n if (year % 4 != 0) {\n return false;\n }\n if (year % 100 != 0) {\n return true;\n }\n if (year % 400 != 0) {\n return false;\n }\n return true;\n }\n \n function originYear() public pure returns(uint16) {\n return 1970;\n }\n \n function dayInSeconds() public pure returns (uint256) {\n return 86400;\n }\n \n function yearInSeconds() public pure returns (uint256) {\n return 31536000;\n }\n \n function leapYearInSeconds() public pure returns (uint256) { \n return 31622400;\n }\n \n function minuteInSeconds() public pure returns(uint256) {\n return 60;\n }\n \n function hourInSeconds() public pure returns(uint256) { \n return 3600;\n }\n\n function leapYearsBefore(uint256 _year) public pure returns (uint256) {\n _year -= 1;\n return _year / 4 - _year / 100 + _year / 400;\n }\n\n\n function parseTimestamp(uint256 _timestamp) internal pure returns (_DateTime dt) {\n uint256 secondsAccountedFor = 0;\n uint256 buf;\n uint8 i;\n\n dt.year = getYear(_timestamp);\n buf = leapYearsBefore(dt.year) - leapYearsBefore(originYear());\n\n secondsAccountedFor += leapYearInSeconds() * buf;\n secondsAccountedFor += yearInSeconds() * (dt.year - originYear() - buf);\n uint256 secondsInMonth;\n for (i = 1; i <= 12; i++) {\n secondsInMonth = dayInSeconds() * getDaysInMonth(i, dt.year);\n if (secondsInMonth + secondsAccountedFor > _timestamp) {\n dt.month = i;\n break;\n }\n secondsAccountedFor += secondsInMonth;\n }\n\n for (i = 1; i <= getDaysInMonth(dt.month, dt.year); i++) {\n if (dayInSeconds() + secondsAccountedFor > _timestamp) {\n dt.day = i;\n break;\n }\n secondsAccountedFor += dayInSeconds();\n }\n\n dt.hour = getHour(_timestamp);\n dt.minute = getMinute(_timestamp);\n dt.second = getSecond(_timestamp);\n dt.weekday = getWeekday(_timestamp);\n }\n}\n\n",
"sourcePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/DateTime.sol",
"ast": {
"absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/calendar/DateTime.sol",
"exportedSymbols": {
"DateTime": [
776
]
},
"id": 777,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 112,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:3"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "Contract code based on pipemerrian's Date Time Smart contract, now available as a library.\nhttps://github.com/pipermerriam/ethereum-datetime/blob/master/contracts/DateTime.sol\nProvide Datetime utils on Ethereum Smart Contracts",
"fullyImplemented": true,
"id": 776,
"linearizedBaseContracts": [
776
],
"name": "DateTime",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "DateTime._DateTime",
"id": 127,
"members": [
{
"constant": false,
"id": 114,
"name": "year",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "325:11:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 113,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "325:6:3",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 116,
"name": "month",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "346:11:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 115,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "346:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 118,
"name": "day",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "367:9:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 117,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "367:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 120,
"name": "hour",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "386:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 119,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "386:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 122,
"name": "minute",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "406:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 121,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "406:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 124,
"name": "second",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "428:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 123,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "428:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 126,
"name": "weekday",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "450:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 125,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "450:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "_DateTime",
"nodeType": "StructDefinition",
"scope": 776,
"src": "298:172:3",
"visibility": "public"
},
{
"body": {
"id": 218,
"nodeType": "Block",
"src": "540:725:3",
"statements": [
{
"assignments": [
135
],
"declarations": [
{
"constant": false,
"id": 135,
"name": "secondsAccountedFor",
"nodeType": "VariableDeclaration",
"scope": 219,
"src": "550:27:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 134,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "550:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 137,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "580:1:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "550:31:3"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 139,
"name": "year",
"nodeType": "VariableDeclaration",
"scope": 219,
"src": "591:11:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 138,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "591:6:3",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 140,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "591:11:3"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 142,
"name": "numLeapYears",
"nodeType": "VariableDeclaration",
"scope": 219,
"src": "612:20:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 141,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "612:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 143,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "612:20:3"
},
{
"expression": {
"argumentTypes": null,
"id": 154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 144,
"name": "year",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "642:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 152,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 146,
"name": "originYear",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 539,
"src": "656:10:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$",
"typeString": "function () pure returns (uint16)"
}
},
"id": 147,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "656:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 148,
"name": "_timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "671:10:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 149,
"name": "yearInSeconds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 555,
"src": "684:13:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$",
"typeString": "function () pure returns (uint256)"
}
},
"id": 150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "684:15:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "671:28:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},