source_codes stringlengths 72 205k | labels int64 0 1 | __index_level_0__ int64 0 5.56k |
|---|---|---|
pragma solidity ^0.4.23;
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 | 4,840 |
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,708 |
pragma solidity ^0.4.21;
contract SaiContest_Gaia {
address public owner;
uint public start;
uint public last_roll;
uint public last_jack;
address public week_winner;
address public jack_winner;
uint public week_max;
uint public jack_max;
uint public jack_pot;
uint public jack_nonce;
... | 1 | 2,953 |
pragma solidity ^0.4.25;
contract BestMultiplierV3 {
struct Deposit {
address depositor;
uint deposit;
uint payout;
}
Deposit[] public queue;
mapping (address => uint) public depositNumber;
uint public currentReceiverIndex;
uint public totalInvested; ... | 0 | 454 |
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 pure re... | 0 | 609 |
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);
... | 1 | 4,263 |
contract DamnRocks {
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
... | 1 | 5,227 |
pragma solidity ^0.4.19;
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 | 2,074 |
pragma solidity ^0.4.19;
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 ERC2... | 1 | 4,052 |
pragma solidity ^0.4.11;
library SafeMath {
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
... | 1 | 4,527 |
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,622 |
pragma solidity ^0.4.16;
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 ERC20 is ERC2... | 1 | 4,881 |
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
interface iERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint);
function totalSupply() external view returns (uint);
function... | 0 | 40 |
pragma solidity ^0.4.24;
interface PlayerBookInterface {
function getPlayerID(address _addr) external returns (uint256);
function getPlayerName(uint256 _pID) external view returns (bytes32);
function getPlayerLAff(uint256 _pID) external view returns (uint256);
function getPlayerAddr(uint256 _pID) exter... | 0 | 2,089 |
pragma solidity ^0.4.24;
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... | 1 | 3,924 |
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 transferOwnership(address newOwn... | 0 | 2,175 |
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 | 74 |
pragma solidity ^0.4.25;
interface ERC721 {
function totalSupply() external view returns (uint256 tokens);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function exists(uint256 tokenId) external view... | 1 | 4,457 |
pragma solidity ^0.4.21 ;
contract SHERE_PFV_II_883 {
mapping (address => uint256) public balanceOf;
string public name = " SHERE_PFV_II_883 " ;
string public symbol = " SHERE_PFV_II_IMTD " ;
uint8 public decimals = 18 ;
uint256 publi... | 1 | 5,484 |
pragma solidity ^0.4.16;
contract EtherGuess {
bool private running;
bytes32 public pauseReason;
uint public totalPayout;
int public numberOfGuesses;
uint public currentRound;
uint public totalPayedOut;
uint8 public adminPayout;
uint public lastFinish;
uint public mini... | 1 | 2,657 |
pragma solidity ^0.4.21;
contract EIP20Interface {
uint256 public totalSupply;
uint256 public decimals;
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool succe... | 1 | 3,180 |
pragma solidity ^0.4.20;
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;
}
func... | 0 | 2,076 |
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 | 441 |
pragma solidity^0.4.24;
contract ERC20 {
function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function transfer(address to, uint tokens) public returns (bool success);
}
contract father {
... | 0 | 2,051 |
pragma solidity ^0.5.14;
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 ... | 0 | 2,541 |
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 | 1,301 |
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) {
return... | 1 | 3,430 |
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,304 |
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
contract CollateralizerInterface {
function unpackCollateralParametersFromBytes(
bytes32 parameters
) public pure returns (uint, uint, uint);
}
contract DebtKernelInterface {
enum Errors {
DEBT_ISSUED,
ORDER_EXPIRED,
ISSUANCE_CAN... | 0 | 236 |
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,641 |
pragma solidity ^0.4.24;
contract Ownable {
address public owner;
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
}
contract microICO is Ownable {
uint public soft_cap = 10 ether;
uint public ... | 1 | 2,599 |
contract DAO {
function balanceOf(address addr) returns (uint);
function transferFrom(address from, address to, uint balance) returns (bool);
uint public totalSupply;
}
contract WithdrawDAO {
DAO constant public mainDAO = DAO(0x5c8536898fbb74fc7445814902fd08422eac56d0);
address constant public trus... | 0 | 2,573 |
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,
... | 1 | 3,280 |
pragma solidity ^0.4.11;
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint a, uint b) internal returns (uint) {
uint c = a / b;
return c;
}
function sub(uint a, uint b) interna... | 1 | 3,186 |
pragma solidity ^0.4.13;
contract owned {
address public owner;
mapping (address => bool) public admins;
function owned() public {
owner = msg.sender;
admins[msg.sender]=true;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
modifier onlyAdmin {... | 1 | 3,953 |
pragma solidity ^0.4.24;
library SafeMath256 {
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... | 1 | 2,768 |
pragma solidity 0.4.24;
pragma experimental "v0.5.0";
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed... | 1 | 4,223 |
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 | 2,106 |
pragma solidity ^0.4.19;
contract Snake {
address public ownerAddress;
uint256 public length;
mapping (uint256 => uint256) public snake;
mapping (uint256 => address) public owners;
mapping (uint256 => uint256) public stamps;
event Sale(address owner, uint256 profit, uint256 stamp);
... | 1 | 2,679 |
contract BTCVERVIER {
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256... | 1 | 2,761 |
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 ... | 0 | 1,387 |
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,495 |
pragma solidity ^0.4.11;
contract ERC20 {
function transfer(address _to, uint _value);
function balanceOf(address _owner) constant returns (uint balance);
}
contract IOU {
mapping (address => uint256) public iou_purchased;
mapping (address => uint256) public eth_sent;
uint256 public total_iou_a... | 1 | 5,037 |
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,279 |
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;
return c;
}
function sub(... | 1 | 5,450 |
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 | 1,555 |
pragma solidity ^0.4.18;
contract Dividend {
struct Record {
uint balance;
uint shares;
uint index;
}
mapping (address => Record) public records;
address[] public investors;
address public funder;
uint public startTime;
uint public totalShares;
uint public lastI... | 1 | 3,190 |
pragma solidity ^0.4.21;
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... | 1 | 5,220 |
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,594 |
pragma solidity ^0.5.15;
pragma experimental ABIEncoderV2;
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);
... | 0 | 1,920 |
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 | 513 |
pragma solidity ^0.4.18;
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
}
library TiposCo... | 1 | 4,177 |
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,308 |
pragma solidity ^0.4.24;
contract ERC20Basic {
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 {
function add(uint a, uint b) int... | 0 | 914 |
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);
f... | 1 | 3,452 |
pragma solidity ^0.4.16;
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... | 1 | 3,695 |
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract MANToken {
string public name;
string public symbol;
uint256 public decimals = 18;
uint256 DECIMALSFACTOR = 10**decimals;
uint256 const... | 1 | 4,242 |
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 ... | 1 | 3,156 |
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);
... | 0 | 2,198 |
pragma solidity ^0.4.18;
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;
}
... | 0 | 774 |
pragma solidity ^0.4.15;
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 ERC20 is ERC20Ba... | 1 | 4,425 |
pragma solidity ^0.4.24;
contract DigitalGame {
uint constant MIN_BET_MONEY = 10 finney;
uint constant MAX_BET_MONEY = 10 ether;
uint constant MIN_BET_NUMBER = 2;
uint constant MAX_STAGE = 4;
uint constant FIRST_GENERATION_REWARD = 3;
uint constant SECOND_GENERATION_REWARD = 2;
uint ... | 0 | 943 |
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 re... | 0 | 822 |
pragma solidity ^0.4.23;
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 {
... | 1 | 4,277 |
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 | 164 |
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 | 3,983 |
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,538 |
pragma solidity ^0.4.18;
contract Ownable {
modifier onlyOwner() {
checkOwner();
_;
}
function checkOwner() internal;
}
contract OwnableImpl is Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
functio... | 1 | 5,312 |
pragma solidity 0.7.1;
interface IKashiPair {
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event LogAccrue(uint256 accruedAmount, uint256 feeFraction, uint64 rate, uint256 utilization);
event LogAddAsset(address indexed from, address indexed to, uint256 share, uint256 ... | 0 | 1,311 |
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 div(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b > 0);
uint256 c = a / b;
assert(... | 1 | 5,060 |
pragma solidity ^0.4.20;
contract Harj {
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
modifier onlyStronghands {
require(myDividends(true) > 0);
_;
}
event onTokenPurchase(
address indexed customerAddress,
uint2... | 1 | 4,643 |
pragma solidity ^0.4.24;
library NameFilter {
function nameFilter(string _input)
internal
pure
returns(bytes32)
{
bytes memory _temp = bytes(_input);
uint256 _length = _temp.length;
require (_length <= 32 && _length > 0, "string must be between 1 and 32 characters");
... | 1 | 5,167 |
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 pure returns (uint256) {
... | 1 | 3,300 |
pragma solidity ^0.4.21;
contract AppCoins {
mapping (address => mapping (address => uint256)) public allowance;
function balanceOf (address _owner) public constant returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, add... | 1 | 3,310 |
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-mat... | 0 | 327 |
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,490 |
pragma solidity ^0.4.24;
contract Z_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 Z_ERC20 is Z_ERC... | 1 | 5,215 |
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,408 |
pragma solidity ^0.4.25;
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) e... | 0 | 832 |
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;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uin... | 1 | 3,079 |
pragma solidity ^0.4.24;
pragma solidity ^0.4.24;
library ERC20AsmFn {
function isContract(address addr) internal {
assembly {
if iszero(extcodesize(addr)) { revert(0, 0) }
}
}
function handleReturnData() internal returns (bool result) {
assembly {
swi... | 1 | 3,462 |
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... | 1 | 4,882 |
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 | 54 |
pragma solidity 0.4.24;
interface ITokenContract {
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(
address _to,
uint256 _amount
)
external
returns (bool success);
function transferFrom(
address _from,
... | 1 | 4,064 |
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 | 3,451 |
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,901 |
pragma solidity >0.4.18;
library Buffer {
struct buffer {
bytes buf;
uint capacity;
}
function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {
if (capacity % 32 != 0) {
capacity += 32 - (capacity % 32);
}
... | 0 | 1,481 |
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,150 |
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) {... | 1 | 3,335 |
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 | 946 |
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,293 |
pragma solidity ^0.4.24;
contract SimpleInvest {
mapping (address => uint256) invested;
mapping (address => uint256) atBlock;
function () external payable {
if (invested[msg.sender] != 0) {
uint256 amount = invested[msg.s... | 0 | 2,161 |
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,717 |
pragma solidity 0.4.23;
contract ICOEngineInterface {
function started() public view returns(bool);
function ended() public view returns(bool);
function startTime() public view returns(uint);
function endTime() public view returns(uint);
... | 1 | 3,057 |
pragma solidity ^0.4.23;
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 GlobalStorageMultiId {
ui... | 0 | 768 |
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,233 |
pragma solidity ^0.4.25;
contract ERC721
{
string constant public name = "SuperFan";
string constant public symbol = "SFT";
uint256 public totalSupply;
struct Token
{
uint256 price;
uint256 pack;
string uri;
}
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
eve... | 1 | 3,495 |
pragma solidity ^0.4.15;
contract BMICOAffiliateProgramm {
mapping (string => address) partnersPromo;
mapping (address => uint256) referrals;
struct itemPartners {
uint256 balance;
string promo;
bool create;
}
mapping (address => itemPartners) partnersInfo;
uint256 pu... | 0 | 285 |
pragma solidity ^0.4.21;
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,493 |
pragma solidity ^0.4.25;
contract AcceptsExchange {
antigravity public tokenContract;
function AcceptsExchange(address _tokenContract) public {
tokenContract = antigravity(_tokenContract);
}
modifier onlyTokenContract {
require(msg.sender == address(tokenContract));
_;
}... | 1 | 4,951 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.