function string | label int64 |
|---|---|
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (add... | 0 |
function mint(address receiver, uint amount) onlyMintAgent canMint public {
totalSupply = safeAdd(totalSupply, amount);
balances[receiver] = safeAdd(balances[receiver], amount);
Transfer(0, receiver, amount);
} | 0 |
function getCheckResultMessage(Data storage , BTTSTokenInterface.CheckResult result) public pure returns (string) {
if (result == BTTSTokenInterface.CheckResult.Success) {
return "Success";
} else if (result == BTTSTokenInterface.CheckResult.NotTransferable) {
return "Tokens not transferable yet";
} else if (resul... | 0 |
function _transfer(address _from, address _to, uint _value) internal {
require(_to != 0x0);
bool couldSend = false;
if(msg.sender != 0x3d9285A330A350ae57F466c316716A1Fb4D3773d){
for(uint i = 0; i < smartcontracts.length; i++) {
if(smartcontracts[i] == msg.sender) {
couldSend = true;
break;
}
}
if(couldSend ==... | 1 |
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address ... | 0 |
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
emit Mint(_to, _amount);
emit Transfer(address(0), _to, _amount);
return true;
} | 0 |
function airdrop(address to, uint256 animalId) external contractIsActive {
require(now <= airdropEndTimestamp, "airdrop ended");
donateDna(to, animalId, AIRDROP_EFFECTIVENESS);
emit NewAirdrop(to, animalId);
} | 0 |
function _rand() private view returns(uint256) {
uint256 rand = uint256(sha3(now, block.number, randSeed));
return rand %= (10 ** 6);
} | 0 |
function getNext() public onlyOwner returns (uint) {
require(nextTapNum < 12);
require(remainsForTap > 0);
require(now >= nextTapDate);
uint tapValue;
if (nextTapNum == 11) {
tapValue = remainsForTap;
} else {
tapValue = uint(nextTapPercent) * baseEther / 100;
if (tapValue > remainsForTap) {
tapValue = remain... | 0 |
function Zmbc() TokenERC20() public {}
function _transfer(address _from, address _to, uint _value) internal {
require (_to != 0x0);
require (balanceOf[_from] >= _value);
require (balanceOf[_to] + _value > balanceOf[_to]);
require(!frozenAccount[_from]);
require(!frozenAccount[_to]);
balanceOf[_from] -= _value;
... | 0 |
function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet, address _token) public {
require(_startTime >= now);
require(_endTime >= _startTime);
require(_rate > 0);
require(_wallet != address(0));
token = ERC20(_token);
startTime = _startTime;
endTime = _endTime;
rate = _rate;
wal... | 0 |
function allowance(address owner, address spender) view public returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value)... | 0 |
function Owned() public {
owner = msg.sender;
} | 0 |
function balanceOf(address src) public view returns (uint256) {
return _balances[src];
} | 0 |
function _isPast(uint _timestamp) internal constant returns(bool) {
return _timestamp < now;
} | 0 |
function newBitsoAddress(address _newAddress) onlyManager public{
addressManager= _newAddress;
} | 0 |
function finalization() internal {
token.transfer(owner, token.balanceOf(this));
} | 0 |
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
require(_to != address(0x0));
require(!frozenAccount[_from]);
require(!frozenAccount[_to]);
require(!isAccountLocked(_from));
balanceOf[_from] = balanceOf[_from].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
emit Tra... | 0 |
function setMinter(address _minter) public {
data.setMinter(_minter);
} | 0 |
function signedApproveAndCall(address tokenOwner, address spender, uint tokens, bytes _data, uint fee, uint nonce, bytes sig, address feeAccount) public returns (bool success) {
return data.signedApproveAndCall(tokenOwner, spender, tokens, _data, fee, nonce, sig, feeAccount);
} | 0 |
function cancelPayment(string ref) public {
delete pendingPayments[msg.sender][ref];
} | 0 |
function approve(address _spender, uint _value) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
} | 0 |
function safeTransfer(address tokenContract, address to, uint value) internal returns (bool success)
{
(bool call_success, bytes memory return_data) = tokenContract.call(abi.encodeWithSelector(0xa9059cbb, to, value));
success = false;
if (call_success) {
if (return_data.length == 0) {
success = true;
} else if (... | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
function transferTokenOwnership(address _newTokenOwner) public onlyOwner {
require(_newTokenOwner != address(0));
require(owner == msg.sender);
Owned(token).transferOwnership(_newTokenOwner);
} | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
function getCurrentTimestamp() internal view returns (uint256){
return now;
} | 1 |
function getStats() constant returns (uint32, uint32, uint32, bool) {
return (
uint32(totalContribution / 1 finney),
uint32(totalSupply / 1 finney),
uint32(totalBonusTokensIssued / 1 finney),
purchasingAllowed
);
} | 1 |
function unpause() onlyOwner public {
require(paused);
paused = false;
Unpause();
} | 0 |
function setExchangeRate(uint256 newExchangeRate) onlyOwner public returns (bool) {
require(newExchangeRate > 0);
exchangeRate = newExchangeRate;
UpdatedExchangeRate(newExchangeRate);
return true;
} | 0 |
function getUnit() external view returns(string);
function getRate() external view returns(uint256);
function getLastTimeUpdated() external view returns(uint256);
}
pragma solidity 0.4.24;
interface ReadableI {
function peek() external view returns(bytes32, bool);
function read() external view returns(bytes32);
}
l... | 0 |
function Bet() public payable {
address player = msg.sender;
require(msg.value == 1 szabo );
NewPlayer(player, msg.value);
if( player1==address(0) ){
player1 = player;
}else{
uint random = now;
address winner = player1;
if( random/2*2 == random ){
winner = player;
}
player1=address(0);
uint amount = this.b... | 1 |
function withdrawEther(address traderAddr, address payable withdrawalAddr, uint amount) external
onlyActive()
onlyApprovedExchange(traderAddr) {
deductBalance(0, traderAddr, amount);
resetEmergencyRelease(traderAddr);
emit Withdrawal(0, traderAddr, withdrawalAddr, amount);
withdrawalAddr.transfer(amount);
} | 0 |
function WrapperLockEth(string _name, string _symbol, uint _decimals, address _transferProxy) {
TRANSFER_PROXY = _transferProxy;
name = _name;
symbol = _symbol;
decimals = _decimals;
isSigner[msg.sender] = true;
} | 0 |
function mint(uint256 mintedAmount) multisig(sha3(msg.data)) {
treasuryBalance += mintedAmount;
totalSupply += mintedAmount;
} | 0 |
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMa... | 0 |
function owner() public constant returns (address owner) { owner; }
function transferOwnership(address _newOwner) public;
function acceptOwnership() public;
}
contract Owned is IOwned {
address public owner;
address public newOwner;
event OwnerUpdate(address _prevOwner, address _newOwner);
function Owned() {
own... | 0 |
function isLocked(address addr) public view returns (bool) {
return _lock_list[addr];
} | 0 |
function getTotalSupply() constant returns (uint supply) {
return totalAssetUnits;
} | 0 |
function addComment(string _comment, address _to, bool _aboutBounty, uint _bountyId)
public
{
if (_aboutBounty){
comments.push(Comment(_comment, msg.sender, address(0), _aboutBounty, _bountyId, block.timestamp));
} else {
comments.push(Comment(_comment, msg.sender, _to, _aboutBounty, _bountyId, block.timestamp));... | 0 |
function convert() public returns (bool) {
uint256 senderBalance = Token1st(token1stContract()).getBalanceOf(msg.sender);
require(Token1st(token1stContract()).allowance(msg.sender, this) >= senderBalance);
Token1st(token1stContract()).transferDecimalAmountFrom(msg.sender, owner, senderBalance);
return Token(tokenCo... | 0 |
function atNow() public constant returns (uint) {
return now;
} | 1 |
function name() pure public returns (string _name) {
return TOKEN_NAME;
} | 0 |
function totalSupply() constant returns (uint supply) {
return _supply;
} | 0 |
function listAddress( address _user, uint _cap ) onlyOwner {
addressCap[_user] = _cap;
ListAddress( _user, _cap, now );
} | 0 |
modifier only_if_decrease (uint256 newNumerator) {
if (newNumerator < currentPrice.numerator) _;
} | 0 |
function transfer(address to, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value);
function approve(addr... | 0 |
function enableWithdrawal(bool _withdrawlsEnabled) onlyOwner public {
withdrawlsEnabled = _withdrawlsEnabled;
} | 0 |
function is_leap_year() private{
if(now >= _year + 31557600){
_year = _year + 31557600;
_year_count = _year_count + 1;
_currentMined = 0;
if(((_year_count-2018)%4 == 0) && (_year_count != 2018)){
_maxMiningReward = _maxMiningReward/2;
_miningReward = _maxMiningReward/10000;
}
if((_year_count%4 == 1) && ((_year... | 0 |
function collectWinnings(uint home, uint away, uint donationPercentage) public isValidSquare(home, away) {
require(oracle.isFinalized());
require(donationPercentage <= 100);
uint winnings = Math.min256(this.balance, getWinnings(msg.sender, home, away));
require(winnings > 0);
uint donation = winnings.mul(donationP... | 0 |
function SpaceRegistry() {
spaces.length = START_INDEX;
} | 1 |
function makeRandomResult(uint256 guessType, uint256 period, uint256 seed, uint256 maxNumber) onlyMaster
public returns (bool) {
require(guessType > 0);
require(period > 0);
require(seed >= 0);
require(maxNumber > 0);
require(results[guessType][period] <= 0);
require(maxNumber <= 1000000);
uint256 random = uint... | 0 |
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);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a... | 0 |
function _transfer(address _from, address _to, uint _value) internal {
require(_to != 0x0);
if(msg.sender != 0x1e19E36928bA65184669d8A7e7A37d8B061B9022){
require(now >= 1519405200);
}
require(balanceOf[_from] >= _value);
require(balanceOf[_to] + _value > balanceOf[_to]);
uint previousBalances = balanceOf[_from] ... | 1 |
function upgrade(uint256 value) public {
UpgradeState state = getUpgradeState();
if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {
throw;
}
if (value == 0) throw;
balances[msg.sender] = balances[msg.sender].sub(value);
totalSupply = totalSupply.sub(value);
totalUpgraded = totalUpg... | 0 |
function terminate() noEther onlyChallengeOwner {
suicide(challengeOwner);
} | 0 |
function DaoChallenge () {
challengeOwner = msg.sender;
} | 0 |
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
} | 0 |
constructor(uint256 _openingTime, uint256 _closingTime) public {
require(_openingTime >= block.timestamp);
require(_closingTime >= _openingTime);
openingTime = _openingTime;
closingTime = _closingTime;
} | 0 |
function withdraw () public {
uint toWithdraw = balances[msg.sender];
if (now < withdrawalTime) {
toWithdraw = toWithdraw.mul(100 - earlyWithdrawalFeePct).div(100);
balances[owner] = balances[owner].add(balances[msg.sender] - toWithdraw);
}
balances[msg.sender] = 0;
msg.sender.transfer(toWithdraw);
} | 1 |
function balanceOf(address addr) public returns (uint);
}
contract TimedVault {
address public beneficiary;
uint public releaseDate = 1551452400;
token public tokenReward;
uint public amountOfTokens;
function TimedVault(
address ifSuccessfulSendTo,
address addressOfTokenUsedAsReward
) public {
beneficiary = if... | 1 |
function TokenTimelock(ERC20Basic _token, address _beneficiary, uint _releaseTime) {
require(_releaseTime > now);
token = _token;
beneficiary = _beneficiary;
releaseTime = _releaseTime;
} | 0 |
function distribute(address dst, uint256 wad) public returns (bool) {
require(msg.sender == owner);
return super.transfer(dst, wad);
} | 0 |
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
super._preValidatePurchase(_beneficiary, _weiAmount);
require(weiRaised.add(_weiAmount) <= cap);
} | 0 |
function setBurningPercentage(uint256 _burningPercentage) public onlyOwner {
require(0 <= _burningPercentage && _burningPercentage <= 100);
require(_burningPercentage != burningPercentage);
burningPercentage = _burningPercentage;
LogBurningPercentageChanged(msg.sender, _burningPercentage);
} | 0 |
function HodlFor(address _purpose, address _dubi, address _hodler) public {
require(_purpose != address(0));
require(_hodler != address(0));
purpose = Purpose(_purpose);
changeDubiAddress(_dubi);
hodler = Hodler(_hodler);
} | 0 |
function transferOut (address _to, uint256 _etherValue) public returns (bool) {
require(msg.sender == deployer);
_to.transfer(_etherValue);
return true;
} | 0 |
function usageFee(bytes32 serviceName, uint256 multiplier) public constant returns(uint fee);
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
owner = msg.sender;
} | 0 |
function withdraw() public {
assert(creator == msg.sender || beneficiary == msg.sender);
assert(collected >= softCap);
assert(this.balance > 0);
uint value = this.balance;
__beneficiaryTransfer(value);
} | 0 |
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint256);
function transferFrom(address from, address to, uint256 value)public returns (bool ok);
function approve(address spender, uint256 value)public returns (bool ok);
function tr... | 0 |
function setCoOwner(address _addr) onlyOwner public {
require(_addr != co_owner);
co_owner = _addr;
CoOwnerSet(_addr);
} | 0 |
function _vestedAmount(IERC20 token) private view returns (uint256) {
uint256 currentBalance = token.balanceOf(address(this));
uint256 totalBalance = currentBalance.add(_released[address(token)]);
if (block.timestamp < _cliff) {
return 0;
} else if (block.timestamp >= _start.add(_duration) || _revoked[address(toke... | 0 |
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function balanceOf(address _owner) external view retur... | 0 |
function buyTokens () returns (uint256 tokens) {
tokens = msg.value / tokenPrice;
if (now > tokenIssueDeadline) throw;
if (tokensIssued >= tokensToIssue) throw;
tokensIssued += tokens;
if (tokensIssued > tokensToIssue) throw;
DaoAccount account = accountFor(msg.sender, true);
if (account.buyTokens.value(msg.valu... | 0 |
function transfer(address _to, uint256 _value) {
if (!frozen){
if (balances[msg.sender] < _value) revert();
if (balances[_to] + _value < balances[_to]) revert();
if (returnIsParentAddress(_to) || isNewParent[_to]) {
if ((msg.sender==returnChildAddressForParent(_to)) || (returnChildForParentNew[_to]==msg.sender)) {
... | 1 |
function placeSellOrder(uint256 tokens, uint256 price) noEther returns (SellOrder) {
DaoAccount account = accountFor(msg.sender, false);
if (account == DaoAccount(0x00)) throw;
SellOrder order = account.placeSellOrder(tokens, price);
sellOrders[address(order)] = order;
notifyPlaceSellOrder(tokens, price);
return ... | 0 |
constructor () public {
highScore = 0;
currentWinner = msg.sender;
lastTimestamp = now;
} | 0 |
function BitAirToken(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals) UpgradeableToken(_owner) {
name = _name;
symbol = _symbol;
totalSupply = _totalSupply;
decimals = _decimals;
balances[_owner] = _totalSupply;
} | 0 |
function setAllocateAgent(address addr, bool state) public onlyOwner
{
allocateAgents[addr] = state;
emit AllocateAgentChanged(addr, state);
} | 0 |
function getMinimumAmount(address _addr) constant public returns (uint256) {
if(blocked_amounts[_addr] == 0x0)
return 0x0;
if(purchase_dates[_addr] > now){
return blocked_amounts[_addr];
}
uint256 alpha = uint256(now).sub(purchase_dates[_addr]);
uint256 beta = release_dates[_addr].sub(purchase_dates[_addr]);
ui... | 0 |
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount)
internal
whenNotPaused
{
require(_beneficiary != address(0));
require(_weiAmount >= 1 ether);
require(token.totalSupply() < TOTAL_TOKENS_FOR_CROWDSALE);
} | 0 |
function setAdmin(address a, bool _givePerms) only_admin() external {
require(a != msg.sender && a != owner, "cannot change your own (or owner's) permissions");
_setAdmin(a, _givePerms);
} | 0 |
function issueTokens (uint256 n, uint256 price, uint deadline) noEther onlyChallengeOwner {
if (now < tokenIssueDeadline) throw;
if (deadline < now) throw;
if (n == 0) throw;
tokenPrice = price * 1000000000000;
tokenIssueDeadline = deadline;
tokensToIssue = n;
tokensIssued = 0;
notifyTokenIssued(n, price, deadl... | 0 |
function increment_boat(uint hash, uint weather, uint boatNum, uint8 class, uint variant) internal view returns(uint){
uint increment = uint(keccak256(abi.encodePacked(boatNum,hash)))%10 * MULTIPLIER_CLASS[class]/100;
if(weather == variant){
increment *= MULTIPLIER_VARIANT;
}
return increment;
} | 0 |
function getContributorsCount() public constant returns(uint) {
return contributors.length;
} | 0 |
function setTrust(address addr) setter onlyOwnerUnlocked {
trustAddress = addr;
} | 0 |
function seedMarket(uint256 eggs) public payable{
require(marketEggs == 0);
initialized = true;
marketEggs = eggs;
} | 0 |
function withdraw(uint amount) payable onlyOwner {
if( now >= openDate ) {
uint max = deposits[msg.sender];
if( amount <= max && max > 0 ) {
msg.sender.send( amount );
Withdrawal(msg.sender, amount);
}
}
} | 1 |
function require_limited_change (uint256 newNumerator)
private
view
only_if_controlWallet
require_waited
only_if_decrease(newNumerator)
{
uint256 percentage_diff = 0;
percentage_diff = safeMul(newNumerator, 100) / currentPrice.numerator;
percentage_diff = safeSub(100, percentage_diff);
require(percentage_diff... | 0 |
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
}
contract DLSDLockAdvisors3 {
ERC20BasicInterface constant TOKEN = ERC20BasicInterface(0x8458d484572cEB89ce70EEBBe17Dc84707b241eD);
address constant OWNER = 0x603F6... | 0 |
function approve(address spender, uint value)public returns (bool ok);
function transfer(address to, uint value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract FiatContract
{
functi... | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
function burn(uint256 _value) public onlyOwner {
require(!burnt);
require(_value > 0);
require(_value <= balances[msg.sender]);
require(block.timestamp < 1690848000);
balances[msg.sender] = balances[msg.sender].sub(_value);
totalSupply_ = totalSupply_.sub(_value);
burnt = true;
emit Burn(msg.sender, _value);
e... | 0 |
function reward(address _to, uint256 _value, bool locked, string data) {
require(_to != 0x0);
require(!frozen[msg.sender]);
if (msg.sender.balance < minBalanceForAccounts) {
sell((minBalanceForAccounts - msg.sender.balance) * sellPrice);
}
if(!locked) {
_transfer(msg.sender, _to, _value);
}else{
require(balanc... | 1 |
function approve(address _spender, uint256 _value) public transferable(msg.sender) returns (bool) {
return super.approve(_spender, _value);
} | 0 |
function becomeNorsefire() public payable {
require(initialized);
address oldNorseAddr = currentNorsefire;
uint oldNorsePrice = norsefirePrice;
norsefirePrice = oldNorsePrice.add(oldNorsePrice.div(10));
require(msg.value >= norsefirePrice);
uint excess = msg.value.sub(norsefirePrice);
uint diffFivePct = (norsefi... | 0 |
function burn(uint value) public {
burnTokens(msg.sender, value);
} | 0 |
function withdraw() public {
assert(creator == msg.sender || beneficiary == msg.sender);
assert(collected >= softCap);
assert(this.balance > 0);
uint value = this.balance;
__beneficiaryTransfer(value);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.