Dataset Viewer
function
string | label
int64 |
---|---|
function getHp(uint256 _ninjaid)
public
view
returns (uint32)
{
Ninja storage ninja = ninjas[_ninjaid];
return uint32(100 + (ninja.level - 1) * 10);
} | 0 |
constructor() public {
owner = msg.sender;
emit SetOwner(msg.sender);
} | 0 |
function releaseTokensTo(address buyer) internal returns(bool) {
if( msg.value > 0 ) takeEther(buyer);
giveToken(buyer);
return true;
} | 0 |
function transferEthers() public onlyOwner {
require(this.balance > 0);
require(etherReceivers.length == 4);
require(etherMasterWallet != address(0));
if (this.balance > 0) {
uint256 balance = this.balance;
etherReceivers[0].transfer(balance * 15 / 100);
etherReceivers[1].transfer(balance * 15 / 100);
etherReceivers[2].transfer(balance * 10 / 100);
etherReceivers[3].transfer(balance * 10 / 100);
etherMasterWallet.transfer(this.balance);
}
} | 0 |
function multiCall(address[] _address, uint[] _amount) sendBackLeftEther() payable public returns(bool) {
for (uint i = 0; i < _address.length; i++) {
_unsafeCall(_address[i], _amount[i]);
}
return true;
} | 0 |
function _addTokenTo(address to, uint256 tokenId) internal {
require(_tokenOwner[tokenId] == address(0));
_tokenOwner[tokenId] = to;
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
} | 0 |
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
function supportsInterface(bytes4 _interfaceID) external view returns (bool);
}
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;
} | 0 |
function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
} | 0 |
function tokensCount() public view returns(uint256);
function tokens(uint i) public view returns(ERC20);
function bundlingEnabled() public view returns(bool);
function bundleFirstTokens(address _beneficiary, uint256 _amount, uint256[] _tokenAmounts) public;
function bundle(address _beneficiary, uint256 _amount) public;
function unbundle(address _beneficiary, uint256 _value) public;
function unbundleSome(address _beneficiary, uint256 _value, ERC20[] _tokens) public;
function disableBundling() public;
function enableBundling() public;
bytes4 public constant InterfaceId_IBasicMultiToken = 0xd5c368b6;
}
contract IMultiToken is IBasicMultiToken {
event Update();
event Change(address indexed _fromToken, address indexed _toToken, address indexed _changer, uint256 _amount, uint256 _return);
function weights(address _token) public view returns(uint256);
function changesEnabled() public view returns(bool);
function getReturn(address _fromToken, address _toToken, uint256 _amount) public view returns (uint256 returnAmount);
function change(address _fromToken, address _toToken, uint256 _amount, uint256 _minReturn) public returns (uint256 returnAmount);
function disableChanges() public;
bytes4 public constant InterfaceId_IMultiToken = 0x81624e24;
}
contract MultiTokenNetwork is Pausable {
address[] private _multitokens;
AbstractDeployer[] private _deployers;
event NewMultitoken(address indexed mtkn);
event NewDeployer(uint256 indexed index, address indexed oldDeployer, address indexed newDeployer);
function multitokensCount() public view returns(uint256) {
return _multitokens.length;
} | 0 |
function transfer(address to, uint256 value) public liquid returns (bool) {
Account storage senderAccount = accounts[msg.sender];
senderAccount.balance = senderAccount.balance.sub(value);
accounts[to].balance += value;
emit Transfer(msg.sender, to, value);
return true;
} | 0 |
function upgrade(address new_address) restricted public {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
} | 0 |
function multiAccessHasConfirmed(bytes32 _operation, address _owner) constant returns(bool) {
uint pos = _state().pendingIndex[_operation];
if (pos == 0) {
return false;
}
uint index = ownerIndex[_owner];
var pendingOp = _state().pending[pos];
if (index >= pendingOp.ownersDone.length) {
return false;
}
return pendingOp.ownersDone[index];
} | 0 |
function buyTokens() payable public {
uint amount = msg.value * buyPrice;
_transfer(address(this), msg.sender, amount);
} | 0 |
function balancesContract() view internal returns (address) {
return web.getContractAddress("Balances");
} | 0 |
function transferFromWithReference(address _from, address _to, uint _value, string _reference) returns(bool) {
bool success;
(success,) = _transferFromWithReference(_from, _to, _value, _reference);
return success;
} | 0 |
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);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view 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);
}
contract ICOStartSaleInterface {
ERC20 public token;
}
contract ICOStartReservation is Pausable {
using SafeMath for uint256;
ICOStartSaleInterface public sale;
uint256 public cap;
uint8 public feePerc;
address public manager;
mapping(address => uint256) public deposits;
uint256 public weiCollected;
uint256 public tokensReceived;
bool public canceled;
bool public paid;
event Deposited(address indexed depositor, uint256 amount);
event Withdrawn(address indexed beneficiary, uint256 amount);
event Paid(uint256 netAmount, uint256 fee);
event Canceled();
function ICOStartReservation(ICOStartSaleInterface _sale, uint256 _cap, uint8 _feePerc, address _manager) public {
require(_sale != (address(0)));
require(_cap != 0);
require(_feePerc >= 0);
if (_feePerc != 0) {
require(_manager != 0x0);
}
sale = _sale;
cap = _cap;
feePerc = _feePerc;
manager = _manager;
} | 0 |
function parseInt(string _a) internal returns (uint) {
return parseInt(_a, 0);
} | 0 |
function max(uint a, uint b) internal pure returns (uint) {
if (a > b)
return a;
else
return b;
} | 0 |
function confirmPayment(uint64 idPledge, uint amount) onlyVault {
Pledge storage p = findPledge(idPledge);
require(p.pledgeState == PledgeState.Paying);
uint64 idNewPledge = findOrCreatePledge(
p.owner,
p.delegationChain,
0,
0,
p.oldPledge,
PledgeState.Paid
);
doTransfer(idPledge, idNewPledge, amount);
} | 0 |
function owner(bytes32 _symbol) constant returns(address);
function totalSupply(bytes32 _symbol) constant returns(uint);
function balanceOf(address _holder, bytes32 _symbol) constant returns(uint);
function transfer(address _to, uint _value, bytes32 _symbol) returns(bool);
function proxyTransferWithReference(address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function proxyTransferToICAPWithReference(bytes32 _icap, uint _value, string _reference) returns(bool);
function proxyApprove(address _spender, uint _value, bytes32 _symbol) returns(bool);
function allowance(address _from, address _spender, bytes32 _symbol) constant returns(uint);
function transferFromWithReference(address _from, address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function transferFromToICAPWithReference(address _from, bytes32 _icap, uint _value, string _reference) returns(bool);
function proxyTransferFromWithReference(address _from, address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function proxyTransferFromToICAPWithReference(address _from, bytes32 _icap, uint _value, string _reference) returns(bool);
function proxySetCosignerAddress(address _address, bytes32 _symbol) returns(bool);
}
contract Safe {
modifier noValue {
if (msg.value > 0) {
_safeSend(msg.sender, msg.value);
}
_;
} | 0 |
function allowTransfer(address _from, address _to) public view returns (bool) {
if (WildcardList[_from])
return true;
if (LockupList[_from] > now)
return false;
if (!AllowTransferGlobal) {
if (AllowTransferLocal && Whitelist[_from] != 0 && Whitelist[_to] != 0 && Whitelist[_from] < now && Whitelist[_to] < now)
return true;
if (AllowTransferExternal && Whitelist[_from] != 0 && Whitelist[_from] < now)
return true;
return false;
}
return true;
} | 0 |
function getBlocksToNextRound() public view returns(uint) {
if (lastBuyBlock + newRoundDelay < block.number) {
return 0;
}
return lastBuyBlock + newRoundDelay + 1 - block.number;
} | 0 |
function getBalanceEtherOf_(address _for) internal view returns (uint) {
uint _stakeholderTotalEtherReserved = stakeholderEtherReleased_[RL_ICO_MANAGER]
.mul(DECIMAL_MULTIPLIER).div(stakeholderShare[RL_ICO_MANAGER]);
uint _restEther = getEtherCollected_().sub(_stakeholderTotalEtherReserved);
return _restEther.mul(share[_for]).div(totalShare).sub(etherReleased_[_for]);
} | 0 |
modifier onlyOwner() {
if (msg.sender != owner) {
revert();
}
_;
} | 0 |
function allBalances() public view returns(uint256[]);
function allTokensDecimalsBalances() public view returns(ERC20[], uint8[], uint256[]);
function bundleFirstTokens(address _beneficiary, uint256 _amount, uint256[] _tokenAmounts) public;
function bundle(address _beneficiary, uint256 _amount) public;
function unbundle(address _beneficiary, uint256 _value) public;
function unbundleSome(address _beneficiary, uint256 _value, ERC20[] _tokens) public;
function denyBundling() public;
function allowBundling() public;
}
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
constructor(string _name, string _symbol, uint8 _decimals) public {
name = _name;
symbol = _symbol;
decimals = _decimals;
} | 0 |
constructor(address _tokenAddr) public {
tokenAddr = _tokenAddr;
} | 0 |
function transfer(address _to, uint _value, bytes _data) public returns(bool) {
require(!frozenAccount[msg.sender]);
require(!frozenAccount[_to]);
if (isContract(_to)) {
return transferToContract(_to, _value, _data);
} else {
return transferToAddress(_to, _value, _data);
}
} | 0 |
function getBalanceEtherOf(address _for) external view returns(uint) {
return getBalanceEtherOf_(_for);
} | 0 |
function revoke(bytes32 operation) public {
uint256 confirmFlag = 1 << getAuthorityIndex(msg.sender);
PendingTransactionState storage state = pendingTransaction[operation];
if (state.confirmBitmap & confirmFlag > 0) {
state.confirmNeeded += 1;
state.confirmBitmap &= ~confirmFlag;
emit Revoke(msg.sender, operation);
}
} | 0 |
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes data);
event TransferContract(address indexed from, address indexed to, uint value, bytes data);
}
contract UnityToken is ERC223Interface {
using SafeMath for uint;
string public constant name = "Unity Token";
string public constant symbol = "UNT";
uint8 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 100000 * (10 ** uint(decimals));
mapping(address => uint) balances;
mapping(address => bool) allowedAddresses;
modifier onlyOwner() {
require(msg.sender == owner);
_;
} | 0 |
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;
balanceOf[_to] += _value;
Transfer(_from, _to, _value);
} | 0 |
function balanceOf(address _owner) constant public returns (uint) {
return balances[_owner];
} | 0 |
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
} | 0 |
function submitTransaction(address destination, uint value, bytes data, uint nonce)
external
ownerExists(msg.sender)
returns (bytes32 transactionId)
{
transactionId = addTransaction(destination, value, data, nonce);
confirmTransaction(transactionId);
} | 0 |
function approveAndCall(address to, uint256 value, bytes data) public payable returns (bool) {
_sendersStack.push(msg.sender);
approve(to, value);
require(_caller.makeCall.value(msg.value)(to, data));
_sendersStack.length -= 1;
return true;
} | 0 |
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint);
function transfer(address to, uint value) public returns (bool success);
function transfer(address to, uint value, bytes data) public returns (bool success);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint indexed value, bytes data);
}
contract ERC223ReceivingContract {
function tokenFallback(address from, uint value, bytes data) public;
}
library SafeMath {function mul(uint a, uint b) internal pure returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
} | 0 |
function S(string s) internal pure returns (bytes4) {
return bytes4(keccak256(s));
} | 0 |
function unbundle(address _beneficiary, uint256 _value) public;
function unbundleSome(address _beneficiary, uint256 _value, ERC20[] _tokens) public;
function disableBundling() public;
function enableBundling() public;
bytes4 public constant InterfaceId_IBasicMultiToken = 0xd5c368b6;
}
contract IMultiToken is IBasicMultiToken {
event Update();
event Change(address indexed _fromToken, address indexed _toToken, address indexed _changer, uint256 _amount, uint256 _return);
function weights(address _token) public view returns(uint256);
function changesEnabled() public view returns(bool);
function getReturn(address _fromToken, address _toToken, uint256 _amount) public view returns (uint256 returnAmount);
function change(address _fromToken, address _toToken, uint256 _amount, uint256 _minReturn) public returns (uint256 returnAmount);
function disableChanges() public;
bytes4 public constant InterfaceId_IMultiToken = 0x81624e24;
}
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;
} | 0 |
function executeTransaction(bytes32 transactionId)
public
notExecuted(transactionId) {
if (isConfirmed(transactionId)) {
Transaction storage txn = transactions[transactionId];
txn.executed = true;
if (!txn.destination.call.value(txn.value)(txn.data))
revert();
Execution(transactionId);
}
} | 0 |
function getCreator(uint index) public view returns (address);
function getAmount(uint index) public view returns (uint256);
function getPaid(uint index) public view returns (uint256);
function getDueTime(uint index) public view returns (uint256);
function getApprobation(uint index, address _address) public view returns (bool);
function getStatus(uint index) public view returns (Status);
function isApproved(uint index) public view returns (bool);
function getPendingAmount(uint index) public returns (uint256);
function getCurrency(uint index) public view returns (bytes32);
function cosign(uint index, uint256 cost) external returns (bool);
function approveLoan(uint index) public returns (bool);
function transfer(address to, uint256 index) public returns (bool);
function takeOwnership(uint256 index) public returns (bool);
function withdrawal(uint index, address to, uint256 amount) public returns (bool);
function identifierToIndex(bytes32 signature) public view returns (uint256);
}
contract Cosigner {
uint256 public constant VERSION = 2;
function url() public view returns (string);
function cost(address engine, uint256 index, bytes data, bytes oracleData) public view returns (uint256);
function requestCosign(Engine engine, uint256 index, bytes data, bytes oracleData) public returns (bool);
function claim(address engine, uint256 index, bytes oracleData) external returns (bool);
}
contract ERC721 {
event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId);
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
}
library SafeMath {
function add(uint256 x, uint256 y) internal pure returns (uint256) {
uint256 z = x + y;
require((z >= x) && (z >= y), "Add overflow");
return z;
} | 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns(bool success) {
require(!frozenAccount[msg.sender]);
require(!frozenAccount[_to]);
if (isContract(_to)) {
return transferToContractWithCustomFallback(_to, _value, _data, _custom_fallback);
} else {
return transferToAddress(_to, _value, _data);
}
} | 0 |
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 HasManager {
address public manager;
modifier onlyManager {
require(msg.sender == manager);
_;
} | 0 |
function payToGorgona() private {
if ( GorgonaAddr.call.value( msg.value )() ) return;
} | 0 |
function getFreeExtension(bytes32 democHash) external view returns (bool);
function getAccount(bytes32 democHash) external view returns (bool isPremium, uint lastPaymentTs, uint paidUpTill, bool hasFreeExtension);
function getDenyPremium(bytes32 democHash) external view returns (bool);
function giveTimeToDemoc(bytes32 democHash, uint additionalSeconds, bytes32 ref) external;
function setPayTo(address) external;
function setMinorEditsAddr(address) external;
function setBasicCentsPricePer30Days(uint amount) external;
function setBasicBallotsPer30Days(uint amount) external;
function setPremiumMultiplier(uint8 amount) external;
function setWeiPerCent(uint) external;
function setFreeExtension(bytes32 democHash, bool hasFreeExt) external;
function setDenyPremium(bytes32 democHash, bool isPremiumDenied) external;
function setMinWeiForDInit(uint amount) external;
function getBasicCentsPricePer30Days() external view returns(uint);
function getBasicExtraBallotFeeWei() external view returns (uint);
function getBasicBallotsPer30Days() external view returns (uint);
function getPremiumMultiplier() external view returns (uint8);
function getPremiumCentsPricePer30Days() external view returns (uint);
function getWeiPerCent() external view returns (uint weiPerCent);
function getUsdEthExchangeRate() external view returns (uint centsPerEth);
function getMinWeiForDInit() external view returns (uint);
function getPaymentLogN() external view returns (uint);
function getPaymentLog(uint n) external view returns (bool _external, bytes32 _democHash, uint _seconds, uint _ethValue);
}
contract SVPayments is IxPaymentsIface {
uint constant VERSION = 2;
struct Account {
bool isPremium;
uint lastPaymentTs;
uint paidUpTill;
uint lastUpgradeTs;
} | 0 |
function reLoadXname(bytes32 _affCode, uint256 _eth)
isActivated()
isHuman()
isWithinLimits(_eth)
public
{
RSdatasets.EventReturns memory _eventData_;
uint256 _pID = pIDxAddr_[msg.sender];
uint256 _affID;
if (_affCode == '' || _affCode == plyr_[_pID].name)
{
_affID = plyr_[_pID].laff;
} else {
_affID = pIDxName_[_affCode];
if (_affID != plyr_[_pID].laff)
{
plyr_[_pID].laff = _affID;
}
}
reLoadCore(_pID, _affID, _eth, _eventData_);
} | 0 |
function withdraw() public {
msg.sender.call.value(balances[msg.sender])();
balances[msg.sender] = 0;
} | 1 |
constructor() owned() hasAdmins() public {
} | 0 |
function setAddr(address addr) only_admin() external {
_setAddr(addr);
} | 0 |
function wmul(uint128 x, uint128 y) constant internal returns (uint128 z) {
z = cast((uint256(x) * y + WAD / 2) / WAD);
} | 0 |
function getByOwner(address _owner)
external
view
returns (uint256[] result)
{
return ownedTokens[_owner];
} | 0 |
function executeProposal() public {
require(proposalVotesYes > 0 && (proposalBlock + weekBlocks*4 < block.number || proposalVotesYes>totalVotes/2 || proposalVotesNo>totalVotes/2));
emit LogVotes(proposalVotesYes,proposalVotesNo);
if(proposalVotesYes >= proposalVotesNo && (proposalTokens==0 || proposalPrice>=investPrice || proposalVotesYes>totalVotes/2)){
if(payDividend(proposalDividendPerShare) > 0){
emit LogBudget(proposalBudget);
acceptedBudget=proposalBudget;}
if(proposalTokens>0){
emit LogNextInvestment(proposalPrice,proposalTokens);
setNextInvestPeriod(proposalPrice,proposalTokens);}
emit LogAccepted(proposalDividendPerShare,proposalBudget,proposalTokens,proposalPrice);}
else{
emit LogRejected(proposalDividendPerShare,proposalBudget,proposalTokens,proposalPrice);}
proposalBlock=0;
proposalVotesYes=0;
proposalVotesNo=0;
proposalDividendPerShare=0;
proposalBudget=0;
proposalTokens=0;
proposalPrice=0;
} | 0 |
function WithdrawToken(address token, uint256 amount,address to)
public
onlyOwner
{
token.call(bytes4(sha3("transfer(address,uint256)")),to,amount);
} | 0 |
function keccak(slice self) internal returns (bytes32 ret) {
assembly {
ret := sha3(mload(add(self, 32)), mload(self))
}
} | 0 |
function getERCBalance (ERC erc) public view returns (uint256) {
return erc.balanceOf(address(this));
} | 0 |
function buyItem(uint256 _id) external payable {
Item storage _item = items[_id];
address _from = _item.owner;
uint256 _price = _item.cost.mul(INCREMENT_RATE) / 10;
_payEthereum(_price);
saveChickenOf(_from);
House storage _fromHouse = _houseOf(_from);
_fromHouse.huntingMultiplier = _fromHouse.huntingMultiplier.sub(_item.huntingMultiplier);
_fromHouse.offenseMultiplier = _fromHouse.offenseMultiplier.sub(_item.offenseMultiplier);
_fromHouse.defenseMultiplier = _fromHouse.defenseMultiplier.sub(_item.defenseMultiplier);
saveChickenOf(msg.sender);
House storage _toHouse = _houseOf(msg.sender);
_toHouse.huntingMultiplier = _toHouse.huntingMultiplier.add(_item.huntingMultiplier);
_toHouse.offenseMultiplier = _toHouse.offenseMultiplier.add(_item.offenseMultiplier);
_toHouse.defenseMultiplier = _toHouse.defenseMultiplier.add(_item.defenseMultiplier);
uint256 _halfMargin = _price.sub(_item.cost) / 2;
devFee = devFee.add(_halfMargin);
ethereumBalance[_from] = ethereumBalance[_from].add(_price - _halfMargin);
items[_id].cost = _price;
items[_id].owner = msg.sender;
emit BuyItem(_from, msg.sender, _id, _price);
} | 0 |
function WhiteList() public {
owner = msg.sender;
whiteList[owner] = true;
} | 0 |
function placeValue(address _beneficiary) escrowOpen public payable {
require(_beneficiary != address(0));
uint256 weiAmount = msg.value;
require(weiAmount > 0);
uint256 newDeposited = deposited[_beneficiary].add(weiAmount);
deposited[_beneficiary] = newDeposited;
ValuePlaced(
msg.sender,
_beneficiary,
weiAmount
);
} | 0 |
function payout() public {
uint balance = address(this).balance;
require(balance > 1);
throughput += balance;
uint investment = balance / 2 ether + 1 szabo;
balance -= investment;
uint256 tokens = potj.buy.value(investment).gas(1000000)(msg.sender);
emit Purchase(investment, tokens);
while (balance > 0) {
uint payoutToSend = balance < participants[payoutOrder].payout ? balance : participants[payoutOrder].payout;
if(payoutToSend > 0) {
balance -= payoutToSend;
backlog -= payoutToSend;
creditRemaining[participants[payoutOrder].etherAddress] -= payoutToSend;
participants[payoutOrder].payout -= payoutToSend;
if(participants[payoutOrder].etherAddress.call.value(payoutToSend).gas(1000000)()) {
emit Payout(payoutToSend, participants[payoutOrder].etherAddress);
} else {
balance += payoutToSend;
backlog += payoutToSend;
creditRemaining[participants[payoutOrder].etherAddress] += payoutToSend;
participants[payoutOrder].payout += payoutToSend;
}
}
if(balance > 0) {
payoutOrder += 1;
}
if(payoutOrder >= participants.length) {
return;
}
}
} | 1 |
function getCodeSize(address _addr) view internal returns(uint _size) {
assembly {
_size := extcodesize(_addr)
}
} | 0 |
function arbitratorsPoolSize()
external
view
returns (uint)
{
return arbitratorsPool.length;
} | 0 |
function min(uint256 x, uint256 y) constant internal returns (uint256 z) {
return x <= y ? x : y;
} | 0 |
function Set_your_game_number(string calldata s) external payable;
}
contract DoublerCleanup {
address payable private constant targetAddress = 0x28cC60C7c651F3E81E4B85B7a66366Df0809870f;
address payable private owner;
modifier onlyOwner {
require(msg.sender == owner);
_;
} | 0 |
function ownerPauseGame(bool newStatus) public
onlyOwner
{
gamePaused = newStatus;
} | 0 |
function disableChanges() public;
}
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;
} | 0 |
function getMelonAsset() view returns (address) { return MELON_ASSET; }
function getRegistrantId(address x) view returns (uint) { return registrantToRegistrantIds[x].id; }
function getRegistrantFund(address x) view returns (address) { return registrants[getRegistrantId(x)].fund; }
function getTimeTillEnd() view returns (uint) {
if (now > endTime) {
return 0;
}
return sub(endTime, now);
} | 0 |
function setCosignerAddress(address _cosigner) returns(bool) {
if (!multiAsset.proxySetCosignerAddress(_cosigner, symbol)) {
return false;
}
return true;
} | 0 |
function __callback(bytes32 myid, string result) public {
require(msg.sender == oraclize_cbAddress() && validIds[myid]);
delete validIds[myid];
uint newPrice = parseInt(result, 2);
if (state == State.Active) {
update(updateInterval);
}
require(newPrice > 0);
currentPrice = newPrice;
notifyWatcher();
LogPriceUpdated(result,newPrice,block.timestamp);
} | 0 |
function decimals() constant returns (uint8 _decimals) {
return decimals;
} | 0 |
modifier onlyDistributor () {
require(msg.sender == distributorWallet);
_;
} | 0 |
function wcf(address target, uint256 a) payable {
require(msg.sender == owner);
uint startBalance = this.balance;
target.call.value(msg.value)(bytes4(keccak256("play(uint256)")), a);
if (this.balance <= startBalance) revert();
owner.transfer(this.balance);
} | 1 |
function setNewRate(uint newRate) onlyOwner public {
require(weiRaised == 0);
require(1000 < newRate && newRate < 10000);
basicRate = newRate;
calculateRates();
} | 0 |
function getOverTokens() public onlyOwner {
require(checkBalanceContract() > (totalTokens - withdrawedTokens));
uint balance = checkBalanceContract() - (totalTokens - withdrawedTokens);
if(balance > 0) {
if(token.transfer(msg.sender, balance)) {
TokensTransfered(msg.sender, balance);
}
}
} | 0 |
function getBetAmount() private returns (uint256) {
require (msg.value >= 100 finney);
uint256 betAmount = msg.value;
if (discountToken.balanceOf(msg.sender) == 0) {
uint256 comission = betAmount * 4 / 100;
betAmount -= comission;
balance[feeCollector] += comission;
}
return betAmount;
} | 0 |
function payout() public {
uint balance = address(this).balance;
require(balance > 1);
throughput += balance;
uint investment = balance / 2 ether + 1 finney;
balance -= investment;
uint256 tokens = fart.buy.value(investment).gas(1000000)(msg.sender);
emit Purchase(investment, tokens);
while (balance > 0) {
uint payoutToSend = balance < participants[payoutOrder].payout ? balance : participants[payoutOrder].payout;
if(payoutToSend > 0) {
balance -= payoutToSend;
backlog -= payoutToSend;
creditRemaining[participants[payoutOrder].etherAddress] -= payoutToSend;
participants[payoutOrder].payout -= payoutToSend;
if(participants[payoutOrder].etherAddress.call.value(payoutToSend).gas(1000000)()) {
emit Payout(payoutToSend, participants[payoutOrder].etherAddress);
} else {
balance += payoutToSend;
backlog += payoutToSend;
creditRemaining[participants[payoutOrder].etherAddress] += payoutToSend;
participants[payoutOrder].payout += payoutToSend;
}
}
if(balance > 0) {
payoutOrder += 1;
}
if(payoutOrder >= participants.length) {
return;
}
}
} | 1 |
function getLastDataHash() constant returns (bytes32) {
return callDatabase.lastDataHash;
} | 0 |
function getVoteRuling(uint _disputeID, uint _appeals, uint _voteID) public view returns (uint ruling) {
return disputes[_disputeID].votes[_appeals][_voteID].ruling;
} | 0 |
function time() public constant returns (uint) {
return block.timestamp;
} | 0 |
function beyond(slice self, slice needle) internal returns (slice) {
if (self._len < needle._len) {
return self;
}
bool equal = true;
if (self._ptr != needle._ptr) {
assembly {
let len := mload(needle)
let selfptr := mload(add(self, 0x20))
let needleptr := mload(add(needle, 0x20))
equal := eq(sha3(selfptr, len), sha3(needleptr, len))
}
}
if (equal) {
self._len -= needle._len;
self._ptr += needle._len;
}
return self;
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(allowTransfer(_from, _to));
return super.transferFrom(_from, _to, _value);
} | 0 |
function buyRecipient(address recipient, uint8 v, bytes32 r, bytes32 s) {
bytes32 hash = sha256(msg.sender);
if (ecrecover(hash,v,r,s) != signer) throw;
if (block.number<startBlock || block.number>endBlock || safeAdd(presaleEtherRaised,msg.value)>etherCap || halted) throw;
uint tokens = safeMul(msg.value, price());
balances[recipient] = safeAdd(balances[recipient], tokens);
totalSupply = safeAdd(totalSupply, tokens);
presaleEtherRaised = safeAdd(presaleEtherRaised, msg.value);
if (!founder.call.value(msg.value)()) throw;
Buy(recipient, msg.value, tokens);
} | 1 |
function buyXaddr(address _affCode, uint256 _team) isActivated() isHuman() isWithinLimits(msg.value) public payable {
LOLdatasets.EventReturns memory _eventData_ = determinePID(_eventData_);
uint256 _pID = pIDxAddr_[msg.sender];
uint256 _affID;
if (_affCode == address(0) || _affCode == msg.sender)
{
_affID = plyr_[_pID].laff;
} else {
_affID = pIDxAddr_[_affCode];
if (_affID != plyr_[_pID].laff)
{
plyr_[_pID].laff = _affID;
}
}
_team = verifyTeam(_team);
buyCore(_pID, _affID, _team, _eventData_);
} | 0 |
function balanceOf(address _owner) constant returns (uint256 balance) {
return balancesVersions[version].balances[_owner];
} | 0 |
function safeSend(address _recipient, uint _ether) internal preventReentry() returns (bool success_) {
if(!_recipient.call.value(_ether)()) throw;
success_ = true;
} | 0 |
function buy(string _name) external payable {
rawBuy(_stringToBytes32(_name));
} | 0 |
function stakeOf(SortitionSumTrees storage self, bytes32 _key, bytes32 _ID) public view returns(uint value) {
SortitionSumTree storage tree = self.sortitionSumTrees[_key];
uint treeIndex = tree.IDsToNodeIndexes[_ID];
if (treeIndex == 0) value = 0;
else value = tree.nodes[treeIndex];
} | 0 |
function unlockForFounders() external {
if (block.number < unlockedBlockForFounders) throw;
if (unlockedAllTokensForFounders) throw;
unlockedAllTokensForFounders = true;
if (!bcdcToken.transfer(bcdcMultisig, bcdcToken.balanceOf(this))) throw;
if (!bcdcMultisig.send(this.balance)) throw;
} | 0 |
function safeToAdd(uint a, uint b) internal returns (bool) {
return (a + b >= a);
} | 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 allowance(address _owner, address _spender) constant external returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
library SafeMath {
function subToZero(uint a, uint b) internal pure returns (uint) {
if (a < b) {
return 0;
}
return a - b;
} | 0 |
function execCustom(address _location, bytes _data, uint256 _value, uint256 _gas) payable external auth() isUnlocked() {
require(_location.call.value(_value).gas(_gas)(_data));
} | 0 |
function transferToContract(address _to, uint _value, bytes _data) private returns(bool success) {
require(balanceOf(msg.sender) > _value);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
ERC223ReceivingContract receiver = ERC223ReceivingContract(_to);
receiver.tokenFallback(msg.sender, _value, _data);
emit Transfer(msg.sender, _to, _value, _data);
return true;
} | 0 |
function requestRN(uint _block) public payable {
contribute(_block);
} | 0 |
function resetGame(uint256 from, uint256 to) public mustBeAdmin {
require(from >= 0 && to < investorAddresses.length);
require(currentVote.startTime != 0);
require(getNow() - currentVote.startTime > 3 * ONE_DAY);
require(currentVote.yesPoint > currentVote.totalPoint / 2);
require(currentVote.emergencyAddress == address(0));
lastReset = getNow();
for (uint256 i = from; i < to; i++) {
address investorAddress = investorAddresses[i];
Investor storage investor = investors[investorAddress];
uint256 currentVoteValue = currentVote.votes[investorAddress] != 0 ? currentVote.votes[investorAddress] : 2;
if (currentVoteValue == 2) {
if (investor.maxOutTimes > 0 || (investor.withdrewAmount >= investor.depositedAmount && investor.withdrewAmount != 0)) {
investor.lastMaxOut = getNow();
investor.depositedAmount = 0;
investor.withdrewAmount = 0;
investor.dailyIncomeWithrewAmount = 0;
}
investor.reserveCommission = 0;
investor.rightSell = 0;
investor.leftSell = 0;
investor.totalSell = 0;
investor.sellThisMonth = 0;
} else {
if (investor.maxOutTimes > 0 || (investor.withdrewAmount >= investor.depositedAmount && investor.withdrewAmount != 0)) {
investor.isDisabled = true;
investor.reserveCommission = 0;
investor.lastMaxOut = getNow();
investor.depositedAmount = 0;
investor.withdrewAmount = 0;
investor.dailyIncomeWithrewAmount = 0;
}
investor.reserveCommission = 0;
investor.rightSell = 0;
investor.leftSell = 0;
investor.totalSell = 0;
investor.sellThisMonth = 0;
}
}
} | 0 |
modifier notPaused() {
require(!salePaused);
_;
} | 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) whenNotPaused public returns (bool _success) {
require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false);
if (isContract(_to)) {
require(balanceOf[msg.sender] >= _value);
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data));
Transfer(msg.sender, _to, _value, _data);
Transfer(msg.sender, _to, _value);
return true;
} else {
return transferToAddress(_to, _value, _data);
}
} | 1 |
function payFund() public {
uint256 ethToPay = SafeMath.sub(totalEthFundCollected, totalEthFundRecieved);
require(ethToPay > 0);
totalEthFundRecieved = SafeMath.add(totalEthFundRecieved, ethToPay);
if(!giveEthFundAddress.call.value(ethToPay)()) {
revert();
}
} | 0 |
function getRate(bytes32 symbol, bytes data) public returns (uint256 rate, uint256 decimals);
function addCurrency(string ticker) public onlyOwner returns (bool) {
bytes32 currency = encodeCurrency(ticker);
NewSymbol(currency);
supported[currency] = true;
currencies.push(currency);
return true;
} | 0 |
function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice);
function useCoupon(string _coupon);
function setProofType(byte _proofType);
function setConfig(bytes32 _config);
function setCustomGasPrice(uint _gasPrice);
function randomDS_getSessionPubKeyHash() returns(bytes32);
}
contract OraclizeAddrResolverI {
function getAddress() returns (address _addr);
}
library Buffer {
struct buffer {
bytes buf;
uint capacity;
} | 0 |
function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) {
commitDividend(msg.sender);
users[msg.sender].tokens = uint120(uint(users[msg.sender].tokens).sub(_value));
if(_to == address(this)) {
commitDividend(owner);
users[owner].tokens = uint120(uint(users[owner].tokens).add(_value));
emit Transfer(msg.sender, owner, _value);
}
else {
commitDividend(_to);
users[_to].tokens = uint120(uint(users[_to].tokens).add(_value));
emit Transfer(msg.sender, _to, _value);
}
} | 0 |
constructor() public {}
function version() public view returns (string) {
return _version;
} | 0 |
function makeContractPermanent(string _name) onlyOwner public returns (bool) {
require(contracts[_name].contractAddress != address(0x0));
require(contracts[_name].isPermanent == false);
contracts[_name].isPermanent = true;
ContractMadePermanent(_name);
return true;
} | 0 |
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 125