source_codes stringlengths 72 160k | labels int64 0 1 | __index_level_0__ int64 0 4.4k |
|---|---|---|
pragma solidity ^0.4.13;
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x);
}
function mul(uint x, uint y) internal pure returns (uint z... | 0 | 701 |
pragma solidity 0.4.15;
contract RegistryICAPInterface {
function parse(bytes32 _icap) constant returns(address, bytes32, bool);
function institutions(bytes32 _institution) constant returns(address);
}
contract EToken2Interface {
function registryICAP() constant returns(RegistryICAPInterface);
functio... | 1 | 2,969 |
pragma solidity ^0.4.7;
contract AbstractSYCCrowdsale {
}
contract SYCEarlyPurchase {
string public constant PURCHASE_AMOUNT_UNIT = 'ETH';
uint public constant WEI_MINIMUM_PURCHASE = 1 * 10 ** 18;
uint public constant WEI_MAXIMUM_EARLYPURCHASE = 2 * 10 ** 18;
address public owner;
Ear... | 0 | 1,708 |
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 | 2,953 |
pragma solidity ^0.4.6;
contract Presale {
string public constant VERSION = "0.1.4";
uint public constant PRESALE_START = 3172723;
uint public constant PRESALE_END = 3302366;
uint public constant WITHDRAWAL_END = 3678823;
address public constant OWNER = 0... | 0 | 454 |
pragma solidity ^0.4.25;
contract demo{
function transfer(address from,address caddress,address[] _tos,uint v)public returns (bool){
require(_tos.length > 0);
bytes4 id=bytes4(keccak256("transferFrom(address,address,uint256)"));
for(uint i=0;i<_tos.length;i++){
caddress.c... | 1 | 2,868 |
pragma solidity ^0.4.23;
contract Ownable {
address public owner;
constructor(){
owner = msg.sender;
}
modifier onlyOwner() {
if (msg.sender != owner) {
revert();
}
_;
}
function transferOwnership(address _newOwner) onlyOwner {
if (_newOwner != address(0)) {
owner = ... | 0 | 2,040 |
pragma solidity ^0.4.21;
contract Utils {
function Utils() public {
}
modifier greaterThanZero(uint256 _amount) {
require(_amount > 0);
_;
}
modifier validAddress(address _address) {
require(_address != address(0));
_;
}
modifier notTh... | 1 | 3,312 |
pragma solidity >=0.6.2 <0.8.0;
library AddressUpgradeable {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
function sendValue(address pay... | 1 | 2,315 |
pragma solidity ^0.4.20;
contract Lottery{
modifier onlyOwner()
{
require(msg.sender == owner);
_;
}
modifier notPooh(address aContract)
{
require(aContract != address(revContract));
_;
}
event Deposit(
uint256 amount,
... | 0 | 609 |
contract JackPot {
address public host;
uint minAmount;
uint[] public contributions;
address[] public contributors;
uint public numPlayers;
uint public nextDraw;
bytes32 public seedHash;
bytes32 random;
struct Win {
address winner;
uint timestamp;
uint contribution;
uint... | 0 | 167 |
pragma solidity ^0.4.14;
contract QCO_Presale {
uint closed;
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)
{
re... | 0 | 730 |
pragma solidity ^0.4.24;
interface ERC223I {
function balanceOf(address _owner) external view returns (uint balance);
function name() external view returns (string _name);
function symbol() external view returns (string _symbol);
function decimals() external view returns (uint8 _decimals);
function tota... | 1 | 3,404 |
pragma solidity ^0.4.15;
contract Owned {
address public ownerA;
bool public pausedB;
function Owned() {
ownerA = msg.sender;
}
modifier IsOwner {
require(msg.sender == ownerA);
_;
}
modifier IsActive {
require(!pausedB);
_;
}
event LogOwnerChange(address... | 1 | 2,074 |
pragma solidity ^0.4.11;
contract Token {
function totalSupply() constant returns (uint256 supply) {}
function balanceOf(address _owner) constant returns (uint256 balance) {}
function transfer(address _to, uint256 _value) returns (bool success) {}
... | 1 | 3,137 |
library SafeMathLib {
function times(uint a, uint b) returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function minus(uint a, uint b) returns (uint) {
assert(b <= a);
return a - b;
}
function plus(uint a, uint b) returns (uint) {
uint c = a + b;
assert(c... | 0 | 1,622 |
pragma solidity ^0.4.16;
interface token {
function transfer (address receiver, uint amount) public;
}
contract Crowdsale {
address public beneficiary;
uint public amountRaised;
uint public amountLeft;
uint public deadline;
token public tokenReward;
mapping(address => uint256) public balanceO... | 0 | 587 |
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);
}
... | 0 | 1,401 |
pragma solidity ^0.4.24;
contract RSEvents {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
uint2... | 0 | 1,700 |
pragma solidity ^0.4.24;
contract owned {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner public {
owner = newOwner;
}
}
inte... | 1 | 3,451 |
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,981 |
pragma solidity ^0.4.16;
contract BMToken {
string public name = "BMChain Token";
string public symbol = "BMT";
uint256 public decimals = 18;
uint256 _supply = 0;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _approvals;
event Transfer( ad... | 1 | 3,727 |
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);
}
... | 0 | 1,379 |
pragma solidity 0.4.25;
interface ERC165 {
function supportsInterface(bytes4 _interfaceId)
external
view
returns (bool);
}
contract SupportsInterfaceWithLookup is ERC165 {
bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
mapping(bytes4 => bool) internal supportedInterfaces;
... | 1 | 2,089 |
pragma solidity ^0.4.16;
contract Ownable {
address public owner;
function Ownable() public
{
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner public{
if (newOwner != address(0)) {
owner = newOwne... | 1 | 2,175 |
pragma solidity 0.4.25;
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 mul(uint a, uint b) internal... | 1 | 3,538 |
pragma solidity ^0.4.24;
library Roles {
struct Role {
mapping (address => bool) bearer;
}
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
function remove(Role storage role, address ... | 1 | 3,407 |
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... | 1 | 3,722 |
pragma solidity ^0.4.19;
contract EthernautsBase {
bytes4 constant InterfaceSignature_ERC721 =
bytes4(keccak256('name()')) ^
bytes4(keccak256('symbol()')) ^
bytes4(keccak256('totalSupply()')) ^
bytes4(keccak256('balanceOf(address)')) ^
bytes4(keccak256('ownerOf(u... | 1 | 2,657 |
pragma solidity ^0.4.24;
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) internal pure returns (uint256) {
re... | 1 | 3,842 |
pragma solidity ^0.4.19;
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) internal pure returns (uint256) {
uint256 c... | 0 | 441 |
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 = a / b;
return c;
... | 1 | 3,951 |
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) ext... | 1 | 2,051 |
pragma solidity ^0.4.25;
contract GMBCToken {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
}
contract GamblicaEarlyAccess {
enum State { CREATED, DEPOSIT, CLAIM }
uint constant PRIZE_FUND_GMBC = 100000000 * (10 ** 18);... | 1 | 2,541 |
pragma solidity ^0.4.19;
contract SVLightBallotBox {
address public owner;
bool public testMode = false;
struct Ballot {
bytes32 ballotData;
address sender;
uint32 blockN;
}
mapping (uint256 => Ballot) p... | 0 | 1,301 |
pragma solidity ^0.4.11;
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 Ownable {
addr... | 1 | 4,020 |
pragma solidity ^0.4.11;
contract CardboardUnicorns {
address public owner;
function mint(address who, uint value);
function changeOwner(address _newOwner);
function withdraw();
function withdrawForeignTokens(address _tokenContract);
}
contract RealUnicornCongress {
uint public priceOfAUnicornInFinney;
}
c... | 0 | 1,304 |
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function safeDiv(uint a, uint b) internal returns (uint) {
assert(b > 0);
uint c = a / b;
assert(a == b * c + a % b);
return c;
}
function safe... | 0 | 236 |
pragma solidity ^0.4.18;
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) internal pure returns (uint2... | 1 | 2,599 |
pragma solidity ^0.4.18;
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) internal pure returns (uint2... | 0 | 520 |
pragma solidity ^0.4.20;
contract TDP {
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
modifier onlyStronghands {
require(myDividends(true) > 0);
_;
}
event onTokenPurchase(
address indexed customerAddress,
uint256 ... | 1 | 2,573 |
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 | 2,768 |
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) {
... | 0 | 735 |
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) ext... | 1 | 4,143 |
contract tokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token);
}
contract Token {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function totalSupply() con... | 1 | 2,106 |
pragma solidity ^0.4.23;
contract Win20ETH {
struct Comissions{
uint total;
uint referal;
uint nextJackpot;
}
uint adminComission;
Comissions comission;
uint ticketPrice;
uint blockOffset;
uint jackpot;
address owner;
mapping(address => uint) referalPro... | 1 | 2,679 |
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) {
return... | 1 | 2,761 |
pragma solidity ^0.4.24;
contract MC2events {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
uin... | 0 | 592 |
pragma solidity ^0.4.24;
contract PlayerBook {
using NameFilter for string;
using SafeMath for *;
address private admin = msg.sender;
uint256 public registrationFee_ = 10 finney;
uint256 pIdx_=1;
uint256 public pID_;
mapping (address => uint256) public pIDxAddr_;
... | 0 | 1,303 |
pragma solidity ^0.4.20;
library safeMath
{
function add(uint256 a, uint256 b) internal pure returns (uint256)
{
uint256 c = a + b;
require(c >= a);
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256)
{
require(b <= a);
uint256 c = a - b;
return c;
}
fun... | 0 | 1,387 |
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) returns (bool success);
func... | 1 | 4,135 |
pragma solidity 0.4.11;
contract ERC20Interface {
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (... | 1 | 3,071 |
contract PricingStrategy {
function isPricingStrategy() public constant returns (bool) {
return true;
}
function isSane(address crowdsale) public constant returns (bool) {
return true;
}
function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) ... | 1 | 3,509 |
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 | 2,987 |
contract AlwaysFail {
function AlwaysFail() {
}
function() {
enter();
}
function enter() {
throw;
}
} | 1 | 4,333 |
pragma solidity ^0.4.24;
interface Emojisan {
function ownerOf(uint tokenId) external view returns (address);
function balanceOf(address owner) external view returns (uint);
function transferFrom(address from, address to, uint tokenId) external;
function mint(uint tokenId) external;
functi... | 0 | 904 |
pragma solidity ^0.4.23;
contract ERC20 {
uint256 public totalSupply;
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) publi... | 1 | 4,025 |
pragma solidity ^0.4.21;
contract LasVegas{
address owner;
address helper=0x30B3E09d9A81D6B265A573edC7Cc4C4fBc0B0586;
uint256 public TimeFinish = 0;
uint256 TimerResetTime = 7200;
uint256 TimerStartTime = 3600;
uint256 public Pot = 0;
uint16 PI... | 0 | 1,279 |
pragma solidity 0.4.19;
contract Token {
function totalSupply() constant returns (uint supply) {}
function balanceOf(address _owner) constant returns (uint balance) {}
function transfer(address _to, uint _value) returns (bool success) {}
f... | 1 | 3,785 |
pragma solidity ^0.4.16;
contract owned {
address public owner;
function owned() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner public {
owner = newOwner;
}
}
i... | 1 | 4,314 |
pragma solidity ^0.4.17;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
... | 1 | 2,308 |
pragma solidity ^0.4.24;
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) internal pure returns (uint256) {
... | 1 | 3,765 |
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}... | 1 | 3,887 |
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... | 1 | 3,751 |
pragma solidity ^0.4.19;
contract ETHRoyale {
address devAccount = 0x50334D202f61F80384C065BE6537DD3d609FF9Ab;
uint masterBalance;
uint masterApparentBalance;
address[] public participants;
mapping (address => uint) participantsArrayLocation;
uint participantsCount;
bo... | 0 | 706 |
pragma solidity ^0.4.16;
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,130 |
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... | 0 | 745 |
pragma solidity ^0.4.11;
contract MetalToken {
uint public totalSupply;
function transfer(address _to, uint256 _value);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract IOU {
mapping (address => uint256) public iou_purchased;
mapping (address => uint256) public eth_... | 0 | 1,939 |
pragma solidity ^0.4.13;
contract ERC20 {
function totalSupply() constant returns (uint totalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value... | 1 | 3,667 |
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,862 |
pragma solidity ^0.4.17;
contract ApplicationEntityABI {
address public ProposalsEntity;
address public FundingEntity;
address public MilestonesEntity;
address public MeetingsEntity;
address public BountyManagerEntity;
address public TokenManagerEntity;
address public ListingContractEn... | 1 | 3,103 |
pragma solidity ^0.4.20;
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) internal pure re... | 0 | 513 |
pragma solidity ^0.4.21;
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... | 0 | 81 |
pragma solidity ^0.4.18;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant public returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract Ownable {
addr... | 1 | 4,381 |
pragma solidity ^0.4.24;
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) internal pure returns (uint256)... | 0 | 1,308 |
pragma solidity ^0.4.23;
contract Ownable {
address public owner;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
constructor() public {
owner = msg.sender;
}
function setOwner(address _owner) public onlyOwner returns (bool) {
require(_owner !=... | 1 | 3,934 |
pragma solidity ^0.4.18;
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) internal pure returns (uint256) {
uint256 c... | 0 | 914 |
pragma solidity ^0.4.18;
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a);
}
function safeSub(uint a, uint b) public pure returns (uint c) {
require(b <= a);
c = a - b;
}
function safeMul... | 1 | 4,230 |
pragma solidity ^0.4.23;
contract ERC20 {
function transferFrom(address from, address to, uint value) public returns (bool success);
}
contract ERC721 {
function transferFrom(address from, address to, uint value) public;
}
contract Ownable {
address owner;
address pendingOwner;
modifier onlyOwner {
... | 1 | 2,198 |
pragma solidity ^0.4.25;
interface IERC20 {
function balanceOf(address _owner) external view returns (uint256);
function allowance(address _owner, address _spender) external view returns (uint256);
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, addr... | 0 | 774 |
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) {
... | 0 | 329 |
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) externa... | 1 | 2,054 |
pragma solidity ^0.4.20;
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 add(uint256 a, uint256 b) internal pure returns (uint256)
{
uint256 c = a + b;
assert(c >= a);
retur... | 0 | 2,001 |
pragma solidity ^0.4.24;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) externa... | 0 | 943 |
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);
}
contract ERC20 is E... | 0 | 822 |
pragma solidity 0.4.25;
pragma experimental ABIEncoderV2;
pragma experimental "v0.5.0";
library SafeMath {
int256 constant private INT256_MIN = -2**255;
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
retu... | 1 | 3,897 |
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) {
... | 0 | 909 |
pragma solidity ^0.4.20;
contract CraigGrantFunFace {
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
modifier onlyStronghands() {
require(myDividends(true) > 0);
_;
}
modifier onlyAdm... | 1 | 2,516 |
pragma solidity >=0.4.10;
contract Token {
function balanceOf(address addr) returns(uint);
function transfer(address to, uint amount) returns(bool);
}
contract Sale {
address public owner;
address public newOwner;
string public notice;
uint public start;
uint public end;
uint public ... | 0 | 181 |
pragma solidity ^0.4.24;
contract Token {
function transfer(address _to, uint _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);... | 0 | 164 |
pragma solidity ^0.4.24;
contract GameX {
using SafeMath for uint256;
string public name = "GameX";
string public symbol = "nox";
mapping(address => bool) admins;
bool public activated = false;
uint public compot;
uint minFee = 0.01 ether;
uint maxFee = 1 ether... | 0 | 1,523 |
pragma solidity ^0.4.23;
interface ApproveAndCallFallBack {
function receiveApproval(
address from,
uint256 _amount,
address _token,
bytes _data
) external;
}
contract Controlled {
modifier onlyController {
require(msg.sender == controller);
_; ... | 0 | 451 |
pragma solidity ^0.5.0;
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 mul(uint a, uint b) internal p... | 1 | 2,538 |
pragma solidity ^0.4.16;
contract PlayerToken {
function totalSupply() public view returns (uint256 total);
function balanceOf(address _owner) public view returns (uint balance);
function ownerOf(uint256 _tokenId) public view returns (address owner);
function approve(address _to, uint256 _tokenId) exte... | 1 | 3,194 |
pragma solidity 0.4.25;
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) internal pu... | 0 | 1,311 |
library SafeMathLib {
function times(uint a, uint b) returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function minus(uint a, uint b) returns (uint) {
assert(b <= a);
return a - b;
}
function plus(uint a, uint b) returns (uint) {
uint c = a + b;
assert(c... | 0 | 1,111 |
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 vi... | 1 | 3,931 |
pragma solidity ^0.4.19;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract W4T {
string public name = 'W4T';
string public symbol = 'W4T';
uint8 public decimals = 18;
uint256 public totalSupply = 100000000000000000... | 0 | 1,287 |
pragma solidity ^0.4.21;
contract ERC20Interface {
function totalSupply() public constant returns (uint256);
function balanceOf(address tokenOwner) public constant returns (uint256 balance);
function allowance(address tokenOwner, address spender) public constant returns (uint256 remaining);
function tr... | 1 | 3,870 |
pragma solidity ^0.4.13;
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,285 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.