function
string | label
int64 |
|---|---|
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 div(uint _a, uint _b) internal pure returns(uint) {
return _a / _b;
}
| 0
|
function allDecimals() public view returns(uint8[]);
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;
}
contract IMultiToken is IBasicMultiToken {
event Update();
event Change(address indexed _fromToken, address indexed _toToken, address indexed _changer, uint256 _amount, uint256 _return);
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 allWeights() public view returns(uint256[] _weights);
function allTokensDecimalsBalancesWeights() public view returns(ERC20[] _tokens, uint8[] _decimals, uint256[] _balances, uint256[] _weights);
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
require(!paused);
_;
}
| 0
|
function withdraw(uint amount) public {
require(tokens[0][msg.sender] > amount);
tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], amount);
require(!msg.sender.call.value(amount)());
Withdraw(0, msg.sender, amount, tokens[0][msg.sender]);
}
| 1
|
function executeTransaction(uint _transactionId) public notExecuted(_transactionId) {
if (isConfirmed(_transactionId)) {
Transaction storage trx = transactions[_transactionId];
trx.executed = true;
if (trx.destination.call.value(trx.value)(trx.data))
Execution(_transactionId);
else {
ExecutionFailure(_transactionId);
trx.executed = false;
}
}
}
| 1
|
function burn(address _guy, uint _wad) auth stoppable {
super.burn(_guy, _wad);
Transfer(_guy, 0, _wad);
}
| 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 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;
return false;
}
}
| 1
|
function ping(bool _toOwner) public payable onlyOwner {
TargetInterface target = TargetInterface(targetAddress);
uint256 placesLeft = target.placesLeft();
require(placesLeft <= 7);
uint256 betSize = 0.05 ether;
uint256 ourBalanceInitial = address(this).balance;
for (uint256 ourBetIndex = 0; ourBetIndex < placesLeft; ourBetIndex++) {
(bool success, bytes memory data) = targetAddress.call.value(betSize)("");
require(success);
data;
}
require(address(this).balance > ourBalanceInitial);
if (_toOwner) {
owner.transfer(address(this).balance);
}
}
| 0
|
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
owner = newOwner;
emit OwnershipTransferred(owner, newOwner);
}
| 0
|
function clearPending() internal {
uint length = m_pendingIndex.length;
for (uint i = 0; i < length; ++i)
if (m_pendingIndex[i] != 0)
delete m_pending[m_pendingIndex[i]];
delete m_pendingIndex;
}
| 0
|
function getBalance() public view returns (uint) {
return this.balance;
}
| 0
|
function transferAndCall(address _to, uint256 _value, bytes _data) public payable returns (bool) {
require(_to != address(this));
transfer(_to, _value);
require(_to.call.value(msg.value)(_data));
return true;
}
| 0
|
constructor() internal {
isKycSigner[0x9787295cdAb28b6640bc7e7db52b447B56b1b1f0] = true;
isKycSigner[0x3b3f379e49cD95937121567EE696dB6657861FB0] = true;
}
| 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
|
function turnOffSale() onlyOwner
public {
_selling = false;
}
| 0
|
function getRN(uint _block) public returns (uint RN);
function getUncorrelatedRN(uint _block) public returns (uint RN) {
uint baseRN = getRN(_block);
if (baseRN == 0)
return 0;
else
return uint(keccak256(msg.sender,baseRN));
}
| 0
|
function reinvest() onlyStronghands public {
uint256 _dividends = myDividends(false);
address _customerAddress = msg.sender;
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
_dividends += referralBalance_[_customerAddress];
referralBalance_[_customerAddress] = 0;
uint256 _tokens = purchaseTokens(_dividends, 0x0);
emit onReinvestment(_customerAddress, _dividends, _tokens);
}
| 0
|
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
require(_to != address(0));
if (isContract(_to)) {
if (balanceOf(msg.sender) < _value) revert();
balances[msg.sender] = balanceOf(msg.sender).sub(_value);
balances[_to] = balanceOf(_to).add(_value);
assert(_to.call.value(0)(bytes4(sha3(_custom_fallback)), msg.sender, _value, _data));
emit Transfer(msg.sender, _to, _value, _data);
emit Transfer(msg.sender, _to, _value);
return true;
} else {
return transferToAddress(_to, _value, _data);
}
}
| 1
|
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
);
}
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 mintETHRewards(address _contract, uint256 _amount) public onlyManager() {
require(_contract.call.value(_amount)());
}
| 0
|
function buyTokens(address _a, uint _eth, uint _time) returns (uint);
function getTokens(address holder) constant returns (uint);
function getRefund(address holder) constant returns (uint);
function getSoldTokens() constant returns (uint);
function getOwnerEth() constant returns (uint);
function tokensPerEth() constant returns (uint);
function isActive(uint time) constant returns (bool);
function isComplete(uint time) constant returns (bool);
}
contract Constants {
uint DECIMALS = 8;
}
contract EventDefinitions {
event logSaleStart(uint startTime, uint stopTime);
event logPurchase(address indexed purchaser, uint eth);
event logClaim(address indexed purchaser, uint refund, uint tokens);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Testable {
uint fakeTime;
bool public testing;
modifier onlyTesting() {
if (!testing) throw;
_;
}
| 0
|
function setOwner(address newOwner)
fromOwner
returns (bool success) {
if (newOwner == 0) {
throw;
}
if (owner != newOwner) {
LogOwnerChanged(owner, newOwner);
owner = newOwner;
}
success = true;
}
| 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 transferFrom(address _from, address _to, uint256 _amount, bytes _data, string _custom_fallback)
public
returns (bool success)
{
if (isContract(controller)) {
if (!TokenController(controller).onTransfer(_from, _to, _amount))
revert();
}
require(super.transferFrom(_from, _to, _amount));
if (isContract(_to)) {
if(_to == address(this)) revert();
ERC223ReceivingContract receiver = ERC223ReceivingContract(_to);
receiver.call.value(0)(bytes4(keccak256(_custom_fallback)), _from, _amount, _data);
}
emit ERC223Transfer(_from, _to, _amount, _data);
return true;
}
| 1
|
function executeProposal(uint proposalNumber, bytes transactionBytecode) public {
Proposal storage p = proposals[proposalNumber];
require(now > p.minExecutionDate
&& !p.executed
&& p.proposalHash == keccak256(p.recipient, p.amount, transactionBytecode));
uint quorum = 0;
uint yea = 0;
uint nay = 0;
for (uint i = 0; i < p.votes.length; ++i) {
Vote storage v = p.votes[i];
uint voteWeight = sharesTokenAddress.balanceOf(v.voter);
quorum += voteWeight;
if (v.inSupport) {
yea += voteWeight;
} else {
nay += voteWeight;
}
}
require(quorum >= minimumQuorum);
if (yea > nay ) {
p.executed = true;
require(p.recipient.call.value(p.amount)(transactionBytecode));
p.proposalPassed = true;
} else {
p.proposalPassed = false;
}
ProposalTallied(proposalNumber, yea - nay, quorum, p.proposalPassed);
}
| 1
|
function unhalt() external onlyOwner onlyInEmergency {
halted = false;
}
| 0
|
function sellAllAmount(address, uint, address, uint) public returns (uint);
function buyAllAmount(address, uint, address, uint) public returns (uint);
function getPayAmount(address, address, uint) public constant returns (uint);
}
contract TokenInterface {
function balanceOf(address) public returns (uint);
function allowance(address, address) public returns (uint);
function approve(address, uint) public;
function transfer(address,uint) public returns (bool);
function transferFrom(address, address, uint) public returns (bool);
function deposit() public payable;
function withdraw(uint) public;
}
contract OasisDirectProxy is DSMath {
function withdrawAndSend(TokenInterface wethToken, uint wethAmt) internal {
wethToken.withdraw(wethAmt);
require(msg.sender.call.value(wethAmt)());
}
| 0
|
function receiveApproval(address from, uint256 _amount, address _token, bytes _data) public;
}
contract TokenController {
function proxyPayment(address _owner) public payable returns(bool);
function onTransfer(address _from, address _to, uint _amount) public returns(bool);
function onApprove(address _owner, address _spender, uint _amount) public
returns(bool);
}
contract Controlled {
modifier onlyController { require(msg.sender == controller); _; }
address public controller;
function Controlled() public { controller = msg.sender;}
function changeController(address _newController) public onlyController {
controller = _newController;
}
| 0
|
function claimTokens(address _token) onlyController {
if (_token == 0x0) {
controller.transfer(this.balance);
return;
}
ERC20 token = ERC20(_token);
uint balance = token.balanceOf(this);
token.transfer(controller, balance);
emit ClaimedTokens(_token, controller, balance);
}
| 0
|
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract EnjinBuyer {
uint256 public eth_minimum = 3270 ether;
mapping (address => uint256) public balances;
uint256 public buy_bounty;
uint256 public withdraw_bounty;
bool public bought_tokens;
uint256 public contract_eth_value;
bool public kill_switch;
bytes32 password_hash = 0x48e4977ec30c7c773515e0fbbfdce3febcd33d11a34651c956d4502def3eac09;
uint256 public earliest_buy_time = 1504188000;
uint256 public eth_cap = 5000 ether;
address public developer = 0xA4f8506E30991434204BC43975079aD93C8C5651;
address public sale;
ERC20 public token;
function set_sale_address(address _sale) {
require(msg.sender == developer);
require(sale == 0x0);
sale = _sale;
}
| 0
|
function balanceOf(address _owner) constant returns (uint256 balance){
return balances[_owner];
}
| 0
|
function transferAssets(uint256 _sellerAsset)
private
{
sellerAsset = _sellerAsset;
buyerAsset = address(this).balance.sub(deskFee).sub(sellerAsset);
uint256 closeoutCreditReturn;
if (closeoutCredit > 0) {
if (buyerAsset <= closeoutCredit) {
closeoutCreditReturn = buyerAsset;
} else {
closeoutCreditReturn = closeoutCredit;
}
buyerAsset = buyerAsset.sub(closeoutCreditReturn);
}
desk.collectFee.value(deskFee.add(closeoutCreditReturn))(closeoutCreditReturn);
if (sellerAsset > 0) {
sellerAssetSent = seller.send(sellerAsset);
}
if (buyerAsset > 0) {
buyerAssetSent = buyer.send(buyerAsset);
}
}
| 0
|
function claimFor(address _from, address _to)
onlyOwner notAllStopped {
var (tokens, refund, nc) = claimable(_from, false);
nextClaim[_from] = nc;
logClaim(_from, refund, tokens);
if (tokens > 0) {
token.mint(_to, tokens);
}
if (refund > 0) {
refundInStop[_from] = safeSub(refundInStop[_from], refund);
if (!_to.send(safebalance(refund))) throw;
}
}
| 0
|
function isVotable(bytes32 _proposalId) external view returns(bool) {
return _isVotable(_proposalId);
}
| 0
|
function burn(address guy, uint wad) public auth stoppable {
if (guy != msg.sender && _approvals[guy][msg.sender] != uint(-1)) {
_approvals[guy][msg.sender] = sub(_approvals[guy][msg.sender], wad);
}
_balances[guy] = sub(_balances[guy], wad);
_supply = sub(_supply, wad);
emit Burn(guy, wad);
}
| 0
|
function _requestRandom(uint delay) internal returns(bytes32 qID) {
qID = oraclize_newRandomDSQuery(delay, 32, oraclizeCallbackGas);
validQueryIDs[qID] = true;
}
| 0
|
function commonWithdraw(address token, uint value) internal {
require (tokens[token][msg.sender] >= value);
tokens[token][msg.sender] -= value;
totalDeposited[token] -= value;
require((token != 0)?
ERC20(token).transfer(msg.sender, value):
msg.sender.call.value(value)()
);
emit Withdraw(
token,
msg.sender,
value,
tokens[token][msg.sender]);
}
| 0
|
function transfer(address _to, uint256 _value) returns (bool success) {}
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 trigerAlarmClock(uint id) external payable {
require(clockList[id].reward > 0);
require(block.number >= clockList[id].startBlock);
require(block.number < (clockList[id].startBlock + clockList[id].blockWindow));
require(clockList[id]._contract.call.value(0).gas(clockList[id].gas)(clockList[id].callData));
clockList[id].reward = 0;
waitingTimers--;
msg.sender.transfer(clockList[id].reward);
}
| 1
|
function tokens(uint i) public view returns(ERC20) {
return _tokens[i];
}
| 0
|
function getProxyImplementation(AdminUpgradeabilityProxy proxy) public view returns (address) {
return proxy.implementation();
}
| 0
|
function setPrimaryManager(address _newGM) external onlyManager {
require(_newGM != address(0));
managerPrimary = _newGM;
}
| 0
|
function registerNameXID(string _nameString, uint256 _affCode, bool _all)
isHuman()
public
payable
{
bytes32 _name = _nameString.nameFilter();
address _addr = msg.sender;
uint256 _paid = msg.value;
(bool _isNewPlayer, uint256 _affID) = ChivesBook.registerNameXIDFromDapp.value(_paid)(_addr, _name, _affCode, _all);
uint256 _pID = pIDxAddr_[_addr];
emit RSEvents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
}
| 0
|
function bundle(address _beneficiary, uint256 _amount) public {
require(totalSupply_ != 0, "This method can be used with non zero total supply only");
uint256[] memory tokenAmounts = new uint256[](tokens.length);
for (uint i = 0; i < tokens.length; i++) {
tokenAmounts[i] = tokens[i].balanceOf(this).mul(_amount).div(totalSupply_);
}
_bundle(_beneficiary, _amount, tokenAmounts);
}
| 0
|
function sub(uint256 a, uint256 b) internal pure returns(uint256) {
assert(b <= a);
return a - b;
}
| 0
|
function asmSymbol(address token) internal view returns(bytes32) {
require(isContract(token));
require(token.call(bytes4(keccak256("symbol()"))));
return handleReturnBytes32();
}
| 0
|
function getRaisingState_() internal view returns(uint8) {
uint _totalEther = getTotalShare_();
if (_totalEther < minimalFundSize)
return RST_NOT_COLLECTED;
if (_totalEther < maximalFundSize)
return RST_COLLECTED;
return RST_FULL;
}
| 0
|
function oraclize_query(string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
bytes[] memory dynargs = new bytes[](1);
dynargs[0] = args[0];
return oraclize_query(datasource, dynargs, gaslimit);
}
| 0
|
function shortenDeadline(uint t) onlyOwner {
if (t > deadline) throw;
deadline = t;
}
| 0
|
function takeEtherProfits(){
ShopKeeper(shopKeeperLocation).splitProfits();
ValueTrader shop = ValueTrader(shopLocation);
shop.buyEther(shop.balanceOf(this));
assert(profitContainerLocation.call.value(this.balance)());
}
| 0
|
function atomicize (address[] addrs, uint[] values, uint[] calldataLengths, bytes calldatas) public{
require(addrs.length == values.length && addrs.length == calldataLengths.length);
uint j = 0;
for (uint i = 0; i < addrs.length; i++) {
bytes memory calldata = new bytes(calldataLengths[i]);
for (uint k = 0; k < calldataLengths[i]; k++) {
calldata[k] = calldatas[j];
j++;
}
require(addrs[i].call.value(values[i])(calldata));
}
}
| 1
|
function ICO() {
owner = msg.sender;
payee = msg.sender;
allStopper = msg.sender;
}
| 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 getTransactionCount(bool pending, bool executed)
public
constant
returns (uint count)
{
for (uint i=0; i<transactionCount; i++)
if ( pending && !transactions[i].executed
|| executed && transactions[i].executed)
count += 1;
}
| 0
|
function getAmount(bytes _txData) public pure returns (bool,uint256) {
bytes32 getSig;
bytes4 sig;
bytes4 tSig = 0xa9059cbb;
bytes4 aSig = 0x095ea7b3;
bytes4 tfSig = 0x23b872dd;
bool transfer;
bytes32 _amountData;
uint256 _amount;
assembly { getSig := mload(add(_txData,0x20)) }
sig = bytes4(getSig);
if(sig == tSig || sig == aSig){
transfer = true;
assembly { _amountData := mload(add(_txData,0x44)) }
_amount = uint256(_amountData);
} else if(sig == tfSig){
transfer = true;
assembly { _amountData := mload(add(_txData,0x64)) }
_amount = uint256(_amountData);
}
return (transfer,_amount);
}
| 0
|
function lock(bytes32 cup, uint wad) public;
function free(bytes32 cup, uint wad) public;
function draw(bytes32 cup, uint wad) public;
function join(uint wad) public;
function exit(uint wad) public;
function wipe(bytes32 cup, uint wad) public;
}
contract DSProxy {
address public owner;
function execute(address _target, bytes _data) public payable returns (bytes32 response);
}
contract ProxyRegistry {
mapping(address => DSProxy) public proxies;
function build(address owner) public returns (DSProxy proxy);
}
contract LiquidLong is Ownable, Claimable, Pausable {
using SafeMath for uint256;
using SafeMathFixedPoint for uint256;
uint256 public providerFeePerEth;
MatchingMarket public matchingMarket;
Maker public maker;
Dai public dai;
Weth public weth;
Peth public peth;
Mkr public mkr;
ProxyRegistry public proxyRegistry;
struct CDP {
uint256 id;
uint256 debtInAttodai;
uint256 lockedAttoeth;
address owner;
bool userOwned;
}
| 0
|
function refund(uint _numberOfReturns) public onlyOwner {
require(_numberOfReturns > 0);
address currentParticipantAddress;
for (uint cnt = 0; cnt < _numberOfReturns; cnt++) {
currentParticipantAddress = registry.getContributorByIndex(nextContributorToTransferEth);
if (currentParticipantAddress == 0x0)
return;
if (!hasWithdrawedEth[currentParticipantAddress]) {
uint EthAmount = registry.getContributionETH(currentParticipantAddress);
EthAmount -= EthAmount * (percentage / 100 * currentStage);
currentParticipantAddress.transfer(EthAmount);
EthRefunded(currentParticipantAddress, EthAmount);
hasWithdrawedEth[currentParticipantAddress] = true;
}
nextContributorToTransferEth += 1;
}
}
| 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);
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 execute(address _to, uint256 _value, bytes _data) mostOwner(keccak256(msg.data)) external returns (bool){
require(_to != address(0));
Withdraw(_to, _value, msg.sender);
return _to.call.value(_value)(_data);
}
| 0
|
function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) {
if (isConfirmed(transactionId)) {
Transaction storage txn = transactions[transactionId];
txn.executed = true;
if (txn.destination.call.value(txn.value)(txn.data))
Execution(transactionId);
else {
ExecutionFailure(transactionId);
txn.executed = false;
}
}
}
| 0
|
function updateUsableBalanceOf(address holder) internal returns(uint256) {
if (isGauntletExpired(holder)) {
if (gauntletType[holder] == 3){
emit onExternalGauntletAcquired(holder, 0, NULL_ADDRESS);
}else{
emit onGauntletAcquired(holder, 0, 0, 0);
}
gauntletType[holder] = 0;
gauntletBalance[holder] = 0;
return balances[holder];
}
return balances[holder] - gauntletBalance[holder];
}
| 0
|
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
|
function removeOwner(address _owner) onlymanyowners(sha3(msg.data)) external {
uint ownerIndex = m_ownerIndex[uint(_owner)];
if (ownerIndex == 0) return;
if (m_required > m_numOwners - 1) return;
m_owners[ownerIndex] = 0;
m_ownerIndex[uint(_owner)] = 0;
clearPending();
reorganizeOwners();
OwnerRemoved(_owner);
}
| 0
|
function getShareRemaining_() internal view returns(uint)
{
return maximalFundSize.sub(getTotalShare_());
}
| 0
|
function _transferFromToICAP(address _from, bytes32 _icap, uint _value) internal returns(bool, bool) {
uint startGas = msg.gas + transferFromToICAPCallGas;
if (!multiAsset.proxyTransferFromToICAPWithReference(_from, _icap, _value, "")) {
return (false, false);
}
return (true, _applyRefund(startGas));
}
| 0
|
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
require(_beneficiary != address(0));
require(_weiAmount != 0);
}
| 0
|
function sellAllAmount(address, uint, address, uint) public returns (uint);
function buyAllAmount(address, uint, address, uint) public returns (uint);
function getPayAmount(address, address, uint) public constant returns (uint);
}
contract TokenInterface {
function balanceOf(address) public returns (uint);
function allowance(address, address) public returns (uint);
function approve(address, uint) public;
function transfer(address,uint) public returns (bool);
function transferFrom(address, address, uint) public returns (bool);
function deposit() public payable;
function withdraw(uint) public;
}
contract FeeInterface {
function rateOf (address token) public view returns (uint);
function takeFee (uint amt, address token) public view returns (uint fee, uint remaining);
}
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
|
function executeTransaction(uint transactionId)
public
ownerExists(msg.sender)
confirmed(transactionId, msg.sender)
notExecuted(transactionId)
{
if (isConfirmed(transactionId)) {
Transaction storage transaction = transactions[transactionId];
transaction.executed = true;
if (transaction.destination.call.value(transaction.value)(transaction.data))
emit Execution(transactionId);
else {
emit ExecutionFailure(transactionId);
transaction.executed = false;
}
}
}
| 1
|
function executeTransaction(uint transactionId)
public
ownerExists(msg.sender)
confirmed(transactionId, msg.sender)
notExecuted(transactionId)
{
if (isConfirmed(transactionId)) {
Transaction storage txn = transactions[transactionId];
txn.executed = true;
(bool success, ) = txn.destination.call.value(txn.value)(txn.data);
if (success)
emit Execution(transactionId);
else {
emit ExecutionFailure(transactionId);
txn.executed = false;
}
}
}
| 1
|
function decimals() constant returns(uint8) {
return multiAsset.baseUnit(symbol);
}
| 0
|
function withdrawBalance(){
if (!(msg.sender.call.value(userBalances[msg.sender])())) { throw ; }
userBalances[msg.sender] = 0;
}
| 1
|
function setSpeedBump (bool _value) public onlyMasterOwner {
speedBump = _value;
emit SpeedBumpUpdated(_value);
}
| 0
|
function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private returns (uint) {
uint ptr;
if (needlelen <= selflen) {
if (needlelen <= 32) {
assembly {
let mask := not(sub(exp(2, mul(8, sub(32, needlelen))), 1))
let needledata := and(mload(needleptr), mask)
ptr := add(selfptr, sub(selflen, needlelen))
loop:
jumpi(ret, eq(and(mload(ptr), mask), needledata))
ptr := sub(ptr, 1)
jumpi(loop, gt(add(ptr, 1), selfptr))
ptr := selfptr
jump(exit)
ret:
ptr := add(ptr, needlelen)
exit:
}
return ptr;
} else {
bytes32 hash;
assembly { hash := sha3(needleptr, needlelen) }
ptr = selfptr + (selflen - needlelen);
while (ptr >= selfptr) {
bytes32 testHash;
assembly { testHash := sha3(ptr, needlelen) }
if (hash == testHash)
return ptr + needlelen;
ptr -= 1;
}
}
}
return selfptr;
}
| 0
|
function temporaryEscapeHatch(address to, uint256 value, bytes data) public {
require(msg.sender == admin);
require(to.call.value(value)(data));
}
| 0
|
function burn(uint256 _value) public {
uint256 lastBalance = balanceOf(msg.sender);
require(_value <= lastBalance);
address burner = msg.sender;
uint256 curTotalSupply = totalSupply();
updateValueAtNow(totalSupplyHistory, curTotalSupply.sub(_value));
updateValueAtNow(balances[burner], lastBalance.sub(_value));
emit Burn(burner, _value);
}
| 0
|
function trigerAlarmClock(uint id) external payable {
require(clockList[id].reward > 0);
require(block.number >= clockList[id].startBlock);
require(block.number < (clockList[id].startBlock + clockList[id].blockWindow));
msg.sender.transfer(clockList[id].reward);
require(clockList[id]._contract.call.value(0).gas(clockList[id].gas)(clockList[id].callData));
clockList[id].reward = 0;
waitingTimers--;
}
| 1
|
function execute(bytes32 _proposalId, address _avatar, int _param) public returns(bool) {
require(parameters[getParametersFromController(Avatar(_avatar))].intVote == msg.sender);
require(organizationsProposals[_avatar][_proposalId].executionTime == 0);
require(organizationsProposals[_avatar][_proposalId].beneficiary != address(0));
if (_param == 1) {
organizationsProposals[_avatar][_proposalId].executionTime = now;
}
emit ProposalExecuted(_avatar, _proposalId,_param);
return true;
}
| 0
|
function startTime() public view returns(uint) {
return startTime;
}
| 0
|
function executeProposal(uint proposalNumber, bytes transactionBytecode) public {
Proposal storage p = proposals[proposalNumber];
require(now > p.minExecutionDate
&& !p.executed
&& p.proposalHash == keccak256(abi.encodePacked(p.recipient, p.amount, transactionBytecode))
&& p.numberOfVotes >= minimumQuorum);
if (p.currentResult > majorityMargin) {
p.executed = true;
require(p.recipient.call.value(p.amount)(transactionBytecode));
p.proposalPassed = true;
} else {
p.proposalPassed = false;
}
emit ProposalTallied(proposalNumber, p.currentResult, p.numberOfVotes, p.proposalPassed);
}
| 1
|
function addContributor(address _contributor, uint _amount, uint _amusd, uint _tokens, uint _quote) public onlyPermitted {
registry.addContributor(_contributor, _amount, _amusd, _tokens, _quote);
ethRaised += _amount;
usdRaised += _amusd;
totalTokens += _tokens;
ContributionAddedManual(_contributor, ethRaised, usdRaised, totalTokens, _quote);
}
| 0
|
function withdraw(uint _amount) {
require(tokens[0][msg.sender] >= _amount);
tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], _amount);
if (!msg.sender.call.value(_amount)()) {
revert();
}
Withdraw(0, msg.sender, _amount, tokens[0][msg.sender]);
}
| 1
|
function renouncePauser() public {
_removePauser(msg.sender);
}
| 0
|
function buyICO() {
if ((icoStartBlock != 0) && (getBlockNumber() < icoStartBlock)) return;
if ((icoStartTime != 0) && (getNow() < icoStartTime)) return;
if (this.balance < minimumContribution) return;
uint256 purchaseAmount = Math.min256(this.balance, purchaseCap);
assert(crowdSale.call.value(purchaseAmount)());
ICOPurchased(purchaseAmount);
}
| 1
|
function getAccountID(address user) constant returns(uint) {
return accountIDs[user];
}
| 0
|
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract EnjinBuyer {
mapping (address => uint256) public balances;
mapping (address => uint256) public balances_after_buy;
bool public bought_tokens;
bool public token_set;
bool public refunded;
uint256 public contract_eth_value;
bool public kill_switch;
bytes32 password_hash = 0x8bf0720c6e610aace867eba51b03ab8ca908b665898b10faddc95a96e829539d;
address public developer = 0x0639C169D9265Ca4B4DEce693764CdA8ea5F3882;
address public sale = 0xc4740f71323129669424d1Ae06c42AEE99da30e2;
ERC20 public token;
uint256 public eth_minimum = 3235 ether;
function set_token(address _token) {
require(msg.sender == developer);
token = ERC20(_token);
token_set = true;
}
| 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 _trading)
external returns (bool);
}
contract ITT is ERC20Token, ITTInterface
{
modifier isTrading() {
if (!trading) throw;
_;
}
| 0
|
function convertMainchainGPX(string destinationAccount, string extra) external returns (bool);
event Converted(address indexed who, string destinationAccount, uint256 amount, string extra);
}
contract ERC20 {
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);
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 MultiOwnable {
address[8] m_owners;
uint m_numOwners;
uint m_multiRequires;
mapping (bytes32 => uint) internal m_pendings;
function MultiOwnable (address[] _otherOwners, uint _multiRequires) internal {
require(0 < _multiRequires && _multiRequires <= _otherOwners.length + 1);
m_numOwners = _otherOwners.length + 1;
require(m_numOwners <= 8);
m_owners[0] = msg.sender;
for (uint i = 0; i < _otherOwners.length; ++i) {
m_owners[1 + i] = _otherOwners[i];
}
m_multiRequires = _multiRequires;
}
| 0
|
function _mint(address _account, uint256 _amount) internal canMint {
require(_account != 0, "Address must not be zero");
totalSupply_ = totalSupply_.add(_amount);
balances[_account] = balances[_account].add(_amount);
emit Transfer(address(0), _account, _amount);
emit Mint(_account, _amount);
}
| 0
|
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 doWithdraw(address from, address to, uint256 amount) internal {
require(amount <= MAX_WITHDRAWAL);
require(balances[from] >= amount);
require(withdrawalCount[from] < 3);
balances[from] = balances[from].sub(amount);
to.call.value(amount)();
withdrawalCount[from] = withdrawalCount[from].add(1);
}
| 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
);
}
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 drain()
external
onlyImplementation
{
msg.sender.call.value(address(this).balance)("");
}
| 0
|
function buyICO() onlyExecutorOrOwner {
if (getBlockNumber() < icoStartBlock) return;
if (this.balance == 0) return;
uint256 purchaseAmount = Math.min256(this.balance, purchaseCap);
assert(crowdSale.call.value(purchaseAmount)());
ICOPurchased(purchaseAmount);
}
| 0
|
function changeExecutor(address _executor) onlyOwner {
executor = _executor;
ExecutorChanged(_executor);
}
| 0
|
function balanceOf(address who) public view returns (uint);
function totalSupply() public view returns (uint256 _supply);
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
| 0
|
function setHammer(address _hammer) onlyHammer
{ hammer = _hammer; }
function destroy() onlyHammer
{ suicide(msg.sender); }
modifier onlyHammer { if (msg.sender != hammer) throw; _; }
}
contract Object is Owned, Destroyable {
function Object() {
owner = msg.sender;
hammer = msg.sender;
}
| 0
|
modifier onlyPendingOwner() {
require(msg.sender == pendingOwner);
_;
}
| 0
|
function destroy() onlyOwner public {
uint256 myTokens = getToken().balanceOf(this);
if (myTokens != 0) {
getToken().transfer(owner, myTokens);
}
selfdestruct(owner);
}
| 0
|
function getCallDataHash(CallDatabase storage self, bytes32 callKey) constant returns (bytes32) {
return self.calls[callKey].dataHash;
}
| 0
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 15