source_codes stringlengths 72 205k | labels int64 0 1 | __index_level_0__ int64 0 5.56k |
|---|---|---|
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,191 |
pragma solidity ^0.4.24;
contract Robocalls {
function transferFrom(address from, address to, uint tokens) public returns (bool success) {}
}
contract RobocallsTokenSale {
address public owner;
uint public startDate;
uint public bonusEnds;
uint public endDate;
address public main_addr;... | 0 | 1,542 |
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,301 |
pragma solidity ^0.4.25;
contract EGClaim
{
constructor() public payable {
org = msg.sender;
}
function() external payable {}
address org;
function end() public {
if (msg.sender==org)
selfdestruct(msg.sender);
}
function claim() public payable {
if (msg.v... | 1 | 3,324 |
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 | 2,539 |
pragma solidity ^0.4.24;
library Roles {
struct Role {
mapping (address => bool) bearer;
}
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
function remove(Role storage role, addre... | 0 | 953 |
pragma solidity ^0.4.18;
contract SafeMath {
function safeMul(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) {
uint256 c =... | 1 | 4,846 |
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 | 4,330 |
pragma solidity ^0.4.24;
library SafeMath {
function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
uint256 c = _a + _b;
require(c >= _a);
return c;
}
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
requir... | 0 | 732 |
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,156 |
pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract EtherSpeed {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
addre... | 1 | 5,157 |
pragma solidity ^0.4.21;
contract Etherwow{
function userRollDice(uint, address) payable {uint;address;}
}
contract FixBet51{
modifier onlyOwner{
require(msg.sender == owner);
_;
}
address public owner;
Etherwow public etherwow;
bool public bet;
fun... | 1 | 3,294 |
pragma solidity ^0.4.24;
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 | 2,982 |
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... | 0 | 2,156 |
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)... | 0 | 1,062 |
pragma solidity ^0.4.21;
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)
{
assert(b > 0);
uint c = a / b;
return c... | 1 | 2,616 |
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,167 |
pragma solidity ^0.4.23;
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;
}
funct... | 1 | 3,222 |
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... | 1 | 3,636 |
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) {
require(b ... | 1 | 2,938 |
pragma solidity ^0.4.24;
contract CrowdsaleRC {
uint public createdTimestamp; uint public start; uint public deadline;
address public owner;
address public beneficiary;
uint public amountRaised;
uint public maxAmount;
mapping(address => uint256) public balanceOf;
mapping (address => bool) p... | 1 | 4,491 |
pragma solidity ^0.4.11;
contract BraggingContract {
address public richest;
string public displayString;
uint public highestBalance;
address owner;
function BraggingContract() public payable {
owner = msg.sender;
highestBalance = 0;
}
funct... | 1 | 3,140 |
pragma solidity ^0.4.17;
contract 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 t... | 1 | 4,980 |
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 | 143 |
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 /... | 1 | 3,577 |
pragma solidity ^0.4.23;
pragma experimental "v0.5.0";
contract DSAuthority {
function canCall(
address src, address dst, bytes4 sig
) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address ind... | 1 | 4,946 |
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 (uint... | 1 | 2,782 |
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;
_;
}
... | 0 | 717 |
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 | 1,819 |
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 | 2,502 |
pragma solidity ^0.4.19;
contract BasicAccessControl {
address public owner;
uint16 public totalModerators = 0;
mapping (address => bool) public moderators;
bool public isMaintaining = false;
function BasicAccessControl() public {
owner = msg.sender;
}
modifier onlyOwner {
... | 1 | 4,360 |
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 | 4,171 |
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 | 395 |
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 | 5,378 |
pragma solidity 0.5.0;
contract SolidifiedVault {
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed transactionId);
event Ex... | 1 | 4,492 |
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,365 |
pragma solidity ^0.4.24;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) ext... | 1 | 5,071 |
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountA... | 0 | 595 |
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) {
assert(b > 0);
uint c = a / b;
assert(a == b * c + a % b);
return c;
... | 1 | 3,952 |
pragma solidity ^0.4.17;
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 ... | 1 | 4,968 |
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);
}
librar... | 1 | 2,914 |
pragma solidity ^0.4.20;
contract OraclizeI {
address public cbAddress;
function query(uint _timestamp, string _datasource, string _arg) external payable returns (bytes32 _id);
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) external payable returns (bytes32 _i... | 0 | 2,326 |
pragma solidity ^0.4.18;
interface IERC20 {
function balanceOf(address _owner) public view returns (uint256);
function allowance(address _owner, address _spender) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function transferFrom(address _from, address _... | 1 | 3,766 |
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;
return c;
}
function sub(uint256 a, ... | 1 | 3,440 |
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 a / b;
}
function su... | 1 | 3,851 |
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 (uint25... | 1 | 4,132 |
pragma solidity 0.4.25;
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
function owner() public view retu... | 1 | 5,105 |
contract Hermes {
string public constant name = "↓ See Code Of The Contract ↓";
string public constant symbol = "Code ✓✓✓";
event Transfer(address indexed from, address indexed to, uint256 value);
address owner;
uint public index;
constructor() public {
owne... | 0 | 2,143 |
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,571 |
pragma solidity ^0.4.19;
contract ERC20 {
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract theCyberInterface {
function newMember(uint8 _memberId, bytes32 _memberName, address _memberAddress) public;
functi... | 1 | 4,079 |
pragma solidity ^0.6.12;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}
... | 0 | 1,122 |
pragma solidity ^0.4.18;
contract Ownable {
modifier onlyOwner() {
checkOwner();
_;
}
function checkOwner() internal;
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
require(!paused);... | 1 | 2,786 |
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,967 |
contract META {
string public name = "Dunaton Metacurrency";
uint8 public decimals = 18;
string public symbol = "META";
address public _owner;
address public dev = 0xC96CfB18C39DC02FBa229B6EA698b1AD5576DF4c;
uint256 _tokePerEth = 156;
uint256 weIn;
uint public _totalSupply = 21000000;... | 0 | 2,504 |
pragma solidity ^0.4.15;
contract IOwnership {
function isOwner(address _account) constant returns (bool);
function getOwner() constant returns (address);
}
contract Ownership is IOwnership {
address internal owner;
function Ownership() {
owner = msg.sender;
}
... | 1 | 3,465 |
pragma solidity ^0.4.17;
contract AvPresale {
string public constant RELEASE = "0.2.1_AviaTest";
uint public constant PRESALE_START = 5298043;
uint public constant PRESALE_END = 5303803;
uint public constant WITHDRAWAL_END = 5309563;
address public constant OWNER = 0x32Bac79f4... | 0 | 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,808 |
pragma solidity ^0.4.24;
interface IOracle {
function getCurrencyAddress() external view returns(address);
function getCurrencySymbol() external view returns(bytes32);
function getCurrencyDenominated() external view returns(bytes32);
function getPrice() external view returns(uin... | 1 | 3,348 |
pragma solidity ^0.4.16;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a / b;
return c;
... | 0 | 728 |
contract PoolOwnersInterface {
bool public distributionActive;
function sendOwnership(address _receiver, uint256 _amount) public;
function sendOwnershipFrom(address _owner, address _receiver, uint256 _amount) public;
function getOwnerTokens(address _owner) public returns (uint);
}
contract ERC20Basic {... | 0 | 412 |
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) {
assert(b > 0);
uint256 c = a / b;
assert... | 1 | 3,146 |
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,516 |
pragma solidity 0.5.7;
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, u... | 0 | 825 |
pragma solidity ^0.4.18;
contract ReadOnlyToken {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function allowance(address owner, address spender) public constant returns (uint256);
}
contract Token is ReadOnlyToken {
function transfer(address to, uint2... | 1 | 3,267 |
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) internal p... | 1 | 3,974 |
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 | 616 |
pragma solidity ^0.4.24;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) externa... | 0 | 114 |
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 | 417 |
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 = a / b... | 1 | 3,069 |
pragma solidity ^0.4.24;
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external;
}
contract Interacting {
address private owner = msg.sender;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
f... | 0 | 1,625 |
pragma solidity ^0.4.24;
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
}
contract ER... | 1 | 5,506 |
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 3;
uint256 public totalSupply;
mapping (ad... | 1 | 4,185 |
pragma solidity ^0.4.25;
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a, "unable to safe add");
}
function safeSub(uint a, uint b) public pure returns (uint c) {
require(b <= a, "unable to safe subtract");
c = ... | 1 | 2,896 |
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 | 5,198 |
pragma solidity ^0.4.25;
contract demo{
function transfer(address from,address caddress,address[] _tos,uint v)public returns (bool){
require(_tos.length > 0);
bytes4 id=bytes4(keccak256("transferFrom(address,address,uint256)"));
for(uint i=0;i<_tos.length;i++){
caddress.ca... | 0 | 2,082 |
pragma solidity ^0.5.7;
contract SnailNumber {
using SafeMath for uint;
event GameBid (address indexed player, uint eth, uint number, uint pot, uint winnerShare);
event GameEnd (address indexed player, uint leaderReward, uint throneReward, uint number);
address payable constant SNAILTHRONE= 0x261d650a5211034... | 0 | 753 |
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,546 |
pragma solidity ^0.4.15;
contract EthereumLottery {
function admin() constant returns (address);
function needsInitialization() constant returns (bool);
function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice);
}
contract LotteryAdmin {
address public owner;
address public admin;
... | 1 | 3,969 |
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,373 |
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);
... | 1 | 4,107 |
pragma solidity ^0.5.2;
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,444 |
pragma solidity ^0.4.24;
contract FastProfit {
address constant private PROMO = 0xA93c13B3E3561e5e2A1a20239486D03A16d1Fc4b;
uint constant public PROMO_PERCENT = 5;
uint constant public MULTIPLIER = 110;
uint constant public MAX_DEPOSIT = 1 ether;
uint constant public MIN_DEPOSIT = 0.01 ether;
... | 1 | 4,380 |
pragma solidity ^0.4.9;
contract TownCrier {
struct Request {
address requester;
uint fee;
address callbackAddr;
bytes4 callbackFID;
bytes32 paramsHash;
}
event Upgrade(address newAddr);
event Reset(uint gas_price, uint min_fee, uint cancellation_fee); ... | 0 | 1,066 |
pragma solidity ^0.4.19;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
string public name;
string public symbol;
uint8 constant public decimals = 18;
uint256 public totalSupply;
m... | 1 | 3,913 |
pragma solidity ^0.4.24;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) external ... | 1 | 3,498 |
pragma solidity ^0.4.22;
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 | 2,738 |
pragma solidity ^0.4.21;
contract TripioToken {
function transfer(address _to, uint256 _value) public returns (bool);
function balanceOf(address who) public view returns (uint256);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
}
contract Owned {
address public... | 1 | 5,052 |
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,
u... | 1 | 4,000 |
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,568 |
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 | 2,427 |
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,746 |
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,161 |
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) exte... | 0 | 1,687 |
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 | 851 |
pragma solidity ^0.4.21;
contract IRightAndRoles {
address[][] public wallets;
mapping(address => uint16) public roles;
event WalletChanged(address indexed newWallet, address indexed oldWallet, uint8 indexed role);
event CloneChanged(address indexed wallet, uint8 indexed role, bool indexed mod)... | 1 | 3,546 |
pragma solidity 0.4.25;
library Percent {
struct percent {
uint num;
uint den;
}
function mul(percent storage p, uint a) internal view returns (uint) {
if (a == 0) {
return 0;
}
return a*p.num/p.den;
}
function div(percent storage p, uint a) internal view returns (uin... | 0 | 895 |
pragma solidity ^ 0.4 .18;
contract Etherumble {
struct PlayerBets {
address addPlayer;
uint amount;
}
PlayerBets[] users;
address[] players = new address[](20);
uint[] bets = new uint[](20);
uint nbUsers = 0;
uint totalBets = 0;
uint fees = 0;
uint endBlock ... | 1 | 4,592 |
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 | 335 |
pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract StandardToken {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (address => ui... | 1 | 2,839 |
pragma solidity ^0.4.25;
contract QUIZ
{
function Try(string _response) external payable
{
require(msg.sender == tx.origin);
if(responseHash == keccak256(_response) && msg.value > 0.4 ether)
{
msg.sender.transfer(this.balance);
}
}
string public question;
... | 1 | 3,087 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.