Sponsored:   Ubex.com - World roadshow: Seoul Sep 17-19, Singapore Sep 19-20, Dubai 18-23. Meet us!.
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 1565 txns
 Latest 25 txns From a total of 1565 Transactions
(+8 PendingTxns)

TxHash Age From To Value [TxFee]
0x5a44b0b4664ec458ac6d52d14cf048df0908c966a27eab8ad73936d5d51c5674(pending)0x8ddea076dba6040ec74186b5b5a5cfa25e0a92b1  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x81066f774d422c295b09131c1272573ab5bbaa97b0b1aebaadd53c4f75f9e64a(pending)0x02e4f0ed407e86d7fb8b2e3f1a295b68f29b19e5  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x52cfe3b5871cc4603c8531355a52edbd9950a46506dc8c71d408a44b1a9a780c(pending)0xd6049b48173636ba928eb8ffb31a23674383903a  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x0b833acc38ff84f548698790412e5c1d9da22d13e80272b22627a9f155f817d0(pending)0x1ede8888279064d405d8ef4dc964c1e332c3f8de  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x0ebafc76a77dcbec50bfb7de4a597ca1d177aa4f4c3501848671a58a8073a6d4(pending)0xac563ad14ae2e95405d22d084fcd65b22e41b7db  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x91076ad340736877b99aaf351a443310f988f5cb001c2909a2bce26d185b9ae3(pending)0x209c0cede12277a4af883cbaf7fc18b4c2659296  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0xbe553c53d6b6533ffc36fb4014591da1068fb46b5474fc80aac21dcffaca91f4(pending)0x4be640dcce08e68ede454202fbc59cf5f9e8ea1f  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x63a6a937f3ab10cc3950f51cd8ca2a058f6696d065d212df62b014e4907ade0f(pending)0x4986054c9e61c3aa21e714e5d33df04d97c899d4  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x00c95e4dbd546519a4677cc32926ac9b380b6edafe16dde1e56b99bf585eb9c39 mins ago0x4a4c35280bc7e7f426453db48e5faf66f47398b6  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000244503
0x06c36c7b6442ed636abd18ea73db08370c7528d0abbe19bc7e3f6d75d92e231f39 mins ago0x5774fab7ed7ee05cd7c4113d40c0f8c525d140e7  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
0xa9d2bfc7e32a0c95fa5ab963a634bdea97755658233d0e0dd06c4c282469b9471 hr 21 mins ago0xa7b33cd26f27f1c6b709db5cae442e42387ba69a  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0001091
0x7b71749530c6f4440662d5c34ef8933959b7a4fabd2f3f22c92b42aceec6c0b81 hr 21 mins ago0xa7b33cd26f27f1c6b709db5cae442e42387ba69a  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000173665
0x9eefa428cf061605a9d38ce84d2ef793dba6e9ac54c5f896cd84ebb770783b663 hrs 31 mins ago0x406f4533b2f6209812d7ef9c7d69b8c54217c208  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000279432
0x229d4b76e6cb59bc7c6aefc0145dea3e0b38e450150435158f53614d3bf72b404 hrs 57 mins ago0xb9cc1875eec851548cb7eca33ecc643fce9d44e3  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000186695505
0x91da57f47f7334c7c017170c8dd9cdbaee9646bad0b97bd0bad23bd4d52967a65 hrs 11 mins ago0x557d9c665c4dc7be280791869b68b15b41f72825  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0004207645
0x2cd22d1cc7417c9ee57227f065e17f79c5173defcaad63281ad3a4a74013b2029 hrs 27 mins ago0x4d3e703764c629382f5f96f6866d964efc0a8845  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0001886166
0x7febe0c5b16ad410121b73befef622428e8983b36cda8f05086716b6efbec3c810 hrs 50 mins ago0xa6ca8c1c0f03b419b01d82008bcb738b51d7b918  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0xecfd21f1efe08cdba5ab77dd60346be58eda39d0897ae37ea6f915e7eb76c67c12 hrs 37 mins ago0xc69325fe2449fbdc064018b0c0ca246e7067db54  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000244503
0xf5ad944087f5746abd0ed0d410d387bbd735480796a1e1996efe3db7e465f84313 hrs 44 mins ago0x7b5263f47c96dfbb03a71443d29a2af18a130906  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000208398
0x82276648a63762358767774e0ffd8dcd6836c2146de543aa5ce03c7a99d5eb4f13 hrs 52 mins ago0xbb621b974969d4c1d825e746e4db0ba70bae9063  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
0xfd74a8da048d9c1c87d30948906536dcad1837cd1802883af229f76b37da4cfd15 hrs 2 mins ago0xa9ffaaadd88a819bd76a4d679e833bbd32755ade  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000209574
0xb827aca49b8202a8c08469af92a3b430626c6735da8ec54591e17f8416f6320615 hrs 52 mins ago0x8316dad87322d2fbae454dc9107a95abcb9e25b7  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0001840849
0x8e686402ae538c5cda7246f82eb942f6f50d8de278f986a359eba1d5006f8e4a19 hrs 5 mins ago0xde67adf51408acca6bee2abe20dbfff2dddfed33  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000244503
0xefd1091fecfb564bf45baef229d15f1a2334bb7d6c8a3265cb516d3e85fa1de620 hrs 18 mins ago0x0a3239799518e7f7f339867a4739282014b97dcf  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0002479959
0xf780fee22431edc9e3edad673d3f9a77177857f9e2e81d7b0cc7039ebf34dccd23 hrs 47 mins ago0x263b604509d6a825719859ee458b2d91fb7d330d  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000279432
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: DailyRewards
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

