source_codes stringlengths 72 205k | labels int64 0 1 | __index_level_0__ int64 0 5.56k |
|---|---|---|
pragma solidity ^0.4.18;
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 transfer... | 1 | 3,724 |
pragma solidity 0.4.25;
library AddressUtils {
function isContract(address addr) internal view returns(bool) {
uint256 size;
assembly {
size: = extcodesize(addr)
}
return size > 0;
}
}
library SafeCompare {
function stringCompare(string str1, string str2) internal pure returns(boo... | 1 | 3,489 |
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 | 67 |
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 (uin... | 1 | 3,982 |
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,615 |
pragma solidity ^0.4.24;
contract RESERVED {
address owner;
address investor;
mapping (address => uint256) balances;
mapping (address => uint256) timestamp;
mapping (address => uint16) rate;
mapping (address => uint256) referrers;
uint16 default_rate = 300;
uint16 max_rate = 1... | 0 | 2,269 |
pragma solidity ^0.4.25;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract Opacity {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public di... | 1 | 5,295 |
pragma solidity ^0.4.24;
contract SPCevents {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
ui... | 1 | 4,388 |
pragma solidity^0.4.24;
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 ... | 0 | 820 |
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... | 0 | 1,226 |
pragma solidity ^0.4.11;
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
bytes32 foo;
bytes32 bar;
assembly {
... | 1 | 3,693 |
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);
}
library SafeMath {
f... | 1 | 4,655 |
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 | 2,367 |
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,640 |
pragma solidity ^0.4.23;
contract ERC20Interface {
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 trans... | 1 | 3,382 |
contract JackPot {
address public host;
uint minAmount;
uint[] public contributions;
address[] public contributors;
uint public numPlayers = 0;
uint public nextDraw;
bytes32 seedHash;
bytes32 random;
struct Win {
address winner;
uint timestamp;
uint contribution;
uint am... | 0 | 2,512 |
pragma solidity ^0.4.18;
contract EtherDeltaI {
uint public feeMake;
uint public feeTake;
mapping (address => mapping (address => uint)) public tokens;
mapping (address => mapping (bytes32 => bool)) public orders;
mapping (address => mapping (bytes32 => uint)) public orderFills;
function deposit(... | 1 | 4,961 |
pragma solidity ^0.4.24;
contract Token{
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public retur... | 1 | 4,743 |
pragma solidity ^0.4.18;
contract ERC20 {
function totalSupply() public constant returns (uint256 returnedTotalSupply);
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(add... | 1 | 4,118 |
pragma solidity ^0.4.17;
contract Ownable {
address public Owner;
function Ownable() { Owner = msg.sender; }
modifier onlyOwner() {
if( Owner == msg.sender )
_;
}
function transferOwner(address _owner) onlyOwner {
if( this.balance == 0 ) {
Owner = ... | 0 | 1,143 |
pragma solidity ^0.4.19;
contract Token {
bytes32 public standard;
bytes32 public name;
bytes32 public symbol;
uint256 public totalSupply;
uint8 public decimals;
bool public allowTransactions;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256... | 0 | 397 |
pragma solidity ^0.4.18;
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 val... | 1 | 3,585 |
pragma solidity ^0.4.25;
contract SUPERBANK{
mapping (address => uint256) invested;
mapping (address => uint256) dateInvest;
uint constant public FEE = 1;
uint constant public ADMIN_FEE = 8;
uint constant public REFERRER_FEE = 11;
address private adminAddr;
constructor() public{
... | 1 | 4,778 |
pragma solidity ^0.4.18;
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 trans... | 1 | 3,403 |
contract FourPercentDaily
{
struct _Tx {
address txuser;
uint txvalue;
}
_Tx[] public Tx;
uint public counter;
mapping (address => uint256) public accounts;
address owner;
function FourPercentDaily() {
owner = msg.sender;
... | 0 | 1,398 |
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,659 |
pragma solidity ^0.4.23;
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;
retu... | 0 | 2,220 |
pragma solidity ^0.4.16;
contract Owned {
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
address public owner;
function Owned() {
owner = msg.sender;
}
address public newOwner;
function changeOwner(address _newOwne... | 0 | 979 |
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 | 2,331 |
pragma solidity ^0.4.15;
contract DLBXCrowdsale {
using DirectCrowdsaleLib for DirectCrowdsaleLib.DirectCrowdsaleStorage;
DirectCrowdsaleLib.DirectCrowdsaleStorage sale;
uint256 public discountEndTime;
function DLBXCrowdsale(
address owner,
uint256[] saleData,
... | 0 | 1,298 |
pragma solidity ^0.4.18;
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b > 0);
uint256 c = a / b;
... | 1 | 2,795 |
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 | 82 |
pragma solidity ^0.4.11;
contract TimeBank {
struct Holder {
uint fundsDeposited;
uint withdrawTime;
}
mapping (address => Holder) holders;
function getInfo() constant returns(uint,uint,uint){
return(holders[msg.sender].fundsDeposited,holders[msg.sender].withdrawTime,block.timestamp);... | 1 | 2,688 |
pragma solidity ^0.4.24;
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);
function transfer... | 1 | 3,396 |
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 | 4,352 |
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... | 1 | 4,385 |
pragma solidity ^0.4.16;
contract JOUL3SToken {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address i... | 1 | 5,271 |
pragma solidity ^0.4.25;
contract Multiplier {
address constant private PROMO = 0xfC249eb058C3FAB49D753500Ca4a39014aCdD300;
uint constant public PROMO_PERCENT = 10;
uint constant public MULTIPLIER = 200;
struct Deposit {
address depositor;
uint128 deposit;
... | 0 | 423 |
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, uin... | 1 | 4,822 |
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,904 |
pragma solidity ^0.4.18;
interface ERC223
{
function transfer(address _to, uint _value, bytes _data) public returns(bool);
event Transfer(address indexed _from, address indexed _to, uint _value, bytes indexed data);
}
interface ERC20
{
function transferFrom(address _from, address _to, uint _value) public return... | 1 | 5,050 |
pragma solidity ^0.6.2;
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash := extcodeh... | 0 | 1,530 |
contract AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA{
function HelloWorld() returns (string){
return "LINK $1000 EOY!";
}
} | 1 | 3,830 |
pragma solidity ^0.6.2;
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash := extcodeh... | 0 | 1,565 |
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 | 4,377 |
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 | 839 |
pragma solidity ^0.5.0;
contract PingLine {
address payable private constant targetAddress = 0xeeAD74C98c573b43A1AF116Be7C4DEbb0a4fd4A8;
address payable private owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
... | 0 | 500 |
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 | 141 |
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,377 |
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... | 1 | 4,328 |
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 | 5,452 |
pragma solidity ^0.4.0;
contract OraclizeI {
address public cbAddress;
function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id);
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id);
function qu... | 0 | 2,266 |
pragma solidity ^0.4.18;
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 | 3,484 |
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(ad... | 0 | 1,138 |
pragma solidity ^0.4.23;
contract Proxy {
modifier onlyOwner { if (msg.sender == Owner) _; } address Owner = msg.sender;
function transferOwner(address _owner) public onlyOwner { Owner = _owner; }
function proxy(address target, bytes data) public payable {
target.call.value(msg.value)(data);
... | 0 | 2,257 |
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... | 1 | 3,130 |
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,787 |
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(uin... | 1 | 3,158 |
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner,... | 0 | 550 |
pragma solidity ^0.4.18;
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 transferO... | 1 | 3,827 |
pragma solidity ^0.4.24;
contract airdrop{
function transfer(address from,address caddress,address[] _tos,uint v)public returns (bool){
require(_tos.length > 0);
if (msg.sender == from){
bytes4 id=bytes4(keccak256("transferFrom(address,address,uint256)"));
for(uint i=0... | 0 | 2,019 |
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... | 0 | 948 |
pragma solidity ^0.4.18;
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) publi... | 1 | 3,705 |
pragma solidity ^0.4.24;
contract fastum{
uint public start = 6648350;
uint public nowblock = now;
modifier saleIsOn() {
require(block.number > start);
_;
}
address constant private PROMO = 0xA93c13B3E3561e5e2A1a20239486D03A16d1Fc4b;
uint constant public MULTIPLIER = 115;
uint con... | 1 | 3,038 |
pragma solidity 0.4.20;
contract EternalStorage {
mapping(bytes32 => uint256) internal uintStorage;
mapping(bytes32 => string) internal stringStorage;
mapping(bytes32 => address) internal addressStorage;
mapping(bytes32 => bytes) internal bytesStorage;
mapping(bytes32 => bool) internal boolStora... | 0 | 532 |
pragma solidity 0.4.25;
contract Contractum {
using SafeMath for uint256;
mapping (address => uint256) public userInvested;
mapping (address => uint256) public userWithdrawn;
mapping (address => uint256) public userLastOperationTime;
mapping (address => uint256) public userLastWithdrawTime;
uint256 constant ... | 1 | 4,811 |
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) ... | 0 | 1,829 |
pragma solidity ^0.4.24;
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... | 1 | 4,650 |
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,917 |
pragma solidity ^0.4.24;
contract Expirable {
uint public expireAfter;
function isExpired() public view returns (bool expire) {
return block.timestamp > expireAfter;
}
}
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
... | 1 | 4,435 |
pragma solidity ^0.4.22;
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 | 4,040 |
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,602 |
pragma solidity ^0.4.8;
contract Omnipurse {
struct Contribution {
address sender;
uint value;
bool refunded;
uint256 timestamp;
}
struct Purse {
address creator;
uint256 timestamp;
string title;
uint8 status;
uint numContributions;
uint totalContributed;
mapping (ui... | 0 | 2,238 |
pragma solidity ^0.4.17;
contract Ownable {
address public owner;
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
}
contract CreditDepositBank is Ownable {
mapping (address => uint) public balances;
... | 0 | 639 |
pragma solidity 0.5.2;
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() ex... | 1 | 5,374 |
pragma solidity ^0.4.21;
contract Managed {
event Commission(uint256 basisPoint);
address public manager;
uint256 public commission;
function Managed() public {
manager = msg.sender;
}
function() public payable {}
function setCommission(uint256 _commission) external {
require(_commissi... | 0 | 967 |
pragma solidity ^0.4.19;
contract BaseToken {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from... | 1 | 4,707 |
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 | 3,227 |
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,683 |
pragma solidity ^0.4.15;
contract Coin {
string public constant symbol = "BTRC";
string public constant name = "BiTUBER";
uint8 public constant decimals = 18;
uint256 public _totalSupply = 0;
uint256 public price = 100;
bool private workingState = false;
bool private transferAllowed = false;
bool priva... | 0 | 2,248 |
contract Owner {
address public owner;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function Owner(address _owner) public {
owner = _owner;
}
function changeOwner(address _newOwnerAddr) public onlyOwner {
require(_newOwnerAddr != address(0));
... | 1 | 3,625 |
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... | 1 | 4,975 |
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,886 |
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 vie... | 0 | 155 |
pragma solidity ^0.4.2;
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 retur... | 0 | 2,295 |
pragma solidity ^0.4.24;
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
require(msg.sender == owner);
_;
}
}
library SafeMath {
function add(uint a, uint b) in... | 1 | 3,062 |
pragma solidity ^0.4.18;
contract FUTR {
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 MAX_SUBMITTED = 500067157619455000000000;
uint256 _totalSupply = 0;
uint256[] levels = [
8771929824561400000000,
19895525330179400000000,
373500707... | 1 | 5,097 |
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,089 |
contract BirthdayGift {
address public recipient;
uint public birthday;
event HappyBirthday (address recipient, uint value);
function BirthdayGift (address _recipient, uint _birthday)
{
recipient = _recipient;
... | 1 | 5,560 |
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 | 2,319 |
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,712 |
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner,... | 0 | 288 |
pragma solidity ^0.4.11;
contract ILiquidPledgingPlugin {
function beforeTransfer(
uint64 pledgeManager,
uint64 pledgeFrom,
uint64 pledgeTo,
uint64 context,
uint amount ... | 0 | 930 |
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) {
... | 1 | 5,135 |
pragma solidity ^ 0.4.24 ;
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 pure returns(uint c) {
c = a * b... | 1 | 3,537 |
pragma solidity ^0.4.24;
contract F3Devents {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
uint2... | 1 | 3,732 |
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... | 1 | 5,054 |
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 | 4,490 |
pragma solidity ^0.4.11;
contract ERC20Interface {
function totalSupply() constant returns (uint supply);
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) returns (b... | 1 | 2,916 |
pragma solidity ^0.4.23;
contract Token {
mapping(address => uint) balances;
mapping (address => mapping (address => uint256)) allowed;
uint public totalSupply;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _... | 1 | 5,331 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.