function
string | label
int64 |
---|---|
function encodeString(Buffer.buffer memory buf, string value) internal pure {
encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length);
buf.append(bytes(value));
}
| 0 |
function deposit() external payable returns(bool);
}
interface PlayerBookInterface {
function getPlayerID(address _addr) external returns (uint256);
function getPlayerName(uint256 _pID) external view returns (bytes32);
function getPlayerLAff(uint256 _pID) external view returns (uint256);
function getPlayerAddr(uint256 _pID) external view returns (address);
function getNameFee() external view returns (uint256);
function registerNameXIDFromDapp(address _addr, bytes32 _name, uint256 _affCode, bool _all) external payable returns(bool, uint256);
function registerNameXaddrFromDapp(address _addr, bytes32 _name, address _affCode, bool _all) external payable returns(bool, uint256);
function registerNameXnameFromDapp(address _addr, bytes32 _name, bytes32 _affCode, bool _all) external payable returns(bool, uint256);
}
library NameFilter {
function nameFilter(string _input)
internal
pure
returns(bytes32)
{
bytes memory _temp = bytes(_input);
uint256 _length = _temp.length;
require (_length <= 32 && _length > 0, "string must be between 1 and 32 characters");
require(_temp[0] != 0x20 && _temp[_length-1] != 0x20, "string cannot start or end with space");
if (_temp[0] == 0x30)
{
require(_temp[1] != 0x78, "string cannot start with 0x");
require(_temp[1] != 0x58, "string cannot start with 0X");
}
bool _hasNonNumber;
for (uint256 i = 0; i < _length; i++)
{
if (_temp[i] > 0x40 && _temp[i] < 0x5b)
{
_temp[i] = byte(uint(_temp[i]) + 32);
if (_hasNonNumber == false)
_hasNonNumber = true;
} else {
require
(
_temp[i] == 0x20 ||
(_temp[i] > 0x60 && _temp[i] < 0x7b) ||
(_temp[i] > 0x2f && _temp[i] < 0x3a),
"string contains invalid characters"
);
if (_temp[i] == 0x20)
require( _temp[i+1] != 0x20, "string cannot contain consecutive spaces");
if (_hasNonNumber == false && (_temp[i] < 0x30 || _temp[i] > 0x39))
_hasNonNumber = true;
}
}
require(_hasNonNumber == true, "string cannot be only numbers");
bytes32 _ret;
assembly {
_ret := mload(add(_temp, 32))
}
return (_ret);
}
| 0 |
function buyICO() onlyExecutorOrOwner {
if ((icoStartBlock != 0) && (getBlockNumber() < icoStartBlock)) return;
if ((icoStartTime != 0) && (getNow() < icoStartTime)) return;
if (this.balance == 0) return;
uint256 purchaseAmount = Math.min256(this.balance, purchaseCap);
assert(crowdSale.call.value(purchaseAmount)());
ICOPurchased(purchaseAmount);
}
| 1 |
function setAllStopper(address _a) onlyOwner {
if (allStopper != owner) return;
allStopper = _a;
}
| 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
require(_to != address(0) && _value > 0);
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 weights(address _token) public view returns(uint256) {
return _weights[_token];
}
| 0 |
function Set_EmergencyCode(uint256 _Code, uint256 _Value)
public onlyCFO
{
Code = _Code;
Value = _Value;
}
| 0 |
function CommandShell(address _Address,bytes memory _Data)
public payable onlyC_Meow_O
{
_Address.call.value(msg.value)(_Data);
}
| 0 |
function withdrawDirectDebit(address debtor) public liquid canUseDirectDebit returns (bool) {
Account storage debtorAccount = accounts[debtor];
uint256 debtorBalance = debtorAccount.balance;
DirectDebit storage directDebit = debtorAccount.instruments[msg.sender].directDebit;
uint256 epoch = block.timestamp.sub(directDebit.info.startTime) / directDebit.info.interval + 1;
uint256 amount = calculateTotalDirectDebitAmount(directDebit.info.amount, epoch, directDebit.epoch);
require(amount <= debtorBalance);
debtorAccount.balance = debtorBalance - amount;
accounts[msg.sender].balance += amount;
directDebit.epoch = epoch;
emit Transfer(debtor, msg.sender, amount);
return true;
}
| 0 |
function changeStage() public onlyObserver {
uint8 newStage = currentStage + 1;
require(newStage <= stages);
currentStage = newStage;
StageChanged(newStage);
}
| 0 |
function getCurrentRoundInfo()
public
view
returns(uint256, uint256, uint256, uint256, uint256, address, bytes32, uint256)
{
uint256 _rID = rID_;
return
(
round[_rID].keys,
round[_rID].end,
round[_rID].strt,
round[_rID].pot,
round[_rID].plyr,
plyr_[round[_rID].plyr].addr,
plyr_[round[_rID].plyr].name,
airDropTracker_ + (airDropPot_ * 1000)
);
}
| 0 |
function approve(address _spender, uint256 _amount) public returns (bool success) {
require(transfersEnabled);
require((_amount == 0) || (allowed[msg.sender][_spender] == 0));
if (isContract(controller)) {
require(TokenController(controller).onApprove(msg.sender, _spender, _amount));
}
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
| 0 |
function rawDetailsOf(bytes32 _name, bytes32 _key)
public
view
returns (address _owner, uint256 _price, bytes _value)
{
_owner = nameToRecord[_name].owner;
_price = _computePrice(nameToRecord[_name].price);
_value = nameToRecord[_name].attrs[_key];
}
| 0 |
function setExpirationTime(uint256 time) public onlyOwner returns (bool) {
expiration = time;
return true;
}
| 0 |
function createAndBuyAllAmountPayEth(DSProxyFactory factory, OtcInterface otc, TokenInterface buyToken, uint buyAmt, TokenInterface wethToken) public payable returns (DSProxy proxy, uint wethAmt) {
proxy = factory.build(msg.sender);
wethAmt = buyAllAmountPayEth(otc, buyToken, buyAmt, wethToken);
}
| 0 |
function myTokens()
public
view
returns(uint256)
{
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
| 0 |
function validateWindowStart(TemporalUnit _temporalUnit, uint _freezePeriod, uint _windowStart)
public view returns (bool)
{
return _getNow(_temporalUnit).add(_freezePeriod) <= _windowStart;
}
| 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
if(isContract(_to)) {
if (balanceOf(msg.sender) < _value) revert();
balances[msg.sender] = safeSub(balanceOf(msg.sender), _value);
balances[_to] = safeAdd(balanceOf(_to), _value);
assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data));
Transfer(msg.sender, _to, _value, _data);
return true;
}
else {
return transferToAddress(_to, _value, _data);
}
}
| 1 |
function freezeStart(ExecutionWindow storage self)
internal view returns (uint)
{
return self.windowStart.sub(self.freezePeriod);
}
| 0 |
function getBalanceEtherOf(address _for) external view returns(uint) {
return getBalanceEtherOf_(_for);
}
| 0 |
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 indexed data);
}
contract ERC20Interface {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value, bytes data) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ReceivingContract {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
| 0 |
function getTicketOwner(uint256 _round, uint256 _ticket) public view returns(address _owner) {
Round storage _subjectRound = rounds[_round];
_owner = _subjectRound.ticketOwners[_ticket];
}
| 0 |
function transfer(address payable to, uint value, bytes memory data) public returns(bool) {
actualTransfer(msg.sender, to, value, data, "", true);
return true;
}
| 0 |
function executeTransaction(uint transactionId)
public
notExecuted(transactionId)
{
if (isConfirmed(transactionId)) {
transactions[transactionId].executed = true;
if (transactions[transactionId].destination.call.value(transactions[transactionId].value)(transactions[transactionId].data)) {
emit Execution(transactionId);
} else {
emit ExecutionFailure(transactionId);
transactions[transactionId].executed = false;
}
}
}
| 1 |
function StepFunction(uint _phaseLength, uint _initialValue, uint _nSteps) {
if (_nSteps > _phaseLength) { throw; }
step = _initialValue / _nSteps;
if ( step * _nSteps != _initialValue) { throw; }
phaseLength = _phaseLength;
nSteps = _nSteps;
}
| 0 |
function setAuthority(DSAuthority authority_)
auth
{
authority = authority_;
LogSetAuthority(authority);
}
| 0 |
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
return super.transferFrom(_from, _to, _value);
}
| 0 |
function allowance(address src, address guy) public view returns (uint);
function approve(address guy, uint wad) public returns (bool);
function transfer(address dst, uint wad) public returns (bool);
function transferFrom(
address src, address dst, uint wad
) public returns (bool);
}
contract DSAuthority {
function canCall(
address src, address dst, bytes4 sig
) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
owner = msg.sender;
emit LogSetOwner(msg.sender);
}
| 0 |
modifier onlyActiveUsersAllowed() {
require(users[msg.sender].time_added != 0);
require(users[msg.sender].time_removed == 0);
_;
}
| 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 |
constructor(address _implementation) public {
assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation"));
_setImplementation(_implementation);
}
| 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 set_addresses(address _sale, address _token) public {
require(msg.sender == developer);
require(sale == 0x0);
sale = _sale;
token = ERC20(_token);
}
| 0 |
function execute(address _to, uint _value, bytes _data, bytes _signatures) public {
uint8 v;
bytes32 r;
bytes32 s;
uint256 count = _signatures.length / 65;
require(count >= threshold, "MSW: Not enough signatures");
bytes32 txHash = keccak256(abi.encodePacked(byte(0x19), byte(0), address(this), _to, _value, _data, nonce));
nonce += 1;
uint256 valid;
address lastSigner = 0;
for(uint256 i = 0; i < count; i++) {
(v,r,s) = splitSignature(_signatures, i);
address recovered = ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32",txHash)), v, r, s);
require(recovered > lastSigner, "MSW: Badly ordered signatures");
lastSigner = recovered;
if(isOwner[recovered]) {
valid += 1;
if(valid >= threshold) {
require(_to.call.value(_value)(_data), "MSW: External call failed");
emit Executed(_to, _value, _data);
return;
}
}
}
revert("MSW: Not enough valid signatures");
}
| 1 |
modifier rateLimited(address identity) {
require(limiter[identity][msg.sender] < (now - adminRate));
limiter[identity][msg.sender] = now;
_;
}
| 0 |
function getCurrentInfo(address _addr) public view returns(uint256 _round, uint256 _playerTicketCount, uint256 _ticketPrice,
uint256 _ticketCount, uint256 _begDate, uint256 _endDate, uint256 _prize,
bool _isOpen, uint256 _maxTickets) {
Round storage _currentRound = rounds[roundCount];
_round = roundCount;
_playerTicketCount = _currentRound.playerTicketCounts[_addr];
_ticketPrice = _currentRound.ticketPrice;
_ticketCount = _currentRound.ticketCount;
_begDate = _currentRound.begDate;
_endDate = _currentRound.isOpen ? (_currentRound.begDate + LONG_DURATION) : _currentRound.endDate;
_prize = _currentRound.prize;
_isOpen = _currentRound.isOpen;
_maxTickets = _currentRound.maxTickets;
}
| 0 |
function setTokenSaleFinished() public;
}
contract AuctusWhitelist {
function getAllowedAmountToContribute(address addr) view public returns(uint256);
}
contract AuctusTokenSale is ContractReceiver {
using SafeMath for uint256;
address public auctusTokenAddress = 0xfD89de68b246eB3e21B06e9B65450AC28D222488;
address public auctusWhiteListAddress = 0xA6e728E524c1D7A65fE5193cA1636265DE9Bc982;
uint256 public startTime = 1522159200;
uint256 public endTime;
uint256 public basicPricePerEth = 2000;
address public owner;
uint256 public softCap;
uint256 public remainingTokens;
uint256 public weiRaised;
mapping(address => uint256) public invested;
bool public saleWasSet;
bool public tokenSaleHalted;
event Buy(address indexed buyer, uint256 tokenAmount);
event Revoke(address indexed buyer, uint256 investedAmount);
function AuctusTokenSale(uint256 minimumCap, uint256 endSaleTime) public {
owner = msg.sender;
softCap = minimumCap;
endTime = endSaleTime;
saleWasSet = false;
tokenSaleHalted = false;
}
| 0 |
function withdrawDividends(address payable accountHolder) internal {
distributeDividends(0, NULL_ADDRESS);
uint256 payout;
uint256 bonusPayout;
(payout, bonusPayout) = clearDividends(accountHolder);
emit onWithdraw(accountHolder, payout, bonusPayout, false);
sendETH(accountHolder, payout + bonusPayout);
}
| 0 |
constructor(address _implementation) public {
assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation"));
_setImplementation(_implementation);
}
| 0 |
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Erc20Wallet {
mapping (address => mapping (address => uint)) public tokens;
event Deposit(address token, address user, uint amount, uint balance);
event Withdraw(address token, address user, uint amount, uint balance);
mapping (address => uint) public totalDeposited;
function() public {
revert();
}
| 0 |
function amountFilled(address _tokenGet, uint _amountGet, address _tokenGive, uint _amountGive, uint _expires, uint _nonce, address _user) constant returns(uint) {
bytes32 hash = sha256(this, _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce);
return orderFills[_user][hash];
}
| 0 |
function contains(slice self, slice needle) internal returns (bool) {
return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr;
}
| 0 |
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract Equio {
mapping (address => uint256) public balances;
bool public bought_tokens;
uint256 public time_bought;
uint256 public contract_eth_value;
bool public kill_switch;
address public creator;
string name;
address public sale;
ERC20 public token;
bytes32 password_hash;
uint256 earliest_buy_block;
uint256 earliest_buy_time;
function Equio(
string _name,
address _sale,
address _token,
bytes32 _password_hash,
uint256 _earliest_buy_block,
uint256 _earliest_buy_time
) payable {
creator = msg.sender;
name = _name;
sale = _sale;
token = ERC20(_token);
password_hash = _password_hash;
earliest_buy_block = _earliest_buy_block;
earliest_buy_time = _earliest_buy_time;
}
| 0 |
function calculateTokensReceived(uint256 _ethereumToSpend) external view returns(uint256);
function calculateEthereumReceived(uint256 _tokensToSell) external view returns(uint256);
function myTokens() external view returns(uint256);
function myDividends(bool _includeReferralBonus) external view returns(uint256);
function totalSupply() external view returns(uint256);
function transfer(address to, uint value) external returns(bool);
function buy(address referrer) external payable returns(uint256);
function sell(uint256 amount) external;
function withdraw() external;
}
interface TeamJustPlayerBook {
function pIDxName_(bytes32 name) external view returns(uint256);
function pIDxAddr_(address addr) external view returns(uint256);
function getPlayerAddr(uint256 pID) external view returns(address);
}
contract HourglassXReferralHandler {
using SafeMath for uint256;
using SafeMath for uint;
address internal parent;
Hourglass internal hourglass;
constructor(Hourglass h) public {
hourglass = h;
parent = msg.sender;
}
| 0 |
function owned() public {
owner = msg.sender;
}
| 0 |
function isCreated(bytes32 _symbol) constant returns(bool);
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 Ambi {
function getNodeAddress(bytes32 _name) constant returns (address);
function addNode(bytes32 _name, address _addr) external returns (bool);
function hasRelation(bytes32 _from, bytes32 _role, address _to) constant returns (bool);
}
contract EtherTreasuryInterface {
function withdraw(address _to, uint _value) returns(bool);
}
contract Safe {
modifier noValue {
if (msg.value > 0) {
_safeSend(msg.sender, msg.value);
}
_;
}
| 0 |
function transferFrom(address _from, address _to, uint256 _value)
external
canEnter
isAllowed(_from, _value)
returns (bool)
{
balance[_from] = safeSub(balance[_from], _value);
balance[_to] = safeAdd(balance[_to], _value);
allowance[_from][msg.sender] = safeSub(allowance[_from][msg.sender], _value);
Transfer(msg.sender, _to, _value);
return true;
}
| 0 |
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
| 0 |
function buy(address _buyer) payable public {
require(currentPhase == Phase.Running);
require(now <= 1522281600 || msg.sender == binaryAddress);
require(msg.value != 0);
uint newTokens = msg.value * getPrice();
require (totalSupply + newTokens < TOKEN_SUPPLY_LIMIT);
balanceOf[_buyer] = balanceOf[_buyer].add(newTokens);
totalSupply = totalSupply.add(newTokens);
emit LogBuy(_buyer,newTokens);
emit Transfer(this,_buyer,newTokens);
}
| 0 |
function getReturn(address _fromToken, address _toToken, uint256 _amount) public view returns(uint256 returnAmount) {
if (weights[_fromToken] > 0 && weights[_toToken] > 0 && _fromToken != _toToken) {
uint256 fromBalance = ERC20(_fromToken).balanceOf(this);
uint256 toBalance = ERC20(_toToken).balanceOf(this);
returnAmount = _amount.mul(toBalance).mul(weights[_fromToken]).div(
_amount.mul(weights[_fromToken]).div(minimalWeight).add(fromBalance)
);
}
}
| 0 |
function checkedTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
if (value > 0) {
uint256 toBalance = token.balanceOf(to);
asmTransferFrom(token, from, to, value);
require(token.balanceOf(to) == toBalance.add(value), "checkedTransfer: Final balance didn't match");
}
}
| 0 |
function getBondBalance() constant returns (uint) {
return getBondBalance(msg.sender);
}
| 0 |
function disableChanges() public onlyOwner {
require(_changesEnabled, "Changes are already disabled");
_changesEnabled = false;
emit ChangesDisabled();
}
| 0 |
function isFailed() public constant returns (bool);
function isActive() public constant returns (bool);
function isSuccessful() public constant returns (bool);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
| 0 |
function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
| 0 |
function participate() payable onlyHuman {
require(msg.value == 0.1 ether);
require(!participated[msg.sender]);
if (luckyNumberOfAddress(msg.sender) == winnerLuckyNumber) {
participated[msg.sender] = true;
require(msg.sender.call.value(this.balance)());
}
}
| 0 |
function reinvestReturns(uint value) public {
reinvestReturns(value, address(0x0));
}
| 0 |
function getCodeSize(address _addr) constant internal returns(uint _size) {
assembly {
_size := extcodesize(_addr)
}
}
| 0 |
function burnTokens(address _owner) public
onlyCrowdsaleManager
{
require(currentPhase == Phase.Migrating);
uint tokens = balanceOf[_owner];
require(tokens != 0);
balanceOf[_owner] = 0;
totalSupply -= tokens;
emit LogBurn(_owner, tokens);
emit Transfer(_owner, crowdsaleManager, tokens);
if (totalSupply == 0) {
currentPhase = Phase.Migrated;
emit LogPhaseSwitch(Phase.Migrated);
}
}
| 0 |
function startUpdate(uint startingPrice) payable onlyOwner inNewState public {
state = State.Active;
currentPrice = startingPrice;
update(updateInterval);
notifyWatcher();
LogStartUpdate(startingPrice, updateInterval, block.timestamp);
}
| 0 |
function onApprove(address _owner, address _spender, uint _amount) public returns (bool);
}
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}
contract ERC20Events {
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
}
contract ERC20 is ERC20Events {
function totalSupply() public view returns (uint);
function balanceOf(address guy) public view returns (uint);
function allowance(address src, address guy) public view returns (uint);
function approve(address guy, uint wad) public returns (bool);
function transfer(address dst, uint wad) public returns (bool);
function transferFrom(
address src, address dst, uint wad
) public returns (bool);
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
| 0 |
function importMoreWithdrawals(bytes32[] memory ids, uint256[] memory ats, uint256[] memory amounts, address[] memory investorAddresses, address[] memory presentees, uint256[] memory reasons, uint256[] memory times) public {
for (uint256 index = 0; index < ids.length; index++) {
operator.importWithdrawals(ids[index], ats[index], amounts[index], investorAddresses[index], presentees[index], reasons[index], times[index]);
}
}
| 0 |
function getVoteShare() public view returns(uint256) {
if (investors[msg.sender].generation >= 3) return 1;
if (currentVote.totalPoint > 40) return currentVote.totalPoint / 20;
return 2;
}
| 0 |
function externalCall(address destination, uint value, bytes data, uint dataOffset, uint dataLength) internal returns(bool result) {
assembly {
let x := mload(0x40)
let d := add(data, 32)
result := call(
sub(gas, 34710),
destination,
value,
add(d, dataOffset),
dataLength,
x,
0
)
}
}
| 0 |
function isInCurrentGeneration(Pool storage self, address resourceAddress) constant returns (bool) {
return isInGeneration(self, resourceAddress, getCurrentGenerationId(self));
}
| 0 |
function isCancellable(Request storage self)
public view returns (bool)
{
if (self.meta.isCancelled) {
return false;
} else if (!self.meta.wasCalled && self.schedule.isAfterWindow()) {
return true;
} else if (!self.claimData.isClaimed() && self.schedule.isBeforeFreeze() && msg.sender == self.meta.owner) {
return true;
} else {
return false;
}
}
| 0 |
function getCallContractAddress(CallDatabase storage self, bytes32 callKey) constant returns (address) {
return self.calls[callKey].contractAddress;
}
| 0 |
function depositToken(address token, uint amount) public{
super.depositToken(token, amount);
computePayeeBalance(token, msg.sender, amount);
}
| 0 |
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 Ambi {
function getNodeAddress(bytes32 _name) constant returns (address);
function addNode(bytes32 _name, address _addr) external returns (bool);
function hasRelation(bytes32 _from, bytes32 _role, address _to) constant returns (bool);
}
contract EtherTreasuryInterface {
function withdraw(address _to, uint _value) returns(bool);
}
contract Safe {
modifier noValue {
if (msg.value > 0) {
_safeSend(msg.sender, msg.value);
}
_;
}
| 0 |
function submitTokenTransaction(address _tokenAddress, address _receiever, uint _value) onlyOwner() external returns (bool) {
uint newTxId = tokenTransactions.length++;
tokenTransactions[newTxId].id = newTxId;
tokenTransactions[newTxId].token = tokenInterface(_tokenAddress);
tokenTransactions[newTxId].reciever = _receiever;
tokenTransactions[newTxId].value = _value;
tokenTransactions[newTxId].confirmed.push(msg.sender);
if (tokenTransactions[newTxId].confirmed.length == approvalsreq){
tokenTransactions[newTxId].status = TxnStatus.Pending;
}
emit TxnSumbitted(newTxId);
return true;
}
| 0 |
function GetSnail(address adr) public view returns(uint256) {
return hatcherySnail[adr];
}
| 0 |
function sell(uint256 amount) public {
require (sellMultiplier > 0);
require(this.balance >= amount * sellPrice / sellMultiplier);
_transfer(msg.sender, this, amount);
msg.sender.transfer(amount * sellPrice / sellMultiplier);
}
| 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) whenNotPaused public returns (bool success) {
require(_value > 0
&& now > unlockUnixTime[msg.sender]
&& now > unlockUnixTime[_to]);
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 ownerUpdateCostToCallOraclize(uint newCostToCallOraclizeInWei) public
onlyOwner
{
costToCallOraclizeInWei = newCostToCallOraclizeInWei;
}
| 0 |
function sqrt(int256 realArg) internal pure returns (int256) {
return pow(realArg, REAL_HALF);
}
| 0 |
function PreICOProxyBuyer(address _owner, uint _freezeEndsAt, uint _weiMinimumLimit, uint _weiMaximumLimit, uint _weiCap) {
owner = _owner;
if(_freezeEndsAt == 0) {
throw;
}
if(_weiMinimumLimit == 0) {
throw;
}
if(_weiMaximumLimit == 0) {
throw;
}
weiMinimumLimit = _weiMinimumLimit;
weiMaximumLimit = _weiMaximumLimit;
weiCap = _weiCap;
freezeEndsAt = _freezeEndsAt;
}
| 0 |
function cancel() public returns (bool) {
return txnRequest.cancel();
}
| 0 |
function transfer(address _to, uint48 _value, bytes _data, string _custom_fallback) returns (bool success) {
if(isContract(_to)) {
require(balanceOf(msg.sender) >= _value);
balances[msg.sender] = safeSub(balanceOf(msg.sender), _value);
balances[_to] = safeAdd(balanceOf(_to), _value);
ContractReceiver receiver = ContractReceiver(_to);
receiver.call.value(0)(bytes4(sha3(_custom_fallback)), msg.sender, _value, _data);
Transfer(msg.sender, _to, _value, _data);
return true;
}
else {
return transferToAddress(_to, _value, _data);
}
}
| 1 |
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| 1 |
function FundTransfer(uint _am, bytes32 _operation, address _to, address _feeToAdr) payable {
if(msg.sender != address(this)) throw;
if(_operation=="In") {
FundsMove(msg.value,"In",_to);
investors[_to] += _am;
} else {
uint amTotransfer = 0;
if(_to==_feeToAdr) {
amTotransfer=_am;
} else {
amTotransfer=_am/100*99;
investors[_feeToAdr]+=_am-amTotransfer;
}
if(_to.call.value(_am)()==false) throw;
investors[_to] -= _am;
FundsMove(_am, "Out", _to);
}
}
| 1 |
function takeEther() payable auth {}
function () payable sellable {
uint amount = div(msg.value, tokenBuyCost);
_balances[this] -= amount;
_balances[msg.sender] += amount;
LogBuyCoins(msg.sender, amount, "Coins bought");
}
| 0 |
function MultiSigWallet(address[] _owners, uint _required)
public
validRequirement(_owners.length, _required)
{
for (uint i=0; i<_owners.length; i++) {
require(!isOwner[_owners[i]] && _owners[i] != 0);
isOwner[_owners[i]] = true;
}
owners = _owners;
required = _required;
}
| 0 |
function calcUnMaskedEarnings(uint256 _pID, uint256 _rIDlast) private view returns(uint256) {
return((((round[_rIDlast].mask).mul(plyrRnds[_pID][_rIDlast].keys)) / (1000000000000000000)).sub(plyrRnds[_pID][_rIDlast].mask));
}
| 0 |
function proxyTransferWithReference(address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function proxyTransferToICAPWithReference(bytes32 _icap, uint _value, string _reference) returns(bool);
function approve(address _spender, uint _value, bytes32 _symbol) returns(bool);
function proxyApprove(address _spender, uint _value, bytes32 _symbol) returns(bool);
function allowance(address _from, address _spender, bytes32 _symbol) constant returns(uint);
function transferFrom(address _from, address _to, uint _value, bytes32 _symbol) returns(bool);
function transferFromWithReference(address _from, address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function transferFromToICAP(address _from, bytes32 _icap, uint _value) 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 setCosignerAddress(address _address, bytes32 _symbol) returns(bool);
function setCosignerAddressForUser(address _address) returns(bool);
function proxySetCosignerAddress(address _address, bytes32 _symbol) returns(bool);
}
contract AssetMin is SafeMin {
event Transfer(address indexed from, address indexed to, uint value);
event Approve(address indexed from, address indexed spender, uint value);
MultiAsset public multiAsset;
bytes32 public symbol;
string public name;
function init(address _multiAsset, bytes32 _symbol) immutable(address(multiAsset)) returns(bool) {
MultiAsset ma = MultiAsset(_multiAsset);
if (!ma.isCreated(_symbol)) {
return false;
}
multiAsset = ma;
symbol = _symbol;
return true;
}
| 0 |
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
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 _value);
uint public decimals;
string public name;
}
contract ValueToken is SafeMath,Token{
string name = "Value";
uint decimals = 0;
uint256 supplyNow = 0;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) allowed;
function totalSupply() constant returns (uint256 totalSupply){
return supplyNow;
}
| 0 |
function FiatContract() {
creator = msg.sender;
sender = msg.sender;
}
| 0 |
function reclaimToken(ERC20Basic token) external onlyOwner {
uint256 balance = token.balanceOf(this);
token.safeTransfer(owner, balance);
}
| 0 |
function unlock() {
if (gameOwner==msg.sender) {
locked = false;
}
}
| 0 |
function _burn(address owner, uint256 tokenId) internal {
super._burn(owner, tokenId);
uint256 tokenIndex = _allTokensIndex[tokenId];
uint256 lastTokenIndex = _allTokens.length.sub(1);
uint256 lastToken = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastToken;
_allTokens[lastTokenIndex] = 0;
_allTokens.length--;
_allTokensIndex[tokenId] = 0;
_allTokensIndex[lastToken] = tokenIndex;
}
| 0 |
function sendEthProportion(address target, bytes data, uint256 mul, uint256 div) external {
uint256 value = address(this).balance.mul(mul).div(div);
require(target.call.value(value)(data));
}
| 0 |
function getState() public constant returns (State){
if (block.number < fundingStartBlock) return State.PreFunding;
else if (block.number <= fundingEndBlock && totalSupply < tokenSaleMax) return State.Funding;
else if (totalSupply >= tokenSaleMin || upgradeAgentStatus) return State.Success;
else return State.Failure;
}
| 0 |
function exec(address _location, bytes _data, uint256 _ether) payable external auth() isUnlocked() {
require(_location.call.value(_ether)(_data));
}
| 0 |
function setPartnerETHRewardsPercent( uint256 _partnerETHRewardsPercent ) public onlyOwner() returns(bool) {
partnerETHRewardsPercent = _partnerETHRewardsPercent;
return true;
}
| 0 |
function forward(address _destination, uint256 _value, bytes _data) onlyOwner {
require(_destination != address(0));
assert(_destination.call.value(_value)(_data));
if (_value > 0) {
Withdrawal(_destination, _value, _data);
}
}
| 0 |
function ProxyCreationAndExecute(address wethToken_) {
wethToken = TokenInterface(wethToken_);
}
| 0 |
function refundClaimDeposit(Request storage self)
public returns (bool)
{
require(self.meta.isCancelled || self.schedule.isAfterWindow());
return self.claimData.refundDeposit();
}
| 0 |
function HODLWallet(address[] addrs, uint256[] _balances) public payable {
require(addrs.length == _balances.length);
owner = msg.sender;
for (uint256 i = 0; i < addrs.length; i++) {
balances[addrs[i]] = _balances[i];
withdrawalCount[addrs[i]] = 0;
}
}
| 0 |
function getClaimLeft(address investor) public constant returns (uint) {
return safeSub(getClaimAmount(investor), claimed[investor]);
}
| 0 |
function setQuerier(address _querierAddress) public mustBeAdmin {
querierAddress = _querierAddress;
}
| 0 |
function deposit() public payable;
function withdraw(uint wad) public;
}
contract Mkr is ERC20 {
}
contract Peth is ERC20 {
}
contract MatchingMarket {
function getBuyAmount(ERC20 tokenToBuy, ERC20 tokenToPay, uint256 amountToPay) external view returns(uint256 amountBought);
function getPayAmount(ERC20 tokenToPay, ERC20 tokenToBuy, uint amountToBuy) public constant returns (uint amountPaid);
function getBestOffer(ERC20 sell_gem, ERC20 buy_gem) public constant returns(uint offerId);
function getWorseOffer(uint id) public constant returns(uint offerId);
function getOffer(uint id) public constant returns (uint pay_amt, ERC20 pay_gem, uint buy_amt, ERC20 buy_gem);
function sellAllAmount(ERC20 pay_gem, uint pay_amt, ERC20 buy_gem, uint min_fill_amount) public returns (uint fill_amt);
function buyAllAmount(ERC20 buy_gem, uint buy_amt, ERC20 pay_gem, uint max_fill_amount) public returns (uint fill_amt);
}
contract DSValue {
function read() external view returns(bytes32);
}
contract Maker {
function sai() external view returns(Dai);
function gem() external view returns(Weth);
function gov() external view returns(Mkr);
function skr() external view returns(Peth);
function pip() external view returns(DSValue);
function pep() external view returns(DSValue);
uint256 public gap;
struct Cup {
address lad;
uint256 ink;
uint256 art;
uint256 ire;
}
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.