This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract ERC20Basic { | |
uint public totalSupply; | |
function balanceOf(address who) constant returns (uint); | |
function transfer(address to, uint value); | |
event Transfer(address indexed from, address indexed to, uint value); | |
} | |
contract ERC20 is ERC20Basic { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.11; | |
contract ERC20Basic { | |
uint public totalSupply; | |
function balanceOf(address who) constant returns (uint); | |
function transfer(address to, uint value); | |
event Transfer(address indexed from, address indexed to, uint value); | |
} | |
contract ERC20 is ERC20Basic { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from datetime import datetime | |
import time | |
nowDatetimeObj = datetime.now() | |
targetDatetimeObj = datetime.strptime(sys.argv[1], '%Y-%m-%dT%H:%M') # Expects something like 2018-09-30T23:59 | |
d1_ts = time.mktime(nowDatetimeObj.timetuple()) | |
d2_ts = time.mktime(targetDatetimeObj.timetuple()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Youtube video views | |
This contract keeps in storage a views counter | |
for a given Youtube video. | |
*/ | |
pragma solidity ^0.4.0; | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Youtube video views | |
This contract keeps in storage a views counter | |
for a given Youtube video. | |
*/ | |
pragma solidity ^0.4.0; | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ { "constant": true, "inputs": [], "name": "numberOfInvestors", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "deadline", "outputs": [ { "name": "", "type": "uint256", "value": "1525187089" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "closeCrowdsaleManually", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "checkForClosureConditions", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "fundingGoal", "outputs": [ { "name": "", "type": "uin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.0; | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; | |
interface YoutubeViewsReceiver { | |
function updateYoutubeViewsInternal(uint videoViews); | |
} | |
interface YoutubeLikesReceiver { | |
function updateYoutubeLikesInternal(uint videoLikes); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.21; | |
/** | |
* Math operations with safety checks | |
* https://github.com/Dexaran/ERC223-token-standard/blob/master/SafeMath.sol | |
*/ | |
library SafeMath { | |
function mul(uint a, uint b) pure internal returns (uint) { | |
uint c = a * b; | |
assert(a == 0 || c / a == b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.21; | |
contract QZCrowdsale { | |
address public owner; | |
uint public fundingGoal; | |
uint public amountRaised; | |
uint public deadline; | |
address[] investors; | |
mapping(address => uint256) public balanceOf; | |
bool public fundingGoalReached; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.21; | |
// From https://github.com/Dexaran/ERC223-token-standard/blob/Recommended/Receiver_Interface.sol | |
contract ContractReceiver { | |
function tokenFallback(address _from, uint _value, bytes _data) public; | |
} | |
// From https://github.com/Dexaran/ERC223-token-standard/blob/Recommended/ERC223_Interface.sol | |
contract ERC223 { | |
uint public totalSupply; |
NewerOlder