Sponsored:   LH-CRYPTO - 200 instruments (BTC, EUR, GOLD, OIL, SHARES). Leverage up to 1:500. OPEN ACCOUNT
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3569 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x48e0fac20dd658a240562c21c3d0db7ca7ced375at txn 0x9d3d54e2dc02812d9bb56ffee66244f277b1ba2a737f064bec1ce6822e8a2cfe
 Latest 25 transactions from a total of 3569 transactions

TxHash Age From To Value [TxFee]
0x3f9f42057a03218d6034492f41e02d614f83d9da82e91036ee9e2f957875270431 mins ago0x057dc43af6187a931e78a56b3293912a5b42e5ec  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0000838296
0x0c33966b70395897dde0962e4156e6b9ee282b4d4ea2cd301ad155e79a6e7fce1 hr 22 mins ago0x21eb2bd8a64391df5edbb8008b8381c0f2aefedd  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104787
0x5a7c5165aeb193fabe625d5183044bba29a1cdb3571f5bd0622244f155b4e0ce1 hr 38 mins ago0x8753a38ffdb40a6277718282294d4bc22dcb9605  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x23bea5dd09e557b4a3f091b26544148fdc22e2b7a7a3fd4615e1bffdce1cd1d71 hr 52 mins ago0xf92fa97f02adf2eac9fc0e700e0d4f3615e6998e  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0xae0c8c71fbe96cd85744b394268e64bd8b20612241f9683ee7ca3c828184b3d72 hrs 6 mins ago0xcaf8d88d9073946faf878654c2efac077af31ef3  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x97b06beaebcba52b6f48d112cae9fe103da22aeb83b80885d4d4624b1c4f70c12 hrs 23 mins ago0x5dbda97442b96d909cb2f9adf42f6e6f3ae8b536  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000139716
0x9c474582fbccb540b967b237886e5eb315a267ee33e1b004717ec3339cac25842 hrs 39 mins ago0xdf4c9d016938cfadbba307e20dbce574a21f298b  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000139716
0x1899499d509dc41b96009ef31b48e2d2b4a5ea68c4881b38e745b6ddfedf900d2 hrs 43 mins ago0x894d87bd31ea7eda3f49b85c7fd28bf3de44385b  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000388398
0x9b1880350a5792342fe67ed63009a8185efef7342da52df7838e307a38bff65f2 hrs 50 mins ago0x966ebdab98153be7c4a809367f3678948aea2ea3  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0003495582
0x1bd37ed524249628cf611364fc1f3162b0be67fa5bae3c1aac3e399dc431aed42 hrs 59 mins ago0x27e1dc8e3ffe72149eebc58b56c99d449e993932  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0xbd649e0bec9c7b7d0a9df419547fa3959618cc53eb9c3ac6b4df3c5de966759f3 hrs ago0x5ea5f27eef4dee2711147c7f828285d544ff34c9  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x46c4e345edf65ce23eeefbdabea46b460b18f036034f1c7d9e979ac1704a57b63 hrs 3 mins ago0x4baa0afd02ae0f0b9e3a96476f79375d7dea0ce6  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x2dd580a882900273392706d3937871aa2754f31a1fb257bf05cade80f29011f73 hrs 6 mins ago0x500552b714d82e42e82ee1469ecdf921f9f7196e  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.00016498175
0xde76d185b7c45c3b3ddd687be1c28acaeda23bae47ecb9703fadc202ffde60fc3 hrs 9 mins ago0x6b79effaecbe1670d403ad06bff538b7c9aecaf8  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x1281c45927372d0da78a68850bc24cf4481e91edfb735ddc6eb12cdda33d16c63 hrs 12 mins ago0xf68b963ebb50e08cc9e2fe3bb1de5eff87bc9600  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000194199
0x960e8e6f548aad4ea1b7d850b67b3a1c8533dde7f7b751a07b55d7a3c5ee51f53 hrs 16 mins ago0x48918af726e2db3a42a54a64ef10453f1066a46e  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x2bfe47fbae3a85b5bb8ee81473d124158d82ed4d5a31b12bcb4d0a2573ef12213 hrs 20 mins ago0x1589240c0138c47895fdd3b5b476826eb2802886  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x33072bd3e0fefc2b4db8ea25640c0533773cc944074166512478a40165e19dc73 hrs 23 mins ago0x78da93cdbfde4f9519997f8340e124e6b737d26e  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.0001222515
0x190e0970f1326e22daa3c000866191ebff5ee61875691477ca999e5ea8c3c8873 hrs 25 mins ago0x6465179b92929ea96d97db4cd4cf928948cf80e5  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000104787
0xc7613b63ab80b6a2e3d01a8c31b9d5a4bad7c08967547aa472aa01abf9307bea3 hrs 26 mins ago0x1c1d493b58b8c6fd8b28ca126ad7fcac8600dc47  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000258932
0x0287b4898d23da61babe21a70205b50a8ed7ff80b38f3a76d961ec3d718d5d9e3 hrs 30 mins ago0xed3856976b06a1fa544cc71a806de0bca3710bcd  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000194199
0xacb7c559b4a65a6ec081b063cccc3c3a8212a8e2602a3daaa1afabe348acb1c13 hrs 34 mins ago0xce19eb55125c80c7089f11d249c4cb7658ed20da  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000194199
0x2dde27c328e44fa0fcb8a7fd1d06ecfebf9cd7a75d3435aac7d5b4640cbe01ea3 hrs 37 mins ago0x34348d44d5670b98763e239612300b5507b69fa0  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000194199
0x61df4779327958117c23827dfda0dfa5871c30279e1cf1af1bfc0495860a09223 hrs 39 mins ago0xf1d84bad8b1d4380e853760aadc0ea1d07cd1b0d  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000323665
0x050fd890e53c8c62f5c971e6e1fd86d16a451e1e68b6bcfa4f6a6dad2e86598c3 hrs 43 mins ago0x553b11e7be829fe26c94779c315f04b1ba94906f  IN   0xd31a5afcf4f2168d0e3a47685c85b2166edf69d90 Ether0.000174645
[ 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.