Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitrii Vinokurov Gim6626

  • Miro
  • Russia
View GitHub Profile
View AirDropperImproved.sol
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 {
@Gim6626
Gim6626 / AirDropContract.sol
Last active Oct 7, 2018
Air Drop Contract
View AirDropContract.sol
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 {
View calc-timestamp-min-diff-for-date.py
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())
View YoutubeOraclesTester3.sol
/*
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";
View YoutubeOraclesTester2.sol
/*
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";
View QZCrowdsale-ABI.sol
[ { "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
View YoutubeOraclesTester.sol
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);
}
View QZToken.sol
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);
View QZCrowdsale.sol
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;
View QZToken.sol.old
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;