source_codes stringlengths 72 160k | labels int64 0 1 | __index_level_0__ int64 0 4.4k |
|---|---|---|
pragma solidity ^0.4.9;
contract ERC20 {
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, uint25... | 0 | 1,502 |
pragma solidity ^0.4.5;
contract PPBC_API {
address paddyAdmin;
uint256 public gamesPlayed;
mapping ( address => bool ) alreadyPlayed;
function GetMinimu... | 0 | 1,545 |
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract DailyCoinToken {
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
mapping... | 0 | 2,034 |
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,080 |
pragma solidity ^0.4.25;
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(uint a, uint b)... | 1 | 3,213 |
pragma solidity ^0.4.17;
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;
... | 1 | 2,066 |
pragma solidity ^0.4.25;
contract subsetSum {
struct Number {
bool exists;
bool isUsed;
}
struct Leader {
address id;
uint256 difference;
uint256[] negativeSet;
uint256[] positiveSet;
}
uint256[] numbers;
mapping (uint256 => Numbe... | 0 | 2,025 |
pragma solidity ^0.4.24;
contract Suohaevents {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
uin... | 0 | 1,820 |
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, u... | 1 | 4,298 |
pragma solidity ^0.4.19;
library OwnershipTypes{
using Serializer for Serializer.DataComponent;
struct Ownership
{
address m_Owner;
uint32 m_OwnerInventoryIndex;
}
function SerializeOwnership(Ownership ownership) internal pure returns (bytes32)
{
Serializer.DataCompo... | 1 | 4,118 |
pragma solidity ^0.4.15;
contract MyOwned {
address public owner;
function MyOwned() public { owner = msg.sender; }
modifier onlyOwner { require(msg.sender == owner ); _; }
function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; }
}
interface recipient {
function receive... | 1 | 3,901 |
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) {
retu... | 0 | 700 |
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... | 1 | 2,880 |
pragma solidity ^0.4.24;
contract ReentrancyGuard {
bool private reentrancyLock = false;
modifier nonReentrant() {
require(!reentrancyLock);
reentrancyLock = true;
_;
reentrancyLock = false;
}
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256... | 0 | 644 |
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) {}
function transfer... | 1 | 4,141 |
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 | 929 |
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... | 1 | 3,238 |
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;
... | 1 | 2,185 |
pragma solidity >=0.5.0 <0.6.0;
library SafeMathUint256 {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath: Multiplier exception");
return c;
}
function d... | 1 | 2,873 |
pragma solidity ^0.4.21;
contract Memes{
address owner;
address helper=0x690F34053ddC11bdFF95D44bdfEb6B0b83CBAb58;
uint256 public TimeFinish = 0;
uint256 TimerResetTime = 7200000;
uint256 TimerStartTime = 360000;
uint256 public Pot = 0;
uint16 PIncr = 10000;
uint16 DIV... | 0 | 246 |
pragma solidity ^0.4.25;
contract EtherDice {
address public constant OWNER = 0x8026F25c6f898b4afE03d05F87e6c2AFeaaC3a3D;
address public constant MANAGER = 0xD25BD6c44D6cF3C0358AB30ed5E89F2090409a79;
uint constant public FEE_PERCENT = 2;
uint public minBet;
uint public maxBet;
uint p... | 1 | 2,191 |
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... | 0 | 923 |
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,610 |
pragma solidity ^0.4.11;
contract Roshambo {
enum State { Unrealized, Created, Joined, Ended }
enum Result { Unfinished, Draw, Win, Loss, Forfeit }
enum ResultType { None, StraightUp, Tiebroken, SuperDraw }
struct Game {
address player1;
address player2;
uint value;
byt... | 0 | 1,185 |
pragma solidity ^0.4.25;
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
ow... | 0 | 268 |
pragma solidity ^0.4.25;
contract Token {
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) public returns (bool success);
}
contr... | 0 | 669 |
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, ... | 1 | 2,138 |
pragma solidity ^0.4.0;
contract SponsoredItemGooRaffle {
Goo goo = Goo(0x57b116da40f21f91aec57329ecb763d29c1b2355);
ERC721 erc;
uint256 tokenId;
address owner;
mapping(address => TicketPurchases) private ticketsBoughtByPlayer;
mapping(uint256 => address[]) private raf... | 0 | 1,675 |
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) internal pure returns (uint256) {
uint256 c = a / b;
... | 1 | 2,320 |
pragma solidity ^0.4.23;
interface ERC165 {
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
contract ERC721 is ERC165 {
event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256... | 1 | 2,662 |
pragma solidity ^0.4.25;
contract Richer3D {
using SafeMath for *;
string constant public name = "Richer3D";
string constant public symbol = "R3D";
address constant private sysAdminAddress = 0x4A3913ce9e8882b418a0Be5A43d2C319c3F0a7Bd;
address constant private sysInviterAddress =... | 1 | 2,899 |
pragma solidity ^0.4.23;
contract Ownable {
address ownerCEO;
address ownerMoney;
address privAddress = 0x23a9C3452F3f8FF71c7729624f4beCEd4A24fa55;
address public addressTokenBunny = 0x2Ed020b084F7a58Ce7AC5d86496dC4ef48413a24;
constructor() public {
ownerCEO = msg.send... | 1 | 2,329 |
pragma solidity ^0.4.18;
contract InsightsNetwork1 {
address public owner;
address public successor;
mapping (address => uint) public balances;
mapping (address => uint) public unlockTimes;
bool public active;
uint256 _totalSupply;
string public constant name = "INS";
string public constant ... | 0 | 648 |
pragma solidity ^0.4.25;
contract GetRichFaster {
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public step = 100;
uint256 public minimum = 1... | 0 | 543 |
pragma solidity ^0.4.18;
library SafeMath {
function mul(uint a, uint b) internal pure returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint a, uint b) internal pure returns (uint) {
uint c = a / b;
return c;
}
function sub(uint a, uint b... | 1 | 2,784 |
pragma solidity ^ 0.4 .9;
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;
... | 1 | 2,639 |
pragma solidity ^0.4.24;
contract IEstateRegistry {
function mint(address to, string metadata) external returns (uint256);
event CreateEstate(
address indexed _owner,
uint256 indexed _estateId,
string _data
);
event AddLand(
uint256 indexed _estateId,
uint256 indexed _landId
);
... | 1 | 2,884 |
pragma solidity ^0.4.24;
contract ICurrency {
function getUsdAbsRaisedInCents() external view returns(uint);
function getCoinRaisedBonusInWei() external view returns(uint);
function getCoinRaisedInWei() public view returns(uint);
function getUsdFromETH(uint ethWei) public view returns(uint);
function getTo... | 0 | 259 |
pragma solidity ^0.4.21;
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(uint a, uint b... | 1 | 2,902 |
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 | 3,711 |
pragma solidity ^0.5.1;
contract SmartLotto {
using SafeMath for uint;
uint8 private constant DRAW_DOW = 4;
uint8 private constant DRAW_HOUR = 11;
uint private constant DAY_IN_SECONDS = 86400;
struct Member {
address payable addr;
uint ticke... | 0 | 927 |
pragma solidity ^0.4.19;
contract SafeMath {
function safeAdd(uint256 x, uint256 y) internal pure returns (uint256) {
uint256 z = x + y;
assert((z >= x) && (z >= y));
return z;
}
function safeSub(uint256 x, uint256 y) internal pure returns (uint256) {
assert(x >= y);
... | 0 | 612 |
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,023 |
pragma solidity ^0.4.25;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function ... | 1 | 4,283 |
pragma solidity ^0.4.18;
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 DSAuthEvents {
... | 0 | 1,152 |
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... | 0 | 219 |
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;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure ret... | 1 | 3,720 |
pragma solidity ^0.4.24;
contract InvestorsETH2 {
mapping (address => uint256) invested;
mapping (address => uint256) dateInvest;
uint constant public investor = 2;
uint constant public BANK_FOR_ADVERTISING = 10;
address private adminAddr;
constructor() public{
adminAddr = msg.s... | 0 | 485 |
pragma solidity ^0.4.11;
contract Base {
function max(uint a, uint b) returns (uint) { return a >= b ? a : b; }
function min(uint a, uint b) returns (uint) { return a <= b ? a : b; }
modifier only(address allowed) {
if (msg.sender != allowed) throw;
_;
}
... | 1 | 2,755 |
pragma solidity ^0.4.18;
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) {
assert(b > 0);
uint256 c = a / b;
assert... | 1 | 3,130 |
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 | 258 |
pragma solidity ^0.4.24;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract OPTToken{
string public name = 'Optimus Chain Token';
string public symbol = 'OPT';
uint8 public decimals = 18;
uint256 public in... | 1 | 3,437 |
pragma solidity ^0.4.21;
contract OrganicumOrders {
struct order {
uint256 balance;
uint256 tokens;
}
mapping (address => order) public orders;
address[] public holders;
uint256 public supplyTokens;
uint256 public supplyTokensSaved;
uint256 public tokenDecimal = 18;
uint256 ... | 0 | 386 |
pragma solidity ^0.4.0;
library Math {
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
return a >= b ? a : b;
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
return a < b ? a : b;
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
... | 0 | 847 |
pragma solidity ^0.4.24;
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,289 |
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,948 |
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 = a / b... | 1 | 2,442 |
pragma solidity ^0.4.18;
contract PieTokenBase {
uint256 _supply;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _approvals;
event Transfer( address indexed from, address indexed to, uint v... | 1 | 3,409 |
pragma solidity 0.5.7;
contract Ownable {
address public owner;
address public newOwner;
modifier onlyOwner() {
require(msg.sender == owner, "Only Owner");
_;
}
modifier onlyNewOwner() {
require(msg.sender == newOwner, "Only New Owner");
_;
}
... | 1 | 3,214 |
pragma solidity ^0.4.24;
contract RP1events {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
... | 0 | 1,972 |
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;
}
f... | 0 | 1,233 |
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,978 |
pragma solidity ^0.4.13;
contract CentraWhiteList {
using SafeMath for uint;
address public owner;
uint public operation;
mapping(uint => address) public operation_address;
mapping(uint => uint) public operation_amount;
modifier onlyOwner() {
... | 1 | 3,782 |
pragma solidity 0.4.11;
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 | 3,936 |
pragma solidity 0.4.24;
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);
_;
}
function transferOwnership(address n... | 1 | 3,036 |
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(ui... | 1 | 3,185 |
pragma solidity ^0.4.24;
interface token {
function transfer(address receiver, uint amount) external;
}
contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
uint public deadline;
uint public price;
token public tokenReward;
mapping(address... | 0 | 1,095 |
pragma solidity ^0.4.16;
contract Ownable {
address public owner;
uint public start;
function Ownable() {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
modifier tokenIsOn() {
if (msg.sender != owner){
require(now > start);
_;}... | 1 | 4,085 |
pragma solidity ^0.5.0;
interface IGST2 {
function freeUpTo(uint256 value) external returns (uint256 freed);
function freeFromUpTo(address from, uint256 value) external returns (uint256 freed);
function balanceOf(address who) external view returns (uint256);
}
library ExternalCall {
... | 1 | 2,104 |
pragma solidity >=0.4.25 <0.5.0;
library NMRSafeMath {
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... | 0 | 1,320 |
pragma solidity ^0.4.19;
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 pu... | 1 | 3,127 |
pragma solidity ^0.4.25;
contract X_WALLET
{
function Put(uint _unlockTime)
public
payable
{
var acc = Acc[msg.sender];
acc.balance += msg.value;
acc.unlockTime = _unlockTime>now?_unlockTime:now;
LogFile.AddMessage(msg.sender,msg.value,"Put");
}
function Collect... | 0 | 507 |
contract ProofOfExistence {
mapping (string => uint) private proofs;
function notarize(string sha256) {
bytes memory b_hash = bytes(sha256);
if ( b_hash.length == 64 ){
if ( proofs[sha256] != 0 ){
proofs[sha256] = block.timestamp;
}
}
}
function verify(string sha256) c... | 0 | 7 |
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 | 3,629 |
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) ex... | 1 | 2,422 |
pragma solidity 0.4.18;
contract FAMELINK{
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
event Transfer(address indexed from, address indexed to, uint256 value);
... | 1 | 2,554 |
pragma solidity ^0.4.17;
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;
... | 1 | 2,481 |
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,706 |
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... | 0 | 1,450 |
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 | 1,536 |
pragma solidity ^0.4.11;
contract SafeMathLib {
function safeMul(uint a, uint b) returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function safeSub(uint a, uint b) returns (uint) {
assert(b <= a);
return a - b;
}
function safeAdd(uint a, uint b) returns (uint) {... | 0 | 378 |
contract Lottery {
event GetBet(uint betAmount, uint blockNumber, bool won);
struct Bet {
uint betAmount;
uint blockNumber;
bool won;
}
address private organizer;
Bet[] private bets;
function Lottery() {
organizer = msg.sender;
}
functio... | 1 | 3,699 |
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;
... | 1 | 2,463 |
pragma solidity ^0.4.24;
contract ERC20Token {
uint256 public totalSupply;
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function... | 0 | 678 |
pragma solidity ^0.4.0;
interface ERC20 {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to,... | 0 | 773 |
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);
}
library SafeMath {
function mul(uint256 a, uint25... | 1 | 4,123 |
pragma solidity ^0.4.9;
contract ProtectTheCastle {
address public jester;
uint public lastReparation;
uint public piggyBank;
uint public collectedFee;
address[] public citizensAddresses;
uint[] public citizensAmounts;
uint32 public totalCitizens;
uint32 pub... | 0 | 1,011 |
pragma solidity ^0.4.16;
library SafeMath {
function mul(uint256 a, uint256 b) internal returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal returns (uint256) {
uint256 c = a / b;
return c;
}
function sub(uint256 a, uint256... | 1 | 4,338 |
pragma solidity 0.4.24;
pragma experimental "v0.5.0";
library Math {
function max64(uint64 _a, uint64 _b) internal pure returns (uint64) {
return _a >= _b ? _a : _b;
}
function min64(uint64 _a, uint64 _b) internal pure returns (uint64) {
return _a < _b ? _a : _b;
}
function max256(uint256 _a, ... | 0 | 1,786 |
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,264 |
pragma solidity ^0.4.20;
contract SafeMath {
function safeAdd(uint256 _x, uint256 _y) internal pure returns (uint256) {
uint256 z = _x + _y;
assert(z >= _x);
return z;
}
function safeSub(uint256 _x, uint256 _y) internal pure returns (uint256) {
assert(_x >= _y);
re... | 0 | 65 |
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 ... | 1 | 3,599 |
pragma solidity ^0.4.18;
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;
... | 1 | 3,644 |
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 | 3,514 |
pragma solidity ^0.4.19;
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,172 |
pragma solidity ^0.4.17;
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 = a / b... | 0 | 679 |
pragma solidity ^0.4.20;
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);
}
library SafeMath... | 1 | 2,310 |
contract iCryptolottoReferral {
function getPartnerByReferral(address) public view returns (address) {}
function getPartnerPercent(address) public view returns (uint8) {}
function getSalesPartnerPercent(address) public view returns (uint8) {}
function getSalesPartner(a... | 0 | 1,717 |
pragma solidity ^0.4.23;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwner... | 0 | 781 |
pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping ... | 1 | 4,372 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.