Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 8977 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x48e0fac20dd658a240562c21c3d0db7ca7ced375at txn 0x9d3d54e2dc02812d9bb56ffee66244f277b1ba2a737f064bec1ce6822e8a2cfe
 Latest 25 transactions from a total of 8977 transactions
(+3 PendingTxns)

TxHash Age From To Value [TxFee]
0xb665a471f5945896fa26bc2461f455b83b25dd8757c1bb92fde6033d378f22c5(pending)0x15cabad1f726aa1a7d0c49e7fa3ce0d8db9bcd65  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x28926a0562a018fea06f4a734fb9142437af639c8cef59b59c8586eb55aadfa2(pending)0x18eb8220198b1c7bb127af9598aec272c28ed3b7  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0xd78f0f3fc5b6bfa5c29716300d38760e8177dc31fb294acf7499da2b0ff8f610(pending)0xb9dfd8ce83b4f4bdfc2f3a35ccfa1d2cd9b1206e  IN  0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether(Pending)
0x2e52ec8da863b5792a26b9108491e1cbcac70f484d617a0dba98a05b9952707b2 mins ago0x8aca6db035e1f21c3639b2b72a5fcbc6600ea5af  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000277864
0xed36519b7d1be3cebfda1899aae09d64a75ee7cb8220777dbc7b1cb65c1f39cf49 mins ago0x9ddbe1f25a0ce69c073e8fb9c9e56c8483d99a90  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
0xc3e760dbeadf4b54eaf8c652f6baace058a0e332ef6bf1b01e9bacf791f3e31053 mins ago0x672a9beec51db4e06b3f99ae68ce6efb80706483  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0003213468
0x87536aa90baac85ab80f1ac36018b26b43edf2676f5afa8667c6adf98cf317b31 hr 13 mins ago0xd8705421bfc361a0ccc2c534e81320c1b3f2db3e  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
0xf392b42e5ee2606932baa7498242a0c76bb80130f8f27b18c3af156883a0280d1 hr 49 mins ago0x91ea02976870d5a037a78c5ba3b8bc4f3d9e4da0  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
0xcb027c77923344386ed61ef4888945f072f9b5524c6a8dde8d8dbf13e871459b2 hrs 35 mins ago0x4edeb56e0a46258d01b41225f82a5b90dd7904dd  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
0x6273cc6316675a722e1743df7ee54b9e6a965dc8755c2901937d36475f397f083 hrs 18 mins ago0xdaede838f6f58ffd70ff24c3358e654c1ee57d82  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.00034929
0x19da16ab5e51e04b80c0cb6021072f45b76533236388088ce3d8e50f2993cbae3 hrs 19 mins ago0xf31a0ea339a2c993bb4dbe8a88a34a51f46cb628  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000244503
0x17149ec64835abef3781c5953a9db3c29805a418b33255ef1c3dfcaffbfd39bb3 hrs 30 mins ago0x51bd4c735927f958a90db80398826ff47a9832f1  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104787
0x115ad80e04163ebb6f61c2caccfc32d7cd65d8190068e6c58219a2c8684925d83 hrs 37 mins ago0x185ae85fd1875998ab7d6a81e1fa3a9049674afa  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000069858
0x2eb13f2d39b41b91534c766da251dc6d7e07ef00d86237d316316b4ac29753353 hrs 42 mins ago0xbfb22714b08fd9d689a455ca91590073b31704fd  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104787
0xee4f7186a42b7b5e1e752a3e35bfc5c274a28b364b9bb01dc38abd31ff290ac24 hrs 1 min ago0x1fb9d2b703fa1c3761354129f7630984bcb76eeb  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000482020217
0xb2b0c810dd8a0b6a1a8dc14ec6186517f7f4b73cee6cc8accbaf4fd7075987df4 hrs 29 mins ago0x3160b46499bb9deabc18f867da8d054ae563f313  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000069858
0x1efb361fff0364b8b7e8225f7d613fea2226c278962368139f67eb4a676e7dfa5 hrs 37 mins ago0xed59480b86c8866a4d5fd9d5e983279c5291ee3d  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000401683508
0x29d866c1030548ebc28ef4c7ae326ce209ce363106857bb73684a1c9830baa9c6 hrs 24 mins ago0x8a0a46fed406dcd104f7efc9a4a9124127435a40  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104199
0x11980aa1051e446aed65e217be1a2be44bb9f4f695229c763d3d9e6c720047af7 hrs 1 min ago0xaf898fc38e04824985bdd9b461b71cc4e0363646  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000069466
0x2dfe4e1f281eaf57d20f3c5ff0fa1a5377b00a268d4c76a04fd054d056b45fa07 hrs 23 mins ago0x2bb3517db5864074db56d0fee1b63cc116167d66  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000069858
0x8dfb9fa224b5cc857066b586c195a270a3737426c44e6fc0b1a9cb43f2b0b9af7 hrs 37 mins ago0x4a4c35280bc7e7f426453db48e5faf66f47398b6  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104787
0x2e9803ed2b6fcb42b8714d7334b8256c323bada2796d519b7c77534dc80654aa8 hrs 6 mins ago0xf862c9413f2cc21ebfda534ecfa6df4f59f0b197  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000069858
0x5ce5252dd5dc2ffabb42dac531404de0765f2aeb2a5d23ab78b1a26cb6464d0b8 hrs 39 mins ago0xbb621b974969d4c1d825e746e4db0ba70bae9063  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0000555728
0xb03a35ec81b359d838293508373c51e50e5e2542789cfafa1353e36da9f1511e8 hrs 52 mins ago0xcfee73e9c1082ba7f6c00238de7dde1cce61b109  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104787
0x4688b757153a27f06e7ccbc34c1355408a4d534240ca15f1dcf0313d2fd4e9a89 hrs 19 mins ago0xe0b563867d4160341108ff17890ff49c6dbc4b1f  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0000628722
[ 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 GasUsed 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.