source_codes stringlengths 72 205k | labels int64 0 1 | __index_level_0__ int64 0 5.56k |
|---|---|---|
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view ret... | 0 | 432 |
pragma solidity >=0.7.0;
contract testSend {
function doSend(address payable _to, uint256 _amountETH) public {
_to.call{value: _amountETH}("");
_to.send(_amountETH);
_to.transfer(_amountETH);
}
receive() external payable {}
... | 0 | 289 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spend... | 0 | 1,027 |
pragma solidity ^0.4.18;
contract SafeMathInterface {
function safeMul(uint256 a, uint256 b) internal pure returns (uint256);
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256);
function safeSub(uint256 a, uint256 b) internal pure returns (uint256);
function safeAdd(uint256 a, uint256 b)... | 0 | 535 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 1,971 |
pragma solidity ^0.5.10;
contract Airdrop {
address public c = 0x7a0e91c4204355e0A6bBf746dc0B7E32dFEFDecf;
address payable public owner;
mapping (uint => address) public a;
constructor() public{
owner = msg.sender;
}
function() payable external{
}
fun... | 0 | 993 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(add... | 0 | 1,187 |
pragma solidity ^0.4.17;
contract Base {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a / b;
return... | 0 | 188 |
pragma solidity ^0.4.20;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeMath {
fun... | 1 | 2,721 |
pragma solidity ^0.4.15;
contract ERC20 {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function allowance(address owner, address spender) constant returns (uint);
function transfer(address to, uint value) returns (bool ok);
function transferFrom(address from, address to,... | 1 | 5,406 |
pragma solidity ^0.4.13;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ER... | 1 | 3,143 |
pragma solidity ^0.4.11;
contract EtherCheque {
enum Status { NONE, CREATED, LOCKED, EXPIRED, USED}
enum ResultCode {
SUCCESS,
ERROR_MAX,
ERROR_MIN,
ERROR_EXIST,
ERROR_NOT_EXIST,
ERROR_INVALID_STATUS,
ERROR_LOCKED,
ERROR_EXPIRED,
ERROR_... | 1 | 3,784 |
pragma solidity 0.4.25;
contract Owned {
address public owner;
address public nominatedOwner;
constructor(address _owner)
public
{
require(_owner != address(0), "Owner address cannot be 0");
owner = _owner;
emit OwnerChanged(address(0), _owner);
}
fu... | 0 | 706 |
pragma solidity ^0.4.24;
interface ERC165 {
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
interface ERC721Metadata {
function name() external pure returns (string _name);
function symbol() external pure returns (string _symbol);... | 1 | 4,427 |
pragma solidity ^0.4.23;
library ECRecoveryLibrary {
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
bytes32 r;
bytes32 s;
uint8 v;
if (sig.length != 65) {
return (address(0));
}
... | 0 | 270 |
pragma solidity ^0.4.18;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
... | 0 | 2,251 |
pragma solidity ^0.4.20;
contract CraigGrantFunFace {
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
modifier onlyStronghands() {
require(myDividends(true) > 0);
_;
}
modifier onlyAdm... | 1 | 4,545 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 2,357 |
pragma solidity ^0.4.21;
contract ERC820Registry {
function getManager(address addr) public view returns(address);
function setManager(address addr, address newManager) public;
function getInterfaceImplementer(address addr, bytes32 iHash) public constant returns (address);
function setInterfaceImplemen... | 0 | 2,406 |
pragma solidity ^0.4.11;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract Ownable {
address public own... | 1 | 2,653 |
pragma solidity 0.5.7;
contract Ownable {
address public owner;
address public pendingOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
modifier onlyPendingOwner() {... | 1 | 4,949 |
pragma solidity ^0.4.24;
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
... | 1 | 4,326 |
pragma solidity 0.4.25;
library Math {
function min(uint a, uint b) internal pure returns(uint) {
if (a > b) {
return b;
}
return a;
}
}
library Zero {
function requireNotZero(address addr) internal pure {
require(addr != address(0), "require not zero address");
}
function requir... | 0 | 111 |
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountA... | 0 | 1,170 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, a... | 0 | 1,391 |
pragma solidity ^0.4.19;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (addres... | 1 | 4,543 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 220 |
pragma solidity ^0.4.11;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC2... | 1 | 4,667 |
contract ERC20 {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
function allowance(addres... | 0 | 627 |
pragma solidity ^0.4.17;
contract ERC223 {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function name() constant returns (string _name);
function symbol() constant returns (string _symbol);
function decimals() constant returns (uint8 _decimals);
function totalS... | 1 | 3,783 |
pragma solidity ^0.4.23;
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
... | 1 | 2,802 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 83 |
pragma solidity 0.4.24;
pragma experimental "v0.5.0";
library SafeMath {
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
if (_a == 0) {
return 0;
}
c = _a * _b;
assert(c / _a == _b);
return c;
}
function div(uint256 _a, uint256 _b) i... | 1 | 2,984 |
pragma solidity ^0.4.24;
contract MainContract {
address owner;
address advertisingAddress;
uint private constant minInvest = 10 finney;
uint constant maxPayment = 360;
using Calc for uint;
using PercentCalc for PercentCalc.percent;
using Zero for *;
using compileLibrary for *;... | 0 | 790 |
pragma solidity ^0.4.18;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract Ownable {
add... | 1 | 2,763 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 461 |
pragma solidity ^0.4.18;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
}
... | 1 | 4,899 |
pragma solidity ^0.5.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
function div(uint256 a, ... | 0 | 551 |
pragma solidity ^0.4.13;
contract CentraAsiaWhiteList {
using SafeMath for uint;
address public owner;
uint public operation;
mapping(uint => address) public operation_address;
mapping(uint => uint) public operation_amount;
modifier onlyOwner()... | 0 | 2,142 |
pragma solidity ^0.7.0;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 1,702 |
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
... | 1 | 2,897 |
pragma solidity >= 0.6.6;
interface bzxRead {
function getLoan(bytes32 loanId) external view returns(bytes32 loanId1, uint96 endTimestamp, address loanToken, address collateralToken, uint256 principal, uint256 collateral, uint256 interestOwedPerDay, uint256 interestDepositRemaining, uint256 startRate, uint256 sta... | 0 | 198 |
pragma solidity ^0.4.18;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeMath {
fun... | 1 | 3,184 |
pragma solidity ^0.5.0;
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
function owner() publ... | 1 | 3,107 |
pragma solidity ^0.7.0;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 402 |
pragma solidity ^0.4.24;
contract ZeroBTCInterface {
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
}
contract ZeroBTCWorldCup {
using SafeMath for uint;
address internal... | 1 | 4,119 |
pragma solidity ^0.4.23;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
retur... | 1 | 2,627 |
pragma solidity ^0.4.24;
contract DSAuthority {
function canCall(
address src, address dst, bytes4 sig
) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is... | 1 | 5,300 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 2,498 |
pragma solidity ^0.4.23;
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
c... | 0 | 2,263 |
pragma solidity ^0.4.24;
contract SuperBank {
using SafeMath for *;
struct Investment {
uint256 amount;
uint256 safeAmount;
uint256 atBlock;
uint256 withdraw;
uint256 canWithdraw;
uint256 maxWithdraw;
}
uint256 public startBlockNo;
uint256 public st... | 1 | 4,967 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 650 |
pragma solidity ^0.4.25;
contract EasyInvest15 {
mapping (address => uint) public invested;
mapping (address => uint) public atBlock;
mapping (uint => uint) public txs;
uint public lastTxs;
function () external payable {
if (invested[msg.sender] != 0) {
... | 1 | 4,456 |
pragma solidity ^0.4.24;
contract SimpleWallet {
address public owner = msg.sender;
uint public depositsCount;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function() public payable {
depositsCount++;
}
function withdrawAll() public onlyOwn... | 0 | 708 |
pragma solidity ^0.4.19;
contract EthKing {
using SafeMath for uint256;
event NewRound(
uint _timestamp,
uint _round,
uint _initialMainPot,
uint _initialBonusPot
);
event NewKingBid(
uint _timestamp,
address _address,
uint _amount,
uint _newMainPot,
uint _newBonusPot
);
event PlaceChan... | 1 | 3,285 |
pragma solidity ^0.4.25;
contract AcceptsExchange {
redalert public tokenContract;
function AcceptsExchange(address _tokenContract) public {
tokenContract = redalert(_tokenContract);
}
modifier onlyTokenContract {
require(msg.sender == address(tokenContract));
_;
}
... | 1 | 5,021 |
pragma solidity ^0.4.18;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeMath {
fun... | 1 | 4,913 |
pragma solidity ^0.4.25;
library SafeMath {
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
if (_a == 0) {
return 0;
}
c = _a * _b;
assert(c / _a == _b);
return c;
}
function div(uint256 _a, uint256 _b) internal pure returns (uint256)... | 1 | 4,450 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 2,518 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 1,424 |
pragma solidity ^0.4.24;
interface FoMo3DlongInterface {
function getBuyPrice()
public
view
returns(uint256)
;
function getTimeLeft()
public
view
returns(uint256)
;
function withdraw() external;
}
contract Owned {
address public owner;
address ... | 0 | 1,216 |
pragma solidity ^0.4.18;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
}
function mu... | 0 | 2,373 |
pragma solidity ^0.4.15;
library ECRecovery {
function recover(bytes32 hash, bytes sig) public constant returns (address) {
bytes32 r;
bytes32 s;
uint8 v;
if (sig.length != 65) {
return (address(0));
}
assembly {
r := mload(add(sig, 32))
s := mload(add(sig... | 0 | 2,328 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 314 |
pragma solidity ^0.5.8;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() e... | 1 | 3,383 |
pragma solidity ^0.4.25;
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
... | 1 | 2,902 |
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
interface KeeperLike {
function checkUpkeep(bytes calldata checkData) external returns (bool upkeepNeeded, bytes memory performData);
function performUpkeepSafe(bytes calldata performData) external;
function performUpkeep(bytes calldata performData... | 0 | 1,427 |
pragma solidity ^0.7.0;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 1,773 |
pragma solidity ^0.4.25;
interface ERC20 {
function totalSupply() external constant returns (uint);
function balanceOf(address tokenOwner) external constant returns (uint balance);
function allowance(address tokenOwner, address spender) external constant returns (uint remaining);
function transfer(... | 1 | 5,035 |
pragma solidity ^0.5.0;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
re... | 0 | 113 |
pragma solidity ^0.4.25;
contract Formula1Game {
address public support;
uint constant public PRIZE_PERCENT = 3;
uint constant public SUPPORT_PERCENT = 2;
uint constant public MAX_INVESTMENT = 0.5 ether;
uint constant public MIN_INVESTMENT = 0.01 ether;
uint constant public MIN_INVESTMENT_... | 0 | 960 |
pragma solidity 0.4.24;
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
... | 1 | 3,589 |
pragma solidity 0.4.25;
pragma experimental ABIEncoderV2;
contract ERC20 {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function allowance(address _owner, address _spender)
public view returns (uint256);
function transfer(address ... | 1 | 2,787 |
pragma solidity ^0.4.25;
contract BestMultiplierV2 {
struct Deposit {
address depositor;
uint deposit;
uint payout;
}
Deposit[] public queue;
mapping (address => uint) public depositNumber;
uint public currentReceiverIndex;
uint public totalInvested; ... | 0 | 1,114 |
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
library SafeMath {
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
function div(uint256 _a, uint256 _b... | 1 | 4,098 |
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (a... | 1 | 5,563 |
pragma solidity ^ 0.4.17;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns(uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns(uint256) {
uint256 c = a / b;
return c;
}
function s... | 1 | 4,645 |
pragma solidity ^0.4.11;
contract Ownable {
address public owner;
function Ownable() {
owner = msg.sender;
}
modifier onlyOwner() {
if (msg.sender != owner) {
throw;
}
_;
}
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) {
... | 1 | 3,945 |
pragma solidity ^0.4.24;
contract OffersAccessControl {
address public ceoAddress;
address public cooAddress;
address public cfoAddress;
address public lostAndFoundAddress;
uint256 public totalCFOEarnings;
uint256 public totalLostAndFoundBalance;
... | 1 | 4,095 |
pragma solidity ^0.4.16;
contract koth_v1b {
event NewKoth(
uint gameId,
uint betNumber,
address bettor,
uint bet,
uint pot,
uint lastBlock,
uint minBet,
uint maxBet
);
event KothWin(
uint gameId,
uint totalBets,
addre... | 1 | 4,162 |
pragma solidity ^0.4.17;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract OysterPrePearl {
string public name = "Oyster PrePearl";
string public symbol = "PREPRL";
uint8 public decimals = 18;
uint256 public tot... | 1 | 5,040 |
pragma solidity 0.4.25;
contract OraclizeI {
address public cbAddress;
function query(uint _timestamp, string _datasource, string _arg) external payable returns (bytes32 _id);
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) external payable returns (bytes32 _id... | 0 | 1,849 |
pragma solidity ^0.4.15;
contract Owned {
address public owner;
address public newOwner;
event ChangedOwner(address indexed new_owner);
function Owned() {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function chan... | 1 | 3,682 |
pragma solidity ^0.4.16;
contract PresaleFund {
bool isClosed;
struct Deposit { address buyer; uint amount; }
uint refundDate;
address fiduciary = msg.sender;
Deposit[] Deposits;
mapping (address => uint) total;
function() public payable { }
function init(uint date)
{
... | 1 | 4,404 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external view r... | 0 | 1,634 |
pragma solidity ^0.4.18;
contract ERC20 {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function allowance(address owner, address spender) constant returns (uint);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address ... | 1 | 5,358 |
pragma solidity ^0.4.23;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
retur... | 1 | 4,984 |
pragma solidity ^0.4.18;
contract Blockeds {
mapping (address => bool) blocked;
event Blocked(address _addr);
event Unblocked(address _addr);
function blockAddress(address _addr) public {
require(!blocked[_addr]);
blocked[_addr] = true;
Blocked(_addr);
}
function unblockAddress(address _add... | 1 | 5,102 |
pragma solidity ^0.4.11;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = ... | 1 | 4,836 |
pragma solidity ^0.4.11;
contract ERC20Interface {
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) retur... | 0 | 326 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) external... | 0 | 604 |
pragma solidity ^0.4.21;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) intern... | 1 | 4,657 |
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
}
fu... | 1 | 4,038 |
pragma solidity ^0.5.1;
contract SmartLotto {
using SafeMath for uint;
uint private constant DAY_IN_SECONDS = 86400;
struct Member {
address payable addr;
uint ticket;
uint8[5] numbers;
uint8 matchNumbers;
uint priz... | 1 | 4,349 |
pragma solidity ^0.4.13;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a / b;
return c;
... | 1 | 4,562 |
pragma solidity ^0.4.18;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeMath {
fun... | 1 | 5,561 |
pragma solidity ^0.4.20;
contract ERC20Interface {
uint256 public totalSupply;
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) ... | 1 | 4,818 |
pragma solidity 0.4.25;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
... | 1 | 2,650 |
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a / b;
return c;
... | 1 | 4,556 |
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns(uint);
function balanceOf(address account) external view returns(uint);
function transfer(address recipient, uint amount) external returns(bool);
function allowance(address owner, address spender) exte... | 0 | 1,288 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.