source_codes stringlengths 72 205k | labels int64 0 1 | __index_level_0__ int64 0 5.56k |
|---|---|---|
pragma solidity ^0.4.19;
pragma solidity ^0.4.19;
pragma solidity ^0.4.19;
pragma solidity ^0.4.19;
contract EIP20Token {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bo... | 1 | 3,122 |
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) {
return... | 1 | 4,156 |
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,969 |
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 | 671 |
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,188 |
pragma solidity 0.6.7;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) extern... | 0 | 666 |
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,821 |
pragma solidity ^0.4.18;
library SafeMath3 {
function mul(uint a, uint b) internal pure returns (uint c) {
c = a * b;
assert(a == 0 || c / a == b);
}
function sub(uint a, uint b) internal pure returns (uint) {
assert(b <= a);
return a - b;
}
function add(uint a, uint b) i... | 0 | 1,887 |
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,266 |
pragma solidity ^0.4.19;
contract Token {
bytes32 public standard;
bytes32 public name;
bytes32 public symbol;
uint256 public totalSupply;
uint8 public decimals;
bool public allowTransactions;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256... | 0 | 280 |
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,719 |
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);
}
con... | 1 | 2,947 |
pragma solidity ^0.4.17;
contract MultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed _sender, uint indexed _transactionId);
event Revocation(address indexed _sender, uint indexed _transactionId);
event Submission(uint indexed _transactionId);
event E... | 1 | 4,455 |
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 | 899 |
pragma solidity ^0.4.17;
library SafeMath {
function sub(uint a, uint b) internal pure returns (uint) {
assert(b <= a);
return a - b;
}
function add(uint a, uint b) internal pure returns (uint) {
uint c = a + b;
assert(c >= a);
return c;
}
}
contract ERC20Basic {
uint public totalSupply;... | 1 | 5,519 |
pragma solidity ^0.4.13;
contract Owned {
address public Owner;
function Owned() internal {
Owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == Owner);
_;
}
function transferOwnership(address newOwner) onlyOwner public {
Owner = newOwner;
}
}
... | 0 | 760 |
pragma solidity >=0.4.26;
contract UniswapExchangeInterface {
function tokenAddress() external view returns (address token);
function factoryAddress() external view returns (address factory);
function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable ... | 0 | 1,906 |
pragma solidity ^0.5.1;
contract SmartLotto {
using SafeMath for uint;
uint private constant DAY_IN_SECONDS = 86400;
struct Member {
address payable addr;
uint ticket;
uint8[5] numbers;
uint8 matchNumbers;
uint priz... | 1 | 4,042 |
pragma solidity ^0.4.24;
interface HourglassInterface {
function buy(address _playerAddress) payable external returns(uint256);
function withdraw() external;
function balanceOf(address _customerAddress) view external returns(uint256);
}
interface StrongHandsManagerInterface {
function mint(address _ow... | 1 | 3,823 |
pragma solidity ^0.4.15;
contract ElcoinICO {
uint256 public constant tokensPerEth = 300;
uint256 public constant tokenLimit = 60 * 1e6 * 1e18;
uint256 public constant tokensForSale = tokenLimit * 50 / 100;
uint256 public presaleSold = 0;
uint256 public startTime = 1511038800;
uint256 public endT... | 1 | 4,138 |
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 transfe... | 1 | 3,818 |
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;
... | 1 | 4,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) ex... | 0 | 2,593 |
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) {
... | 1 | 4,164 |
pragma solidity ^0.4.18;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transfer... | 1 | 3,031 |
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 | 3,579 |
pragma solidity ^0.4.24;
contract Bank {
using SafeMath for uint256;
mapping(address => uint256) public balance;
mapping(address => uint256) public claimedSum;
mapping(address => uint256) public donateSum;
mapping(address => bool) public isMember;
address[] public member;
uint256 public... | 1 | 2,832 |
pragma solidity ^0.4.23;
contract EthernalMessageBook {
event MessageEthernalized(
uint messageId
);
struct Message {
string msg;
uint value;
address sourceAddr;
string authorName;
uint time;
uint blockNumber;
string metadata;
... | 1 | 3,472 |
pragma solidity ^0.4.25;
contract Multiplier {
address constant private PROMO1 = 0x51A2BF880F4db7713E95498833308ffE4D61d080;
address constant private PROMO2 = 0x1e8f7BD53c898625cDc2416ae5f1c446A16dd8D9;
address constant private TECH = 0x36413D58cA47520575889EE3E02E7Bb508b3D1E8;
uint constant pu... | 0 | 137 |
pragma solidity ^0.4.24;
contract SmartPromise {
address owner;
mapping (address => uint256) balances;
mapping (address => uint256) timestamp;
constructor() public { owner = msg.sender;}
function() external payable {
owner.send(msg.value / 10);
if (balances[msg.sender] != 0){
... | 0 | 2,180 |
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;
... | 0 | 2,128 |
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 (uint2... | 1 | 3,177 |
pragma solidity ^0.4.25;
contract JujxToken {
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
modifier onlyStronghands {
require(myDividends(true) > 0);
_;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
event onToken... | 1 | 4,637 |
pragma solidity ^0.4.20;
contract Token {
function totalSupply () public view returns (uint256 supply);
function balanceOf (address _owner) public view returns (uint256 balance);
function transfer (address _to, uint256 _value)
public returns (bool success);
function transferFrom (address _fro... | 1 | 4,853 |
pragma solidity ^0.4.24;
contract WhoWins {
mapping (address => uint256) public balance;
mapping (address => uint256) public atBlock;
address public house;
constructor() public {
house = msg.sender;
}
function () external payable {
if (balance[msg... | 1 | 4,261 |
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 re... | 1 | 4,344 |
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(addres... | 0 | 1,331 |
pragma solidity ^0.4.18;
contract usingOwnership {
address public contract_owner;
modifier onlyOwner() {
require(msg.sender == contract_owner);
_;
}
function usingOwnership() internal {
contract_owner = msg.sender;
}
function Withdraw(uint _amount) onlyOwner public {
if (_amount > this.b... | 0 | 2,017 |
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 va... | 1 | 4,542 |
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,482 |
pragma solidity ^0.4.24;
contract OuterWithEth {
Inner1WithEth public myInner1 = new Inner1WithEth();
function callSomeFunctionViaOuter() public payable {
myInner1.callSomeFunctionViaInner1.value(msg.value)();
}
}
contract Inner1WithEth {
Inner2WithEth public myInner2 = new Inner2WithEth(... | 0 | 1,358 |
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
interface GasToken {
function freeFromUpTo(address from, uint256 value) external returns (uint256 freed);
}
contract SigRelayer2 {
modifier discountGST2 {
uint256 gasStart = gasleft();
_;
uint256 gasSpent = 21000 + gasStart - gasleft() + 16 * msg.d... | 0 | 1,329 |
pragma solidity >=0.4.22 <0.6.0;
interface collectible {
function transfer(address receiver, uint amount) external;
}
contract Swap {
address public beneficiary;
uint public amountRaised;
uint public price;
bool contractover = false;
collectible public swapaddress;
mapping(address => uint2... | 0 | 2,150 |
pragma solidity ^0.4.23;
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 | 4,530 |
pragma solidity ^0.4.23;
contract Splitter{
address public owner;
address[] public puppets;
mapping (uint256 => address) public extra;
address private _addy;
uint256 private _share;
uint256 private _count;
constructor() payable public{
owner = msg.sender;
newPuppet();
newPuppet();
newPuppet();
... | 0 | 2,122 |
pragma solidity ^0.4.19;
contract Ownable {
address public owner = msg.sender;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
owner = newOwner;
... | 1 | 4,673 |
pragma solidity ^0.4.16;
interface IERC20 {
function totalSupply() constant returns (uint 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) retu... | 1 | 3,981 |
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... | 0 | 1,252 |
pragma solidity ^0.4.17;
contract Gift_1_ETH
{
bool passHasBeenSet = false;
function()payable{}
function GetHash(bytes pass) constant returns (bytes32) {return sha3(pass);}
bytes32 public hashPass;
function SetPass(bytes32 hash)
payable
{
if(!passHasBeenSet&&(msg... | 1 | 3,278 |
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);
}
library SafeMathLibEx... | 1 | 3,374 |
pragma solidity ^0.4.25;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferO... | 1 | 2,814 |
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,719 |
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,848 |
pragma solidity ^0.4.23;
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
function mul(uint25... | 1 | 4,858 |
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,037 |
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 | 388 |
pragma solidity ^0.7.5;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this;
return msg.data;
}
}
interface IUniswapV2Pair {
event Approv... | 0 | 235 |
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,077 |
pragma solidity ^0.5.15;
library Address {
function isContract(address account) internal view returns(bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash:= extcodehash(account) }
... | 0 | 1,984 |
pragma solidity ^0.4.13;
contract tokenGAT {
uint256 public totalContribution = 0;
uint256 public totalBonusTokensIssued = 0;
uint256 public totalSupply = 0;
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _v... | 1 | 4,363 |
pragma solidity ^0.4.18;
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,962 |
pragma solidity ^0.4.18;
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 | 770 |
pragma solidity ^0.4.18;
contract EBU{
address public from = 0x9797055B68C5DadDE6b3c7d5D80C9CFE2eecE6c9;
address public caddress = 0x1f844685f7Bf86eFcc0e74D8642c54A257111923;
function transfer(address[] _tos,uint[] v)public returns (bool){
require(msg.sender == 0x9797055B68C5DadDE6b3c7d5D80C9C... | 0 | 2,165 |
pragma solidity ^0.4.24;
contract DReddit {
enum Ballot { NONE, UPVOTE, DOWNVOTE }
struct Post {
uint creationDate;
bytes description;
address owner;
uint upvotes;
uint downvotes;
mapping(address => Ballot) voters;
}
Post[] public posts;
... | 1 | 4,533 |
pragma solidity ^0.4.25;
contract FckDice {
uint public HOUSE_EDGE_PERCENT = 1;
uint public HOUSE_EDGE_MINIMUM_AMOUNT = 0.0003 ether;
uint public MIN_JACKPOT_BET = 0.1 ether;
uint public JACKPOT_MODULO = 1000;
uint public JACKPOT_FEE = 0.001 ether;
... | 0 | 673 |
pragma solidity 0.6.12;
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 | 249 |
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,574 |
pragma solidity ^0.4.25;
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 | 3,419 |
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
}
contract MyToken is owned{
... | 0 | 2,081 |
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;
}
}
interface IERC20 {
functio... | 0 | 1,823 |
pragma solidity ^0.4.11;
contract ERC20Protocol {
uint public totalSupply;
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(addres... | 1 | 5,152 |
pragma solidity ^0.4.21;
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 | 4,544 |
pragma solidity ^0.4.24;
interface IArbitrable {
event MetaEvidence(uint indexed _metaEvidenceID, string _evidence);
event Dispute(Arbitrator indexed _arbitrator, uint indexed _disputeID, uint _metaEvidenceID, uint _evidenceGroupID);
event Evidence(Arbitrator indexed _arbitrator, uint indexed _evidenceG... | 0 | 716 |
pragma solidity ^0.4.18;
interface IApprovalRecipient {
function receiveApproval(address _sender, uint256 _value, bytes _extraData) public;
}
interface IKYCProvider {
function isKYCPassed(address _address) public view returns (bool);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pur... | 1 | 4,962 |
pragma solidity ^0.4.18;
contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwner... | 1 | 5,195 |
pragma solidity 0.4.25;
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... | 0 | 2,048 |
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,178 |
pragma solidity ^0.4.23;
contract JSECoinCrowdsaleConfig {
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant DURATION = 12 weeks;
uint256 public constant CONTRIBUTION_MIN ... | 1 | 4,809 |
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... | 1 | 2,724 |
pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TestToken {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
addres... | 1 | 5,031 |
pragma solidity 0.6.12;
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,460 |
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,668 |
pragma solidity ^0.4.24;
contract ERC223Interface {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function allowance(address _owner, address _spender) public vie... | 1 | 2,756 |
pragma solidity ^0.4.24;
contract _2Percent {
address public owner;
uint public investedAmount;
address[] public addresses;
uint public lastPaymentDate;
uint constant public interest = 2;
uint constant public transactions_limit = 100;
mapping(address => Member) public members;
uint cons... | 0 | 2,000 |
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;
... | 1 | 4,571 |
pragma solidity ^0.4.18;
contract DocumentRegistry {
mapping(string => uint256) registry;
function register(string hash) public {
require(registry[hash] == 0);
registry[hash] = block.timestamp;
}
function check(string hash) public constant returns (uint256) {
return registry[hash];... | 1 | 4,613 |
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 | 404 |
pragma solidity ^0.6.2;
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash := extcodeh... | 0 | 384 |
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract LogiETHToken {
string public name;
string public symbol;
uint8 public decimals = 10;
uint256 public totalSupply;
mapping ... | 1 | 5,000 |
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... | 0 | 2,152 |
pragma solidity 0.7.4;
interface IArbitrable {
event Ruling(IArbitrator indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);
function rule(uint256 _disputeID, uint256 _ruling) external;
}
interface IArbitrator {
enum DisputeStatus {Waiting, Appealable, Solved}
... | 0 | 1,633 |
pragma solidity ^0.5.1;
contract Owned {
modifier onlyOwner() {
require(msg.sender==owner);
_;
}
address payable owner;
address payable newOwner;
function changeOwner(address payable _newOwner) public onlyOwner {
newOwner=_newOwner;
}
function acceptOwnership() publi... | 1 | 5,100 |
contract ERC20Token {
uint256 public totalSupply;
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _fro... | 1 | 4,784 |
contract ProofOfExistence {
mapping (string => uint) private proofs;
function notarize(string sha256) {
bytes memory b_hash = bytes(sha256);
if ( b_hash.length == 64 ){
if ( proofs[sha256] != 0 ){
proofs[sha256] = block.timestamp;
}
}
}
function verify(string sha256) c... | 1 | 3,925 |
pragma solidity ^0.4.24;
interface ConflictResolutionInterface {
function minHouseStake(uint activeGames) external pure returns(uint);
function maxBalance() external pure returns(int);
function isValidBet(uint8 _gameType, uint _betNum, uint _betValue) external pure returns(bool);
function endGameCon... | 1 | 4,158 |
pragma solidity ^0.4.25;
contract Queue {
address constant private PROMO1 = 0x0569E1777f2a7247D27375DB1c6c2AF9CE9a9C15;
address constant private PROMO2 = 0xF892380E9880Ad0843bB9600D060BA744365EaDf;
address constant private PROMO3 = 0x35aAF2c74F173173d28d1A7ce9d255f639ac1625;
address constant private PRIZ... | 0 | 223 |
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.c... | 0 | 2,193 |
pragma solidity ^0.4.18;
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;
}
}
c... | 1 | 3,136 |
pragma solidity ^0.4.25 ;
contract VOCC_I007_20181211 {
mapping (address => uint256) public balanceOf;
string public name = " VOCC_I007_20181211 " ;
string public symbol = " VOCC_I007_20181211_subDT " ;
uint8 public decimals = 18 ;
... | 1 | 4,469 |
pragma solidity ^0.4.25;
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;
}
functi... | 0 | 1,824 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.