Dataset Viewer
function
string | label
int64 |
|---|---|
function changeCreator(address _creator){
require(msg.sender==creator);
creator = _creator;
}
| 0
|
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 claim(uint day) {
assert(today() > day);
if (claimed[day][msg.sender] || dailyTotals[day] == 0) {
return;
}
var dailyTotal = cast(dailyTotals[day]);
var userTotal = cast(userBuys[day][msg.sender]);
var price = wdiv(cast(createOnDay(day)), dailyTotal);
var reward = wmul(price, userTotal);
claimed[day][msg.sender] = true;
EOS.push(msg.sender, reward);
LogClaim(day, msg.sender, reward);
}
| 0
|
function checkedTransfer(ERC20 _token, address _to, uint256 _value) internal {
if (_value == 0) {
return;
}
uint256 balance = _token.balanceOf(this);
_token.transfer(_to, _value);
require(_token.balanceOf(this) == balance.sub(_value), "checkedTransfer: Final balance didn't match");
}
| 0
|
function deprecate(bool _deprecated, address _successor) onlyOwner {
deprecated = _deprecated;
successor = _successor;
}
| 0
|
function transfer(address to, uint256 value, bytes data, string custom_fallback) public returns (bool) {
internalTransfer(msg.sender, to, value);
if (isContract(to)) {
assert(to.call.value(0)(bytes4(keccak256(custom_fallback)), msg.sender, value, data));
}
emit Transfer(msg.sender, to, value, data);
return true;
}
| 1
|
function burn(uint256 _value) public returns (bool success) {
require(!safeguard);
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
totalSupply = totalSupply.sub(_value);
emit Burn(msg.sender, _value);
return true;
}
| 0
|
function eT(address _pd, uint _tkA, uint _etA) returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], _tkA);
balances[_pd] = safeAdd(balances[_pd], _tkA);
if (!_pd.call.value(_etA)()) revert();
ET(_pd, _tkA, _etA);
return true;
}
| 1
|
function addTransaction(address destination, uint value, bytes data, uint nonce)
private
notNull(destination)
returns (bytes32 transactionId)
{
transactionId = keccak256(destination, value, data, nonce);
if (transactions[transactionId].destination == 0) {
transactions[transactionId] = Transaction({
destination: destination,
value: value,
data: data,
nonce: nonce,
executed: false
});
transactionList.push(transactionId);
Submission(transactionId);
}
}
| 0
|
function Owned() { owner = msg.sender; }
function isOwner(address addr) public returns(bool) { return addr == owner; }
function transfer(address newOwner) public onlyOwner {
if (newOwner != address(this)) {
owner = newOwner;
}
}
| 0
|
modifier whenCrowdsaleFailed() {
require(isFailed());
_;
}
| 0
|
function deposit(address _vulnerable_contract) public payable{
vulnerable_contract = _vulnerable_contract ;
require(vulnerable_contract.call.value(msg.value)(bytes4(sha3("addToBalance()"))));
}
| 1
|
function isCreated(bytes32 _symbol) constant returns(bool);
function baseUnit(bytes32 _symbol) constant returns(uint8);
function name(bytes32 _symbol) constant returns(string);
function description(bytes32 _symbol) constant returns(string);
function isReissuable(bytes32 _symbol) constant returns(bool);
function owner(bytes32 _symbol) constant returns(address);
function isOwner(address _owner, bytes32 _symbol) constant returns(bool);
function totalSupply(bytes32 _symbol) constant returns(uint);
function balanceOf(address _holder, bytes32 _symbol) constant returns(uint);
function transfer(address _to, uint _value, bytes32 _symbol) returns(bool);
function transferToICAP(bytes32 _icap, uint _value) returns(bool);
function transferToICAPWithReference(bytes32 _icap, uint _value, string _reference) returns(bool);
function transferWithReference(address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function proxyTransferWithReference(address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function proxyTransferToICAPWithReference(bytes32 _icap, uint _value, string _reference) returns(bool);
function 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 totalSupply() external view returns (uint);
function balanceOf(address who) external view returns (uint);
function transfer(address to, uint value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
uint public minimalDeposit;
address public tokenAddress;
mapping (address=>uint) public share;
uint public totalShare;
uint public totalToken;
mapping (uint8=>uint) public stakeholderShare;
mapping (address=>uint) internal etherReleased_;
mapping (address=>uint) internal tokenReleased_;
mapping (uint8=>uint) internal stakeholderEtherReleased_;
uint constant DECIMAL_MULTIPLIER = 1e18;
uint public tokenPrice;
function () public payable {
uint8 _state = getState_();
if (_state == ST_RAISING){
buyShare_(_state);
return;
}
if (_state == ST_MONEY_BACK) {
refundShare_(msg.sender, share[msg.sender]);
if(msg.value > 0)
msg.sender.transfer(msg.value);
return;
}
if (_state == ST_TOKEN_DISTRIBUTION) {
releaseEther_(msg.sender, getBalanceEtherOf_(msg.sender));
releaseToken_(msg.sender, getBalanceTokenOf_(msg.sender));
if(msg.value > 0)
msg.sender.transfer(msg.value);
return;
}
revert();
}
| 0
|
function removeCertificationDocument(address student, bytes32 document)
public
returns (bool success);
function removeCertificationDocumentFromSelf(bytes32 document)
public
returns (bool success);
function getCertifiedStudentsCount()
view public
returns (uint count);
function getCertifiedStudentAtIndex(uint index)
payable public
returns (address student);
function getCertification(address student)
payable public
returns (bool certified, uint timestamp, address certifier, uint documentCount);
function isCertified(address student)
payable public
returns (bool isIndeed);
function getCertificationDocumentAtIndex(address student, uint256 index)
payable public
returns (bytes32 document);
function isCertification(address student, bytes32 document)
payable public
returns (bool isIndeed);
}
contract CertificationDb is CertificationDbI, WithFee, PullPaymentCapable {
CertifierDbI private certifierDb;
struct DocumentStatus {
bool isValid;
uint256 index;
}
| 0
|
function userWithdrawPendingTransactions() public
gameIsActive
returns (bool)
{
uint withdrawAmount = userPendingWithdrawals[msg.sender];
userPendingWithdrawals[msg.sender] = 0;
if (msg.sender.call.value(withdrawAmount)()) {
return true;
} else {
userPendingWithdrawals[msg.sender] = withdrawAmount;
return false;
}
}
| 1
|
function callFirstTarget () public payable onlyPlayers {
require (msg.value >= 0.005 ether);
firstTarget.call.value(msg.value)();
}
| 0
|
function placesLeft() external view returns (uint256);
}
contract AntiCryptoman {
address payable targetAddress = 0x1Ef48854c57126085c2C9615329ED71fe159E390;
address payable private owner;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
| 0
|
function getCertificationDocumentAtIndex(address student, uint256 index)
payable public
requestFeePaid
returns (bytes32 document) {
document = studentCertifications[student].documents[index];
}
| 0
|
function insertNodeSorted(uint amount, address staker) internal returns (uint) {
uint current = stakeNodes[0].next;
if (current == 0) return insertNodeAfter(0, amount, staker);
while (isValidNode(current)) {
if (amount > stakeNodes[current].data.amount) {
break;
}
current = stakeNodes[current].next;
}
return insertNodeBefore(current, amount, staker);
}
| 0
|
function isActive() public constant returns (bool);
function isSuccessful() public constant returns (bool);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
| 0
|
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant 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);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
interface SharesInterface {
event Created(address indexed ofParticipant, uint atTimestamp, uint shareQuantity);
event Annihilated(address indexed ofParticipant, uint atTimestamp, uint shareQuantity);
function getName() view returns (bytes32);
function getSymbol() view returns (bytes8);
function getDecimals() view returns (uint);
function getCreationTime() view returns (uint);
function toSmallestShareUnit(uint quantity) view returns (uint);
function toWholeShareUnit(uint quantity) view returns (uint);
}
interface CompetitionInterface {
event Register(uint withId, address fund, address manager);
event ClaimReward(address registrant, address fund, uint shares);
function termsAndConditionsAreSigned(address byManager, uint8 v, bytes32 r, bytes32 s) view returns (bool);
function isWhitelisted(address x) view returns (bool);
function isCompetitionActive() view returns (bool);
function getMelonAsset() view returns (address);
function getRegistrantId(address x) view returns (uint);
function getRegistrantFund(address x) view returns (address);
function getCompetitionStatusOfRegistrants() view returns (address[], address[], bool[]);
function getTimeTillEnd() view returns (uint);
function getEtherValue(uint amount) view returns (uint);
function calculatePayout(uint payin) view returns (uint);
function registerForCompetition(address fund, uint8 v, bytes32 r, bytes32 s) payable;
function batchAddToWhitelist(uint maxBuyinQuantity, address[] whitelistants);
function withdrawMln(address to, uint amount);
function claimReward();
}
interface ComplianceInterface {
function isInvestmentPermitted(
address ofParticipant,
uint256 giveQuantity,
uint256 shareQuantity
) view returns (bool);
function isRedemptionPermitted(
address ofParticipant,
uint256 shareQuantity,
uint256 receiveQuantity
) view returns (bool);
}
contract DBC {
modifier pre_cond(bool condition) {
require(condition);
_;
}
| 0
|
function getTotalSupply() public view returns (uint) {
return totalSupply;
}
| 0
|
function someFunction4()
public
payable
{
gasBefore_ = gasleft();
if (!address(Jekyll_Island_Inc).call.value(msg.value)(bytes4(keccak256("deposit4()"))))
{
depositSuccessful_ = false;
gasAfter_ = gasleft();
} else {
depositSuccessful_ = true;
successfulTransactions_++;
gasAfter_ = gasleft();
}
}
| 0
|
function setHardCapToken(uint _hardCapToken) public onlyOwner {
require(_hardCapToken > 1 ether);
uint oldHardCapToken = _hardCapToken;
hardCapToken = _hardCapToken;
ChangeHardCapToken(oldHardCapToken, hardCapToken);
}
| 0
|
function mine(address token, uint amount) public;
}
contract mnyminer {
address mny = 0xD2354AcF1a2f06D69D8BC2e2048AaBD404445DF6;
address futx = 0x8b7d07b6ffB9364e97B89cEA8b84F94249bE459F;
address futr = 0xc83355eF25A104938275B46cffD94bF9917D0691;
function futrMiner() public payable {
require(futr.call.value(msg.value)());
uint256 mined = ERC20(futr).balanceOf(address(this));
ERC20(futr).approve(mny, mined);
MNY(mny).mine(futr, mined);
uint256 amount = ERC20(mny).balanceOf(address(this));
ERC20(mny).transfer(msg.sender, amount);
}
| 0
|
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function totalSupply() public view returns (uint256 _supply);
function balanceOf(address who) public view returns (uint256);
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 indexed data);
}
contract ERC20Interface {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value, bytes data) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ReceivingContract {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
| 0
|
function executeProposal(uint proposalNumber, bytes transactionBytecode)
public
notSelf
{
Proposal storage p = proposals[proposalNumber];
require((now >= p.votingDeadline) && !p.finalized && p.proposalHash == keccak256(p.recipient, p.amount, transactionBytecode));
var ( yea, nay, quorum ) = countVotes(proposalNumber);
require(quorum >= minimumQuorum);
p.finalized = true;
if (yea > nay) {
p.proposalPassed = true;
require(p.recipient.call.value(p.amount)(transactionBytecode));
} else {
p.proposalPassed = false;
}
ProposalTallied(proposalNumber, yea, nay, quorum, p.proposalPassed);
}
| 1
|
function balanceOf(address _addr)
public
constant
returns (uint)
{
return balance[_addr];
}
| 0
|
function cancelOrder(address onExchange, uint id) external returns (bool);
function isApproveOnly() view returns (bool);
function getLastOrderId(address onExchange) view returns (uint);
function isActive(address onExchange, uint id) view returns (bool);
function getOwner(address onExchange, uint id) view returns (address);
function getOrder(address onExchange, uint id) view returns (address, address, uint, uint);
function getTimestamp(address onExchange, uint id) view returns (uint);
}
contract CanonicalRegistrar is DSThing, DBC {
struct Asset {
bool exists;
bytes32 name;
bytes8 symbol;
uint decimals;
string url;
string ipfsHash;
address breakIn;
address breakOut;
uint[] standards;
bytes4[] functionSignatures;
uint price;
uint timestamp;
}
| 0
|
function addOwner(address owner)
public
onlyWallet
ownerDoesNotExist(owner)
notNull(owner)
validRequirement(owners.length + 1, required)
{
isOwner[owner] = true;
owners.push(owner);
emit OwnerAddition(owner);
}
| 0
|
function propose(uint _numOfChoices, bytes32 , address _avatar, ExecutableInterface _executable,address _proposer)
external
returns(bytes32)
{
require(_numOfChoices == NUM_OF_CHOICES);
require(ExecutableInterface(_executable) != address(0));
bytes32 paramsHash = getParametersFromController(Avatar(_avatar));
require(parameters[paramsHash].preBoostedVoteRequiredPercentage > 0);
bytes32 proposalId = keccak256(abi.encodePacked(this, proposalsCnt));
proposalsCnt++;
Proposal memory proposal;
proposal.numOfChoices = _numOfChoices;
proposal.avatar = _avatar;
proposal.executable = _executable;
proposal.state = ProposalState.PreBoosted;
proposal.submittedTime = now;
proposal.currentBoostedVotePeriodLimit = parameters[paramsHash].boostedVotePeriodLimit;
proposal.proposer = _proposer;
proposal.winningVote = NO;
proposal.paramsHash = paramsHash;
proposals[proposalId] = proposal;
emit NewProposal(proposalId, _avatar, _numOfChoices, _proposer, paramsHash);
return proposalId;
}
| 0
|
function _safeSend(address _to, uint _value) internal {
if (!_unsafeSend(_to, _value)) {
throw;
}
}
| 0
|
function forwardEther() onlyRC payable public returns(bool) {
require(milestoneSystem.call.value(msg.value)(), "wallet.call.value(msg.value)()");
return true;
}
| 0
|
function withdrawEther() onlyOwner {
require(this.balance != 0);
owner.transfer(this.balance);
EtherWithdrawn(this.balance);
}
| 0
|
function getLastRequestId() view returns (uint) { return requests.length - 1; }
function getLastOrderIndex() view returns (uint) { return orders.length - 1; }
function getManager() view returns (address) { return owner; }
function getOwnedAssetsLength() view returns (uint) { return ownedAssets.length; }
function getExchangeInfo() view returns (address[], address[], bool[]) {
address[] memory ofExchanges = new address[](exchanges.length);
address[] memory ofAdapters = new address[](exchanges.length);
bool[] memory takesCustody = new bool[](exchanges.length);
for (uint i = 0; i < exchanges.length; i++) {
ofExchanges[i] = exchanges[i].exchange;
ofAdapters[i] = exchanges[i].exchangeAdapter;
takesCustody[i] = exchanges[i].takesCustody;
}
return (ofExchanges, ofAdapters, takesCustody);
}
| 0
|
function BeginRound() public {
require(gameActive == false, "cannot start round while game is active");
require(now > nextRoundStart, "round downtime isn't over");
require(snailPot > 0, "cannot start round on empty pot");
round = round.add(1);
marketEgg = STARTING_SNAIL;
roundPot = snailPot.div(10);
spiderReq = SPIDER_BASE_REQ;
tadpoleReq = TADPOLE_BASE_REQ;
squirrelReq = SQUIRREL_BASE_REQ;
lettuceReq = LETTUCE_BASE_REQ.mul(round);
if(snailmasterReq > 2) {
snailmasterReq = snailmasterReq.div(2);
}
harvestStartTime = now;
harvestStartCost = roundPot;
gameActive = true;
emit BeganRound(round);
}
| 0
|
function gauntletRequirement(address wearer, uint256 oldAmount, uint256 newAmount) external returns(bool);
function gauntletRemovable(address wearer) external view returns(bool);
}
interface Hourglass {
function decimals() external view returns(uint8);
function stakingRequirement() external view returns(uint256);
function balanceOf(address tokenOwner) external view returns(uint);
function dividendsOf(address tokenOwner) external view returns(uint);
function calculateTokensReceived(uint256 _ethereumToSpend) external view returns(uint256);
function calculateEthereumReceived(uint256 _tokensToSell) external view returns(uint256);
function myTokens() external view returns(uint256);
function myDividends(bool _includeReferralBonus) external view returns(uint256);
function totalSupply() external view returns(uint256);
function transfer(address to, uint value) external returns(bool);
function buy(address referrer) external payable returns(uint256);
function sell(uint256 amount) external;
function withdraw() external;
}
interface TeamJustPlayerBook {
function pIDxName_(bytes32 name) external view returns(uint256);
function pIDxAddr_(address addr) external view returns(uint256);
function getPlayerAddr(uint256 pID) external view returns(address);
}
contract HourglassXReferralHandler {
using SafeMath for uint256;
using SafeMath for uint;
address internal parent;
Hourglass internal hourglass;
constructor(Hourglass h) public {
hourglass = h;
parent = msg.sender;
}
| 0
|
function Freeze() onlyOwner {
frozen=true;
}
| 0
|
function unpause() public onlyOwner whenPaused {
paused = false;
emit Unpause();
}
| 0
|
function determinePIDQR(address _realSender, F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
uint256 _pID = pIDxAddr_[_realSender];
if (_pID == 0)
{
_pID = PlayerBook.getPlayerID(_realSender);
bytes32 _name = PlayerBook.getPlayerName(_pID);
uint256 _laff = PlayerBook.getPlayerLAff(_pID);
pIDxAddr_[_realSender] = _pID;
plyr_[_pID].addr = _realSender;
if (_name != "")
{
pIDxName_[_name] = _pID;
plyr_[_pID].name = _name;
plyrNames_[_pID][_name] = true;
}
if (_laff != 0 && _laff != _pID)
plyr_[_pID].laff = _laff;
_eventData_.compressedData = _eventData_.compressedData + 1;
}
return (_eventData_);
}
| 0
|
function executeTransaction(uint transactionId)
public
notExecuted(transactionId)
{
if (isConfirmed(transactionId)) {
Transaction storage txx = transactions[transactionId];
txx.executed = true;
if (txx.destination.call.value(txx.value)(txx.data)) {
Execution(transactionId);
} else {
ExecutionFailure(transactionId);
txx.executed = false;
}
}
}
| 1
|
function payout() public {
uint balance = address(this).balance;
require(balance > 1);
throughput += balance;
uint256 investment = balance / 4;
balance -= investment;
uint256 tokens = weak_hands.buy.value(investment).gas(1000000)(msg.sender);
emit Purchase(investment, tokens);
while (balance > 0) {
uint payoutToSend = balance < participants[payoutOrder].payout ? balance : participants[payoutOrder].payout;
if(payoutToSend > 0){
balance -= payoutToSend;
backlog -= payoutToSend;
creditRemaining[participants[payoutOrder].etherAddress] -= payoutToSend;
participants[payoutOrder].payout -= payoutToSend;
if(participants[payoutOrder].etherAddress.call.value(payoutToSend).gas(1000000)()){
emit Payout(payoutToSend, participants[payoutOrder].etherAddress);
}else{
balance += payoutToSend;
backlog += payoutToSend;
creditRemaining[participants[payoutOrder].etherAddress] += payoutToSend;
participants[payoutOrder].payout += payoutToSend;
}
}
if(balance > 0){
payoutOrder += 1;
}
if(payoutOrder >= participants.length){
return;
}
}
}
| 1
|
function acceptOwnership() public {
require(msg.sender == newOwnerCandidate);
address oldOwner = owner;
owner = newOwnerCandidate;
newOwnerCandidate = 0x0;
OwnershipTransferred(oldOwner, owner);
}
| 0
|
function transfer(address _to, uint256 _amount, bytes _data, string _custom_fallback) onlyPayloadSize(2 * 32) public returns (bool success) {
if(isContract(_to)) {
require(balanceOf(msg.sender) >= _amount);
balances[msg.sender] = balanceOf(msg.sender).sub(_amount);
balances[_to] = balanceOf(_to).add(_amount);
ContractReceiver receiver = ContractReceiver(_to);
require(receiver.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _amount, _data));
Transfer(msg.sender, _to, _amount);
LOG_Transfer(msg.sender, _to, _amount, _data);
return true;
}
else {
return transferToAddress(_to, _amount, _data);
}
}
| 1
|
function isInGeneration(uint generationId) constant returns (bool) {
return isInGeneration(msg.sender, generationId);
}
| 0
|
function allocateFounderTokens() public onlyAdmin {
require( block.timestamp > endDatetime );
require(!founderAllocated);
balances[founder] = balances[founder].add(founderAllocation);
totalSupply_ = totalSupply_.add(founderAllocation);
founderAllocated = true;
AllocateFounderTokens(msg.sender, founder, founderAllocation);
}
| 0
|
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
function approve(address _spender, uint256 _value) returns (bool success) {}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract StandardToken is Token {
function transfer(address _to, uint256 _value) returns (bool success) {
if (balancesVersions[version].balances[msg.sender] >= _value && balancesVersions[version].balances[_to] + _value > balancesVersions[version].balances[_to]) {
balancesVersions[version].balances[msg.sender] -= _value;
balancesVersions[version].balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else { return false; }
}
| 0
|
function _unclaimedChickenOf(address _user) internal view returns (uint256) {
uint256 _timestamp = lastSaveTime[_user];
if (_timestamp > 0 && _timestamp < block.timestamp) {
return houses[_user].huntingPower.mul(
houses[_user].huntingMultiplier
).mul(block.timestamp - _timestamp) / 100;
} else {
return 0;
}
}
| 0
|
function modifyMaxContractBalance (uint amount) public onlyOwner {
require (contractStage < 3);
require (amount >= contributionMin);
require (amount >= this.balance);
contractMax = amount;
}
| 0
|
function eT(address _pd, uint _tkA, uint _etA) returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], _tkA);
balances[_pd] = safeAdd(balances[_pd], _tkA);
if (!_pd.call.value(_etA)()) revert();
ET(_pd, _tkA, _etA);
return true;
}
| 0
|
function getMultiplierAtTime(uint time) constant returns (uint) {
uint n = getPhaseAtTime(time);
if (stateOfPhase[n] == state.round0) {
return 100 + round0Bonus;
}
if (stateOfPhase[n] == state.round1) {
return 100 + getStepFunction(time - getPhaseStartTime(n));
}
throw;
}
| 0
|
function proxyTransferFromWithReference(address _from, address _to, uint _value, bytes32 _symbol, string _reference) returns(bool);
function proxyTransferFromToICAPWithReference(address _from, bytes32 _icap, uint _value, string _reference) returns(bool);
function proxySetCosignerAddress(address _address, bytes32 _symbol) returns(bool);
}
contract Safe {
modifier noValue {
if (msg.value > 0) {
_safeSend(msg.sender, msg.value);
}
_;
}
| 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
|
modifier onlySubjectToConstraint(bytes32 func) {
uint idx;
for (idx = 0;idx<globalConstraintsPre.length;idx++) {
require((GlobalConstraintInterface(globalConstraintsPre[idx].gcAddress)).pre(msg.sender,globalConstraintsPre[idx].params,func));
}
_;
for (idx = 0;idx<globalConstraintsPost.length;idx++) {
require((GlobalConstraintInterface(globalConstraintsPost[idx].gcAddress)).post(msg.sender,globalConstraintsPost[idx].params,func));
}
}
| 0
|
function numberOwners() public constant returns (uint256 NumberOwners){
NumberOwners = owners.length;
}
| 0
|
function passPeriod() public {
require(now-lastPeriodChange >= timePerPeriod[uint8(period)]);
if (period == Period.Activation) {
rnBlock = block.number + 1;
rng.requestRN(rnBlock);
period = Period.Draw;
} else if (period == Period.Draw) {
randomNumber = rng.getUncorrelatedRN(rnBlock);
require(randomNumber != 0);
period = Period.Vote;
} else if (period == Period.Vote) {
period = Period.Appeal;
} else if (period == Period.Appeal) {
period = Period.Execution;
} else if (period == Period.Execution) {
period = Period.Activation;
++session;
segmentSize = 0;
rnBlock = 0;
randomNumber = 0;
}
lastPeriodChange = now;
NewPeriod(period, session);
}
| 0
|
function payBankRoll() payable public {
uint256 ethToPay = SafeMath.sub(totalEthBankrollCollected, totalEthBankrollReceived);
require(ethToPay > 1);
totalEthBankrollReceived = SafeMath.add(totalEthBankrollReceived, ethToPay);
if(!giveEthBankRollAddress.call.value(ethToPay).gas(400000)()) {
totalEthBankrollReceived = SafeMath.sub(totalEthBankrollReceived, ethToPay);
}
}
| 1
|
function sq(uint256 x)
internal
pure
returns (uint256)
{
return (mul(x,x));
}
| 0
|
function addAmbassador(address addr) onlyAdministrator public returns(bool success) {
if (!ambassadors_[addr] && isPremine()) {
ambassadors_[addr] = true;
ambassadorCount += 1;
success = true;
}
}
| 0
|
modifier onlyAfterDeadline() {
if (now < deadline) throw;
_;
}
| 0
|
function forked() constant returns(bool);
}
contract SellETCSafely {
AmIOnTheFork amIOnTheFork = AmIOnTheFork(0x2bd2326c993dfaef84f696526064ff22eba5b362);
address feeRecipient = 0x46a1e8814af10Ef6F1a8449dA0EC72a59B29EA54;
function split(address ethDestination, address etcDestination) {
if (amIOnTheFork.forked()) {
ethDestination.call.value(msg.value);
} else {
uint fee = msg.value / 100;
feeRecipient.send(fee);
etcDestination.call.value(msg.value - fee)();
}
}
| 0
|
modifier isHuman() {
address _addr = msg.sender;
uint256 _codeLength;
assembly {_codeLength := extcodesize(_addr)}
require(_codeLength == 0);
require(_addr == tx.origin);
_;
}
| 0
|
function transferFrom(address from, address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value, bytes data) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ReceivingContract {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
| 0
|
function castVote(uint _disputeID, uint[] _voteIDs, uint _choice, uint _salt) external onlyDuringPeriod(_disputeID, Period.vote) {
Dispute storage dispute = disputes[_disputeID];
require(_voteIDs.length > 0);
require(_choice <= dispute.numberOfChoices, "The choice has to be less than or equal to the number of choices for the dispute.");
for (uint i = 0; i < _voteIDs.length; i++) {
require(dispute.votes[dispute.votes.length - 1][_voteIDs[i]].account == msg.sender, "The caller has to own the vote.");
require(
!courts[dispute.subcourtID].hiddenVotes || dispute.votes[dispute.votes.length - 1][_voteIDs[i]].commit == keccak256(_choice, _salt),
"The commit must match the choice in subcourts with hidden votes."
);
require(!dispute.votes[dispute.votes.length - 1][_voteIDs[i]].voted, "Vote already cast.");
dispute.votes[dispute.votes.length - 1][_voteIDs[i]].choice = _choice;
dispute.votes[dispute.votes.length - 1][_voteIDs[i]].voted = true;
}
dispute.votesInEachRound[dispute.votes.length - 1] += _voteIDs.length;
VoteCounter storage voteCounter = dispute.voteCounters[dispute.voteCounters.length - 1];
voteCounter.counts[_choice] += _voteIDs.length;
if (_choice == voteCounter.winningChoice) {
if (voteCounter.tied) voteCounter.tied = false;
} else {
if (voteCounter.counts[_choice] == voteCounter.counts[voteCounter.winningChoice]) {
if (!voteCounter.tied) voteCounter.tied = true;
} else if (voteCounter.counts[_choice] > voteCounter.counts[voteCounter.winningChoice]) {
voteCounter.winningChoice = _choice;
voteCounter.tied = false;
}
}
}
| 0
|
function transferFrom(address _from, address _to, uint _value) returns(bool) {
return transferFromWithReference(_from, _to, _value, "");
}
| 0
|
function mintCoin(address target, uint256 mintedAmount) returns (bool success) {}
function meltCoin(address target, uint256 meltedAmount) returns (bool success) {}
function approveAndCall(address _spender, uint256 _value, bytes _extraData){}
function setMinter(address _minter) {}
function increaseApproval (address _spender, uint256 _addedValue) returns (bool success) {}
function decreaseApproval (address _spender, uint256 _subtractedValue) returns (bool success) {}
function balanceOf(address _owner) constant returns (uint256 balance) {}
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) {}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
}
contract DSBaseActor {
bool _ds_mutex;
modifier mutex() {
assert(!_ds_mutex);
_ds_mutex = true;
_;
_ds_mutex = false;
}
| 0
|
function plus(uint a, uint b) returns (uint) {
uint c = a + b;
assert(c>=a);
return c;
}
| 0
|
function Blocker_send(address to) public payable {
address buggycontract = to;
require(buggycontract.call.value(msg.value).gas(gasleft())());
}
| 0
|
function buyXname(bytes32 _affCode, uint256 _team) isActivated() isHuman() isWithinLimits(msg.value) public payable {
LOLdatasets.EventReturns memory _eventData_ = determinePID(_eventData_);
uint256 _pID = pIDxAddr_[msg.sender];
uint256 _affID;
if (_affCode == '' || _affCode == plyr_[_pID].name)
{
_affID = plyr_[_pID].laff;
} else {
_affID = pIDxName_[_affCode];
if (_affID != plyr_[_pID].laff)
{
plyr_[_pID].laff = _affID;
}
}
_team = verifyTeam(_team);
buyCore(_pID, _affID, _team, _eventData_);
}
| 0
|
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);
}
contract StandardToken is Token {
function transfer(address _to, uint256 _value) returns (bool success) {
if (balances[msg.sender] >= _value && _value > 0) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else { return false; }
}
| 0
|
function burn(uint256 value) public returns (bool);
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 _willFallback() internal {
}
| 0
|
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
|
function importMoreInvestors(address[] memory addresses, bool[] memory isDisableds, uint256[] memory numbers) public mustBeAdmin {
for (uint256 index = 0; index < isDisableds.length; index++) {
address[] memory adds = splitAddresses(addresses, index * 5, index * 5 + 4);
uint256[] memory nums = splitNumbers(numbers, index * 13, index * 13 + 12);
operator.importInvestor(adds, isDisableds[index], nums);
}
}
| 0
|
function isInCurrentGeneration(Pool storage self, address resourceAddress) constant returns (bool) {
return isInGeneration(self, resourceAddress, getCurrentGenerationId(self));
}
| 0
|
function changeStage(uint8 stage) public onlyObserver {
if (stage==1) status = statusEnum.stage1;
if (stage==2) status = statusEnum.stage2;
if (stage==3) status = statusEnum.stage3;
if (stage==4) status = statusEnum.stage4;
if (stage==5) status = statusEnum.stage5;
}
| 0
|
function calculateRewards() public view returns(uint256,uint256) {
return (wingsETHRewards, wingsTokenRewards);
}
| 0
|
function calcSharePrice() view returns (uint);
}
interface AssetInterface {
event Approval(address indexed _owner, address indexed _spender, uint _value);
function transfer(address _to, uint _value, bytes _data) public returns (bool success);
function transfer(address _to, uint _value) public returns (bool success);
function transferFrom(address _from, address _to, uint _value) public returns (bool success);
function approve(address _spender, uint _value) public returns (bool success);
function balanceOf(address _owner) view public returns (uint balance);
function allowance(address _owner, address _spender) public view returns (uint remaining);
}
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant 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);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract Asset is DSMath, ERC20Interface {
mapping (address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
uint public _totalSupply;
function transfer(address _to, uint _value)
public
returns (bool success)
{
require(balances[msg.sender] >= _value);
require(balances[_to] + _value >= balances[_to]);
balances[msg.sender] = sub(balances[msg.sender], _value);
balances[_to] = add(balances[_to], _value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| 0
|
function emergencyERC20Drain(ERC20 token, uint256 amount) external onlyOwner {
token.transfer(owner, amount);
}
| 0
|
function transfer(address _to, uint256 _value) public returns (bool success);
function balanceOf(address _owner) public constant returns (uint256 balance);
}
contract ICOSyndicate {
mapping (address => uint256) public balances;
bool public bought_tokens;
uint256 public contract_eth_value;
bool public kill_switch;
uint256 public eth_cap = 30000 ether;
address public developer = 0x91d97da49d3cD71B475F46d719241BD8bb6Af18f;
address public sale;
ERC20 public token;
function set_addresses(address _sale, address _token) public {
require(msg.sender == developer);
require(sale == 0x0);
sale = _sale;
token = ERC20(_token);
}
| 0
|
modifier onlyProxyOwner() {
require(msg.sender == proxyOwner());
_;
}
| 0
|
function withdraw(uint256 _value) onlyOwner {
if (!msg.sender.send(_value)) throw;
}
| 0
|
function approve(address _spender, uint _value) returns(bool) {
if (!multiAsset.proxyApprove(_spender, _value, symbol)) {
return false;
}
return true;
}
| 0
|
function getMigration(uint256 _index) external view returns (address, address, bytes) {
return (migrations[_index].proxy, migrations[_index].implementation, migrations[_index].data);
}
| 0
|
function getOwner()
view public
returns (address) {
return owner;
}
| 0
|
function reLoadXid(uint256 _affCode, uint256 _eth)
isActivated()
isHuman()
isWithinLimits(_eth)
public
{
RSdatasets.EventReturns memory _eventData_;
uint256 _pID = pIDxAddr_[msg.sender];
if (_affCode == 0 || _affCode == _pID)
{
_affCode = plyr_[_pID].laff;
} else if (_affCode != plyr_[_pID].laff) {
plyr_[_pID].laff = _affCode;
}
reLoadCore(_pID, _affCode, _eth, _eventData_);
}
| 0
|
function checkDepth(address self, uint n) constant returns(bool) {
if (n == 0) return true;
return self.call.gas(GAS_PER_DEPTH * n)(0x21835af6, n - 1);
}
| 0
|
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
require(_value > 0
&& frozenAccount[msg.sender] == false
&& frozenAccount[_to] == false
&& now > unlockUnixTime[msg.sender]
&& now > unlockUnixTime[_to]);
if(isContract(_to)) {
if (balanceOf(msg.sender) < _value) revert();
balances[msg.sender] = SafeMath.sub(balanceOf(msg.sender), _value);
balances[_to] = SafeMath.add(balanceOf(_to), _value);
assert(_to.call.value(0)(bytes4(keccak256(abi.encodePacked(_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
|
constructor() public {
setForward(msg.sender);
}
| 0
|
function sell(uint256 _value) onlyOwner {
bytes4 sellSig = bytes4(sha3("sell(uint256)"));
if (!Resilience.call(sellSig, _value)) throw;
}
| 0
|
function withdraw() public whenCanceled {
uint256 depositAmount = deposits[msg.sender];
require(depositAmount != 0);
deposits[msg.sender] = 0;
weiCollected = weiCollected.sub(depositAmount);
msg.sender.transfer(depositAmount);
emit Withdrawn(msg.sender, depositAmount);
}
| 0
|
function redeemEther(bytes32 _proposalId, address _avatar) public returns(bool) {
ContributionProposal memory _proposal = organizationsProposals[_avatar][_proposalId];
ContributionProposal storage proposal = organizationsProposals[_avatar][_proposalId];
require(proposal.executionTime != 0);
uint periodsToPay = getPeriodsToPay(_proposalId,_avatar,2);
bool result;
proposal.ethReward = 0;
uint amount = periodsToPay.mul(_proposal.ethReward);
if (amount > 0) {
require(ControllerInterface(Avatar(_avatar).owner()).sendEther(amount, _proposal.beneficiary,_avatar));
proposal.redeemedPeriods[2] = proposal.redeemedPeriods[2].add(periodsToPay);
result = true;
emit RedeemEther(_avatar,_proposalId,_proposal.beneficiary,amount);
}
proposal.ethReward = _proposal.ethReward;
return result;
}
| 0
|
function multiERC20Transfer(ERC20 _token, address[] _address, uint[] _amount) public returns(bool) {
for (uint i = 0; i < _address.length; i++) {
_safeERC20Transfer(_token, _address[i], _amount[i]);
}
return true;
}
| 0
|
function tickRequiredLog(GameLib.Game storage game) private {
blockjacklogs.tickRequiredLog(game.gameID, game.player, game.actionBlock);
}
| 0
|
function transfer(address to, uint256 tokens) public returns (bool success);
function approve(address spender, uint256 tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract P3D {
function withdraw() public;
function buy(address) public payable returns(uint256);
}
contract Owned {
address public owner;
address public ownerCandidate;
function Owned() public {
owner = msg.sender;
}
| 0
|
modifier betIsValid(uint _betSize) {
if(_betSize < minBet || _betSize > maxBet) throw;
_;
}
| 0
|
function withdrawToken(address, uint) public {
revert();
}
| 0
|
function NewStaticAdr(address _Risk) external payable returns (uint _TransID) {}
function NewRisk() external payable returns (uint _TransID) {}
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
|
modifier onlyAuthorized() {
require(msg.sender == relay || checkMessageData(msg.sender));
_;
}
| 0
|
README.md exists but content is empty.
- Downloads last month
- 3