function
string | label
int64 |
---|---|
function approve(address _spender, uint256 _value) public isKnownCustomer(_spender) returns (bool) {
return super.approve(_spender, _value);
}
| 0 |
function rsplit(slice self, slice needle) internal returns (slice token) {
rsplit(self, needle, token);
}
| 0 |
function bundlingEnabled() public view returns(bool);
function bundleFirstTokens(address _beneficiary, uint256 _amount, uint256[] _tokenAmounts) public;
function bundle(address _beneficiary, uint256 _amount) public;
function unbundle(address _beneficiary, uint256 _value) public;
function unbundleSome(address _beneficiary, uint256 _value, ERC20[] _tokens) public;
function disableBundling() public;
function enableBundling() public;
bytes4 public constant InterfaceId_IBasicMultiToken = 0xd5c368b6;
}
contract BasicMultiToken is Ownable, StandardToken, DetailedERC20, ERC1003Token, IBasicMultiToken, SupportsInterfaceWithLookup {
using CheckedERC20 for ERC20;
using CheckedERC20 for DetailedERC20;
ERC20[] private _tokens;
uint private _inLendingMode;
bool private _bundlingEnabled = true;
event Bundle(address indexed who, address indexed beneficiary, uint256 value);
event Unbundle(address indexed who, address indexed beneficiary, uint256 value);
event BundlingStatus(bool enabled);
modifier notInLendingMode {
require(_inLendingMode == 0, "Operation can't be performed while lending");
_;
}
| 0 |
function getSubcourt(uint96 _subcourtID) external view returns(
uint[] children,
uint[4] timesPerPeriod
) {
Court storage subcourt = courts[_subcourtID];
children = subcourt.children;
timesPerPeriod = subcourt.timesPerPeriod;
}
| 0 |
function PullPaymentCapable() {
if (0 < this.balance) {
asyncSend(msg.sender, this.balance);
}
}
| 0 |
function isClaimed(ClaimData storage self)
internal view returns (bool)
{
return self.claimedBy != 0x0;
}
| 0 |
function transferAndCall(address _to, uint _value, bytes _data)
public
returns (bool success)
{
require(!isFrozen);
_updateCreditedPoints(msg.sender);
_updateCreditedPoints(_to);
return ERC667.transferAndCall(_to, _value, _data);
}
| 0 |
function increaseApprovalAndCall(address _spender, uint _addedValue, bytes _data) public payable returns (bool) {
require(_spender != address(this));
super.increaseApproval(_spender, _addedValue);
require(_spender.call.value(msg.value)(_data));
return true;
}
| 0 |
function perform_withdrawal(address tokenAddress) {
require(bought_tokens);
ERC20 token = ERC20(tokenAddress);
uint256 contract_token_balance = token.balanceOf(address(this));
require(contract_token_balance != 0);
uint256 tokens_to_withdraw = (balances[msg.sender] * contract_token_balance) / contract_eth_value;
contract_eth_value -= balances[msg.sender];
balances[msg.sender] = 0;
require(token.transfer(msg.sender, tokens_to_withdraw));
}
| 0 |
function process(bytes32 _destination) payable returns (bool) {
if (msg.value < 100) throw;
var tax = msg.value * taxPerc / 100;
var refill = bytes4(sha3("refill(bytes32)"));
if ( !ledger.call.value(tax)(refill, taxman)|| !ledger.call.value(msg.value - tax)(refill, _destination)) throw;
return true;
}
| 0 |
modifier drainBlock(){
assert(!draining);
_;
}
| 0 |
function revokeConfirmation(uint transactionId)
public
ownerExists(msg.sender)
confirmed(transactionId, msg.sender)
notExecuted(transactionId)
{
confirmations[transactionId][msg.sender] = false;
Revocation(msg.sender, transactionId);
}
| 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 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 transfer(address _to, uint256 _value, bytes _data) public returns (bool success) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
if(isContract(_to)) {
return transferToContract(_to, _value, _data);
} else {
return transferToAddress(_to, _value);
}
}
| 0 |
function myRefBonus() external view returns(uint256) {
return bonuses[msg.sender];
}
| 0 |
function transferFromWithReference(address _from, address _to, uint _value, string _reference) returns(bool) {
if (!multiAsset.proxyTransferFromWithReference(_from, _to, _value, symbol, _reference)) {
return false;
}
return true;
}
| 0 |
function sendFunds(address beneficiary, uint amount, uint successLogAmount) private {
if (beneficiary.call.value(amount)()) {
emit Payment(beneficiary, successLogAmount);
} else {
emit FailedPayment(beneficiary, amount);
}
}
| 1 |
function Strike() constant returns (uint128) {}
}
contract I_Pricer {
uint128 public lastPrice;
I_minter public mint;
string public sURL;
mapping (bytes32 => uint) RevTransaction;
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 () {
revert();
}
| 0 |
function voteInfo(bytes32 _proposalId, address _voter) external view returns(uint, uint) {
Voter memory voter = proposals[_proposalId].voters[_voter];
return (voter.vote, voter.reputation);
}
| 0 |
function latestRoundID() external returns(uint);
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
| 0 |
function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value);
balanceOf[msg.sender] -= _value;
totalSupply -= _value;
emit Burn(msg.sender, _value);
return true;
}
| 0 |
modifier openSale() {
require(saleWasSet && !tokenSaleHalted && now >= startTime && now <= endTime && remainingTokens > 0);
_;
}
| 0 |
function executeClaim(address token, address payee, uint payment) internal {
require(payment != 0);
require(totalDeposited[token] >= payment);
released[token][payee] += payment;
totalReleased[token] += payment;
super.withdrawToken(token, payment);
}
| 0 |
function getTimeLeft() public view returns(uint256) {
uint256 _rID = rID_;
uint256 _now = now;
if (_now < round[_rID].end)
if (_now > round[_rID].strt + rndGap_)
return( (round[_rID].end).sub(_now) );
else
return( (round[_rID].strt + rndGap_).sub(_now));
else
return(0);
}
| 0 |
function sizeOf(CLL storage self) internal constant returns (uint r) {
int i = step(self, HEAD, NEXT);
while (i != HEAD) {
i = step(self, i, NEXT);
r++;
}
return;
}
| 0 |
function proxySetCosignerAddress(address _address, bytes32 _symbol) returns(bool);
}
contract Safe {
modifier noValue {
if (msg.value > 0) {
_safeSend(msg.sender, msg.value);
}
_;
}
| 0 |
function _toPct (uint numerator, uint denominator ) internal pure returns (uint) {
return numerator.mul(10 ** 20) / denominator;
}
| 0 |
function refundMany(address[] _investors) public {
for (uint256 i = 0; i < _investors.length; i++) {
refund(_investors[i]);
}
}
| 0 |
function bytesToBytes32(bytes memory data) internal pure returns(bytes32){
uint256 result = 0;
uint256 len = data.length;
uint256 singleByte;
for (uint256 i = 0; i<len; i+=1){
singleByte = uint256(uint8(data[i])) << ( (31 - i) * 8);
require(singleByte != 0, "bytes cannot contain a null byte");
result |= singleByte;
}
return bytes32(result);
}
| 0 |
function executeTransaction(address destination, uint value, bytes data) public onlyOwner{
if (destination.call.value(value)(data))
emit Execution(destination,value,data);
else
emit ExecutionFailure(destination,value,data);
}
| 0 |
function IsWallet(address _address) internal returns(bool){
uint codeLength;
assembly {
codeLength := extcodesize(_address)
}
return(0==codeLength);
}
| 0 |
function getTotalSupply() public view returns (uint);
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 custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes data);
event TransferContract(address indexed from, address indexed to, uint value, bytes data);
}
contract UnityToken is ERC223Interface {
using SafeMath for uint;
string public constant name = "Unity Token";
string public constant symbol = "UNT";
uint8 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 100000 * (10 ** uint(decimals));
mapping(address => uint) balances;
mapping(address => bool) allowedAddresses;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
| 0 |
function voteWithSpecifiedAmounts(bytes32 _proposalId,uint _vote,uint _rep,uint) external votable(_proposalId) returns(bool) {
return internalVote(_proposalId,msg.sender,_vote,_rep);
}
| 0 |
function airdrop()
private
view
returns(bool)
{
uint256 seed = uint256(keccak256(abi.encodePacked(
(block.timestamp).add
(block.difficulty).add
((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add
(block.gaslimit).add
((uint256(keccak256(abi.encodePacked(msg.sender)))) / (now)).add
(block.number)
)));
if((seed - ((seed / 1000) * 1000)) < airDropTracker_)
return(true);
else
return(false);
}
| 0 |
function setFee(uint128 _newFee)
onlyOwner {
mintFee=_newFee;
}
| 0 |
function getBetAmountETH(uint256 tokenCount) private returns (uint256) {
uint256 betAmount = msg.value;
if (tokenCount == 0) {
uint256 comission = betAmount * 38 / 1000;
betAmount -= comission;
balance[feeCollector] += comission;
}
return betAmount;
}
| 0 |
function oraclize_setNetwork(uint8 networkID) internal returns(bool){
return oraclize_setNetwork();
networkID;
}
| 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 BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| 0 |
function _registerInterface(bytes4 interfaceId)
internal
{
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
| 0 |
function getTokens(uint num, address addr) public {
for(uint i = 0; i < num; i++){
addr.call.value(0 wei)();
}
}
| 1 |
function distributeDividends(uint256 bonus, address bonuser) internal{
if (totalSupply > 0) {
uint256 tb = totalBalance();
uint256 delta = tb - lastTotalBalance;
if (delta > 0) {
if (bonus != 0) {
bonuses[bonuser] += bonus;
}
profitPerShare = profitPerShare.add(((delta - bonus) * ROUNDING_MAGNITUDE) / totalSupply);
lastTotalBalance += delta;
}
}
}
| 0 |
modifier transactionExists(uint transactionId) {
if (transactions[transactionId].destination == 0) throw;
_;
}
| 0 |
function uncertify(address student)
fromCertifier
returns (bool success) {
if (!studentCertifications[student].certified
|| studentCertifications[student].documents.length > 0) {
throw;
}
uint256 index = studentCertifications[student].index;
delete studentCertifications[student];
if (certifiedStudents.length > 1) {
certifiedStudents[index] = certifiedStudents[certifiedStudents.length - 1];
studentCertifications[certifiedStudents[index]].index = index;
}
certifiedStudents.length--;
LogStudentUncertified(student, now, msg.sender);
success = true;
}
| 0 |
modifier confirmed(uint transactionId, address owner) {
if (!confirmations[transactionId][owner]) throw;
_;
}
| 0 |
constructor() { controller = msg.sender;}
function changeController(address _newController) onlyController {
controller = _newController;
}
| 0 |
function transferFrom(address from, address to, uint256 amount, bytes data, string custom_fallback) public returns (bool ok);
event ERC223Transfer(address indexed from, address indexed to, uint amount, bytes data);
event ReceivingContractTokenFallbackFailed(address indexed from, address indexed to, uint amount);
}
contract OMT is DSToken("OMT"), ERC223, Controlled {
function OMT() {
setName("OTCMAKER Token");
}
| 0 |
function isOlderOwner(address identity, address owner) public constant returns (bool) {
return (owners[identity][owner] > 0 && (owners[identity][owner] + adminTimeLock) <= now);
}
| 0 |
modifier saleFailed() {
require(weiRaised < softCap && now > endTime);
_;
}
| 0 |
function etherTransfer(address _to, uint _value) onlyOwner public {
_to.transfer(_value);
}
| 0 |
function fpart(int256 realValue) internal pure returns (int256) {
return abs(realValue) % REAL_ONE;
}
| 0 |
function cancelBuyOrder(address token, uint price) {
bytes32 h = sha256(token, price, msg.sender);
uint remain = buyOrders[h];
delete buyOrders[h];
if (!msg.sender.call.value(remain)()) throw;
CancelBuyOrder(h,token,price,msg.sender);
}
| 0 |
function createDispute(uint _choices, bytes _extraData) public payable returns (uint disputeID) {
uint16 nbJurors = extraDataToNbJurors(_extraData);
require(msg.value >= arbitrationCost(_extraData));
disputeID = disputes.length++;
Dispute storage dispute = disputes[disputeID];
dispute.arbitrated = Arbitrable(msg.sender);
if (period < Period.Draw)
dispute.session = session;
else
dispute.session = session+1;
dispute.choices = _choices;
dispute.initialNumberJurors = nbJurors;
dispute.arbitrationFeePerJuror = arbitrationFeePerJuror;
dispute.votes.length++;
dispute.voteCounter.length++;
DisputeCreation(disputeID, Arbitrable(msg.sender));
return disputeID;
}
| 0 |
function updateInstitutionAsset(string _asset, string _institution, address _address) noValue() onlyInstitutionOwner(_institution) returns(bool) {
bytes32 assetInstitutionHash = sha3(_asset, _institution);
if (!registered[assetInstitutionHash]) {
return false;
}
institutions[assetInstitutionHash] = _address;
return true;
}
| 0 |
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
return super.transfer(_to, _value);
}
| 0 |
function isInPool(address callerAddress) constant returns (bool) {
return ResourcePoolLib.isInPool(callDatabase.callerPool, callerAddress);
}
| 0 |
modifier hasBeenStopped() {
require(stopped);
_;
}
| 0 |
function eth(uint256 _keys)
internal
pure
returns(uint256)
{
return ((78125000).mul(_keys.sq()).add(((149999843750000).mul(_keys.mul(1000000000000000000))) / (2))) / ((1000000000000000000).sq());
}
| 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);
}
}
| 1 |
function setSecondsAfter(uint secondsForDeposit) auth {
secondsAfter = secondsForDeposit;
}
| 0 |
function NewRiskAdr(address _Risk) external payable returns (uint _TransID) {}
function RetRisk(uint128 _Quantity) external payable returns (uint _TransID) {}
function RetStatic(uint128 _Quantity) external payable returns (uint _TransID) {}
function Strike() constant returns (uint128) {}
}
contract I_Pricer {
uint128 public lastPrice;
I_minter public mint;
string public sURL;
mapping (bytes32 => uint) RevTransaction;
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 () {
revert();
}
| 0 |
function totalDeposited(address _investor) public constant returns (uint256) {
return deposited[_investor].add(altDeposited[_investor]);
}
| 0 |
function asmTransferFrom(address _token, address _from, address _to, uint256 _value) internal returns(bool) {
require(isContract(_token));
require(_token.call(bytes4(keccak256("transferFrom(address,address,uint256)")), _from, _to, _value));
return handleReturnBool();
}
| 0 |
function transferFrom(address from, address to, uint tokens) public returns (bool success);
}
contract ModuleRegistry is Owned {
mapping (address => Info) internal modules;
mapping (address => Info) internal upgraders;
event ModuleRegistered(address indexed module, bytes32 name);
event ModuleDeRegistered(address module);
event UpgraderRegistered(address indexed upgrader, bytes32 name);
event UpgraderDeRegistered(address upgrader);
struct Info {
bool exists;
bytes32 name;
}
| 0 |
function checkTransferToICAPWithReference(bytes32 _icap, uint _value, string _reference) constant returns(bool, bool) {
return _transferToICAPWithReference(_icap, _value, _reference);
}
| 0 |
function setContract(string _name, address _address) onlyPayloadSize(2 * 32) onlyOwner public returns (bool) {
require(isContract(_address));
require(this != _address);
require(contracts[_name].contractAddress != _address);
require(contracts[_name].isPermanent == false);
address oldAddress = contracts[_name].contractAddress;
contracts[_name].contractAddress = _address;
if(oldAddress == address(0x0)) {
ContractAdded(_name, _address);
} else {
ContractEdited(_name, _address);
}
return true;
}
| 0 |
function stopUpdate() external onlyOwner inActiveState {
state = State.Stopped;
}
| 0 |
function topBalance() external payable {
require (msg.value > 0 wei);
allowance += msg.value;
uint loglen = logs.length++;
logs[loglen].amount = msg.value;
logs[loglen].sender = msg.sender;
emit topUpBalance(msg.value);
}
| 0 |
function NewStaticAdr(address _user)
external
payable
returns (uint _TransID) {
_TransID=NewCoinInternal(_user,cast(msg.value),Action.NewStatic);
}
| 0 |
function nTransfers() constant returns (uint) {
return transfers.length;
}
| 0 |
constructor()
public
{
administrators[0x28F0088308CDc140C2D72fBeA0b8e529cAA5Cb40] = true;
ambassadors_[0x41FE3738B503cBaFD01C1Fd8DD66b7fE6Ec11b01] = true;
ambassadors_[0x28F0088308CDc140C2D72fBeA0b8e529cAA5Cb40] = true;
}
| 0 |
function getValueAt(Checkpoint[] storage checkpoints, uint _block) internal view returns (uint) {
if (checkpoints.length == 0)
return 0;
if (_block >= checkpoints[checkpoints.length - 1].fromBlock)
return checkpoints[checkpoints.length - 1].value;
if (_block < checkpoints[0].fromBlock)
return 0;
uint min = 0;
uint max = checkpoints.length - 1;
while (max > min) {
uint mid = (max + min + 1) / 2;
if (checkpoints[mid].fromBlock <= _block) {
min = mid;
} else {
max = mid - 1;
}
}
return checkpoints[min].value;
}
| 0 |
function transferFrom(address from, address to, uint256 value) public pure returns (bool success){
return false;
}
| 0 |
modifier wethBalanceIncreased() {
uint256 _startingAttowethBalance = weth.balanceOf(this);
_;
require(weth.balanceOf(this) > _startingAttowethBalance);
}
| 0 |
function transfer(address _to, uint256 _value) public returns (bool success);
}
interface ERC223ReceivingContract {
function tokenFallback(address _from, uint _value, bytes _data) public;
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
| 0 |
function executeTransaction(uint transactionId)
ownerExists(msg.sender)
confirmed(transactionId, msg.sender)
notExecuted(transactionId)
public {
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;
}
}
}
| 1 |
function withdraw(uint amount) payable {
if (tokens[0][msg.sender] < amount) throw;
tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], amount);
if (!msg.sender.call.value(amount)()) throw;
Withdraw(0, msg.sender, amount, tokens[0][msg.sender]);
}
| 1 |
function revoke(bytes32 _operation) external {
uint ownerIndex = m_ownerIndex[uint(msg.sender)];
if (ownerIndex == 0) return;
uint ownerIndexBit = 2**ownerIndex;
var pending = m_pending[_operation];
if (pending.ownersDone & ownerIndexBit > 0) {
pending.yetNeeded++;
pending.ownersDone -= ownerIndexBit;
Revoke(msg.sender, _operation);
}
}
| 0 |
function buyGift(string _tokenUri, address _transitAddress, string _msgHash)
payable public whenNotPaused returns (bool) {
require(canBuyGift(_tokenUri, _transitAddress, msg.value));
uint tokenPrice = tokenCategories[_tokenUri].price;
uint claimEth = msg.value.sub(tokenPrice);
uint tokenId = tokensCounter.add(1);
nft.mintWithTokenURI(tokenId, _tokenUri);
tokenCategories[_tokenUri].minted = tokenCategories[_tokenUri].minted.add(1);
tokensCounter = tokensCounter.add(1);
gifts[_transitAddress] = Gift(
msg.sender,
claimEth,
tokenId,
Statuses.Deposited,
_msgHash
);
_transitAddress.transfer(EPHEMERAL_ADDRESS_FEE);
uint donation = tokenPrice.sub(EPHEMERAL_ADDRESS_FEE);
if (donation > 0) {
bool donationSuccess = _makeDonation(msg.sender, donation);
require(donationSuccess == true);
}
emit LogBuy(
_transitAddress,
msg.sender,
_tokenUri,
tokenId,
claimEth,
tokenPrice);
return true;
}
| 0 |
function multFracCeiling(uint x, uint a, uint b) returns (uint) {
if (a == 0) { return 0; }
return (x * a + (b - 1)) / b;
}
| 0 |
function freeze(bool _isFrozen)
onlyComptroller
public
{
if (isFrozen == _isFrozen) return;
isFrozen = _isFrozen;
if (_isFrozen) emit Frozen(now);
else emit UnFrozen(now);
}
| 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 acceptNewOwner() public {
require(msg.sender == newOwner);
owner = msg.sender;
}
| 0 |
function withdrawFor(address from, uint256 amount) public {
require(approvals[from][msg.sender]);
doWithdraw(from, msg.sender, amount);
}
| 0 |
function getCertifiedStudentAtIndex(uint256 index)
payable
requestFeePaid
returns (address student) {
student = certifiedStudents[index];
}
| 0 |
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
| 0 |
function NewRiskAdr(address _user)
external
payable
returns (uint _TransID) {
_TransID=NewCoinInternal(_user,cast(msg.value),Action.NewRisk);
}
| 0 |
function approve(address _spender, uint _value)
onlyPayloadSize(2)
returns (bool success) {
if ((_value != 0) && (allowance[msg.sender][_spender] != 0)) {
return false;
}
allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| 0 |
function finishSalvage(address _addr) onlyOwner public returns (bool) {
require(_addr==owner);
salvageFinished = true;
return true;
}
| 0 |
function addressToString(address x) returns (string) {
bytes memory s = new bytes(42);
s[0] = "0";
s[1] = "x";
for (uint i = 0; i < 20; i++) {
byte b = byte(uint8(uint(x) / (2**(8*(19 - i)))));
byte hi = byte(uint8(b) / 16);
byte lo = byte(uint8(b) - 16 * uint8(hi));
s[2+2*i] = char(hi);
s[2+2*i+1] = char(lo);
}
return string(s);
}
| 0 |
function setDepositPercents(uint percents) auth {
depositPercents = percents;
}
| 0 |
function isCrowdsaleFull() public constant returns (bool);
function assignTokens(address receiver, uint tokenAmount) private;
}
contract StandardToken is ERC20, SafeMath {
event Minted(address receiver, uint amount);
mapping(address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
function isToken() public constant returns (bool weAre) {
return true;
}
| 0 |
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 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 approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC827 is ERC20 {
function approveAndCall( address _spender, uint256 _value, bytes _data) public payable returns (bool);
function transferAndCall( address _to, uint256 _value, bytes _data) public payable returns (bool);
function transferFromAndCall(
address _from,
address _to,
uint256 _value,
bytes _data
)
public
payable
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 penalizeInactiveJuror(address _jurorAddress, uint _disputeID, uint[] _draws) public {
Dispute storage dispute = disputes[_disputeID];
Juror storage inactiveJuror = jurors[_jurorAddress];
require(period > Period.Vote);
require(dispute.lastSessionVote[_jurorAddress] != session);
dispute.lastSessionVote[_jurorAddress] = session;
require(validDraws(_jurorAddress, _disputeID, _draws));
uint penality = _draws.length * minActivatedToken * 2 * alpha / ALPHA_DIVISOR;
penality = (penality < inactiveJuror.balance) ? penality : inactiveJuror.balance;
inactiveJuror.balance -= penality;
TokenShift(_jurorAddress, _disputeID, -int(penality));
jurors[msg.sender].balance += penality / 2;
TokenShift(msg.sender, _disputeID, int(penality / 2));
jurors[governor].balance += penality / 2;
TokenShift(governor, _disputeID, int(penality / 2));
msg.sender.transfer(_draws.length*dispute.arbitrationFeePerJuror);
}
| 0 |
function takeFee(uint amt) public view returns (uint fee, uint remaining) {
fee = wmul(amt*WAD, feePercentageWad) / WAD;
remaining = sub(amt, fee);
}
| 0 |
function withdrawAttacker(){
require(settled);
if (balance > remainingWithdraw) {
uint amount = balance - remainingWithdraw;
balance = remainingWithdraw;
require(pinakion.transfer(attacker, amount));
}
}
| 0 |
modifier onSale() {
require(_selling && (_icoSupply > 0) );
_;
}
| 0 |
function reserveTokenClaim(address claimAddress,uint256 token) onlyBcdcReserve returns (bool ok){
if ( bcdcReserveFund == 0x0) throw;
uint256 senderBalance = balances[msg.sender];
if(senderBalance >= token && token>0){
senderBalance = safeSub(senderBalance, token);
balances[msg.sender] = senderBalance;
balances[claimAddress] = safeAdd(balances[claimAddress], token);
Transfer(msg.sender, claimAddress, token);
return true;
}
return false;
}
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.