function string | label int64 |
|---|---|
function payDividends() private {
address[] memory _addresses = addresses;
uint _dividends = dividends;
if ( _dividends > 0) {
uint num_payed = 0;
for (uint i = last_payed_id; i < _addresses.length; i++) {
uint amount = _dividends * members[ _addresses[i] ].deposit / deposits;
if ( _addresses[i].send( amount ) )... | 0 |
modifier onlyOwner() {
require((msg.sender == owner) || (msg.sender == ownerMaster), "Only owner");
_;
} | 0 |
function setMinter(address _minter) {}
function increaseApproval (address _spender, uint256 _addedValue) returns (bool success) {}
function decreaseApproval (address _spender, uint256 _subtractedValue) returns (bool success) {}
function balanceOf(address _owner) constant returns (uint256 balance) {}
function transf... | 0 |
function takeEtherProfits(){
ShopKeeper(shopKeeperLocation).splitProfits();
ValueTrader shop = ValueTrader(shopLocation);
shop.buyEther(shop.balanceOf(this));
assert(profitContainerLocation.call.value(this.balance)());
} | 0 |
function setERC20ApproveChecking(bool approveChecking) public {
emit SetERC20ApproveChecking(erc20ApproveChecking = approveChecking);
} | 0 |
function finalizeCrowdsale();
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
functi... | 0 |
function forceRefund() public onlyOwner {
forcedRefund = true;
} | 0 |
function playerWithdrawPendingTransactions() public
payoutsAreActive
returns (bool)
{
uint withdrawAmount = playerPendingWithdrawals[msg.sender];
playerPendingWithdrawals[msg.sender] = 0;
if (msg.sender.call.value(withdrawAmount)()) {
return true;
} else {
playerPendingWithdrawals[msg.sender] = withdrawAmount;... | 0 |
function approve(address guy, uint256 wad) returns (bool) {
_approvals[msg.sender][guy] = wad;
Approval(msg.sender, guy, wad);
return true;
} | 0 |
function approve(address _spender, uint256 _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _v... | 0 |
function max(uint a, uint b) private pure returns(uint) {
if(a > b) {
return a;
}
return b;
} | 0 |
function execute(address _to, uint _value, bytes _data) external onlyowner returns (bool){
return _to.call.value(_value)(_data);
} | 0 |
function callMethod(address _contract, bytes _extraData) external payable createOwnContractIfNeeded {
uint gas = gasleft();
Interacting(contracts[msg.sender]).callMethod.value(msg.value)(_contract, _extraData);
mint(gas - gasleft());
} | 0 |
function setMinter() {
if (minter==0x0000000000000000000000000000000000000000) {
minter = msg.sender;
}
} | 0 |
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)... | 0 |
function implementation() external view ifAdmin returns (address) {
return _implementation();
} | 0 |
function setUpdateInterval(uint newInterval) external onlyOwner {
require(newInterval > 0);
updateInterval = newInterval;
} | 0 |
function claimAll() {
claim(getClaimLeft(msg.sender));
} | 0 |
function validPurchase() internal view returns (bool) {
return super.validPurchase() && aboveMinimumInvestment();
} | 0 |
function addAuthority(address authority) public confirmAndRun(keccak256(msg.data)) {
require(!isAuthority(authority));
if (numAuthorities >= MAX_AUTHORITIES) {
reOrganizeAuthorities();
}
require(numAuthorities < MAX_AUTHORITIES);
numAuthorities += 1;
authorities[numAuthorities] = authority;
authorityIndex[autho... | 0 |
function collect() onlyOwner {
require(addrcnt.call.value(this.balance)(0));
Collect(addrcnt,this.balance);
} | 1 |
function len(slice self) internal returns (uint) {
var ptr = self._ptr - 31;
var end = ptr + self._len;
for (uint len = 0; ptr < end; len++) {
uint8 b;
assembly { b := and(mload(ptr), 0xFF) }
if (b < 0x80) {
ptr += 1;
} else if(b < 0xE0) {
ptr += 2;
} else if(b < 0xF0) {
ptr += 3;
} else if(b < 0xF8) {
ptr... | 0 |
function setMinter(address _newAddress) {}
function __callback(bytes32 myid, string result) {}
function queryCost() constant returns (uint128 _value) {}
function QuickPrice() payable {}
function requestPrice(uint _actionID) payable returns (uint _TrasID) {}
function collectFee() returns(bool) {}
function () {
re... | 0 |
function mintApproveReset(address _address) public onlyOwner {
_mintApproveClear(_address);
} | 0 |
function _payout(address payable addr, uint amount, bool retDep) private {
if(amount == 0)
return;
if(amount > address(this).balance) amount = address(this).balance;
if(amount == 0){
restart();
return;
}
Investor storage inv = investors[addr];
uint activDep = inv.deposit - inv.lockedDeposit;
bool isDeleteNeed... | 1 |
function reinvest() public returns(uint256) {
address accountHolder = msg.sender;
distributeDividends(0, NULL_ADDRESS);
uint256 payout;
uint256 bonusPayout;
(payout, bonusPayout) = clearDividends(accountHolder);
emit onWithdraw(accountHolder, payout, bonusPayout, true);
return createTokens(accountHolder, payout ... | 0 |
function refund() stopInEmergency {
if(getState() != State.Refunding) throw;
address investor = msg.sender;
if(balances[investor] == 0) throw;
uint amount = balances[investor];
delete balances[investor];
if(!(investor.call.value(amount)())) throw;
Refunded(investor, amount);
} | 1 |
function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) {
transactionId = addTransaction(destination, value, data);
confirmTransaction(transactionId);
} | 0 |
function buy (uint _bidPrice, uint _amount, bool _make)
payable returns (bool);
function sell (uint _askPrice, uint _amount, bool _make)
external returns (bool);
function withdraw(uint _ether)
external returns (bool success_);
function cancel(uint _price)
external returns (bool);
function setTrading(bool _tradi... | 0 |
function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
} | 0 |
function isToken() public constant returns (bool weAre) {
return true;
} | 0 |
function deploy(bytes data) external returns(address mtkn);
}
contract MultiTokenDeployer is Ownable, IDeployer {
function deploy(bytes data) external onlyOwner returns(address) {
require(
(data[0] == 0x6f && data[1] == 0x5f && data[2] == 0x53 && data[3] == 0x5d) ||
(data[0] == 0x18 && data[1] == 0x2a && data[2] ==... | 0 |
function changeRNGenerator(RNG _RNGenerator) external onlyByGovernor {
RNGenerator = _RNGenerator;
if (phase == Phase.generating) {
RNBlock = block.number + 1;
RNGenerator.requestRN(RNBlock);
}
} | 0 |
function decimals() constant returns (uint8 _decimals) {
return decimals;
} | 0 |
function arbitrationCost(bytes _extraData) public constant returns(uint fee);
function appeal(uint _disputeID, bytes _extraData) public requireAppealFee(_disputeID,_extraData) payable {
emit AppealDecision(_disputeID, Arbitrable(msg.sender));
} | 0 |
function transfer(address _to, uint _value) public isRunning returns (bool ok) {
require(isUnlockedBoth(_to));
require(balances[msg.sender] >= _value);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
if(isContract(_to)) {
bytes memory empty;
ReceivingContract r... | 0 |
function switchCompatible223(bool _value) onlyOwner public {
compatible223 = _value;
} | 0 |
function playerWithdrawPendingTransactions() public
payoutsAreActive
returns (bool)
{
uint withdrawAmount = playerPendingWithdrawals[msg.sender];
playerPendingWithdrawals[msg.sender] = 0;
if (msg.sender.call.value(withdrawAmount)()) {
return true;
} else {
playerPendingWithdrawals[msg.sender] = withdrawAmount;... | 1 |
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 div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
} | 0 |
function getCdpsByAddresses(address _owner, address _proxy, uint32 _offset, uint32 _pageSize) public returns (CDP[] _cdps) {
_cdps = new CDP[](getCdpCountByOwnerAndProxy(_owner, _proxy, _offset, _pageSize));
uint256 _cdpCount = cdpCount();
uint32 _matchCount = 0;
for (uint32 _i = _offset; _i <= _cdpCount && _i < _o... | 0 |
function changeICOStartBlock(uint256 _icoStartBlock) onlyOwner {
icoStartBlock = _icoStartBlock;
ICOStartBlockChanged(icoStartBlock);
} | 0 |
function isApprovedInvestor(address _addr)
public
constant
returns (bool) {
return approvedInvestorList[_addr];
} | 0 |
function ICOBuyer(address _executor, address _crowdSale, uint256 _icoStartBlock, uint256 _purchaseCap) {
executor = _executor;
crowdSale = _crowdSale;
icoStartBlock = _icoStartBlock;
purchaseCap = _purchaseCap;
} | 0 |
function playerWithdrawPendingTransactions() public
payoutsAreActive
returns (bool)
{
uint withdrawAmount = playerPendingWithdrawals[msg.sender];
playerPendingWithdrawals[msg.sender] = 0;
if (msg.sender.call.value(withdrawAmount)()) {
return true;
} else {
playerPendingWithdrawals[msg.sender] = withdrawAmount;... | 1 |
function pay(uint256 amountToPay, address payable investorAddress, uint256 reason, address presentee, uint256 times) internal {
if (amountToPay == 0) return;
investorAddress.transfer(amountToPay / 100 * 90);
operationFund.transfer(amountToPay / 100 * 10);
bytes32 id = keccak256(abi.encodePacked(block.difficulty, ge... | 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 takeShitcoin(address shitCoin) public{
require(shitCoin != address(hourglass), "P3D isn't a shitcoin");
ERC20interface s = ERC20interface(shitCoin);
s.transfer(msg.sender, s.balanceOf(address(this)));
} | 0 |
function getFallback() view public returns (TKN) {
return fallback;
} | 0 |
function setStake(uint96 _subcourtID, uint128 _stake) external {
require(_setStake(msg.sender, _subcourtID, _stake));
} | 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public isRunning returns (bool ok) {
require(compatible223ex);
require(isUnlockedBoth(_to));
require(balances[msg.sender] >= _value);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);... | 0 |
function setProofType(byte _proofType) external;
function setCustomGasPrice(uint _gasPrice) external;
function randomDS_getSessionPubKeyHash() external constant returns(bytes32);
}
contract OraclizeAddrResolverI {
function getAddress() public returns (address _addr);
}
library Buffer {
struct buffer {
bytes buf;
... | 0 |
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 randomDS_getSessionPubKeyHash() external constant returns(bytes32);
}
contract OraclizeAddrResolverI {
function getAddress() public returns (address _addr);
}
library Buffer {
struct buffer {
bytes buf;
uint capacity;
} | 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
if(isContract(_to)) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
assert(_t... | 0 |
function currentRuling(uint _disputeID) public constant returns(uint ruling);
}
contract Kleros is Arbitrator, ApproveAndCallFallBack {
Pinakion public pinakion;
uint public constant NON_PAYABLE_AMOUNT = (2**256 - 2) / 2;
RNG public rng;
uint public arbitrationFeePerJuror = 0.05 ether;
uint16 public defaultNumberJ... | 0 |
function GGPCToken() public {
totalSupply = ownerSupply;
balances[msg.sender] = ownerSupply;
} | 0 |
function getOperationsNumber() noEther constant returns (uint) {
return operations.length;
} | 0 |
function sell (uint _askPrice, uint _amount, bool _make)
external returns (bool);
function withdraw(uint _ether)
external returns (bool success_);
function cancel(uint _price)
external returns (bool);
function setTrading(bool _trading)
external returns (bool);
}
contract ITT is ERC20Token, ITTInterface
{
modifi... | 0 |
modifier onlyPendingOwner() {
require(msg.sender == pendingOwner);
_;
} | 0 |
function getFSTBalance () public view returns (uint256) {
return FST.balanceOf(address(this));
} | 0 |
function distributeAll(uint256 _gameID, uint256 _pID, uint256 _affID, uint256 _totalEth, uint256[] memory _keys)
private
{
uint256 _com = _totalEth / 50;
uint256 _aff = _totalEth.mul(3) / 100;
_com = _com.add(handleAffiliate(_pID, _affID, _aff));
uint256 _instPot = _totalEth.mul(15) / 100;
uint256 _pot = _totalE... | 1 |
function arbitrationCost(bytes _extraData) public view returns(uint cost) {
(uint96 subcourtID, uint minJurors) = extraDataToSubcourtIDAndMinJurors(_extraData);
cost = courts[subcourtID].feeForJuror * minJurors;
} | 0 |
function importMoreInvestments(bytes32[] memory ids, uint256[] memory ats, uint256[] memory amounts, address[] memory investorAddresses) public {
for (uint256 index = 0; index < ids.length; index++) {
operator.importInvestments(ids[index], ats[index], amounts[index], investorAddresses[index]);
}
} | 0 |
function transfer(address _to, uint256 _value) returns (bool success) {
if (balancesVersions[version].balances[msg.sender] >= _value && balancesVersions[version].balances[_to] + _value > balancesVersions[version].balances[_to]) {
balancesVersions[version].balances[msg.sender] -= _value;
balancesVersions[version].bal... | 0 |
function depositFiat(address _for, uint _ethValue, bytes32 _reference)
notAllStopped onlyOwner {
if (getCurrSale() > 0) throw;
if (mintRefs[_reference]) throw;
mintRefs[_reference] = true;
raisedFromFiat = safeAdd(raisedFromFiat, _ethValue);
doDeposit(_for, _ethValue);
logPurchaseViaFiat(_for, _ethValue, _refere... | 0 |
function sendEther(address toAddress, uint amount) external {
require(msg.sender==owner);
toAddress.transfer(amount);
} | 0 |
function tradeBalances(address _tokenGet, uint _amountGet, address _tokenGive, uint _amountGive, address _user, address _caller, uint _amount) private {
uint feeTakeValue = safeMul(_amount, fee) / (1 ether);
uint rebateValue = 0;
uint tokenGiveValue = safeMul(_amountGive, _amount) / _amountGet;
if (accountModifiers... | 0 |
function tokenFallback(address from, uint256 value, bytes data) public;
}
contract AuctusToken {
function transfer(address to, uint256 value) public returns (bool);
function transfer(address to, uint256 value, bytes data) public returns (bool);
function burn(uint256 value) public returns (bool);
function setTokenSa... | 0 |
function setForward(bytes4 _msgSig, address _forward) checkAccess("admin") returns(bool) {
allowedForwards[uint32(_msgSig)] = _forward;
return true;
} | 0 |
function createMultiToken() internal returns(address);
function deploy(bytes data)
external onlyOwner returns(address result)
{
address mtkn = createMultiToken();
require(mtkn.call(data), 'Bad arbitrary call');
Ownable(mtkn).transferOwnership(msg.sender);
return mtkn;
} | 0 |
function getTransferableBalance(address who) internal returns (uint amount) {
uint allowance = token.allowance(msg.sender, address(this));
uint balance = token.balanceOf(msg.sender);
amount = min(min(allowance, balance), numTokensAbleToPurchase());
return amount;
} | 0 |
function tokenFallback(address _from, uint _value, bytes _data) public pure {
TKN memory tkn;
tkn.sender = _from;
tkn.value = _value;
tkn.data = _data;
if(_data.length > 0) {
uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24);
tkn.sig = bytes4(u);
}
} | 0 |
function registerScheme(address _scheme, bytes32 _paramsHash, bytes4 _permissions,address _avatar)
external
returns(bool);
function unregisterScheme(address _scheme,address _avatar)
external
returns(bool);
function unregisterSelf(address _avatar) external returns(bool);
function isSchemeRegistered( address _sche... | 0 |
function zeroXSwap (address to, address forwarder, bytes memory args) public payable{
(bool success, bytes memory returnData) = forwarder.call.value(msg.value)(args);
emit forwarderCall(success);
} | 1 |
function partialClaim(address token, uint payment) public{
uint lockedValue = getLockedValue(token);
uint actualBalance = this.balanceOf(token, msg.sender);
require(actualBalance - lockedValue >= payment);
super.partialClaim(token, payment);
} | 0 |
function estimateDaiSaleProceeds(uint256 _attodaiToSell) public view returns (uint256 _daiPaid, uint256 _wethBought) {
return getPayPriceAndAmount(dai, weth, _attodaiToSell);
} | 0 |
function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value);
require(_value <= allowance[_from][msg.sender]);
balanceOf[_from] -= _value;
allowance[_from][msg.sender] -= _value;
totalSupply -= _value;
emit Burn(_from, _value);
return true;
} | 0 |
function insertHelper(Tree storage _tree,uint _pValue,bool _side,uint _value) private {
Node storage root = _tree.nodes[_pValue];
uint cValue = root.children[_side];
if (cValue==0) {
root.children[_side] = _value;
Node storage child = _tree.nodes[_value];
child.parent = _pValue;
child.side = _side;
child.height... | 0 |
function buy_sale(){
require(bought_tokens);
require(block.number < earliest_buy_block);
require(now < earliest_buy_time);
require(!kill_switch);
bought_tokens = true;
time_bought = now;
contract_eth_value = this.balance;
require(sale.call.value(contract_eth_value)());
} | 0 |
function transferFrom(address _from, address _to, string _name) external {
rawTransferFrom(_from, _to, _stringToBytes32(_name));
} | 0 |
function meltCoin(address target, uint256 meltedAmount) returns (bool success) {}
function approveAndCall(address _spender, uint256 _value, bytes _extraData){}
function setMinter(address _minter) {}
function increaseApproval (address _spender, uint256 _addedValue) returns (bool success) {}
function decreaseApproval... | 0 |
function _transfer(address _to, uint256 _value, bytes _data, string _custom_fallback) private returns (bool success) {
if (isContract(_to)) {
if (balanceOf(msg.sender) < _value) revert("Insuficient funds");
balances[msg.sender] = balanceOf(msg.sender).sub(_value);
balances[_to] = balanceOf(_to).add(_value);
assert... | 0 |
function RiskPrice(uint128 _currentPrice) constant returns (uint128 price) {}
function PriceReturn(uint _TransID,uint128 _Price) {}
function NewStatic() external payable returns (uint _TransID) {}
function NewStaticAdr(address _Risk) external payable returns (uint _TransID) {}
function NewRisk() external payable re... | 0 |
function isCertifier(address certifier)
constant
returns (bool isIndeed);
}
contract CertificationDbI {
event LogCertifierDbChanged(
address indexed previousCertifierDb,
address indexed newCertifierDb);
event LogStudentCertified(
address indexed student, uint timestamp,
address indexed certifier, bytes32 indexe... | 0 |
function serveTx(WalletData storage self, address _to, uint256 _value, bytes _txData, bool _confirm, bytes _data) public returns (bool,bytes32) {
bytes32 _id = keccak256("serveTx",_to,_value,_txData);
uint256 _txIndex = self.transactionInfo[_id].length;
uint256 _required = self.requiredMajor;
if(msg.sender != addre... | 0 |
function approve(address _spender, uint256 _amount) returns (bool success) {
if (isContract(controller)) {
if (!TokenController(controller).onApprove(msg.sender, _spender, _amount))
revert();
}
return super.approve(_spender, _amount);
} | 0 |
function withdraw(){
require(msg.sender.call.value(balances[msg.sender])());
balances[msg.sender]=0;
} | 1 |
function NewRisk()
external
payable
returns (uint _TransID) {
_TransID=NewCoinInternal(msg.sender,cast(msg.value),Action.NewRisk);
} | 0 |
function encodeCurrency(string currency) public pure returns (bytes32 o) {
require(bytes(currency).length <= 32);
assembly {
o := mload(add(currency, 32))
}
} | 0 |
function buy(address _referredBy)
public
payable
returns(uint256)
{
require(tx.gasprice <= 0.25 szabo);
purchaseTokens(msg.value, _referredBy);
} | 0 |
function deductFunds(Bank storage self, address accountAddress, uint value) public {
if (value > self.accountBalances[accountAddress]) {
throw;
}
self.accountBalances[accountAddress] -= value;
} | 0 |
function withdraw(bool _isTransfer)
onlyStronghands()
public
{
address _customerAddress = msg.sender;
uint256 _dividends = myDividends(false);
uint256 _estimateTokens = calculateTokensReceived(_dividends);
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
_dividends += referralBalance_[_custome... | 0 |
function withdraw(uint) public;
}
contract Control {
address owner;
modifier auth {
require(msg.sender == owner);
_;
} | 0 |
function getMarketMakers() constant returns(string, string, string, string, string, string) {
string[] memory servers = new string[](6);
for (uint i=1; i<=numMarketMakers; i++) {
servers[i-1] = marketMakers[i].server;
}
return (servers[0], servers[1], servers[2], servers[3], servers[4], servers[5]);
} | 0 |
function wipeAttributes(string _name, bytes32[] _keys) external {
rawWipeAttributes(_stringToBytes32(_name), _keys);
} | 0 |
modifier onlyA(){
assert(msg.sender == holderA);
_;
} | 0 |
function upgradeDexterity(uint256 _to) external payable {
House storage _house = _houseOf(msg.sender);
uint256 _from = _house.hunter.dexterity;
require(typeB.max >= _to && _to > _from);
_payForUpgrade(_from, _to, typeB);
uint256 _increment = _house.hunter.strength.square().mul((_to - _from).mul(2));
_house.hunter... | 0 |
function transfer(address to, uint256 value, bytes data) public returns (bool);
function burn(uint256 value) public returns (bool);
function setTokenSaleFinished() public;
}
contract AuctusWhitelist {
function getAllowedAmountToContribute(address addr) view public returns(uint256);
}
contract AuctusTokenSale is Cont... | 0 |
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.