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 sp... | 0 | 1,841 |
pragma solidity ^0.4.25;
contract Ownable
{
address public laxmi;
address public newLaxmi;
constructor() public
{
laxmi = msg.sender;
}
modifier onlyLaxmi()
{
require(msg.sender == laxmi, "Can used only by owner");
_;
}
function changeLaxmi(address _lax... | 0 | 537 |
pragma solidity ^0.4.16;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is... | 1 | 2,806 |
pragma solidity ^0.4.24;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function tr... | 1 | 4,341 |
pragma solidity ^0.4.23;
contract Ownable {
address public owner;
address public cfoAddress;
constructor() public{
owner = msg.sender;
cfoAddress = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
modifier onlyCFO() {
re... | 1 | 3,175 |
pragma solidity ^0.4.24;
contract MainContract {
address owner;
address advertisingAddress;
uint private constant minInvest = 5 finney;
using Calc for uint;
using PercentCalc for PercentCalc.percent;
using Zero for *;
using compileLibrary for *;
struct User {
uint idx;
... | 0 | 784 |
contract ESportsConstants {
uint constant TOKEN_DECIMALS = 18;
uint8 constant TOKEN_DECIMALS_UINT8 = uint8(TOKEN_DECIMALS);
uint constant TOKEN_DECIMAL_MULTIPLIER = 10 ** TOKEN_DECIMALS;
uint constant RATE = 240;
}
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (... | 1 | 4,057 |
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,409 |
pragma solidity ^0.8.4;
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 o... | 0 | 2,537 |
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(0xe4ae1efdfc53b73893af49113d8694a057b9c0d1);
address constant public trus... | 0 | 154 |
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 | 3,009 |
pragma solidity >=0.8.0;
interface IShaman {
function memberAction(address member, uint96 loot, uint96 shares) external payable returns (uint96 lootOut, uint96 sharesOut);
}
contract Baal {
bool public lootPaused;
bool public sharesPaused;
bool singleSummoner;
uint8 constant public dec... | 0 | 1,686 |
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);
}
lib... | 1 | 2,901 |
pragma solidity ^0.4.21;
contract LasVegas{
address owner;
address helper=0x30B3E09d9A81D6B265A573edC7Cc4C4fBc0B0586;
uint256 public TimeFinish = 0;
uint256 TimerResetTime = 7200;
uint256 TimerStartTime = 3600;
uint256 public Pot = 0;
uint16 PI... | 1 | 5,505 |
contract Government {
uint32 public lastCreditorPayedOut;
uint public lastTimeOfNewCredit;
uint public profitFromCrash;
address[] public creditorAddresses;
uint[] public creditorAmounts;
address public corruptElite;
mapping (address => uint) buddies;
uint constant TWELVE_HOURS = 43... | 1 | 4,721 |
pragma solidity ^0.5.10;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
... | 1 | 3,863 |
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, uint256 b) internal pure returns... | 1 | 2,733 |
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,895 |
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 | 569 |
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) {
... | 0 | 1,816 |
contract RNG{
function contribute(uint _block) public payable;
function requestRN(uint _block) public payable {
contribute(_block);
}
function getRN(uint _block) public returns (uint RN);
function getUncorrelatedRN(uint _block) public returns (uint RN) {
uint ... | 0 | 2,065 |
pragma solidity ^0.4.21;
contract Custodian {
struct Request {
bytes32 lockId;
bytes4 callbackSelector;
address callbackAddress;
uint256 idx;
uint256 timestamp;
bool extended;
}
event Requested(
bytes32 _lockId,
address... | 0 | 127 |
pragma solidity ^0.4.16;
contract owned {
address public owner;
mapping (address => bool) public admins;
function owned() {
owner = msg.sender;
admins[msg.sender]=true;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
modifier onlyAdmin {
... | 1 | 3,394 |
pragma solidity ^0.4.11;
contract ERC20Token {
uint256 public totalSupply;
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferF... | 1 | 3,327 |
pragma solidity ^0.4.24;
contract FoMo3Dlong{
uint256 public airDropPot_;
uint256 public airDropTracker_;
function withdraw() public;
function buyXaddr(address _affCode, uint256 _team) public payable;
}
contract MainHub{
using SafeMath for *;
address public owner;
bool public closed = fa... | 1 | 5,544 |
pragma solidity ^0.5.0;
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;
}
func... | 1 | 2,975 |
pragma solidity ^0.4.18;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint) {
uint c = a + b;
assert(c >= a && c >= b);
return c;
}
function sub(uint a, uint b) internal pure returns (uint) {
assert(b <= a);
re... | 0 | 980 |
pragma solidity ^0.5.9;
contract Receiver {
address public implementation;
bool public isPayable;
event LogImplementationChanged(address _oldImplementation, address _newImplementation);
event LogPaymentReceived(address sender, uint256 value);
constructor(address _impleme... | 0 | 2,300 |
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 | 190 |
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(addre... | 0 | 1,139 |
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 | 5,088 |
pragma solidity ^0.5.0;
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() e... | 0 | 699 |
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnersh... | 1 | 5,317 |
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 ... | 0 | 606 |
pragma solidity ^0.4.24;
contract SafeMath {
function safeAdd(uint256 x, uint256 y) internal returns(uint256) {
uint256 z = x + y;
assert((z >= x) && (z >= y));
return z;
}
function safeSubtract(uint256 x, uint256 y) internal returns(uint256) {
assert(x >= y);
uint... | 1 | 4,276 |
pragma solidity ^0.6.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
re... | 0 | 301 |
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 returns (uint256) {
uint256 c =... | 1 | 3,420 |
pragma solidity ^0.4.20;
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 | 5,359 |
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,060 |
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 vi... | 0 | 2,565 |
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract Tacoin {
string public name = "Tacoin";
string public symbol = "TACO";
uint8 public decimals = 18;
uint256 public totalSupply = 10000000000... | 1 | 5,554 |
pragma solidity ^0.4.19;
contract TeambrellaWallet {
uint public m_opNum;
uint public m_teamId;
address public m_owner;
address[] public m_cosigners;
address[] public m_cosignersApprovedDisband;
modifier orderedOps(uint opNum) {
require(opNum >= m_opNum);
_;
}... | 0 | 1,069 |
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,524 |
pragma solidity 0.4.25;
contract EthRV {
using SafeMath for uint;
struct Investor {
uint deposit;
uint paymentTime;
uint withdrawal;
uint boostStartup;
bool isParticipant;
}
mapping (address => Investor) public investors;
address public admin1Address;
address public admin2Address;
... | 0 | 2,205 |
pragma solidity ^0.6.6;
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,... | 0 | 1,243 |
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 | 16 |
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 | 3,120 |
pragma solidity ^0.4.24;
contract FoMo3Dlong{
uint256 public airDropPot_;
uint256 public airDropTracker_;
function withdraw() public;
function buyXaddr(address _affCode, uint256 _team) public payable;
}
contract MainHub{
using SafeMath for *;
address public owner;
bool public closed = fa... | 1 | 4,642 |
pragma solidity ^0.4.16;
contract ERC20token{
uint256 public totalSupply;
string public name;
uint8 public decimals;
string public symbol;
address public admin;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address in... | 1 | 4,754 |
pragma solidity 0.4.24;
contract ERC20TokenInterface {
function totalSupply () external constant returns (uint);
function balanceOf (address tokenOwner) external constant returns (uint balance);
function transfer (address to, uint tokens) external returns (bool success);
function transferFrom (address... | 0 | 815 |
pragma solidity ^0.4.11;
contract ERC20Interface {
uint public totalSupply;
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)
... | 1 | 3,067 |
pragma solidity ^0.4.11;
interface token {
function transfer(address receiver, uint amount) public;
}
contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
uint public deadline;
uint public price;
token public tokenReward;
mapping(addr... | 1 | 5,322 |
pragma solidity ^0.4.17;
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);
f... | 0 | 959 |
pragma solidity ^0.4.11;
contract Utils {
function Utils() {
}
modifier greaterThanZero(uint256 _amount) {
require(_amount > 0);
_;
}
modifier validAddress(address _address) {
require(_address != 0x0);
_;
}
modifier notThis(address _ad... | 1 | 4,893 |
pragma solidity ^0.4.23;
contract MonarchyGame {
struct Vars {
address monarch;
uint64 prizeGwei;
uint32 numOverthrows;
uint32 blockEnded;
uint32 prevBlock;
bool isPaid; ... | 0 | 225 |
pragma solidity ^0.4.25;
pragma experimental ABIEncoderV2;
contract LibSignatureValidation {
using LibBytes for bytes;
function isValidSignature(bytes32 hash, address signerAddress, bytes memory signature) internal pure returns (bool) {
require(signature.length == 65, "LENGTH_65_REQUIRED");
uint8 v = uin... | 1 | 3,354 |
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, addres... | 0 | 2,485 |
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 | 562 |
pragma solidity ^0.4.15;
contract IICOInfo {
function estimate(uint256 _wei) public constant returns (uint tokens);
function purchasedTokenBalanceOf(address addr) public constant returns (uint256 tokens);
function isSaleActive() public constant returns (bool active);
}
contract IMintableToken {
function... | 1 | 3,436 |
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,693 |
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);
... | 0 | 1,045 |
pragma solidity ^0.4.24;
library SafeMath {
function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
uint256 c = _a + _b;
assert(c >= _a);
return c;
}
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
assert(_a >= _b);
return _a... | 1 | 3,446 |
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 | 4,565 |
pragma solidity ^0.4.25;
contract Ownable
{
address public owner;
address public newOwner;
constructor() public
{
owner = msg.sender;
}
modifier onlyOwner()
{
require(msg.sender == owner, "Can used only by owner");
_;
}
function changeOwner(address... | 0 | 954 |
pragma solidity 0.4.21;
interface ExchangeHandler {
function getAvailableAmount(
address[8] orderAddresses,
uint256[6] orderValues,
uint256 exchangeFee,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256);
... | 1 | 5,543 |
pragma solidity ^0.4.20;
contract ETH_QUIZ
{
function Try(string _response) external payable {
require(msg.sender == tx.origin);
if(responseHash == keccak256(_response) && msg.value>=1 ether)
{
msg.sender.transfer(this.balance);
}
}
string public qu... | 1 | 2,735 |
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);
}
c... | 1 | 5,454 |
pragma solidity ^0.4.19;
contract Token {
function name() public constant returns (string);
function symbol() public constant returns (string);
function decimals() public constant returns (uint8);
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public c... | 1 | 4,735 |
pragma solidity ^0.4.24;
contract GameX {
using SafeMath for uint256;
string public name = "GameX";
string public symbol = "nox";
mapping(address => bool) admins;
bool public activated = false;
uint public compot;
uint minFee = 0.01 ether;
uint maxFee = 1 ether... | 1 | 5,362 |
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,218 |
pragma solidity ^0.4.16;
library SafeMath {
function mul(uint a, uint b) internal pure returns (uint) {
uint c = a * b;
require(a == 0 || c / a == b);
return c;
}
function div(uint a, uint b) internal pure returns (uint) {
require(b > 0);
uint c = a / b;
require(a == b * c + a % b);
... | 1 | 5,254 |
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,... | 0 | 1,527 |
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) external ... | 1 | 3,987 |
pragma solidity ^0.4.18;
contract PotPotato{
address public ceoAddress;
address public hotPotatoHolder;
address public lastHotPotatoHolder;
uint256 public lastBidTime;
uint256 public contestStartTime;
uint256 public lastPot;
Potato[] public potatoes;
uint256 public BASE_TIME_TO... | 1 | 5,487 |
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) exter... | 0 | 1,300 |
pragma solidity ^0.4.25;
contract ExRAR {
address Owner;
bool closed = false;
function() public payable {}
function assignOwner() public payable {
if (0==Owner) Owner=msg.sender;
}
function close(bool F) public {
if (msg.sender==Owner) closed=F;
}
function end() public... | 1 | 5,441 |
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 | 160 |
pragma solidity ^0.4.18;
contract FUTMOTO {
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 MAX_SUBMITTED = 15000000000000000000;
uint256 _totalSupply = 0;
uint256[] levels = [
1000000000000000000,
3000000000000000000,
600000000000000... | 1 | 4,067 |
pragma solidity ^0.5.0;
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() e... | 0 | 956 |
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 (uint... | 1 | 3,791 |
pragma solidity ^0.4.25;
contract ERC20 {
function transfer(address _recipient, uint256 _value) public returns (bool success);
}
contract Airdrop {
function drop(ERC20 token, address[] recipients, uint256[] values) public {
for (uint256 i = 0; i < recipients.length; i++) {
token.transfer(recipients[i], ... | 1 | 3,234 |
pragma solidity ^0.4.24;
contract AceReturns {
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) recentinvestment;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint25... | 1 | 2,869 |
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,777 |
pragma solidity ^0.4.24;
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a);
}
function safeSub(uint a, uint b) public pure returns (uint c) {
require(b <= a);
c = a - b;
}
function safeMul(uint a, uint b) ... | 1 | 4,433 |
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 (... | 1 | 4,973 |
pragma solidity ^0.4.11;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a / b;
return c;
... | 1 | 2,961 |
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 | 2,200 |
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 | 98 |
pragma solidity ^0.4.11;
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 q... | 0 | 2,557 |
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 returns (uint25... | 1 | 3,183 |
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 | 253 |
pragma solidity ^0.4.24;
contract EthGods {
EthGodsName private eth_gods_name;
function set_eth_gods_name_contract_address(address eth_gods_name_contract_address) public returns (bool) {
require(msg.sender == admin);
eth_gods_name = EthGodsName(eth_gods_name_contract_address);
... | 1 | 3,923 |
pragma solidity ^0.4.18;
contract 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 | 4,199 |
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) {
... | 0 | 1,445 |
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,648 |
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,682 |
pragma solidity ^0.4.23;
contract ZTHReceivingContract {
function tokenFallback(address _from, uint _value, bytes _data) public returns (bool);
}
contract ZTHInterface {
function getFrontEndTokenBalanceOf(address who) public view returns (uint);
function transfer(address _to, uint _value) public returns (... | 1 | 4,723 |
pragma solidity ^0.4.24;
interface ERC165 {
function supportsInterface(bytes4 _interfaceId)
external
view
returns (bool);
}
contract ERC721Basic is ERC165 {
bytes4 internal constant InterfaceId_ERC721 = 0x80ac58cd;
bytes4 internal constant InterfaceId_ERC721Exists = 0x4f558e79;
... | 1 | 3,991 |
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,696 |
pragma solidity ^0.4.18;
contract NFTHouseGame {
struct Listing {
uint startPrice;
uint endPrice;
uint startedAt;
uint endsAt;
bool isAvailable;
}
enum HouseClasses {
Shack,
Apartment,
Bungalow,
House,
Mansion,
Estate,... | 1 | 3,191 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.