ETH Price: $3,152.55 (+1.07%)
Gas: 2 Gwei

Contract

0x145F32aE92B04E09B483A17D3298335096fFF97F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Rand Modulus115246362020-12-25 19:12:031295 days ago1608923523IN
0x145F32aE...096fFF97F
0.015 ETH0.0016945829
Rand Modulus114788962020-12-18 18:56:231302 days ago1608317783IN
0x145F32aE...096fFF97F
0.015 ETH0.0088085764
Rand Modulus113127292020-11-23 5:55:101328 days ago1606110910IN
0x145F32aE...096fFF97F
0.015 ETH0.0079812658
Rand Modulus112872072020-11-19 8:04:441332 days ago1605773084IN
0x145F32aE...096fFF97F
0.015 ETH0.0024437439
Rand Modulus112328162020-11-10 23:41:351340 days ago1605051695IN
0x145F32aE...096fFF97F
0.015 ETH0.0022022430
Rand Modulus112228572020-11-09 10:51:131342 days ago1604919073IN
0x145F32aE...096fFF97F
0.015 ETH0.0070219851
Rand Modulus112162472020-11-08 10:39:291343 days ago1604831969IN
0x145F32aE...096fFF97F
0.015 ETH0.0035802526
Rand Modulus112086152020-11-07 6:15:391344 days ago1604729739IN
0x145F32aE...096fFF97F
0.015 ETH0.0016262430
Rand Modulus111996762020-11-05 21:26:331345 days ago1604611593IN
0x145F32aE...096fFF97F
0.015 ETH0.001518626
Rand Modulus111932182020-11-04 21:42:491346 days ago1604526169IN
0x145F32aE...096fFF97F
0.015 ETH0.0009345216
Rand Modulus111921702020-11-04 17:54:481346 days ago1604512488IN
0x145F32aE...096fFF97F
0.015 ETH0.0040367855
Rand Modulus111914762020-11-04 15:29:461346 days ago1604503786IN
0x145F32aE...096fFF97F
0.015 ETH0.0031582454
Rand Modulus111873032020-11-03 23:56:291347 days ago1604447789IN
0x145F32aE...096fFF97F
0.015 ETH0.0013556623.2
Rand Modulus111854362020-11-03 17:13:441347 days ago1604423624IN
0x145F32aE...096fFF97F
0.015 ETH0.0045534784
Rand Modulus111853522020-11-03 16:53:101347 days ago1604422390IN
0x145F32aE...096fFF97F
0.015 ETH0.0016671568
Rand Modulus111853522020-11-03 16:53:101347 days ago1604422390IN
0x145F32aE...096fFF97F
0.015 ETH0.0009071237
Rand Modulus111853522020-11-03 16:53:101347 days ago1604422390IN
0x145F32aE...096fFF97F
0.015 ETH0.0009071237
Rand Modulus111853522020-11-03 16:53:101347 days ago1604422390IN
0x145F32aE...096fFF97F
0.015 ETH0.0056429941
Rand Modulus111827992020-11-03 7:17:501348 days ago1604387870IN
0x145F32aE...096fFF97F
0.015 ETH0.0022767342
Rand Modulus111823092020-11-03 5:31:161348 days ago1604381476IN
0x145F32aE...096fFF97F
0.015 ETH0.0042606858
Rand Modulus111818512020-11-03 3:45:381348 days ago1604375138IN
0x145F32aE...096fFF97F
0.03 ETH0.0018821656
Rand Modulus111802422020-11-02 21:58:541348 days ago1604354334IN
0x145F32aE...096fFF97F
0.015 ETH0.0028823646
Rand Modulus111795872020-11-02 19:27:491348 days ago1604345269IN
0x145F32aE...096fFF97F
0.015 ETH0.006879850
Rand Modulus111761862020-11-02 7:01:501349 days ago1604300510IN
0x145F32aE...096fFF97F
0.015 ETH0.0028060848
Rand Modulus111760762020-11-02 6:41:301349 days ago1604299290IN
0x145F32aE...096fFF97F
0.015 ETH0.0021026836
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
115246362020-12-25 19:12:031295 days ago1608923523
0x145F32aE...096fFF97F
0.015 ETH
114788962020-12-18 18:56:231302 days ago1608317783
0x145F32aE...096fFF97F
0.015 ETH
113127292020-11-23 5:55:101328 days ago1606110910
0x145F32aE...096fFF97F
0.015 ETH
112872072020-11-19 8:04:441332 days ago1605773084
0x145F32aE...096fFF97F
0.015 ETH
112328162020-11-10 23:41:351340 days ago1605051695
0x145F32aE...096fFF97F
0.015 ETH
112228572020-11-09 10:51:131342 days ago1604919073
0x145F32aE...096fFF97F
0.015 ETH
112162472020-11-08 10:39:291343 days ago1604831969
0x145F32aE...096fFF97F
0.015 ETH
112086152020-11-07 6:15:391344 days ago1604729739
0x145F32aE...096fFF97F
0.015 ETH
111996762020-11-05 21:26:331345 days ago1604611593
0x145F32aE...096fFF97F
0.015 ETH
111932182020-11-04 21:42:491346 days ago1604526169
0x145F32aE...096fFF97F
0.015 ETH
111921702020-11-04 17:54:481346 days ago1604512488
0x145F32aE...096fFF97F
0.015 ETH
111914762020-11-04 15:29:461346 days ago1604503786
0x145F32aE...096fFF97F
0.015 ETH
111873032020-11-03 23:56:291347 days ago1604447789
0x145F32aE...096fFF97F
0.015 ETH
111854362020-11-03 17:13:441347 days ago1604423624
0x145F32aE...096fFF97F
0.015 ETH
111853522020-11-03 16:53:101347 days ago1604422390
0x145F32aE...096fFF97F
0.015 ETH
111827992020-11-03 7:17:501348 days ago1604387870
0x145F32aE...096fFF97F
0.015 ETH
111823092020-11-03 5:31:161348 days ago1604381476
0x145F32aE...096fFF97F
0.015 ETH
111802422020-11-02 21:58:541348 days ago1604354334
0x145F32aE...096fFF97F
0.015 ETH
111795872020-11-02 19:27:491348 days ago1604345269
0x145F32aE...096fFF97F
0.015 ETH
111761862020-11-02 7:01:501349 days ago1604300510
0x145F32aE...096fFF97F
0.015 ETH
111760762020-11-02 6:41:301349 days ago1604299290
0x145F32aE...096fFF97F
0.015 ETH
111759762020-11-02 6:19:451349 days ago1604297985
0x145F32aE...096fFF97F
0.015 ETH
111750222020-11-02 2:44:171349 days ago1604285057
0x145F32aE...096fFF97F
0.015 ETH
111748222020-11-02 1:57:181349 days ago1604282238
0x145F32aE...096fFF97F
0.06 ETH
111748032020-11-02 1:54:011349 days ago1604282041
0x145F32aE...096fFF97F
0.03 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DONDIRoulette

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-10-21
*/