// written by garry from Team Chibi Fighters
// find us at https://chibifighters.io
// [email protected]
// version 1.0.0


contract Owned {
    address public owner;
    address public newOwner;

    event OwnershipTransferred(address indexed _from, address indexed _to);

    constructor() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    function transferOwnership(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }
    
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
}


interface ERC20Interface {
    function transferFrom(address from, address to, uint tokens) external returns (bool success);
    function transfer(address to, uint tokens) external;
    function balanceOf(address _owner) external view returns (uint256 _balance);
}

interface ERC20InterfaceClassic {
    function transfer(address to, uint tokens) external returns (bool success);
}

contract DailyRewards is Owned {

	event RewardClaimed(
		address indexed buyer,
		uint256 day
	);
	
	// what day the player is on in his reward chain
	mapping (address => uint) private daysInRow;

	// timeout after which row is broken
	mapping (address => uint) private timeout;
	
	// how often the reward can be claimed, e.g. every 24h
	uint waitingTime = 24 hours;
	// window of claiming, if it expires day streak resets to day 1
	uint waitingTimeBuffer = 48 hours;
	
	
	constructor() public {
	    // Explore Chibis and their universe
	    // Off chain battles, real Ether fights, true on chain ownership
	    // Leaderboards, tournaments, roleplay elements, we got it all
	}
	
	
	function requestReward() public returns (uint _days) {
	    require (msg.sender != address(0));
	    require (now > timeout[msg.sender]);
	    
	    // waited too long, reset
	    if (now > timeout[msg.sender] + waitingTimeBuffer) {
	        daysInRow[msg.sender] = 1;    
	    } else {
	        // no limit to being logged in, looking forward to the longest streak
	        daysInRow[msg.sender]++;
	    }
	    
	    timeout[msg.sender] = now + waitingTime;
	    
	    emit RewardClaimed(msg.sender, daysInRow[msg.sender]);
	    
	    return daysInRow[msg.sender];
	}
	
	
	/**
	 * @dev Query stats of next reward, checks for expired time, too
	 **/
	function nextReward() public view returns (uint _day, uint _nextClaimTime, uint _nextClaimExpire) {
	    uint _dayCheck;
	    if (now > timeout[msg.sender] + waitingTimeBuffer) _dayCheck = 1; else _dayCheck = daysInRow[msg.sender] + 1;
	    
	    return (_dayCheck, timeout[msg.sender], timeout[msg.sender] + waitingTimeBuffer);
	}
	
	
	function queryWaitingTime() public view returns (uint _waitingTime) {
	    return waitingTime;
	}
	
	function queryWaitingTimeBuffer() public view returns (uint _waitingTimeBuffer) {
	    return waitingTimeBuffer;
	}
	

	/**
	 * @dev Sets the interval for daily rewards, e.g. 24h = 86400
	 * @param newTime New interval time in seconds
	 **/
	function setWaitingTime(uint newTime) public onlyOwner returns (uint _newWaitingTime) {
	    waitingTime = newTime;
	    return waitingTime;
	}
	
	
	/**
	 * @dev Sets buffer for daily rewards. So user have time to claim it. e.g. 1h = 3600
	 * @param newTime New buffer in seconds
	 **/
	function setWaitingTimeBuffer(uint newTime) public onlyOwner returns (uint _newWaitingTimeBuffer) {
	    waitingTimeBuffer = newTime;
	    return waitingTimeBuffer;
	}


    /**
    * @dev Send Ether to owner
    * @param _address Receiving address
    * @param _amountWei Amount in WEI to send
    **/
    function weiToOwner(address _address, uint _amountWei) public onlyOwner returns (bool) {
        require(_amountWei <= address(this).balance);
        _address.transfer(_amountWei);
        return true;
    }

    function ERC20ToOwner(address _to, uint256 _amount, ERC20Interface _tokenContract) public onlyOwner {
        _tokenContract.transfer(_to, _amount);
    }

    function ERC20ClassicToOwner(address _to, uint256 _amount, ERC20InterfaceClassic _tokenContract) public onlyOwner {
        _tokenContract.transfer(_to, _amount);
    }

}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_amountWei","type":"uint256"}],"name":"weiToOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_tokenContract","type":"address"}],"name":"ERC20ClassicToOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"requestReward","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nextReward","outputs":[{"name":"_day","type":"uint256"},{"name":"_nextClaimTime","type":"uint256"},{"name":"_nextClaimExpire","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_tokenContract","type":"address"}],"name":"ERC20ToOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newTime","type":"uint256"}],"name":"setWaitingTimeBuffer","outputs":[{"name":"_newWaitingTimeBuffer","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newTime","type":"uint256"}],"name":"setWaitingTime","outputs":[{"name":"_newWaitingTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"queryWaitingTimeBuffer","outputs":[{"name":"_waitingTimeBuffer","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"queryWaitingTime","outputs":[{"name":"_waitingTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"day","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6080604052620151806004556202a30060055534801561001e57600080fd5b5060008054600160a060020a031916331790556106bf806100406000396000f3006080604052600436106100ab5763ffffffff60e060020a6000350416630db5db2681146100b057806328f14573146100e85780634cecac6d146101155780636da4fe261461013c57806379ba50971461016f5780638da5cb5b14610184578063d4ee1d90146101b5578063dea21027146101ca578063e90389bd146101f5578063ebc73e651461020d578063f2fde38b14610225578063f5cb0daa14610246578063f94e08d01461025b575b600080fd5b3480156100bc57600080fd5b506100d4600160a060020a0360043516602435610270565b604080519115158252519081900360200190f35b3480156100f457600080fd5b50610113600160a060020a0360043581169060243590604435166102d6565b005b34801561012157600080fd5b5061012a610381565b60408051918252519081900360200190f35b34801561014857600080fd5b50610151610461565b60408051938452602084019290925282820152519081900360600190f35b34801561017b57600080fd5b506101136104c2565b34801561019057600080fd5b5061019961054a565b60408051600160a060020a039092168252519081900360200190f35b3480156101c157600080fd5b50610199610559565b3480156101d657600080fd5b50610113600160a060020a036004358116906024359060443516610568565b34801561020157600080fd5b5061012a6004356105ff565b34801561021957600080fd5b5061012a600435610620565b34801561023157600080fd5b50610113600160a060020a0360043516610641565b34801561025257600080fd5b5061012a610687565b34801561026757600080fd5b5061012a61068d565b60008054600160a060020a0316331461028857600080fd5b303182111561029657600080fd5b604051600160a060020a0384169083156108fc029084906000818181858888f193505050501580156102cc573d6000803e3d6000fd5b5060019392505050565b600054600160a060020a031633146102ed57600080fd5b80600160a060020a031663a9059cbb84846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561035057600080fd5b505af1158015610364573d6000803e3d6000fd5b505050506040513d602081101561037a57600080fd5b5050505050565b600033151561038f57600080fd5b3360009081526003602052604090205442116103aa57600080fd5b60055433600090815260036020526040902054014211156103dd57336000908152600260205260409020600190556103f4565b336000908152600260205260409020805460010190555b600454336000818152600360209081526040808320429095019094556002815290839020548351908152925191927f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f7241929081900390910190a2503360009081526002602052604090205490565b6005543360009081526003602052604081205490918291829182910142111561048c575060016104a1565b50336000908152600260205260409020546001015b33600090815260036020526040902054600554919450925082019050909192565b600154600160a060020a031633146104d957600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a0316331461057f57600080fd5b80600160a060020a031663a9059cbb84846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b1580156105e257600080fd5b505af11580156105f6573d6000803e3d6000fd5b50505050505050565b60008054600160a060020a0316331461061757600080fd5b50600581905590565b60008054600160a060020a0316331461063857600080fd5b50600481905590565b600054600160a060020a0316331461065857600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055490565b600454905600a165627a7a7230582081abc0a122904f0a1cf24731ea26253414f4973919cab68e653d706d63a96ce30029

   Swarm Source:
bzzr://81abc0a122904f0a1cf24731ea26253414f4973919cab68e653d706d63a96ce3

 

View All
Block Age transaction Difficulty Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.