POL Price: $0.090771 (+1.06%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Claim Rewards461078912023-08-09 18:39:40982 days ago1691606380IN
0xd3f8c00b...2C026312C
0 POL0.0072433116.48179991
Stake461077732023-08-09 18:35:28982 days ago1691606128IN
0xd3f8c00b...2C026312C
0 POL0.0168079691.83274276
Stake461077642023-08-09 18:35:10982 days ago1691606110IN
0xd3f8c00b...2C026312C
0 POL0.0171685493.8028478
Stake461077552023-08-09 18:34:50982 days ago1691606090IN
0xd3f8c00b...2C026312C
0 POL0.0168921692.29281816
Stake461077242023-08-09 18:33:40982 days ago1691606020IN
0xd3f8c00b...2C026312C
0 POL0.0169936892.84746064
Stake461077092023-08-09 18:33:08982 days ago1691605988IN
0xd3f8c00b...2C026312C
0 POL0.0172718794.36737038
Stake461076972023-08-09 18:32:44982 days ago1691605964IN
0xd3f8c00b...2C026312C
0 POL0.0162349293.9945229
Stake461076802023-08-09 18:32:08982 days ago1691605928IN
0xd3f8c00b...2C026312C
0 POL0.0178592297.58285392
Stake461076782023-08-09 18:32:02982 days ago1691605922IN
0xd3f8c00b...2C026312C
0 POL0.0172043193.99827107
Stake461076482023-08-09 18:31:00982 days ago1691605860IN
0xd3f8c00b...2C026312C
0 POL0.0179931898.30836783
Stake461076172023-08-09 18:29:54982 days ago1691605794IN
0xd3f8c00b...2C026312C
0 POL0.01876791102.54795443
Stake461075652023-08-09 18:28:02982 days ago1691605682IN
0xd3f8c00b...2C026312C
0 POL0.0167781391.66978786
Stake461073862023-08-09 18:21:42982 days ago1691605302IN
0xd3f8c00b...2C026312C
0 POL0.0171793493.86799869
Stake461073702023-08-09 18:21:08982 days ago1691605268IN
0xd3f8c00b...2C026312C
0 POL0.0178153997.33696679
Stake461073292023-08-09 18:19:42982 days ago1691605182IN
0xd3f8c00b...2C026312C
0 POL0.0168705492.17469208
Stake461073252023-08-09 18:19:32982 days ago1691605172IN
0xd3f8c00b...2C026312C
0 POL0.0169994592.87899729
Stake461073012023-08-09 18:18:42982 days ago1691605122IN
0xd3f8c00b...2C026312C
0 POL0.0179660898.16673822
Stake461072822023-08-09 18:18:02982 days ago1691605082IN
0xd3f8c00b...2C026312C
0 POL0.0177585797.0265557
Stake461071972023-08-09 18:15:00982 days ago1691604900IN
0xd3f8c00b...2C026312C
0 POL0.016336689.25742731
Stake461009172023-08-09 14:32:15982 days ago1691591535IN
0xd3f8c00b...2C026312C
0 POL0.03801311159.21723617
Claim Rewards447165962023-07-05 15:17:341017 days ago1688570254IN
0xd3f8c00b...2C026312C
0 POL0.01320346162.43623645
Stake447165242023-07-05 15:15:001017 days ago1688570100IN
0xd3f8c00b...2C026312C
0 POL0.03388311148.30574111
Stake445941942023-07-02 12:33:441020 days ago1688301224IN
0xd3f8c00b...2C026312C
0 POL0.02612172142.71984854
Stake445941802023-07-02 12:33:141020 days ago1688301194IN
0xd3f8c00b...2C026312C
0 POL0.02628805143.62861272
Stake445941692023-07-02 12:32:501020 days ago1688301170IN
0xd3f8c00b...2C026312C
0 POL0.02778672138.85310283
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RotyBroiStaking

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract RotyBroiStaking is ReentrancyGuard {
    using SafeERC20 for IERC20;

    // Interfaces for ERC20 and ERC721.
    IERC20 public immutable oioiToken;
    IERC721 public immutable therotybroiCollection;

    // Constructor function to set the rewards token and the NFT collection addresses.
    constructor(IERC721 _therotybroiCollection, IERC20 _oioiToken) {
        therotybroiCollection = _therotybroiCollection;
        oioiToken = _oioiToken;
    }

    struct StakedRotyBroi {
        address staker;
        uint256 rotybroiId;
    }

    // Staker info.
    struct Staker {
        // Amount of NFT staked by the staker.
        uint256 amountStaked;
        // IDs of the NFT staked by the staker.
        StakedRotyBroi[] stakedRotyBrois;
        // Last time of the rewards were calculated for this staker.
        uint256 timeOfLastUpdate;
        // Calculated, but unclaimed rewards for the staker.
        // The rewards are calculated each time the staker writes to this staking smart contract.
        uint256 unclaimedRewards;
    }

    // Rewards per hour in wei for each NFT staked by the staker.
    uint256 private rewardsPerHour = 47474747;

    // Mapping of staker address to staker info.
    mapping(address => Staker) public stakers;

    // Mapping of NFT ID to staker.
    // Made for this staking smart contract to remember who to send back the NFT/s to.
    mapping(uint256 => address) public stakerAddress;

    // If the staker address already has NFT/s staked, calculate the rewards.
    // Increment the "amountStaked" and map "msg.sender" to the IDs of the staked NFTs to later send back on withdrawal.
    // Finally give "timeOfLastUpdate" the value of now.
    function stake(uint256 _rotybroiId) external nonReentrant {
        // If wallet has staked NFT/s, calculate the rewards before adding the new NFT.
        if (stakers[msg.sender].amountStaked > 0) {
            uint256 rewards = calculateRewards(msg.sender);
            stakers[msg.sender].unclaimedRewards += rewards;
        }

        // Wallet must own the NFT they are trying to stake.
        require(
            therotybroiCollection.ownerOf(_rotybroiId) == msg.sender,
            "You are not #OiOi!!!! Buy The ROTY BROI now!!!!!!!"
        );

        // Transfer the NFT from the wallet to this staking smart contract.
        therotybroiCollection.transferFrom(msg.sender, address(this), _rotybroiId);

        // Create "StakedRotyBroi".
        StakedRotyBroi memory stakedRotyBroi = StakedRotyBroi(msg.sender, _rotybroiId);

        // Add the NFT to the "stakedRotyBrois" array.
        stakers[msg.sender].stakedRotyBrois.push(stakedRotyBroi);

        // Increment the amount of NFT staked for this wallet.
        stakers[msg.sender].amountStaked++;

        // Update the mapping of the "rotybroiId" to the staker's address.
        stakerAddress[_rotybroiId] = msg.sender;

        // Update the "timeOfLastUpdate" for the staker
        stakers[msg.sender].timeOfLastUpdate = block.timestamp;
    }

    // Check if staker has any NFT staked and if they tried to withdraw, calculate the rewards and store them in the "unclaimedRewards" decrement the "amountStaked" of the staker and transfer the NFT back to them.
    function withdraw(uint256 _rotybroiId) external nonReentrant {
        // Make sure the staker has at least one NFT staked before withdrawing.
        require(
            stakers[msg.sender].amountStaked > 0,
            "You have no ROTY BROI staked!!!! Stake The ROTY BROI now!!!!!!!"
        );

        // Wallet must own the NFT they are trying to withdraw.
        require(
            stakerAddress[_rotybroiId] == msg.sender,
            "You don't own this ROTY BROI!!!!!!!"
        );

        // Update the rewards for this staker, as the amount of rewards decreases with less NFTs.
        uint256 rewards = calculateRewards(msg.sender);
        stakers[msg.sender].unclaimedRewards += rewards;

        // Find the index of this NFT ID in the "stakedRotyBrois" array
        uint256 index = 0;
        for (uint256 i = 0; i < stakers[msg.sender].stakedRotyBrois.length; i++) {
            if (
                stakers[msg.sender].stakedRotyBrois[i].rotybroiId == _rotybroiId &&
                stakers[msg.sender].stakedRotyBrois[i].staker != address(0)
            ) {
                index = i;
                break;
            }
        }

        // Set this NFT's staker to be address 0 to mark it as no longer staked.
        stakers[msg.sender].stakedRotyBrois[index].staker = address(0);

        // Decrement the amount of NFT staked for this wallet.
        stakers[msg.sender].amountStaked--;

        // Update the mapping of the "rotybroiId" to the be "address(0)" to indicate that the NFT is no longer staked.
        stakerAddress[_rotybroiId] = address(0);

        // Transfer the NFT back to the staker address.
        therotybroiCollection.transferFrom(address(this), msg.sender, _rotybroiId);

        // Update the "timeOfLastUpdate" for the staker.
        stakers[msg.sender].timeOfLastUpdate = block.timestamp;
    }

    // Calculate rewards for the "msg.sender", check if there are any rewards claim, set "unclaimedRewards" to 0 and transfer the reward tokens to the user.
    function claimRewards() external {
        uint256 rewards = calculateRewards(msg.sender) +
            stakers[msg.sender].unclaimedRewards;
        require(rewards > 0, "You have no OiOi tokens to claim");
        stakers[msg.sender].timeOfLastUpdate = block.timestamp;
        stakers[msg.sender].unclaimedRewards = 0;
        oioiToken.safeTransfer(msg.sender, rewards);
    }


    //////////
    // View //
    //////////

    function availableRewards(address _staker) public view returns (uint256) {
        uint256 rewards = calculateRewards(_staker) +
            stakers[_staker].unclaimedRewards;
        return rewards;
    }

    function getStakedRotyBrois(address _user) public view returns (StakedRotyBroi[] memory) {
        // Check if we know this staker.
        if (stakers[_user].amountStaked > 0) {
            // Return all the NFTs in the "stakedRotyBroi" Array for this staker that are not -1.
            StakedRotyBroi[] memory _stakedRotyBrois = new StakedRotyBroi[](stakers[_user].amountStaked);
            uint256 _index = 0;

            for (uint256 j = 0; j < stakers[_user].stakedRotyBrois.length; j++) {
                if (stakers[_user].stakedRotyBrois[j].staker != (address(0))) {
                    _stakedRotyBrois[_index] = stakers[_user].stakedRotyBrois[j];
                    _index++;
                }
            }

            return _stakedRotyBrois;
        }
        
        // Otherwise, return empty array.
        else {
            return new StakedRotyBroi[](0);
        }
    }

    /////////////
    // Internal//
    /////////////

    // Calculate rewards for "param _staker" by calculating the time passed since last update in hours and mulitplying it to amount of NFT staked and "rewardsPerHour".
    function calculateRewards(address _staker)
        internal
        view
        returns (uint256 _rewards)
    {
        return (((
            ((block.timestamp - stakers[_staker].timeOfLastUpdate) *
                stakers[_staker].amountStaked)
        ) * rewardsPerHour) / 3600);
    }
}

File 2 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.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 IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    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));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is 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.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @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].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "evmVersion": "london",
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC721","name":"_therotybroiCollection","type":"address"},{"internalType":"contract IERC20","name":"_oioiToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"availableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getStakedRotyBrois","outputs":[{"components":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"rotybroiId","type":"uint256"}],"internalType":"struct RotyBroiStaking.StakedRotyBroi[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oioiToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rotybroiId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakers","outputs":[{"internalType":"uint256","name":"amountStaked","type":"uint256"},{"internalType":"uint256","name":"timeOfLastUpdate","type":"uint256"},{"internalType":"uint256","name":"unclaimedRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"therotybroiCollection","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rotybroiId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526302d4683b60015534801561001857600080fd5b506040516111f53803806111f58339810160408190526100379161006b565b60016000556001600160a01b0391821660a052166080526100a5565b6001600160a01b038116811461006857600080fd5b50565b6000806040838503121561007e57600080fd5b825161008981610053565b602084015190925061009a81610053565b809150509250929050565b60805160a05161110f6100e66000396000818161018c015281816104f2015281816108fa0152610a030152600081816101b30152610609015261110f6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a22be79511610076578063b08c19771161005b578063b08c197714610187578063ec483e6e146101ae578063f854a27f146101d557600080fd5b8063a22be79514610154578063a694fc3a1461017457600080fd5b80632e1a7d4d146100a8578063372500ab146100bd5780639168ae72146100c55780639406704514610113575b600080fd5b6100bb6100b6366004610e96565b6101f6565b005b6100bb61056c565b6100f36100d3366004610ec4565b600260208190526000918252604090912080549181015460039091015483565b604080519384526020840192909252908201526060015b60405180910390f35b61013c610121366004610e96565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161010a565b610167610162366004610ec4565b61063b565b60405161010a9190610ee1565b6100bb610182366004610e96565b610835565b61013c7f000000000000000000000000000000000000000000000000000000000000000081565b61013c7f000000000000000000000000000000000000000000000000000000000000000081565b6101e86101e3366004610ec4565b610b1c565b60405190815260200161010a565b60026000540361024d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600081815533815260209190915260409020546102d45760405162461bcd60e51b815260206004820152603f60248201527f596f752068617665206e6f20524f54592042524f49207374616b65642121212160448201527f205374616b652054686520524f54592042524f49206e6f7721212121212121006064820152608401610244565b6000818152600360205260409020546001600160a01b031633146103465760405162461bcd60e51b815260206004820152602360248201527f596f7520646f6e2774206f776e207468697320524f54592042524f492121212160448201526221212160e81b6064820152608401610244565b600061035133610b54565b33600090815260026020526040812060030180549293508392909190610378908490610f4f565b9091555060009050805b3360009081526002602052604090206001015481101561043d573360009081526002602052604090206001018054859190839081106103c3576103c3610f67565b90600052602060002090600202016001015414801561041e575033600090815260026020526040812060010180548390811061040157610401610f67565b60009182526020909120600290910201546001600160a01b031614155b1561042b5780915061043d565b8061043581610f7d565b915050610382565b5033600090815260026020526040812060010180548390811061046257610462610f67565b6000918252602080832060029283020180546001600160a01b0319166001600160a01b039590951694909417909355338252909152604081208054916104a783610f96565b90915550506000838152600360205260409081902080546001600160a01b0319169055516323b872dd60e01b8152306004820152336024820152604481018490526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401600060405180830381600087803b15801561053657600080fd5b505af115801561054a573d6000803e3d6000fd5b5050336000908152600260208190526040822042910155600190555050505050565b33600081815260026020526040812060030154909161058a90610b54565b6105949190610f4f565b9050600081116105e65760405162461bcd60e51b815260206004820181905260248201527f596f752068617665206e6f204f694f6920746f6b656e7320746f20636c61696d6044820152606401610244565b3360008181526002602081905260408220429181019190915560030155610638907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083610bad565b50565b6001600160a01b038116600090815260026020526040902054606090156107f1576001600160a01b03821660009081526002602052604081205467ffffffffffffffff81111561068d5761068d610fad565b6040519080825280602002602001820160405280156106d257816020015b60408051808201909152600080825260208201528152602001906001900390816106ab5790505b5090506000805b6001600160a01b0385166000908152600260205260409020600101548110156107e8576001600160a01b038516600090815260026020526040812060010180548390811061072957610729610f67565b60009182526020909120600290910201546001600160a01b0316146107d6576001600160a01b038516600090815260026020526040902060010180548290811061077557610775610f67565b60009182526020918290206040805180820190915260029092020180546001600160a01b03168252600101549181019190915283518490849081106107bc576107bc610f67565b602002602001018190525081806107d290610f7d565b9250505b806107e081610f7d565b9150506106d9565b50909392505050565b604080516000808252602082019092529061082e565b60408051808201909152600080825260208201528152602001906001900390816108075790505b5092915050565b6002600054036108875760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610244565b600260008181553381526020919091526040902054156108da5760006108ac33610b54565b336000908152600260205260408120600301805492935083929091906108d3908490610f4f565b9091555050505b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109659190610fc3565b6001600160a01b0316146109e15760405162461bcd60e51b815260206004820152603260248201527f596f7520617265206e6f7420234f694f6921212121204275792054686520524f60448201527f54592042524f49206e6f772121212121212100000000000000000000000000006064820152608401610244565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90606401600060405180830381600087803b158015610a4f57600080fd5b505af1158015610a63573d6000803e3d6000fd5b50506040805180820182523380825260208083018781526000838152600280845295812060018082018054808301825590845294832087519590980290970180546001600160a01b0319166001600160a01b0390951694909417845591519290950191909155908352805491945090925090610ade83610f7d565b909155505050600090815260036020908152604080832080546001600160a01b03191633908117909155835260029182905282204291015560019055565b6001600160a01b0381166000908152600260205260408120600301548190610b4384610b54565b610b4d9190610f4f565b9392505050565b6001546001600160a01b0382166000908152600260208190526040822080549101549192610e1092909190610b899042610fe0565b610b939190610ff7565b610b9d9190610ff7565b610ba79190611016565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052610c14908490610c19565b505050565b6000610c6e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610cfe9092919063ffffffff16565b805190915015610c145780806020019051810190610c8c9190611038565b610c145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610244565b6060610d0d8484600085610d15565b949350505050565b606082471015610d8d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610244565b6001600160a01b0385163b610de45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610244565b600080866001600160a01b03168587604051610e00919061108a565b60006040518083038185875af1925050503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5091509150610e52828286610e5d565b979650505050505050565b60608315610e6c575081610b4d565b825115610e7c5782518084602001fd5b8160405162461bcd60e51b815260040161024491906110a6565b600060208284031215610ea857600080fd5b5035919050565b6001600160a01b038116811461063857600080fd5b600060208284031215610ed657600080fd5b8135610b4d81610eaf565b602080825282518282018190526000919060409081850190868401855b82811015610f2c57815180516001600160a01b03168552860151868501529284019290850190600101610efe565b5091979650505050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610f6257610f62610f39565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201610f8f57610f8f610f39565b5060010190565b600081610fa557610fa5610f39565b506000190190565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610fd557600080fd5b8151610b4d81610eaf565b600082821015610ff257610ff2610f39565b500390565b600081600019048311821515161561101157611011610f39565b500290565b60008261103357634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561104a57600080fd5b81518015158114610b4d57600080fd5b60005b8381101561107557818101518382015260200161105d565b83811115611084576000848401525b50505050565b6000825161109c81846020870161105a565b9190910192915050565b60208152600082518060208401526110c581604085016020870161105a565b601f01601f1916919091016040019291505056fea2646970667358221220bff061134b9da112cb79601ffe8a628039caa14ad9ed2fa13abc201a74ad38fa64736f6c634300080d00330000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a9000000000000000000000000c5f6fa36baf5bc15d68dad00faca72fc4e843c25

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a22be79511610076578063b08c19771161005b578063b08c197714610187578063ec483e6e146101ae578063f854a27f146101d557600080fd5b8063a22be79514610154578063a694fc3a1461017457600080fd5b80632e1a7d4d146100a8578063372500ab146100bd5780639168ae72146100c55780639406704514610113575b600080fd5b6100bb6100b6366004610e96565b6101f6565b005b6100bb61056c565b6100f36100d3366004610ec4565b600260208190526000918252604090912080549181015460039091015483565b604080519384526020840192909252908201526060015b60405180910390f35b61013c610121366004610e96565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161010a565b610167610162366004610ec4565b61063b565b60405161010a9190610ee1565b6100bb610182366004610e96565b610835565b61013c7f0000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a981565b61013c7f000000000000000000000000c5f6fa36baf5bc15d68dad00faca72fc4e843c2581565b6101e86101e3366004610ec4565b610b1c565b60405190815260200161010a565b60026000540361024d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600081815533815260209190915260409020546102d45760405162461bcd60e51b815260206004820152603f60248201527f596f752068617665206e6f20524f54592042524f49207374616b65642121212160448201527f205374616b652054686520524f54592042524f49206e6f7721212121212121006064820152608401610244565b6000818152600360205260409020546001600160a01b031633146103465760405162461bcd60e51b815260206004820152602360248201527f596f7520646f6e2774206f776e207468697320524f54592042524f492121212160448201526221212160e81b6064820152608401610244565b600061035133610b54565b33600090815260026020526040812060030180549293508392909190610378908490610f4f565b9091555060009050805b3360009081526002602052604090206001015481101561043d573360009081526002602052604090206001018054859190839081106103c3576103c3610f67565b90600052602060002090600202016001015414801561041e575033600090815260026020526040812060010180548390811061040157610401610f67565b60009182526020909120600290910201546001600160a01b031614155b1561042b5780915061043d565b8061043581610f7d565b915050610382565b5033600090815260026020526040812060010180548390811061046257610462610f67565b6000918252602080832060029283020180546001600160a01b0319166001600160a01b039590951694909417909355338252909152604081208054916104a783610f96565b90915550506000838152600360205260409081902080546001600160a01b0319169055516323b872dd60e01b8152306004820152336024820152604481018490526001600160a01b037f0000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a916906323b872dd90606401600060405180830381600087803b15801561053657600080fd5b505af115801561054a573d6000803e3d6000fd5b5050336000908152600260208190526040822042910155600190555050505050565b33600081815260026020526040812060030154909161058a90610b54565b6105949190610f4f565b9050600081116105e65760405162461bcd60e51b815260206004820181905260248201527f596f752068617665206e6f204f694f6920746f6b656e7320746f20636c61696d6044820152606401610244565b3360008181526002602081905260408220429181019190915560030155610638907f000000000000000000000000c5f6fa36baf5bc15d68dad00faca72fc4e843c256001600160a01b03169083610bad565b50565b6001600160a01b038116600090815260026020526040902054606090156107f1576001600160a01b03821660009081526002602052604081205467ffffffffffffffff81111561068d5761068d610fad565b6040519080825280602002602001820160405280156106d257816020015b60408051808201909152600080825260208201528152602001906001900390816106ab5790505b5090506000805b6001600160a01b0385166000908152600260205260409020600101548110156107e8576001600160a01b038516600090815260026020526040812060010180548390811061072957610729610f67565b60009182526020909120600290910201546001600160a01b0316146107d6576001600160a01b038516600090815260026020526040902060010180548290811061077557610775610f67565b60009182526020918290206040805180820190915260029092020180546001600160a01b03168252600101549181019190915283518490849081106107bc576107bc610f67565b602002602001018190525081806107d290610f7d565b9250505b806107e081610f7d565b9150506106d9565b50909392505050565b604080516000808252602082019092529061082e565b60408051808201909152600080825260208201528152602001906001900390816108075790505b5092915050565b6002600054036108875760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610244565b600260008181553381526020919091526040902054156108da5760006108ac33610b54565b336000908152600260205260408120600301805492935083929091906108d3908490610f4f565b9091555050505b6040516331a9108f60e11b81526004810182905233906001600160a01b037f0000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a91690636352211e90602401602060405180830381865afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109659190610fc3565b6001600160a01b0316146109e15760405162461bcd60e51b815260206004820152603260248201527f596f7520617265206e6f7420234f694f6921212121204275792054686520524f60448201527f54592042524f49206e6f772121212121212100000000000000000000000000006064820152608401610244565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f0000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a96001600160a01b0316906323b872dd90606401600060405180830381600087803b158015610a4f57600080fd5b505af1158015610a63573d6000803e3d6000fd5b50506040805180820182523380825260208083018781526000838152600280845295812060018082018054808301825590845294832087519590980290970180546001600160a01b0319166001600160a01b0390951694909417845591519290950191909155908352805491945090925090610ade83610f7d565b909155505050600090815260036020908152604080832080546001600160a01b03191633908117909155835260029182905282204291015560019055565b6001600160a01b0381166000908152600260205260408120600301548190610b4384610b54565b610b4d9190610f4f565b9392505050565b6001546001600160a01b0382166000908152600260208190526040822080549101549192610e1092909190610b899042610fe0565b610b939190610ff7565b610b9d9190610ff7565b610ba79190611016565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052610c14908490610c19565b505050565b6000610c6e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610cfe9092919063ffffffff16565b805190915015610c145780806020019051810190610c8c9190611038565b610c145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610244565b6060610d0d8484600085610d15565b949350505050565b606082471015610d8d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610244565b6001600160a01b0385163b610de45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610244565b600080866001600160a01b03168587604051610e00919061108a565b60006040518083038185875af1925050503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5091509150610e52828286610e5d565b979650505050505050565b60608315610e6c575081610b4d565b825115610e7c5782518084602001fd5b8160405162461bcd60e51b815260040161024491906110a6565b600060208284031215610ea857600080fd5b5035919050565b6001600160a01b038116811461063857600080fd5b600060208284031215610ed657600080fd5b8135610b4d81610eaf565b602080825282518282018190526000919060409081850190868401855b82811015610f2c57815180516001600160a01b03168552860151868501529284019290850190600101610efe565b5091979650505050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610f6257610f62610f39565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201610f8f57610f8f610f39565b5060010190565b600081610fa557610fa5610f39565b506000190190565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610fd557600080fd5b8151610b4d81610eaf565b600082821015610ff257610ff2610f39565b500390565b600081600019048311821515161561101157611011610f39565b500290565b60008261103357634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561104a57600080fd5b81518015158114610b4d57600080fd5b60005b8381101561107557818101518382015260200161105d565b83811115611084576000848401525b50505050565b6000825161109c81846020870161105a565b9190910192915050565b60208152600082518060208401526110c581604085016020870161105a565b601f01601f1916919091016040019291505056fea2646970667358221220bff061134b9da112cb79601ffe8a628039caa14ad9ed2fa13abc201a74ad38fa64736f6c634300080d0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a9000000000000000000000000c5f6fa36baf5bc15d68dad00faca72fc4e843c25

-----Decoded View---------------
Arg [0] : _therotybroiCollection (address): 0x6D2723Cb02c558cF67473Dc959aC08737b6129a9
Arg [1] : _oioiToken (address): 0xc5f6fa36bAF5bc15d68DAd00fAcA72Fc4E843C25

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006d2723cb02c558cf67473dc959ac08737b6129a9
Arg [1] : 000000000000000000000000c5f6fa36baf5bc15d68dad00faca72fc4e843c25


Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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  ]

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.