function
string | label
int64 |
---|---|
function getBalance(address toCheck) public constant returns (uint256) {
return balances[toCheck];
} | 0 |
function setBurnFeeReceiver(address _address) public onlyOwner returns (bool) {
burnFeeReceiver = _address;
return true;
} | 0 |
modifier whenOpen() {
require(isOpen());
_;
} | 0 |
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
} | 1 |
function canExitPool() constant returns (bool) {
return ResourcePoolLib.canExitPool(callDatabase.callerPool, msg.sender);
} | 0 |
function subbytes(bytes _data, uint _start, uint _length) private pure returns(bytes) {
bytes memory result = new bytes(_length);
uint from;
uint to;
assembly {
from := add(_data, _start)
to := result
}
memcpy(to, from, _length);
} | 0 |
function setToken(address _token) onlyOwner {
if (address(token) != 0x0) throw;
token = Token(_token);
} | 0 |
function calcBurnFee(uint256 _amount) public view returns (uint256) {
uint256 fee = 0;
fee = _amount.div(decimalpercent);
fee = fee.mul(burnFee.prop);
fee = fee.add(burnFee.abs);
return fee;
} | 0 |
function getReturn(address _fromToken, address _toToken, uint256 _amount) public view returns (uint256 returnAmount);
function change(address _fromToken, address _toToken, uint256 _amount, uint256 _minReturn) public returns (uint256 returnAmount);
function disableChanges() public;
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
function totalSupply() public view returns (uint256) {
return totalSupply_;
} | 0 |
modifier onlyDuring(Period _period) {require(period == _period); _;}
modifier onlyGovernor() {require(msg.sender == governor); _;}
constructor(Pinakion _pinakion, RNG _rng, uint[5] _timePerPeriod, address _governor) public {
pinakion = _pinakion;
rng = _rng;
lastPeriodChange = now;
timePerPeriod = _timePerPeriod;
governor = _governor;
} | 0 |
function setMaximumMaxOutTimes(address investorAddress, uint256 times) public mustBeAdmin{ investors[investorAddress].maxOutTimes = times; }
function disableInvestor(address investorAddress) public mustBeAdmin {
Investor storage investor = investors[investorAddress];
investor.isDisabled = true;
} | 0 |
function registerAlarmClock(address _contract, uint startBlock, uint blockWindow, uint gas, bytes _callData) external payable {
require(gas >= 200000);
require(msg.value > gas);
require(block.number < startBlock);
clockList.push(ClockStruct(_contract, startBlock, blockWindow, msg.value - gas, gas, _callData));
totalTimers++;
waitingTimers++;
emit _newAlarmClock(_contract, startBlock, blockWindow, msg.value - gas, gas, _callData);
} | 0 |
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _namiAddress;
} | 0 |
function addNode(bytes32 _nodeName, address _nodeAddress) constant returns(bool);
}
contract AmbiEnabled {
Ambi public ambiC;
bool public isImmortal;
bytes32 public name;
modifier checkAccess(bytes32 _role) {
if(address(ambiC) != 0x0 && ambiC.hasRelation(name, _role, msg.sender)){
_;
}
} | 0 |
function isContract(address _addr) private view returns (bool is_contract) {
uint length;
assembly {
length := extcodesize(_addr)
}
return (length > 0);
} | 0 |
function _updateCreditedPoints(address _account)
private
{
creditedPoints[_account] += _getUncreditedPoints(_account);
lastPointsPerToken[_account] = totalPointsPerToken;
} | 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 setCost(uint _buildingCostWei) onlyOwner
{ buildingCostWei = _buildingCostWei; }
string public securityCheckURI;
function setSecurityCheck(string _uri) onlyOwner
{ securityCheckURI = _uri; }
}
contract BuilderComission is Builder {
function create(address _ledger, bytes32 _taxman, uint _taxPerc,
address _client) payable returns (address) {
if (buildingCostWei > 0 && beneficiary != 0) {
if (msg.value < buildingCostWei) throw;
if (!beneficiary.send(buildingCostWei)) throw;
if (msg.value > buildingCostWei) {
if (!msg.sender.send(msg.value - buildingCostWei)) throw;
}
} else {
if (msg.value > 0) {
if (!msg.sender.send(msg.value)) throw;
}
}
if (_client == 0)
_client = msg.sender;
var inst = CreatorComission.create(_ledger, _taxman, _taxPerc);
inst.delegate(_client);
Builded(_client, inst);
getContractsOf[_client].push(inst);
return inst;
} | 0 |
function CallRejected(bytes32 callKey, bytes15 reason) public {
_CallRejected(callKey, reason);
} | 0 |
function registerInstitution(string _institution, address _address) noValue() checkAccess("admin") returns(bool) {
if (bytes(_institution).length != 4) {
return false;
}
if (institutionOwners[sha3(_institution)] != 0) {
return false;
}
institutionOwners[sha3(_institution)] = _address;
return true;
} | 0 |
function setEthPriceProvider(address provider) external onlyOwner {
require(provider != 0x0);
ethPriceProvider = provider;
} | 0 |
function finishMinting() onlyOwner public returns (bool) {
require(!mintingFinished);
mintingFinished = true;
MintFinished();
return true;
} | 0 |
function createIdentity(address owner, address recoveryKey) public validAddress(recoveryKey) {
Proxy identity = new Proxy();
owners[identity][owner] = now - adminTimeLock;
recoveryKeys[identity] = recoveryKey;
LogIdentityCreated(identity, msg.sender, owner, recoveryKey);
} | 0 |
function setCosignerAddress(address _cosigner) returns(bool) {
if (!multiAsset.proxySetCosignerAddress(_cosigner, symbol)) {
return false;
}
return true;
} | 0 |
function setCosignerAddress(address _cosigner) onlyHuman() returns(bool) {
return multiAsset.proxySetCosignerAddress(_cosigner, symbol);
} | 0 |
function abi() constant returns (string)
{ return '[{"constant":true,"inputs":[],"name":"signer","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"comission","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"value","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"delegate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"description","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"closeBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_comission","type":"address"},{"name":"_description","type":"string"},{"name":"_beneficiary","type":"bytes32"},{"name":"_value","type":"uint256"}],"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[],"name":"PaymentReceived","type":"event"}]'; }
}
contract Builder is Mortal {
event Builded(address indexed client, address indexed instance);
mapping(address => address[]) public getContractsOf;
function getLastContract() constant returns (address) {
var sender_contracts = getContractsOf[msg.sender];
return sender_contracts[sender_contracts.length - 1];
} | 0 |
function ownerSetHouseEdge(uint newHouseEdge) public
onlyOwner
{
houseEdge = newHouseEdge;
} | 0 |
function transferFrom(address from, address to, uint256 value) public returns (bool) {
address spender = (from != address(_caller)) ? from : _sendersStack[_sendersStack.length - 1];
return super.transferFrom(spender, to, value);
} | 0 |
function oraclize_query(uint timestamp, string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
string[] memory dynargs = new string[](2);
dynargs[0] = args[0];
dynargs[1] = args[1];
return oraclize_query(timestamp, datasource, dynargs, gaslimit);
} | 0 |
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
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 bounty(address user, uint amount) auth {
assert(_balances[this] >= amount);
_balances[user] += amount;
_balances[this] -= amount;
LogBounty(user, amount, "Sent bounty");
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value > 0 && _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);
Transfer(_from, _to, _value);
return true;
} | 0 |
function balanceOfAt(address _owner, uint256 _blockNumber) public view returns (uint256) {
if ((balances[_owner].length == 0) || (balances[_owner][0].fromBlock > _blockNumber)) {
if (address(parentToken) != address(0)) {
return parentToken.balanceOfAt(_owner, Math.min256(_blockNumber, parentSnapShotBlock));
} else {
return 0;
}
} else {
return getValueAt(balances[_owner], _blockNumber);
}
} | 0 |
function CampaignBeneficiary() {
Resilience = 0xDA922E473796bc372d4a2cb95395ED17aF8b309B;
bytes4 setBeneficiarySig = bytes4(sha3("setBeneficiary()"));
if (!Resilience.call(setBeneficiarySig)) throw;
} | 0 |
function getRN(uint _block) public returns (uint RN) {
RN=randomNumber[_block];
if (RN==0){
saveRN(_block);
return randomNumber[_block];
}
else
return RN;
} | 0 |
function getInvestor(address investorAddress) view public returns (address[] memory addresses, bool isDisabled, uint256[] memory numbers) {
addresses = new address[](4);
numbers = new uint256[](16);
Investor memory investor = investors[investorAddress];
addresses[0] = investor.parent;
addresses[1] = investor.leftChild;
addresses[2] = investor.rightChild;
addresses[3] = investor.presenter;
numbers[0] = investor.generation;
numbers[1] = investor.depositedAmount;
numbers[2] = investor.withdrewAmount;
numbers[3] = investor.lastMaxOut;
numbers[4] = investor.maxOutTimes;
numbers[5] = investor.maxOutTimesInWeek;
numbers[6] = investor.totalSell;
numbers[7] = investor.sellThisMonth;
numbers[8] = investor.rightSell;
numbers[9] = investor.leftSell;
numbers[10] = investor.reserveCommission;
numbers[11] = investor.dailyIncomeWithrewAmount;
numbers[12] = investor.registerTime;
numbers[13] = getUnpaidSystemCommission(investorAddress);
numbers[14] = getDailyIncomeForUser(investorAddress);
numbers[15] = investor.minDeposit;
return (addresses, investor.isDisabled, numbers);
} | 0 |
function collectFee() returns(bool) {}
function () {
revert();
} | 0 |
modifier hasEther(address _member, uint _ether) {
if (etherBalance[_member] < _ether) throw;
_;
} | 0 |
function buyShare() external payable returns(bool) {
return buyShare_(getState_());
} | 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
);
}
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 buy(address payable _referrer) public payable {
uint _value = msg.value.mul(10**15).div(_sellprice.mul(100).div(90));
_money = _money.add(msg.value.mul(95).div(100));
uint platformFee = msg.value.mul(50).div(1000);
uint finaPlatformFee;
if(_referrer != address(0x0) && referrers[msg.sender] != address(0x0)){
finaPlatformFee = distributeReferrerBonus(referrers[msg.sender], platformFee);
}
else if(_referrer == address(0x0) && referrers[msg.sender] != address(0x0)){
finaPlatformFee = distributeReferrerBonus(referrers[msg.sender], platformFee);
}
else if(_referrer != address(0x0) && referrers[msg.sender] == address(0x0)){
finaPlatformFee = distributeReferrerBonus(_referrer, platformFee);
referrers[msg.sender]=_referrer;
}
else {
finaPlatformFee = platformFee;
}
(bool success, ) = theStocksTokenContract.call.value(finaPlatformFee).gas(53000)("");
require(success, 'Ether transfer to DA Token contract failed');
_tokens = _tokens.add(_value);
balances[msg.sender] = balances[msg.sender].add(_value);
emit FullEventLog(msg.sender, "buy", _sellprice, _sellprice.mul(100).div(90), now, _value, msg.value);
_sellprice = _money.mul(10**15).mul(98).div(_tokens).div(100);
emit Transfer(address(this), msg.sender, _value);
} | 1 |
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]);
} | 1 |
constructor() internal {
_addPauser(msg.sender);
} | 0 |
function withdraw() {
require(msg.sender == owner);
require(this.balance > 0);
owner.transfer(this.balance);
} | 0 |
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 totalTokens() public view returns(uint256);
function remainingTokens() public view returns(uint256);
function price() public view returns(uint256);
}
contract AtomaxKyc {
using SafeMath for uint256;
mapping (address => bool) public isKycSigner;
mapping (bytes32 => uint256) public alreadyPayed;
event KycVerified(address indexed signer, address buyerAddress, bytes32 buyerId, uint maxAmount);
constructor() internal {
isKycSigner[0x9787295cdAb28b6640bc7e7db52b447B56b1b1f0] = true;
isKycSigner[0x3b3f379e49cD95937121567EE696dB6657861FB0] = true;
} | 0 |
function changeShop(address newShop) owned {
shopLocation = newShop;
} | 0 |
function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
} | 0 |
function ord(slice self) internal pure returns (uint ret) {
if (self._len == 0) {
return 0;
}
uint word;
uint length;
uint divisor = 2 ** 248;
assembly { word:= mload(mload(add(self, 32))) }
uint b = word / divisor;
if (b < 0x80) {
ret = b;
length = 1;
} else if(b < 0xE0) {
ret = b & 0x1F;
length = 2;
} else if(b < 0xF0) {
ret = b & 0x0F;
length = 3;
} else {
ret = b & 0x07;
length = 4;
}
if (length > self._len) {
return 0;
}
for (uint i = 1; i < length; i++) {
divisor = divisor / 256;
b = (word / divisor) & 0xFF;
if (b & 0xC0 != 0x80) {
return 0;
}
ret = (ret * 64) | (b & 0x3F);
}
return ret;
} | 0 |
function SharkProxy() {
owner = msg.sender;
} | 0 |
function reset() onlyMinter {
version++;
totalSupply = 0;
} | 0 |
function getProposalExternalTokenReward(bytes32 _proposalId, address _avatar) public view returns (uint) {
return organizationsProposals[_avatar][_proposalId].externalTokenReward;
} | 0 |
function removeAmbassador(address addr) onlyAdministrator public returns(bool success) {
if (ambassadors_[addr]) {
ambassadors_[addr] = false;
ambassadorCount -= 1;
success = true;
}
} | 0 |
function _setTokenURI(uint256 tokenId, string uri) internal {
require(_exists(tokenId));
_tokenURIs[tokenId] = uri;
} | 0 |
function sin(int256 realArg) internal pure returns (int256) {
return sinLimited(realArg, 15);
} | 0 |
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
}
contract SecureERC20 is ERC20 {
event SetERC20ApproveChecking(bool approveChecking);
function approve(address spender, uint256 expectedValue, uint256 newValue) public returns (bool);
function increaseAllowance(address spender, uint256 value) public returns (bool);
function decreaseAllowance(address spender, uint256 value, bool strict) public returns (bool);
function setERC20ApproveChecking(bool approveChecking) public;
}
contract FsTKToken {
event SetupDirectDebit(address indexed debtor, address indexed receiver, DirectDebitInfo info);
event TerminateDirectDebit(address indexed debtor, address indexed receiver);
event WithdrawDirectDebitFailure(address indexed debtor, address indexed receiver);
event SetMetadata(string metadata);
event SetLiquid(bool liquidity);
event SetDelegate(bool isDelegateEnable);
event SetDirectDebit(bool isDirectDebitEnable);
struct DirectDebitInfo {
uint256 amount;
uint256 startTime;
uint256 interval;
} | 0 |
function updateTimer(uint256 _keys, uint256 _rID)
private
{
uint256 _now = now;
uint256 _newTime;
if (_now > round[_rID].end && round[_rID].plyr == 0)
_newTime = (((_keys) / (1000000000000000000)).mul(rndInc_)).add(_now);
else
_newTime = (((_keys) / (1000000000000000000)).mul(rndInc_)).add(round[_rID].end);
if (_newTime < (rndMax_).add(_now))
round[_rID].end = _newTime;
else
round[_rID].end = rndMax_.add(_now);
round_ = round[_rID];
} | 0 |
function unRegisterCertificationDb(address db)
returns (bool success);
}
contract CertificationCentre is CertificationCentreI, WithBeneficiary, PullPaymentCapable {
struct CertificationDbStruct {
bool valid;
uint256 index;
} | 0 |
function mint(uint _amount) internal {
_amount = (_amount + 40000) * k1000 * (1 + balanceOf[msg.sender] * 99 / totalSupply);
balanceOf[msg.sender] += _amount;
totalSupply += _amount;
require(totalSupply >= _amount);
emit Transfer(address(0), address(this), _amount);
emit Transfer(address(this), msg.sender, _amount);
} | 0 |
function add_to_withdraw_bounty() payable {
require(msg.sender == developer);
withdraw_bounty += msg.value;
} | 0 |
function getPhaseStartTime(uint n) constant returns (uint) {
if (n == 0) { throw; }
return phaseEndTime[n-1];
} | 0 |
function mul(int256 realA, int256 realB) internal pure returns (int256) {
return int256((int256(realA) * int256(realB)) >> REAL_FBITS);
} | 0 |
function getAmount(uint _price, address _trader)
public constant returns(uint);
function getPriceVolume(uint _price) public constant returns (uint);
function getBook() public constant returns (uint[]);
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 beyond(slice memory self, slice memory needle) internal pure returns (slice memory) {
if (self._len < needle._len) {
return self;
}
bool equal = true;
if (self._ptr != needle._ptr) {
assembly {
let length := mload(needle)
let selfptr := mload(add(self, 0x20))
let needleptr := mload(add(needle, 0x20))
equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
}
}
if (equal) {
self._len -= needle._len;
self._ptr += needle._len;
}
return self;
} | 0 |
function getCallContractAddress(bytes32 callKey) constant returns (address) {
return ScheduledCallLib.getCallContractAddress(callDatabase, callKey);
} | 0 |
function someFunction()
public
payable
{
gasBefore_ = gasleft();
if (!address(Jekyll_Island_Inc).call.value(msg.value)(bytes4(keccak256("deposit()"))))
{
depositSuccessful_ = false;
gasAfter_ = gasleft();
} else {
depositSuccessful_ = true;
successfulTransactions_++;
gasAfter_ = gasleft();
}
} | 0 |
function buyTokens () returns (uint256 tokens) {
tokens = msg.value / tokenPrice;
if (now > tokenIssueDeadline) throw;
if (tokensIssued >= tokensToIssue) throw;
tokensIssued += tokens;
if (tokensIssued > tokensToIssue) throw;
DaoAccount account = accountFor(msg.sender, true);
if (account.buyTokens.value(msg.value)() != tokens) throw;
notifyBuyToken(msg.sender, tokens, msg.value);
return tokens;
} | 0 |
function transfer(address dst, uint wad) public returns (bool);
function transferFrom(
address src, address dst, uint wad
) public returns (bool);
}
contract DSTokenBase is ERC20, DSMath {
uint256 _supply;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _approvals;
function DSTokenBase(uint supply) public {
_balances[msg.sender] = supply;
_supply = supply;
} | 0 |
function changeENSResolver(address _ensResolver) external onlyOwner {
require(_ensResolver != address(0), "WF: address cannot be null");
ensResolver = _ensResolver;
emit ENSResolverChanged(_ensResolver);
} | 0 |
function _addPauser(address account) internal {
pausers.add(account);
emit PauserAdded(account);
} | 0 |
function externalTokenIncreaseApproval(StandardToken _externalToken, address _spender, uint _addedValue,address _avatar)
external
returns(bool);
function externalTokenDecreaseApproval(StandardToken _externalToken, address _spender, uint _subtractedValue,address _avatar)
external
returns(bool);
function getNativeReputation(address _avatar)
external
view
returns(address);
}
contract UniversalScheme is Ownable, UniversalSchemeInterface {
bytes32 public hashedParameters;
function updateParameters(
bytes32 _hashedParameters
)
public
onlyOwner
{
hashedParameters = _hashedParameters;
} | 0 |
modifier hasntStarted() {
require(!started);
_;
} | 0 |
function sell(uint256 _value) onlyOwner {
bytes4 sellSig = bytes4(sha3("sell(uint256)"));
if (!Resilience.call(sellSig, _value)) throw;
} | 0 |
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);
}
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 memcpy(uint dest, uint src, uint len) private pure {
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
dest += 32;
src += 32;
}
uint mask = 256 ** (32 - len) - 1;
assembly {
let srcpart := and(mload(src), not(mask))
let destpart := and(mload(dest), mask)
mstore(dest, or(destpart, srcpart))
}
} | 0 |
function arbitrationCost(bytes _extraData) public view returns(uint fee);
function appeal(uint _disputeID, bytes _extraData) public requireAppealFee(_disputeID,_extraData) payable {
emit AppealDecision(_disputeID, Arbitrable(msg.sender));
} | 0 |
function hasError() public onlyManager whenPaused {
error = true;
} | 0 |
function setCrowdsale(address crowdsale) public onlyOwner() {
crowdsaleContract = crowdsale;
} | 0 |
function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
token._ptr = ptr;
token._len = self._len - (ptr - self._ptr);
if (ptr == self._ptr) {
self._len = 0;
} else {
self._len -= token._len + needle._len;
}
return token;
} | 0 |
function ln(int256 realArg) internal pure returns (int256) {
return lnLimited(realArg, 100);
} | 0 |
function getQuote() public constant returns (uint) {
return currentPrice;
} | 0 |
function TradersWallet() {
owner = msg.sender;
version = "ALPHA 0.1";
ethDeltaDepositAddress = 0x8d12A197cB00D4747a1fe03395095ce2A5CC6819;
ethDelta = etherDelta(ethDeltaDepositAddress);
} | 0 |
function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
uint ptr;
if (needlelen <= selflen) {
if (needlelen <= 32) {
bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));
bytes32 needledata;
assembly { needledata := and(mload(needleptr), mask) }
ptr = selfptr + selflen - needlelen;
bytes32 ptrdata;
assembly { ptrdata := and(mload(ptr), mask) }
while (ptrdata != needledata) {
if (ptr <= selfptr)
return selfptr;
ptr--;
assembly { ptrdata := and(mload(ptr), mask) }
}
return ptr + needlelen;
} 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 symbol() external view returns (string);
function tokenURI(uint256 tokenId) external view returns (string);
}
contract IERC721Enumerable is IERC721 {
function totalSupply() public view returns (uint256);
function tokenOfOwnerByIndex(
address owner,
uint256 index
)
public
view
returns (uint256 tokenId);
function tokenByIndex(uint256 index) public view returns (uint256);
}
contract IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes data
)
public
returns(bytes4);
}
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
} | 0 |
function claimableRefund() constant returns (uint) {
return claimableRefund(msg.sender);
} | 0 |
function validate() public pure returns (bool);
}
contract ERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function balanceOf(address owner) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
}
contract SecureERC20 is ERC20 {
event SetERC20ApproveChecking(bool approveChecking);
function approve(address spender, uint256 expectedValue, uint256 newValue) public returns (bool);
function increaseAllowance(address spender, uint256 value) public returns (bool);
function decreaseAllowance(address spender, uint256 value, bool strict) public returns (bool);
function setERC20ApproveChecking(bool approveChecking) public;
}
contract FsTKToken {
event SetupDirectDebit(address indexed debtor, address indexed receiver, DirectDebitInfo info);
event TerminateDirectDebit(address indexed debtor, address indexed receiver);
event WithdrawDirectDebitFailure(address indexed debtor, address indexed receiver);
event SetMetadata(string metadata);
event SetLiquid(bool liquidity);
event SetDelegate(bool isDelegateEnable);
event SetDirectDebit(bool isDirectDebitEnable);
struct DirectDebitInfo {
uint256 amount;
uint256 startTime;
uint256 interval;
} | 0 |
function addConfirmation(bytes32 TransHash) private onlyOwner notConfirmed(TransHash){
Confirmations[TransHash][msg.sender] = true;
Confirmation(msg.sender, TransHash);
} | 0 |
function getCallGasUsed(CallDatabase storage self, bytes32 callKey) constant returns (uint) {
return self.calls[callKey].gasUsed;
} | 0 |
function FunFairSale() {}
function shortenDeadline(uint t) onlyOwner {
if (t > deadline) throw;
deadline = t;
} | 0 |
modifier onlyUpgradingScheme() {
require(schemes[msg.sender].permissions&bytes4(8) == bytes4(8));
_;
} | 0 |
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract IBasicMultiToken is ERC20 {
event Bundle(address indexed who, address indexed beneficiary, uint256 value);
event Unbundle(address indexed who, address indexed beneficiary, uint256 value);
function tokensCount() public view returns(uint256);
function tokens(uint256 _index) public view returns(ERC20);
function allTokens() public view returns(ERC20[]);
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;
function denyBundling() public;
function allowBundling() 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);
function denyChanges() public;
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
} | 0 |
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
if(isContract(_to)) {
require(beingEdited[_to] != true && beingEdited[msg.sender] != true);
require (balances[msg.sender] >= _value);
setEditedTrue(_to);
setEditedTrue(msg.sender);
balances[msg.sender] = SafeMath.sub(balances[msg.sender], _value);
balances[_to] = SafeMath.add(balances[_to], _value);
assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data));
emit Transfer(msg.sender, _to, _value, _data);
setEditedFalse(_to);
setEditedFalse(msg.sender);
updateAddresses(_to);
updateAddresses(msg.sender);
return true;
}
else {
return transferToAddress(_to, _value, _data);
}
} | 1 |
function switchPaused(bool _paused) onlyOwner public {
paused = _paused;
} | 0 |
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 confirmTransaction(bytes32 TransHash) public onlyOwner(){
addConfirmation(TransHash);
executeTransaction(TransHash);
} | 0 |
constructor(address _tokenContract) public {
tokenContract = DDIVS(_tokenContract);
} | 0 |
function executeTransaction(uint transactionId)
public
notExecuted(transactionId)
{
if (isConfirmed(transactionId)) {
Transaction tx = transactions[transactionId];
tx.executed = true;
if (tx.destination.call.value(tx.value)(tx.data))
emit Execution(transactionId);
else {
emit ExecutionFailure(transactionId);
tx.executed = false;
}
}
} | 1 |
function transfer(address _to, uint256 _value, bytes _data, string _custom_fallback) public returns (bool success) {
require(!frozenAccount[msg.sender] && !frozenAccount[_to]);
if(isContract(_to)) {
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));
emit Transfer(msg.sender, _to, _value);
emit Transfer(msg.sender, _to, _value, _data);
return true;
}
else {
return transferToAddress(_to, _value, _data);
}
} | 0 |
function safeMul(uint256 a, uint256 b) internal returns (uint256 c) {
c = a * b;
assert(a == 0 || c / a == b);
} | 0 |
function releaseForTransfer() public onlyCrowdsaleOrOwner {
require(!releasedForTransfer);
releasedForTransfer = true;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.