pragma solidity ^0.5.17;

// File: @openzeppelin/contracts/math/SafeMath.sol

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}


// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);
    function mint(address account, uint amount) external;
    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/utils/Address.sol

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing a contract.
     *
     * IMPORTANT: It is unsafe to assume that an address for which this
     * function returns false is an externally-owned account (EOA) and not a
     * contract.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != 0x0 && codehash != accountHash);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}


// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

interface DONDIAirdrop {
    function airdrop(uint256 value) external;
    function airdropAll() external;
    function getRemainAirdrop(address pool) external view returns (uint256);
}

interface DONDISlotHarvester {
    function setFortune(address user, uint256 amount) external;
}

contract DONDIRoulette {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    DONDISlotHarvester harvester = DONDISlotHarvester(0x7BF87882611c9A0FE92FdAAfFC9Ed0d241305EEe);
    
    struct MyAction {
        uint256 rand;
        uint256 lastTimestamp;	
    }
    
    mapping(address => uint8) public spinCount;
    mapping(address => MyAction) public result;
    mapping(address => uint256) lastDay;
    constructor() public {
    }

    function randModulus(uint256 randString) external payable {

        uint256 day = now / 86400;
        address payable fundaddress = address(0x1912780CA1056fB9B5f3B4C241881f69Ed225861);
        uint256 rand = uint256(keccak256(abi.encodePacked(
            randString,
            now,
            block.difficulty,
            msg.sender)
        )) % 1000;
        
        if (lastDay[msg.sender] != day) {
            lastDay[msg.sender] = day;
            
            spinCount[msg.sender] = 0;
            uint256 spinCost = uint256(15) * 10 ** 18 / 1000;
            require(msg.value == spinCost, "Wrong cost");
            result[msg.sender].lastTimestamp = now;
            uint256 airdropAmount;
            if (rand < 20) {
                // free spin
                if (!msg.sender.send(spinCost)) {
                    msg.sender.transfer(spinCost);
                }
                airdropAmount = 0;
            } else {
                if (!fundaddress.send(spinCost)) {
                    fundaddress.transfer(address(this).balance);
                }
                if (rand < 50) {
                    // no dondi
                    airdropAmount = 1;
                    spinCount[msg.sender] = 1;
                } else if (rand < 550) {
                    // 5 dondi
                    airdropAmount = 5;
                    spinCount[msg.sender] = 1;
                } else if (rand < 800) {
                    // 10 dondi
                    airdropAmount = 10;
                    spinCount[msg.sender] = 1;
                } else if (rand < 950) {
                    // 15 dondi
                    airdropAmount = 15;
                    spinCount[msg.sender] = 1;
                } else if (rand < 980) {
                    // 25 dondi
                    airdropAmount = 25;
                    spinCount[msg.sender] = 1;
                } else if (rand < 998) {
                    // 100 dondi
                    airdropAmount = 100;
                    spinCount[msg.sender] = 1;
                } else {
                    // 1000 dondi
                    airdropAmount = 1000;
                    spinCount[msg.sender] = 1;
                }
            }
            result[msg.sender].rand = airdropAmount;
            if (airdropAmount == 1) {
                airdropAmount = 0;
            }
            if (airdropAmount > 0) {
                harvester.setFortune(msg.sender, airdropAmount);
            }
        } else {
            require(spinCount[msg.sender] < 5, "you already use all spin count for today");
            
            uint256 spinCost = uint256(15) * uint256(2) ** spinCount[msg.sender] * 10 ** 18 / 1000;
            require(msg.value == spinCost, "Wrong cost");

            result[msg.sender].lastTimestamp = now;
            uint256 airdropAmount;
            if (rand < 20) {
                // free spin
                if (!msg.sender.send(spinCost)) {
                    msg.sender.transfer(spinCost);
                }
                airdropAmount = 0;
            } else {
                if (!fundaddress.send(spinCost)) {
                    fundaddress.transfer(address(this).balance);
                }
                if (rand < 50) {
                    // no dondi
                    airdropAmount = 1;
                    spinCount[msg.sender]++;
                } else if (rand < 550) {
                    // 5 dondi
                    airdropAmount = 5;
                    spinCount[msg.sender]++;
                } else if (rand < 800) {
                    // 10 dondi
                    airdropAmount = 10;
                    spinCount[msg.sender]++;
                } else if (rand < 950) {
                    // 15 dondi
                    airdropAmount = 15;
                    spinCount[msg.sender]++;
                } else if (rand < 980) {
                    // 25 dondi
                    airdropAmount = 25;
                    spinCount[msg.sender]++;
                } else if (rand < 998) {
                    // 100 dondi
                    airdropAmount = 100;
                    spinCount[msg.sender]++;
                } else {
                    // 1000 dondi
                    airdropAmount = 1000;
                    spinCount[msg.sender]++;
                }
            }
            result[msg.sender].rand = airdropAmount;
            if (airdropAmount == 1) {
                airdropAmount = 0;
            }
            if (airdropAmount > 0) {
                harvester.setFortune(msg.sender, airdropAmount);
            }
        }
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[{"internalType":"uint256","name":"randString","type":"uint256"}],"name":"randModulus","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"result","outputs":[{"internalType":"uint256","name":"rand","type":"uint256"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"spinCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"}]

6080604052600080546001600160a01b031916737bf87882611c9a0fe92fdaaffc9ed0d241305eee17905534801561003657600080fd5b506108ad806100466000396000f3fe6080604052600436106100345760003560e01c806353442901146100395780635d9c9d0f1461005857806377302b0b146100a1575b600080fd5b6100566004803603602081101561004f57600080fd5b50356100ed565b005b34801561006457600080fd5b5061008b6004803603602081101561007b57600080fd5b50356001600160a01b0316610822565b6040805160ff9092168252519081900360200190f35b3480156100ad57600080fd5b506100d4600480360360208110156100c457600080fd5b50356001600160a01b0316610837565b6040805192835260208301919091528051918290030190f35b6000620151804260408051602080820187905242828401524460608084019190915233901b608083015282516074818403018152609490920190925280519101209190049150731912780ca1056fb9b5f3b4c241881f69ed225861906000906103e89033600090815260036020526040902054919006915083146104795733600090815260036020908152604080832086905560019091529020805460ff1916905566354a6ba7a180003481146101d8576040805162461bcd60e51b815260206004820152600a60248201526915dc9bdb99c818dbdcdd60b21b604482015290519081900360640190fd5b33600090815260026020526040812042600190910155601483101561024e57604051339083156108fc029084906000818181858888f1935050505061024657604051339083156108fc029084906000818181858888f19350505050158015610244573d6000803e3d6000fd5b505b5060006103e6565b6040516001600160a01b0385169083156108fc029084906000818181858888f193505050506102ae576040516001600160a01b038516904780156108fc02916000818181858888f193505050501580156102ac573d6000803e3d6000fd5b505b60328310156102d95750336000908152600160208190526040909120805460ff1916821790556103e6565b6102268310156103085750336000908152600160208190526040909120805460ff1916909117905560056103e6565b6103208310156103375750336000908152600160208190526040909120805460ff19169091179055600a6103e6565b6103b68310156103665750336000908152600160208190526040909120805460ff19169091179055600f6103e6565b6103d48310156103955750336000908152600160208190526040909120805460ff1916909117905560196103e6565b6103e68310156103c45750336000908152600160208190526040909120805460ff1916909117905560646103e6565b50336000908152600160208190526040909120805460ff191690911790556103e85b3360009081526002602052604090208190556001811415610405575060005b80156104725760008054604080516345387e5160e11b81523360048201526024810185905290516001600160a01b0390921692638a70fca29260448084019382900301818387803b15801561045957600080fd5b505af115801561046d573d6000803e3d6000fd5b505050505b505061081c565b33600090815260016020526040902054600560ff909116106104cc5760405162461bcd60e51b81526004018080602001828103825260288152602001806108516028913960400191505060405180910390fd5b336000908152600160205260408120546103e89060ff1660020a67d02ab486cedc000002049050803414610534576040805162461bcd60e51b815260206004820152600a60248201526915dc9bdb99c818dbdcdd60b21b604482015290519081900360640190fd5b3360009081526002602052604081204260019091015560148310156105aa57604051339083156108fc029084906000818181858888f193505050506105a257604051339083156108fc029084906000818181858888f193505050501580156105a0573d6000803e3d6000fd5b505b50600061078d565b6040516001600160a01b0385169083156108fc029084906000818181858888f1935050505061060a576040516001600160a01b038516904780156108fc02916000818181858888f19350505050158015610608573d6000803e3d6000fd5b505b603283101561063e5750336000908152600160208190526040909120805460ff80821684011660ff1990911617905561078d565b6102268310156106785750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055600561078d565b6103208310156106b25750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055600a61078d565b6103b68310156106ec5750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055600f61078d565b6103d48310156107265750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055601961078d565b6103e68310156107605750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055606461078d565b50336000908152600160208190526040909120805460ff19811660ff918216909301169190911790556103e85b33600090815260026020526040902081905560018114156107ac575060005b80156108195760008054604080516345387e5160e11b81523360048201526024810185905290516001600160a01b0390921692638a70fca29260448084019382900301818387803b15801561080057600080fd5b505af1158015610814573d6000803e3d6000fd5b505050505b50505b50505050565b60016020526000908152604090205460ff1681565b600260205260009081526040902080546001909101548256fe796f7520616c72656164792075736520616c6c207370696e20636f756e7420666f7220746f646179a265627a7a72315820369e0aa02a61c80c53ec5373e9588c21e2107e754e1e64e04f9e740ceac4fbda64736f6c63430005110032

Deployed Bytecode

0x6080604052600436106100345760003560e01c806353442901146100395780635d9c9d0f1461005857806377302b0b146100a1575b600080fd5b6100566004803603602081101561004f57600080fd5b50356100ed565b005b34801561006457600080fd5b5061008b6004803603602081101561007b57600080fd5b50356001600160a01b0316610822565b6040805160ff9092168252519081900360200190f35b3480156100ad57600080fd5b506100d4600480360360208110156100c457600080fd5b50356001600160a01b0316610837565b6040805192835260208301919091528051918290030190f35b6000620151804260408051602080820187905242828401524460608084019190915233901b608083015282516074818403018152609490920190925280519101209190049150731912780ca1056fb9b5f3b4c241881f69ed225861906000906103e89033600090815260036020526040902054919006915083146104795733600090815260036020908152604080832086905560019091529020805460ff1916905566354a6ba7a180003481146101d8576040805162461bcd60e51b815260206004820152600a60248201526915dc9bdb99c818dbdcdd60b21b604482015290519081900360640190fd5b33600090815260026020526040812042600190910155601483101561024e57604051339083156108fc029084906000818181858888f1935050505061024657604051339083156108fc029084906000818181858888f19350505050158015610244573d6000803e3d6000fd5b505b5060006103e6565b6040516001600160a01b0385169083156108fc029084906000818181858888f193505050506102ae576040516001600160a01b038516904780156108fc02916000818181858888f193505050501580156102ac573d6000803e3d6000fd5b505b60328310156102d95750336000908152600160208190526040909120805460ff1916821790556103e6565b6102268310156103085750336000908152600160208190526040909120805460ff1916909117905560056103e6565b6103208310156103375750336000908152600160208190526040909120805460ff19169091179055600a6103e6565b6103b68310156103665750336000908152600160208190526040909120805460ff19169091179055600f6103e6565b6103d48310156103955750336000908152600160208190526040909120805460ff1916909117905560196103e6565b6103e68310156103c45750336000908152600160208190526040909120805460ff1916909117905560646103e6565b50336000908152600160208190526040909120805460ff191690911790556103e85b3360009081526002602052604090208190556001811415610405575060005b80156104725760008054604080516345387e5160e11b81523360048201526024810185905290516001600160a01b0390921692638a70fca29260448084019382900301818387803b15801561045957600080fd5b505af115801561046d573d6000803e3d6000fd5b505050505b505061081c565b33600090815260016020526040902054600560ff909116106104cc5760405162461bcd60e51b81526004018080602001828103825260288152602001806108516028913960400191505060405180910390fd5b336000908152600160205260408120546103e89060ff1660020a67d02ab486cedc000002049050803414610534576040805162461bcd60e51b815260206004820152600a60248201526915dc9bdb99c818dbdcdd60b21b604482015290519081900360640190fd5b3360009081526002602052604081204260019091015560148310156105aa57604051339083156108fc029084906000818181858888f193505050506105a257604051339083156108fc029084906000818181858888f193505050501580156105a0573d6000803e3d6000fd5b505b50600061078d565b6040516001600160a01b0385169083156108fc029084906000818181858888f1935050505061060a576040516001600160a01b038516904780156108fc02916000818181858888f19350505050158015610608573d6000803e3d6000fd5b505b603283101561063e5750336000908152600160208190526040909120805460ff80821684011660ff1990911617905561078d565b6102268310156106785750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055600561078d565b6103208310156106b25750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055600a61078d565b6103b68310156106ec5750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055600f61078d565b6103d48310156107265750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055601961078d565b6103e68310156107605750336000908152600160208190526040909120805460ff19811660ff91821690930116919091179055606461078d565b50336000908152600160208190526040909120805460ff19811660ff918216909301169190911790556103e85b33600090815260026020526040902081905560018114156107ac575060005b80156108195760008054604080516345387e5160e11b81523360048201526024810185905290516001600160a01b0390921692638a70fca29260448084019382900301818387803b15801561080057600080fd5b505af1158015610814573d6000803e3d6000fd5b505050505b50505b50505050565b60016020526000908152604090205460ff1681565b600260205260009081526040902080546001909101548256fe796f7520616c72656164792075736520616c6c207370696e20636f756e7420666f7220746f646179a265627a7a72315820369e0aa02a61c80c53ec5373e9588c21e2107e754e1e64e04f9e740ceac4fbda64736f6c63430005110032

Deployed Bytecode Sourcemap

15610:5182:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16081:4708;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16081:4708:0;;:::i;:::-;;15904:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15904:42:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;15904:42:0;-1:-1:-1;;;;;15904:42:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;15953;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15953:42:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;15953:42:0;-1:-1:-1;;;;;15953:42:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;16081:4708;16152:11;16172:5;16166:3;16313:116;;;;;;;;;;16369:3;16313:116;;;;16387:16;16313:116;;;;;;;;16418:10;16313:116;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;16313:116:0;;;;;;;16303:137;;;;;16166:11;;;;-1:-1:-1;16226:42:0;;16188:27;;16444:4;;16481:10;16473:19;;;;:7;:19;;;;;;16295:153;;;;-1:-1:-1;16473:26:0;;16469:4313;;16524:10;16516:19;;;;:7;:19;;;;;;;;:25;;;16570:9;:21;;;;;:25;;-1:-1:-1;;16570:25:0;;;16629:29;16681:9;:21;;16673:44;;;;;-1:-1:-1;;;16673:44:0;;;;;;;;;;;;-1:-1:-1;;;16673:44:0;;;;;;;;;;;;;;;16739:10;16732:18;;;;:6;:18;;;;;16767:3;16732:32;;;;:38;16832:2;16825:9;;16821:1524;;;16890:25;;:10;;:25;;;;;16906:8;;16890:25;;;;16906:8;16890:10;:25;;;;;;;16885:104;;16940:29;;:10;;:29;;;;;16960:8;;16940:29;;;;16960:8;16940:10;:29;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16940:29:0;16885:104;-1:-1:-1;17023:1:0;16821:1524;;;17070:26;;-1:-1:-1;;;;;17070:16:0;;;:26;;;;;17087:8;;17070:26;;;;17087:8;17070:16;:26;;;;;;;17065:119;;17121:43;;-1:-1:-1;;;;;17121:20:0;;;17142:21;17121:43;;;;;;;;;17142:21;17121:20;:43;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17121:43:0;17065:119;17213:2;17206:4;:9;17202:1128;;;-1:-1:-1;17323:10:0;17313:21;;;;17289:1;17313:21;;;;;;;;:25;;-1:-1:-1;;17313:25:0;;;;;17202:1128;;;17375:3;17368:4;:10;17364:966;;;-1:-1:-1;17485:10:0;17475:21;;;;17499:1;17475:21;;;;;;;;:25;;-1:-1:-1;;17475:25:0;;;;;;17451:1;17364:966;;;17537:3;17530:4;:10;17526:804;;;-1:-1:-1;17649:10:0;17639:21;;;;17663:1;17639:21;;;;;;;;:25;;-1:-1:-1;;17639:25:0;;;;;;17614:2;17526:804;;;17701:3;17694:4;:10;17690:640;;;-1:-1:-1;17813:10:0;17803:21;;;;17827:1;17803:21;;;;;;;;:25;;-1:-1:-1;;17803:25:0;;;;;;17778:2;17690:640;;;17865:3;17858:4;:10;17854:476;;;-1:-1:-1;17977:10:0;17967:21;;;;17991:1;17967:21;;;;;;;;:25;;-1:-1:-1;;17967:25:0;;;;;;17942:2;17854:476;;;18029:3;18022:4;:10;18018:312;;;-1:-1:-1;18143:10:0;18133:21;;;;18157:1;18133:21;;;;;;;;:25;;-1:-1:-1;;18133:25:0;;;;;;18107:3;18018:312;;;-1:-1:-1;18295:10:0;18285:21;;;;18309:1;18285:21;;;;;;;;:25;;-1:-1:-1;;18285:25:0;;;;;;18258:4;18018:312;18366:10;18359:18;;;;:6;:18;;;;;:39;;;18434:1;18417:18;;18413:76;;;-1:-1:-1;18472:1:0;18413:76;18507:17;;18503:105;;18545:9;;;:47;;;-1:-1:-1;;;18545:47:0;;18566:10;18545:47;;;;;;;;;;;;-1:-1:-1;;;;;18545:9:0;;;;:20;;:47;;;;;;;;;;:9;;:47;;;5:2:-1;;;;30:1;27;20:12;5:2;18545:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;18545:47:0;;;;18503:105;16469:4313;;;;;18658:10;18648:21;;;;:9;:21;;;;;;18672:1;18648:21;;;;:25;18640:78;;;;-1:-1:-1;;;18640:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18804:10;18747:16;18794:21;;;:9;:21;;;;;;18829:4;;18794:21;;18788:1;18780:35;18766:60;;:67;18747:86;;18869:8;18856:9;:21;18848:44;;;;;-1:-1:-1;;;18848:44:0;;;;;;;;;;;;-1:-1:-1;;;18848:44:0;;;;;;;;;;;;;;;18916:10;18909:18;;;;:6;:18;;;;;18944:3;18909:32;;;;:38;19009:2;19002:9;;18998:1510;;;19067:25;;:10;;:25;;;;;19083:8;;19067:25;;;;19083:8;19067:10;:25;;;;;;;19062:104;;19117:29;;:10;;:29;;;;;19137:8;;19117:29;;;;19137:8;19117:10;:29;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19117:29:0;19062:104;-1:-1:-1;19200:1:0;18998:1510;;;19247:26;;-1:-1:-1;;;;;19247:16:0;;;:26;;;;;19264:8;;19247:26;;;;19264:8;19247:16;:26;;;;;;;19242:119;;19298:43;;-1:-1:-1;;;;;19298:20:0;;;19319:21;19298:43;;;;;;;;;19319:21;19298:20;:43;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19298:43:0;19242:119;19390:2;19383:4;:9;19379:1114;;;-1:-1:-1;19500:10:0;19490:21;;;;19466:1;19490:21;;;;;;;;:23;;;;;;;;;-1:-1:-1;;19490:23:0;;;;;;19379:1114;;;19550:3;19543:4;:10;19539:954;;;-1:-1:-1;19660:10:0;19650:21;;;;:9;:21;;;;;;;;:23;;-1:-1:-1;;19650:23:0;;;;;;;;;;;;;;;;19626:1;19539:954;;;19710:3;19703:4;:10;19699:794;;;-1:-1:-1;19822:10:0;19812:21;;;;:9;:21;;;;;;;;:23;;-1:-1:-1;;19812:23:0;;;;;;;;;;;;;;;;19787:2;19699:794;;;19872:3;19865:4;:10;19861:632;;;-1:-1:-1;19984:10:0;19974:21;;;;:9;:21;;;;;;;;:23;;-1:-1:-1;;19974:23:0;;;;;;;;;;;;;;;;19949:2;19861:632;;;20034:3;20027:4;:10;20023:470;;;-1:-1:-1;20146:10:0;20136:21;;;;:9;:21;;;;;;;;:23;;-1:-1:-1;;20136:23:0;;;;;;;;;;;;;;;;20111:2;20023:470;;;20196:3;20189:4;:10;20185:308;;;-1:-1:-1;20310:10:0;20300:21;;;;:9;:21;;;;;;;;:23;;-1:-1:-1;;20300:23:0;;;;;;;;;;;;;;;;20274:3;20185:308;;;-1:-1:-1;20460:10:0;20450:21;;;;:9;:21;;;;;;;;:23;;-1:-1:-1;;20450:23:0;;;;;;;;;;;;;;;;20423:4;20185:308;20529:10;20522:18;;;;:6;:18;;;;;:39;;;20597:1;20580:18;;20576:76;;;-1:-1:-1;20635:1:0;20576:76;20670:17;;20666:105;;20708:9;;;:47;;;-1:-1:-1;;;20708:47:0;;20729:10;20708:47;;;;;;;;;;;;-1:-1:-1;;;;;20708:9:0;;;;:20;;:47;;;;;;;;;;:9;;:47;;;5:2:-1;;;;30:1;27;20:12;5:2;20708:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;20708:47:0;;;;20666:105;16469:4313;;;16081:4708;;;;:::o;15904:42::-;;;;;;;;;;;;;;;:::o;15953:::-;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

bzzr://369e0aa02a61c80c53ec5373e9588c21e2107e754e1e64e04f9e740ceac4fbda

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.