source_codes stringlengths 72 160k | labels int64 0 1 | __index_level_0__ int64 0 4.4k |
|---|---|---|
pragma solidity ^0.4.24;
contract IERC20 {
function totalSupply() public constant returns (uint _totalSupply);
function balanceOf(address _owner) public constant returns (uint balance);
function transfer(address _to, uint _value) public returns (bool success);
function transferFrom(address _from, a... | 1 | 3,630 |
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;
... | 1 | 2,115 |
pragma solidity ^0.4.25;
contract EtherStateEquivalentToken {
address public owner;
mapping (address => uint256) public tokenBalance;
mapping (address => uint256) public refBalance;
uint256 public tokenPrice = 0.0004 ether;
uint256 public tokenSupply = 0;
uint256 constant public softCap =... | 0 | 1,787 |
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);
}
co... | 1 | 3,620 |
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... | 0 | 1,587 |
pragma solidity ^0.4.20;
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)... | 1 | 2,857 |
pragma solidity ^0.4.23;
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() {
require(... | 0 | 1,731 |
pragma solidity ^0.4.25;
contract CoinFlip {
address owner;
uint payPercentage = 90;
uint public MaxAmountToBet = 200000000000000000;
struct Game {
address addr;
uint blocknumber;
uint blocktimestamp;
uint bet;
uint prize;
bool winner;
}
Game[] lastPlayedGames;
Gam... | 0 | 2,028 |
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 transferOwn... | 1 | 3,966 |
pragma solidity 0.6.12;
library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x < y ? x : y;
}
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
... | 1 | 3,367 |
pragma solidity ^0.4.24;
interface IERC165 {
function supportsInterface(bytes4 interfaceId)
external
view
returns (bool);
}
contract IERC721 is IERC165 {
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
event Approval(
address indexed own... | 1 | 3,422 |
pragma solidity ^0.4.11;
contract FundariaBonusFund {
mapping(address=>uint) public ownedBonus;
mapping(address=>int) public investorsAccounts;
uint public finalTimestampOfBonusPeriod;
address registeringContractAddress;
address public fundariaTokenBuyAddress;
address creator;
... | 0 | 1,791 |
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 retu... | 1 | 2,389 |
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 r... | 0 | 1,940 |
pragma solidity ^0.4.17;
contract Ownable {
address public Owner;
function Ownable() { Owner = msg.sender; }
function isOwner() internal constant returns (bool) { return(Owner == msg.sender); }
}
contract Savings is Ownable {
address public Owner;
mapping (address => uint) public deposits;
... | 0 | 702 |
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 | 3,562 |
pragma solidity ^0.4.21;
contract Partner {
function exchangeTokensFromOtherContract(address _source, address _recipient, uint256 _RequestedTokens);
}
contract Target {
function transfer(address _to, uint _value);
}
contract MNY {
string public name = "MNY by Monkey Capital";
uint8 public decimals =... | 1 | 2,194 |
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 | 4,000 |
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 | 994 |
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 | 464 |
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;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure re... | 1 | 2,098 |
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,550 |
pragma solidity ^0.5.0;
interface TargetInterface {
function sendTXTpsTX(string calldata UserTicketKey, string calldata setRef) external payable;
}
contract NonRandomFiveDemo {
address payable private targetAddress = 0xC19abA5148A8E8E2b813D40bE1276312FeDdB813;
address payable private owner;
mod... | 1 | 3,810 |
pragma solidity ^0.4.19;
contract IToken {
function balanceOf(address _address) constant returns (uint balance);
function transferFromOwner(address _to, uint256 _value) returns (bool success);
}
contract TokenEscrow {
string public standard = 'FractalPreRelease 1.0';
string public name = 'FractalPre... | 1 | 4,159 |
pragma solidity 0.4.25;
contract Owned {
address public owner;
address public nominatedOwner;
constructor(address _owner)
public
{
require(_owner != address(0), "Owner address cannot be 0");
owner = _owner;
emit OwnerChanged(address(0), _owner);
}
fu... | 1 | 2,715 |
pragma solidity ^0.4.19;
contract Ownable {
address public owner;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function Ownable() public {
owner = msg.sender;
}
function transferTo(address _to) public onlyOwner returns (bool) {
require(_to !... | 0 | 1,236 |
pragma solidity ^0.4.19;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract BKEXComToken {
string public name = "BKEX.COM Token";
string public symbol = "bkex.com";
uint256 public decimals = 18;
uint256 publ... | 1 | 3,050 |
pragma solidity ^0.5.7;
interface TokenInterface {
function allowance(address, address) external view returns (uint);
function balanceOf(address) external view returns (uint);
function approve(address, uint) external;
function transfer(address, uint) external returns (bool);
function transferFrom(a... | 1 | 3,014 |
pragma solidity ^0.4.25;
contract 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 safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
uint... | 1 | 2,293 |
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 {
... | 0 | 212 |
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... | 0 | 1,036 |
pragma solidity ^0.4.24;
library AddressUtilsLib {
function isContract(address _addr) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(_addr)
}
return size > 0;
}
}
pragma solidity ^0.4.24;
library SafeMathLib {
f... | 1 | 4,327 |
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 | 900 |
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);
}
co... | 0 | 1,446 |
pragma solidity ^0.4.17;
contract tokenRecipient { function receiveApproval(address from, uint256 value, address token, bytes extraData); }
contract JaxBox
{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public... | 1 | 2,963 |
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,849 |
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 | 2,167 |
pragma solidity ^0.4.16;
contract ERC20 {
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);
function allowance(address own... | 1 | 4,163 |
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 returns (ui... | 0 | 660 |
pragma solidity ^0.4.7;
contract SYCEarlyPurchase {
string public constant PURCHASE_AMOUNT_UNIT = 'ETH';
uint public constant WEI_MINIMUM_PURCHASE = 40 * 10 ** 18;
uint public constant WEI_MAXIMUM_EARLYPURCHASE = 7000 * 10 ** 18;
address public owner;
EarlyPurchase[] public earlyPurcha... | 0 | 1,614 |
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 | 741 |
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... | 0 | 245 |
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 | 4,186 |
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 | 1,754 |
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 DSAuthEvents {... | 1 | 2,417 |
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,169 |
pragma solidity ^0.4.25;
contract 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(u... | 0 | 1,206 |
pragma solidity ^0.4.24;
contract EtherBet{
address gameOwner = address(0);
bool locked = false;
function bet() payable
{
if ((random()%2==1) && (msg.value == 1 ether) && (!locked))
{
if (!msg.sender.call.value(2 ether)())
throw;
}
}
function lock()
{
if (gameOwner==msg.sender)
{
locked =... | 0 | 509 |
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,732 |
pragma solidity ^0.4.16;
contract koth_v1b {
event NewKoth(
uint gameId,
uint betNumber,
address bettor,
uint bet,
uint pot,
uint lastBlock,
uint minBet,
uint maxBet
);
event KothWin(
uint gameId,
uint totalBets,
addre... | 0 | 597 |
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) intern... | 1 | 2,186 |
pragma solidity ^0.4.19;
interface ERC20 {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256... | 1 | 2,304 |
pragma solidity ^0.4.15;
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,759 |
pragma solidity ^0.4.11;
contract asssderf {
event Hodl(address indexed hodler, uint indexed amount);
event Party(address indexed hodler, uint indexed amount);
mapping (address => uint) public hodlers;
uint constant partyTime = 1546508000;
function() payable {
hodlers[msg.sender] += msg.val... | 0 | 981 |
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 transferOw... | 1 | 3,481 |
pragma solidity ^0.4.24;
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function transfer(address to, uint tokens) public returns (bool success);
event Transfer(address ind... | 1 | 4,132 |
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 | 518 |
pragma solidity 0.4.25;
library Math {
function min(uint a, uint b) internal pure returns(uint) {
if (a > b) {
return b;
}
return a;
}
}
library Zero {
function requireNotZero(address addr) internal pure {
require(addr != address(0), "require not zero address");
}
function requir... | 1 | 2,390 |
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 sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
... | 0 | 767 |
pragma solidity ^0.5.0;
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) external returns (... | 1 | 4,290 |
pragma solidity ^0.4.18;
contract LuckyNumber {
address owner;
bool contractIsAlive = true;
uint8 winningNumber;
uint commitTime = 60;
uint nonce = 1;
mapping (address => uint8) addressToGuess;
mapping (address => uint) addressToTimeStamp;
modifier live()
{... | 0 | 1,726 |
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 | 1,651 |
pragma solidity ^0.4.18;
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 transf... | 1 | 2,910 |
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(uint a, uint b) p... | 1 | 3,135 |
pragma solidity ^0.4.18;
library _SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
}
function mul(uint a, uint b) intern... | 1 | 2,512 |
pragma solidity ^0.4.23;
contract Contract {
struct Contributor {
uint256 balance;
uint256 balance_bonus;
uint256 fee;
bool whitelisted;
}
mapping (address => Contributor) public contributors;
uint256 public contract_eth_value;
uint256 public contract_eth_value_fee;
}
contract ERC20 {
func... | 1 | 3,274 |
pragma solidity ^0.4.24;
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address indexed operator, string role);
event RoleRemoved(address indexed operator, string role);
function checkRole(address _operator, string _role)
public
view
... | 0 | 421 |
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) {
require(_b > 0);
uint256 c... | 0 | 123 |
pragma solidity ^0.4.24;
contract POOHMOXevents {
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNewPlayer,
uint256 affiliateID,
address affiliateAddress,
bytes32 affiliateName,
u... | 1 | 4,239 |
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 returns (uint256) {
uint256 c ... | 1 | 3,013 |
pragma solidity ^0.4.20;
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... | 0 | 819 |
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,403 |
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;... | 0 | 1,382 |
pragma solidity ^0.4.24;
contract H3Devents {
event onNewDecision
(
address senderAddress,
uint256 randNum,
bool decision
);
event onNewName
(
uint256 indexed playerID,
address indexed playerAddress,
bytes32 indexed playerName,
bool isNew... | 0 | 1,575 |
pragma solidity ^0.4.0;
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 (uint... | 0 | 1,638 |
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... | 0 | 1,795 |
contract Escrow {
address seller;
address buyer;
address arbiter;
function Escrow() {
buyer = msg.sender;
seller = 0x1db3439a222c519ab44bb1144fc28167b4fa6ee6;
arbiter = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045;
}
function finalize() {
if (msg.send... | 1 | 4,240 |
pragma solidity ^0.4.25;
pragma experimental ABIEncoderV2;
library Strings {
function concat(string _base, string _value)
internal
pure
returns (string) {
bytes memory _baseBytes = bytes(_base);
bytes memory _valueBytes = bytes(_value);
assert(_valueBytes.leng... | 0 | 399 |
pragma solidity ^0.4.15;
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) inte... | 1 | 3,490 |
pragma solidity 0.4.24;
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;
}
}
in... | 1 | 3,793 |
pragma solidity ^0.4.19;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
}
fu... | 1 | 2,256 |
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);
}
... | 0 | 1,352 |
contract Token {
uint256 public totalSupply;
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to,... | 1 | 2,144 |
pragma solidity ^0.4.19;
contract PreIcoContract {
function buyTokens (address _investor) public payable;
uint256 public startTime;
uint256 public endTime;
}
contract ReservationContract {
mapping(address => bool) public invested;
uint public MIN_INVESTMENT = 1 ether;
PreIcoC... | 1 | 3,935 |
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 | 982 |
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) ext... | 0 | 456 |
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) {
retur... | 1 | 3,049 |
pragma solidity 0.4.19;
contract NameRegistry {
uint public nextId = 0;
mapping (uint => Participant) public participantMap;
mapping (address => NameInfo) public nameInfoMap;
mapping (bytes12 => address) public ownerMap;
mapping (address => string) public nameMap;
struct NameI... | 1 | 3,520 |
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,950 |
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 | 3,508 |
pragma solidity >=0.7.0;
contract testSend {
function doSend(address payable _to, uint256 _amountETH) public {
_to.call{value: _amountETH}("");
_to.send(_amountETH);
_to.transfer(_amountETH);
}
receive() external payable {}
... | 1 | 3,363 |
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 (ui... | 0 | 641 |
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... | 0 | 1,953 |
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 ERC20Basic {
function allowance(address owne... | 1 | 4,055 |
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 | 2,603 |
pragma solidity ^0.4.25;
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 ... | 1 | 4,197 |
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,281 |
pragma solidity ^0.4.24;
contract Daily75 {
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public step = 125;
uint256 public minimum = 10 finn... | 0 | 1,884 |
pragma solidity 0.4.25;
contract BTCNNInterface {
function getFrontEndTokenBalanceOf(address who) public view returns(uint);
function transfer(address _to, uint _value) public returns(bool);
function approve(address spender, uint tokens) public returns(bool);
}
contract BtcnnRoll {
using SafeMath
for ui... | 1 | 3,710 |
pragma solidity ^0.4.11;
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwn... | 1 | 2,426 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.