ETH Price: $3,154.76 (+2.04%)

Contract

0xC4190Cff123654149FcDe0a519FB0EC4eb0B59fb
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Bounty211626492024-11-11 6:28:355 days ago1731306515IN
Titan Legends: The Battlefield
0 ETH0.002486115.83766332
Pay Ransom211402792024-11-08 3:37:238 days ago1731037043IN
Titan Legends: The Battlefield
0 ETH0.0011071910.62474468
Claim Bounty211359582024-11-07 13:05:239 days ago1730984723IN
Titan Legends: The Battlefield
0 ETH0.0018321211.67427356
Claim Bounty211359362024-11-07 13:00:599 days ago1730984459IN
Titan Legends: The Battlefield
0 ETH0.0033221212.01191697
Claim Bounty211329112024-11-07 2:52:479 days ago1730947967IN
Titan Legends: The Battlefield
0 ETH0.0060257417.6622156
Claim Bounty211315282024-11-06 22:15:119 days ago1730931311IN
Titan Legends: The Battlefield
0 ETH0.0051341518.24703687
Pay Ransom211311762024-11-06 21:04:119 days ago1730927051IN
Titan Legends: The Battlefield
0 ETH0.0038548233.59792413
Claim Bounty211311392024-11-06 20:56:4710 days ago1730926607IN
Titan Legends: The Battlefield
0 ETH0.0037972126.24667368
Pay Ransom211310962024-11-06 20:47:5910 days ago1730926079IN
Titan Legends: The Battlefield
0 ETH0.0021526118.76175058
Claim Bounty211292522024-11-06 14:37:5910 days ago1730903879IN
Titan Legends: The Battlefield
0 ETH0.0061549119.05091593
Claim Bounty211248392024-11-05 23:50:1110 days ago1730850611IN
Titan Legends: The Battlefield
0 ETH0.000841165.19997603
Claim Bounty211193352024-11-05 5:23:3511 days ago1730784215IN
Titan Legends: The Battlefield
0 ETH0.000678953.00460994
Pay Ransom211188822024-11-05 3:52:2311 days ago1730778743IN
Titan Legends: The Battlefield
0 ETH0.000964653.98777718
Claim Bounty211149882024-11-04 14:49:3512 days ago1730731775IN
Titan Legends: The Battlefield
0 ETH0.002170287.70792313
Pay Ransom211127702024-11-04 7:23:5912 days ago1730705039IN
Titan Legends: The Battlefield
0 ETH0.001528994.71056004
Claim Bounty211121892024-11-04 5:27:4712 days ago1730698067IN
Titan Legends: The Battlefield
0 ETH0.001448925.88647838
Claim Bounty211110562024-11-04 1:39:5912 days ago1730684399IN
Titan Legends: The Battlefield
0 ETH0.000778685.38235355
Claim Bounty211110282024-11-04 1:34:2312 days ago1730684063IN
Titan Legends: The Battlefield
0 ETH0.000616314.26003412
Claim Bounty211109722024-11-04 1:23:1112 days ago1730683391IN
Titan Legends: The Battlefield
0 ETH0.000661254.72785322
Claim Bounty210993622024-11-02 10:28:3514 days ago1730543315IN
Titan Legends: The Battlefield
0 ETH0.001051353.08167579
Pay Ransom210960712024-11-01 23:26:2314 days ago1730503583IN
Titan Legends: The Battlefield
0 ETH0.001022855.46388408
Claim Bounty210957792024-11-01 22:27:4714 days ago1730500067IN
Titan Legends: The Battlefield
0 ETH0.000828885.12370758
Claim Bounty210944062024-11-01 17:51:2315 days ago1730483483IN
Titan Legends: The Battlefield
0 ETH0.0199358111.96516759
Claim Bounty210941922024-11-01 17:08:3515 days ago1730480915IN
Titan Legends: The Battlefield
0 ETH0.011633921.7759358
Claim Bounty210941882024-11-01 17:07:4715 days ago1730480867IN
Titan Legends: The Battlefield
0 ETH0.0319825616.76318561
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TitanLegendsBattlefield

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 15 : TitanLegendsBattlefield.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "./ILGNDX.sol";
import "./ITitanLegendsMarketplace.sol";

contract TitanLegendsBattlefield is ERC721Holder, ReentrancyGuard, Ownable2Step {
    using EnumerableSet for EnumerableSet.UintSet;

    IERC721 public immutable titanLegends;
    IERC20 public immutable titanX;
    ITitanLegendsMarketplace public immutable marketplace;
    ILGNDX public legendX;

    uint256 public constant tokensPerBountyPoint = 59_954.112 ether;
    uint256 public activationTime;
    uint64 public maxPerBounty = 25;
    bool public tokenSet;
    bool public active;
    bool public isClaimBurnDisabled;
    bool public marketplaceExclusionEnabled;

    EnumerableSet.UintSet private battle;
    mapping(uint256 tokenId => bool) public isExcluded;

    event BountyClaimed(address addr, uint256[] tokenIds);
    event RansomPaid(address addr, uint256[] tokenIds);

    constructor(address _titanLegends, address _titanX, address _marketplace) Ownable(msg.sender) {
        titanLegends = IERC721(_titanLegends);
        titanX = IERC20(_titanX);
        marketplace = ITitanLegendsMarketplace(_marketplace);
    }

    function dragonsAtBattle() external view returns (uint256[] memory) {
        return battle.values();
    }

    function getEarlyClaimBurn() public view returns (uint256) {
        if (isClaimBurnDisabled) return 0;
        uint256 daysPassed = (block.timestamp - activationTime) / 86400;
        if (daysPassed > 24) return 0;
        return 50 - daysPassed * 2;
    }

    function getMultiplier(uint256 tokenId) public pure returns (uint256) {
        if (
            tokenId == 46 || tokenId == 135 || tokenId == 212 || tokenId == 225 || tokenId == 427 || tokenId == 532
                || tokenId == 591 || tokenId == 694 || tokenId == 735 || tokenId == 811 || tokenId == 946 || tokenId == 1139
                || tokenId == 1210 || tokenId == 1237 || tokenId == 1357 || tokenId == 1457 || tokenId == 1503
                || tokenId == 1561 || tokenId == 1663 || tokenId == 1876 || tokenId == 1996 || tokenId == 2089
                || tokenId == 2251
        ) return 80;
        if (tokenId > 1500) return 28;
        return 10;
    }

    function processBountyNfts(uint256[] memory tokenIds) private returns (uint256 totalBounty, uint256 burnPool) {
        uint256 earlyClaimBurn = getEarlyClaimBurn();
        if (earlyClaimBurn > 0) {
            uint256 multiplierPool;
            for (uint256 i; i < tokenIds.length; i++) {
                uint256 tokenId = tokenIds[i];
                uint256 burnPercent = isExcluded[tokenId] ? 3 : earlyClaimBurn + 3;
                unchecked {
                    uint256 multiplier = getMultiplier(tokenId);
                    multiplierPool += multiplier;
                    burnPool += (multiplier * burnPercent * tokensPerBountyPoint) / 100;
                }
                titanLegends.safeTransferFrom(msg.sender, address(this), tokenId);
                battle.add(tokenId);
            }
            totalBounty = multiplierPool * tokensPerBountyPoint;
        } else {
            uint256 multiplierPool;
            for (uint256 i; i < tokenIds.length; i++) {
                uint256 tokenId = tokenIds[i];
                unchecked {
                    multiplierPool += getMultiplier(tokenId);
                }
                titanLegends.safeTransferFrom(msg.sender, address(this), tokenId);
                battle.add(tokenId);
            }
            totalBounty = multiplierPool * tokensPerBountyPoint;
            burnPool = (totalBounty * 3) / 100;
        }
        return (totalBounty, burnPool);
    }

    function claimBounty(uint256[] calldata tokenIds) external nonReentrant {
        require(active, "The Battlefield is not active");
        require(tokenIds.length <= maxPerBounty, "Max number of dragons per bounty exceeded");
        (uint256 totalBounty, uint256 burnPool) = processBountyNfts(tokenIds);
        legendX.burn(burnPool);
        legendX.transfer(msg.sender, totalBounty - burnPool);
        emit BountyClaimed(msg.sender, tokenIds);
    }

    function payRansom(uint256[] calldata tokenIds) external nonReentrant {
        require(active, "The Battlefield is not active");
        uint256 multiplierPool;
        bool isGracePeriod = getEarlyClaimBurn() > 0;
        for (uint256 i; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            unchecked {
                multiplierPool += getMultiplier(tokenId);
            }
            titanLegends.safeTransferFrom(address(this), msg.sender, tokenId);
            if (isGracePeriod) isExcluded[tokenId] = true;
            battle.remove(tokenId);
        }
        uint256 ransomPool = multiplierPool * tokensPerBountyPoint;
        uint256 burnPool = (ransomPool * 3) / 100;
        legendX.transferFrom(msg.sender, address(this), ransomPool + burnPool);
        legendX.burn(burnPool);
        emit RansomPaid(msg.sender, tokenIds);
    }

    function purchaseListingFromMarketplace(uint256 listingId, uint256 price) external nonReentrant {
        require(getEarlyClaimBurn() > 0, "Only available during grace period");
        require(marketplaceExclusionEnabled, "Function disabled");
        titanX.transferFrom(msg.sender, address(this), price);
        titanX.approve(address(marketplace), price);
        (uint256 tokenId,,) = marketplace.listings(listingId);
        marketplace.buyListing(listingId, price);
        isExcluded[tokenId] = true;
        titanLegends.safeTransferFrom(address(this), msg.sender, tokenId);
    }

    function setMaxPerBounty(uint64 _limit) external onlyOwner {
        maxPerBounty = _limit;
    }

    function addExemption(uint256[] calldata tokenIds) external onlyOwner {
        for (uint256 i; i < tokenIds.length; i++) {
            isExcluded[tokenIds[i]] = true;
        }
    }

    function setToken(address tokenAddress) external onlyOwner {
        require(!tokenSet, "Can only be done once");
        legendX = ILGNDX(tokenAddress);
        tokenSet = true;
    }

    function setMarketplaceExclusion(bool isEnabled) external onlyOwner {
        marketplaceExclusionEnabled = isEnabled;
    }

    function disableEarlyClaimBurn() external onlyOwner {
        isClaimBurnDisabled = true;
    }

    function activateBattlefield() external onlyOwner {
        require(tokenSet, "Token is not set");
        require(!active, "Battlefield is already active");
        active = true;
        marketplaceExclusionEnabled = true;
        activationTime = block.timestamp;
    }
}

File 2 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 15 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {Ownable} from "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 4 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 5 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../token/ERC721/IERC721.sol";

File 6 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 7 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 address zero.
     *
     * 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);
}

File 8 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data)
        external
        returns (bytes4);
}

File 9 of 15 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.20;

import {IERC721Receiver} from "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or
 * {IERC721-setApprovalForAll}.
 */
abstract contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 10 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 11 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @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);
}

File 12 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 13 of 15 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._positions[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._positions[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 14 of 15 : ILGNDX.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface ILGNDX {
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function burn(uint256 value) external;

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

File 15 of 15 : ITitanLegendsMarketplace.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface ITitanLegendsMarketplace {
    function listings(uint256 listingId) external returns (uint256, uint256, address);

    function buyListing(uint256 listingId, uint256 price) external;

    function isListingActive(uint256 listingId) external returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_titanLegends","type":"address"},{"internalType":"address","name":"_titanX","type":"address"},{"internalType":"address","name":"_marketplace","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"BountyClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"RansomPaid","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"activateBattlefield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"activationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"addExemption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimBounty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableEarlyClaimBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dragonsAtBattle","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEarlyClaimBurn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"isClaimBurnDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isExcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legendX","outputs":[{"internalType":"contract ILGNDX","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplace","outputs":[{"internalType":"contract ITitanLegendsMarketplace","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplaceExclusionEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerBounty","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"payRansom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"listingId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"purchaseListingFromMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"setMarketplaceExclusion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_limit","type":"uint64"}],"name":"setMaxPerBounty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"titanLegends","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"titanX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerBountyPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e0604052600580546001600160401b03191660191790553480156200002457600080fd5b5060405162001cf338038062001cf383398101604081905262000047916200012a565b600160005533806200007357604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200007e816200009d565b506001600160a01b0392831660805290821660a0521660c05262000174565b600280546001600160a01b0319169055620000b881620000bb565b50565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200012557600080fd5b919050565b6000806000606084860312156200014057600080fd5b6200014b846200010d565b92506200015b602085016200010d565b91506200016b604085016200010d565b90509250925092565b60805160a05160c051611b10620001e3600039600081816103fb01528181610fb50152818161106b015261110201526000818161047d01528181610f210152610fe40152600081816103270152818161086a015281816111950152818161130f01526114050152611b106000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80637e31c33d11610104578063abc8c7af116100a2578063e30c397811610071578063e30c397814610441578063f2fde38b14610452578063f33ce20a14610465578063f9119bbd1461047857600080fd5b8063abc8c7af146103f6578063adf8252d1461041d578063b14cb9e414610430578063da4493f61461043857600080fd5b8063818dcfd3116100de578063818dcfd31461039b5780638da5cb5b146103b05780639529c5db146103c157806397aae1d2146103c957600080fd5b80637e31c33d1461036d5780637ea6d877146103805780637fe84d911461039357600080fd5b8063330da3d41161017c5780636ab9d7c11161014b5780636ab9d7c114610322578063715018a6146103495780637704c0b11461035157806379ba50971461036557600080fd5b8063330da3d4146102bd57806336327753146102d057806340624824146102fb5780635f05b3951461030f57600080fd5b8063150b7a02116101b8578063150b7a02146102405780631e1bce4c1461027757806329553e1a1461028a5780632e89e34f1461029e57600080fd5b806302fb0c5e146101df5780630a272a0a14610208578063144fa6d71461022b575b600080fd5b6005546101f390600160481b900460ff1681565b60405190151581526020015b60405180910390f35b6101f3610216366004611704565b60086020526000908152604090205460ff1681565b61023e610239366004611732565b61049f565b005b61025e61024e366004611765565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101ff565b61023e610285366004611845565b610539565b6005546101f390600160581b900460ff1681565b6102af690cb21e71cd803060000081565b6040519081526020016101ff565b61023e6102cb36600461186f565b610565565b6003546102e3906001600160a01b031681565b6040516001600160a01b0390911681526020016101ff565b6005546101f390600160401b900460ff1681565b61023e61031d36600461186f565b6107ae565b6102e37f000000000000000000000000000000000000000000000000000000000000000081565b61023e610a65565b6005546101f390600160501b900460ff1681565b61023e610a79565b61023e61037b3660046118f2565b610abd565b61023e61038e36600461186f565b610ae3565b61023e610b43565b6103a3610b60565b6040516101ff919061190f565b6001546001600160a01b03166102e3565b61023e610b71565b6005546103dd9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101ff565b6102e37f000000000000000000000000000000000000000000000000000000000000000081565b6102af61042b366004611704565b610c48565b6102af610d7a565b6102af60045481565b6002546001600160a01b03166102e3565b61023e610460366004611732565b610de2565b61023e610473366004611953565b610e53565b6102e37f000000000000000000000000000000000000000000000000000000000000000081565b6104a761120c565b600554600160401b900460ff16156104fe5760405162461bcd60e51b815260206004820152601560248201527443616e206f6e6c7920626520646f6e65206f6e636560581b60448201526064015b60405180910390fd5b600380546001600160a01b039092166001600160a01b03199092169190911790556005805468ff00000000000000001916600160401b179055565b61054161120c565b6005805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b61056d611239565b600554600160481b900460ff166105c65760405162461bcd60e51b815260206004820152601d60248201527f54686520426174746c656669656c64206973206e6f742061637469766500000060448201526064016104f5565b60055467ffffffffffffffff168111156106345760405162461bcd60e51b815260206004820152602960248201527f4d6178206e756d626572206f6620647261676f6e732070657220626f756e747960448201526808195e18d95959195960ba1b60648201526084016104f5565b60008061067384848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061126392505050565b600354604051630852cd8d60e31b8152600481018390529294509092506001600160a01b0316906342966c6890602401600060405180830381600087803b1580156106bd57600080fd5b505af11580156106d1573d6000803e3d6000fd5b50506003546001600160a01b0316915063a9059cbb9050336106f3848661198b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061199e565b507fa970df8203a37231c63e07161c7e92b5ef10a10d768abb48f29e9ed30ae1afd6338585604051610796939291906119bb565b60405180910390a150506107aa6001600055565b5050565b6107b6611239565b600554600160481b900460ff1661080f5760405162461bcd60e51b815260206004820152601d60248201527f54686520426174746c656669656c64206973206e6f742061637469766500000060448201526064016104f5565b600080600061081c610d7a565b11905060005b8381101561090a57600085858381811061083e5761083e611a05565b90506020020135905061085081610c48565b604051632142170760e11b81529401936001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906108a390309033908690600401611a1b565b600060405180830381600087803b1580156108bd57600080fd5b505af11580156108d1573d6000803e3d6000fd5b5050505082156108f5576000818152600860205260409020805460ff191660011790555b6109006006826114c6565b5050600101610822565b506000610921690cb21e71cd803060000084611a3f565b905060006064610932836003611a3f565b61093c9190611a56565b6003549091506001600160a01b03166323b872dd333061095c8587611a78565b6040518463ffffffff1660e01b815260040161097a93929190611a1b565b6020604051808303816000875af1158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd919061199e565b50600354604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015610a0457600080fd5b505af1158015610a18573d6000803e3d6000fd5b505050507f7336132b9708b97c5ba9d9bb3c170669d9d6f2502bd2b37b1f26803befad5776338787604051610a4f939291906119bb565b60405180910390a1505050506107aa6001600055565b610a6d61120c565b610a7760006114db565b565b60025433906001600160a01b03168114610ab15760405163118cdaa760e01b81526001600160a01b03821660048201526024016104f5565b610aba816114db565b50565b610ac561120c565b60058054911515600160581b0260ff60581b19909216919091179055565b610aeb61120c565b60005b81811015610b3e57600160086000858585818110610b0e57610b0e611a05565b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101610aee565b505050565b610b4b61120c565b6005805460ff60501b1916600160501b179055565b6060610b6c60066114f4565b905090565b610b7961120c565b600554600160401b900460ff16610bc55760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881a5cc81b9bdd081cd95d60821b60448201526064016104f5565b600554600160481b900460ff1615610c1f5760405162461bcd60e51b815260206004820152601d60248201527f426174746c656669656c6420697320616c72656164792061637469766500000060448201526064016104f5565b600580546bff00ff00000000000000000019166b01000100000000000000000017905542600455565b600081602e1480610c595750816087145b80610c6457508160d4145b80610c6f57508160e1145b80610c7b5750816101ab145b80610c87575081610214145b80610c9357508161024f145b80610c9f5750816102b6145b80610cab5750816102df145b80610cb757508161032b145b80610cc35750816103b2145b80610ccf575081610473145b80610cdb5750816104ba145b80610ce75750816104d5145b80610cf357508161054d145b80610cff5750816105b1145b80610d0b5750816105df145b80610d17575081610619145b80610d2357508161067f145b80610d2f575081610754145b80610d3b5750816107cc145b80610d47575081610829145b80610d535750816108cb145b15610d6057506050919050565b6105dc821115610d725750601c919050565b50600a919050565b600554600090600160501b900460ff1615610d955750600090565b60006201518060045442610da9919061198b565b610db39190611a56565b90506018811115610dc657600091505090565b610dd1816002611a3f565b610ddc90603261198b565b91505090565b610dea61120c565b600280546001600160a01b0383166001600160a01b03199091168117909155610e1b6001546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b610e5b611239565b6000610e65610d7a565b11610ebd5760405162461bcd60e51b815260206004820152602260248201527f4f6e6c7920617661696c61626c6520647572696e6720677261636520706572696044820152611bd960f21b60648201526084016104f5565b600554600160581b900460ff16610f0a5760405162461bcd60e51b8152602060048201526011602482015270119d5b98dd1a5bdb88191a5cd8589b1959607a1b60448201526064016104f5565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610f5a90339030908690600401611a1b565b6020604051808303816000875af1158015610f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9d919061199e565b5060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af115801561102d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611051919061199e565b5060405163de74e57b60e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063de74e57b906024016060604051808303816000875af11580156110bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e09190611a8b565b5050604051636d0ba1d360e01b815260048101859052602481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636d0ba1d390604401600060405180830381600087803b15801561114e57600080fd5b505af1158015611162573d6000803e3d6000fd5b50505060008281526008602052604090819020805460ff1916600117905551632142170760e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691506342842e0e906111cf90309033908690600401611a1b565b600060405180830381600087803b1580156111e957600080fd5b505af11580156111fd573d6000803e3d6000fd5b50505050506107aa6001600055565b6001546001600160a01b03163314610a775760405163118cdaa760e01b81523360048201526024016104f5565b60026000540361125c57604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6000806000611270610d7a565b905080156113b7576000805b855181101561139a57600086828151811061129957611299611a05565b60209081029190910181015160008181526008909252604082205490925060ff166112ce576112c9856003611a78565b6112d1565b60035b905060006112de83610c48565b604051632142170760e11b81526064690cb21e71cd8030600000858402020498909801979501946001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691506342842e0e9061134990339030908790600401611a1b565b600060405180830381600087803b15801561136357600080fd5b505af1158015611377573d6000803e3d6000fd5b5050505061138f82600661150890919063ffffffff16565b50505060010161127c565b506113af690cb21e71cd803060000082611a3f565b9350506114c0565b6000805b855181101561148e5760008682815181106113d8576113d8611a05565b602002602001015190506113eb81610c48565b604051632142170760e11b81529301926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e9061143e90339030908690600401611a1b565b600060405180830381600087803b15801561145857600080fd5b505af115801561146c573d6000803e3d6000fd5b5050505061148481600661150890919063ffffffff16565b50506001016113bb565b506114a3690cb21e71cd803060000082611a3f565b935060646114b2856003611a3f565b6114bc9190611a56565b9250505b50915091565b60006114d28383611514565b90505b92915050565b600280546001600160a01b0319169055610aba81611607565b6060600061150183611659565b9392505050565b60006114d283836116b5565b600081815260018301602052604081205480156115fd57600061153860018361198b565b855490915060009061154c9060019061198b565b90508082146115b157600086600001828154811061156c5761156c611a05565b906000526020600020015490508087600001848154811061158f5761158f611a05565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c2576115c2611ac4565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506114d5565b60009150506114d5565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156116a957602002820191906000526020600020905b815481526020019060010190808311611695575b50505050509050919050565b60008181526001830160205260408120546116fc575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556114d5565b5060006114d5565b60006020828403121561171657600080fd5b5035919050565b6001600160a01b0381168114610aba57600080fd5b60006020828403121561174457600080fd5b81356115018161171d565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561177b57600080fd5b84356117868161171d565b935060208501356117968161171d565b925060408501359150606085013567ffffffffffffffff808211156117ba57600080fd5b818701915087601f8301126117ce57600080fd5b8135818111156117e0576117e061174f565b604051601f8201601f19908116603f011681019083821181831017156118085761180861174f565b816040528281528a602084870101111561182157600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561185757600080fd5b813567ffffffffffffffff8116811461150157600080fd5b6000806020838503121561188257600080fd5b823567ffffffffffffffff8082111561189a57600080fd5b818501915085601f8301126118ae57600080fd5b8135818111156118bd57600080fd5b8660208260051b85010111156118d257600080fd5b60209290920196919550909350505050565b8015158114610aba57600080fd5b60006020828403121561190457600080fd5b8135611501816118e4565b6020808252825182820181905260009190848201906040850190845b818110156119475783518352928401929184019160010161192b565b50909695505050505050565b6000806040838503121561196657600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b818103818111156114d5576114d5611975565b6000602082840312156119b057600080fd5b8151611501816118e4565b6001600160a01b0384168152604060208201819052810182905260006001600160fb1b038311156119eb57600080fd5b8260051b8085606085013791909101606001949350505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b80820281158282048414176114d5576114d5611975565b600082611a7357634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156114d5576114d5611975565b600080600060608486031215611aa057600080fd5b83519250602084015191506040840151611ab98161171d565b809150509250925092565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220b974bdae2dc6582656b9f34af7cb678c0883d831ebcf94e0a4cf8541cef5b4aa64736f6c63430008180033000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf9000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80637e31c33d11610104578063abc8c7af116100a2578063e30c397811610071578063e30c397814610441578063f2fde38b14610452578063f33ce20a14610465578063f9119bbd1461047857600080fd5b8063abc8c7af146103f6578063adf8252d1461041d578063b14cb9e414610430578063da4493f61461043857600080fd5b8063818dcfd3116100de578063818dcfd31461039b5780638da5cb5b146103b05780639529c5db146103c157806397aae1d2146103c957600080fd5b80637e31c33d1461036d5780637ea6d877146103805780637fe84d911461039357600080fd5b8063330da3d41161017c5780636ab9d7c11161014b5780636ab9d7c114610322578063715018a6146103495780637704c0b11461035157806379ba50971461036557600080fd5b8063330da3d4146102bd57806336327753146102d057806340624824146102fb5780635f05b3951461030f57600080fd5b8063150b7a02116101b8578063150b7a02146102405780631e1bce4c1461027757806329553e1a1461028a5780632e89e34f1461029e57600080fd5b806302fb0c5e146101df5780630a272a0a14610208578063144fa6d71461022b575b600080fd5b6005546101f390600160481b900460ff1681565b60405190151581526020015b60405180910390f35b6101f3610216366004611704565b60086020526000908152604090205460ff1681565b61023e610239366004611732565b61049f565b005b61025e61024e366004611765565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101ff565b61023e610285366004611845565b610539565b6005546101f390600160581b900460ff1681565b6102af690cb21e71cd803060000081565b6040519081526020016101ff565b61023e6102cb36600461186f565b610565565b6003546102e3906001600160a01b031681565b6040516001600160a01b0390911681526020016101ff565b6005546101f390600160401b900460ff1681565b61023e61031d36600461186f565b6107ae565b6102e37f000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf981565b61023e610a65565b6005546101f390600160501b900460ff1681565b61023e610a79565b61023e61037b3660046118f2565b610abd565b61023e61038e36600461186f565b610ae3565b61023e610b43565b6103a3610b60565b6040516101ff919061190f565b6001546001600160a01b03166102e3565b61023e610b71565b6005546103dd9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101ff565b6102e37f000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d81565b6102af61042b366004611704565b610c48565b6102af610d7a565b6102af60045481565b6002546001600160a01b03166102e3565b61023e610460366004611732565b610de2565b61023e610473366004611953565b610e53565b6102e37f000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b181565b6104a761120c565b600554600160401b900460ff16156104fe5760405162461bcd60e51b815260206004820152601560248201527443616e206f6e6c7920626520646f6e65206f6e636560581b60448201526064015b60405180910390fd5b600380546001600160a01b039092166001600160a01b03199092169190911790556005805468ff00000000000000001916600160401b179055565b61054161120c565b6005805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b61056d611239565b600554600160481b900460ff166105c65760405162461bcd60e51b815260206004820152601d60248201527f54686520426174746c656669656c64206973206e6f742061637469766500000060448201526064016104f5565b60055467ffffffffffffffff168111156106345760405162461bcd60e51b815260206004820152602960248201527f4d6178206e756d626572206f6620647261676f6e732070657220626f756e747960448201526808195e18d95959195960ba1b60648201526084016104f5565b60008061067384848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061126392505050565b600354604051630852cd8d60e31b8152600481018390529294509092506001600160a01b0316906342966c6890602401600060405180830381600087803b1580156106bd57600080fd5b505af11580156106d1573d6000803e3d6000fd5b50506003546001600160a01b0316915063a9059cbb9050336106f3848661198b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061199e565b507fa970df8203a37231c63e07161c7e92b5ef10a10d768abb48f29e9ed30ae1afd6338585604051610796939291906119bb565b60405180910390a150506107aa6001600055565b5050565b6107b6611239565b600554600160481b900460ff1661080f5760405162461bcd60e51b815260206004820152601d60248201527f54686520426174746c656669656c64206973206e6f742061637469766500000060448201526064016104f5565b600080600061081c610d7a565b11905060005b8381101561090a57600085858381811061083e5761083e611a05565b90506020020135905061085081610c48565b604051632142170760e11b81529401936001600160a01b037f000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf916906342842e0e906108a390309033908690600401611a1b565b600060405180830381600087803b1580156108bd57600080fd5b505af11580156108d1573d6000803e3d6000fd5b5050505082156108f5576000818152600860205260409020805460ff191660011790555b6109006006826114c6565b5050600101610822565b506000610921690cb21e71cd803060000084611a3f565b905060006064610932836003611a3f565b61093c9190611a56565b6003549091506001600160a01b03166323b872dd333061095c8587611a78565b6040518463ffffffff1660e01b815260040161097a93929190611a1b565b6020604051808303816000875af1158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd919061199e565b50600354604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015610a0457600080fd5b505af1158015610a18573d6000803e3d6000fd5b505050507f7336132b9708b97c5ba9d9bb3c170669d9d6f2502bd2b37b1f26803befad5776338787604051610a4f939291906119bb565b60405180910390a1505050506107aa6001600055565b610a6d61120c565b610a7760006114db565b565b60025433906001600160a01b03168114610ab15760405163118cdaa760e01b81526001600160a01b03821660048201526024016104f5565b610aba816114db565b50565b610ac561120c565b60058054911515600160581b0260ff60581b19909216919091179055565b610aeb61120c565b60005b81811015610b3e57600160086000858585818110610b0e57610b0e611a05565b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101610aee565b505050565b610b4b61120c565b6005805460ff60501b1916600160501b179055565b6060610b6c60066114f4565b905090565b610b7961120c565b600554600160401b900460ff16610bc55760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881a5cc81b9bdd081cd95d60821b60448201526064016104f5565b600554600160481b900460ff1615610c1f5760405162461bcd60e51b815260206004820152601d60248201527f426174746c656669656c6420697320616c72656164792061637469766500000060448201526064016104f5565b600580546bff00ff00000000000000000019166b01000100000000000000000017905542600455565b600081602e1480610c595750816087145b80610c6457508160d4145b80610c6f57508160e1145b80610c7b5750816101ab145b80610c87575081610214145b80610c9357508161024f145b80610c9f5750816102b6145b80610cab5750816102df145b80610cb757508161032b145b80610cc35750816103b2145b80610ccf575081610473145b80610cdb5750816104ba145b80610ce75750816104d5145b80610cf357508161054d145b80610cff5750816105b1145b80610d0b5750816105df145b80610d17575081610619145b80610d2357508161067f145b80610d2f575081610754145b80610d3b5750816107cc145b80610d47575081610829145b80610d535750816108cb145b15610d6057506050919050565b6105dc821115610d725750601c919050565b50600a919050565b600554600090600160501b900460ff1615610d955750600090565b60006201518060045442610da9919061198b565b610db39190611a56565b90506018811115610dc657600091505090565b610dd1816002611a3f565b610ddc90603261198b565b91505090565b610dea61120c565b600280546001600160a01b0383166001600160a01b03199091168117909155610e1b6001546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b610e5b611239565b6000610e65610d7a565b11610ebd5760405162461bcd60e51b815260206004820152602260248201527f4f6e6c7920617661696c61626c6520647572696e6720677261636520706572696044820152611bd960f21b60648201526084016104f5565b600554600160581b900460ff16610f0a5760405162461bcd60e51b8152602060048201526011602482015270119d5b98dd1a5bdb88191a5cd8589b1959607a1b60448201526064016104f5565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b116906323b872dd90610f5a90339030908690600401611a1b565b6020604051808303816000875af1158015610f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9d919061199e565b5060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d81166004830152602482018390527f000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1169063095ea7b3906044016020604051808303816000875af115801561102d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611051919061199e565b5060405163de74e57b60e01b8152600481018390526000907f000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d6001600160a01b03169063de74e57b906024016060604051808303816000875af11580156110bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e09190611a8b565b5050604051636d0ba1d360e01b815260048101859052602481018490529091507f000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d6001600160a01b031690636d0ba1d390604401600060405180830381600087803b15801561114e57600080fd5b505af1158015611162573d6000803e3d6000fd5b50505060008281526008602052604090819020805460ff1916600117905551632142170760e11b81526001600160a01b037f000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf91691506342842e0e906111cf90309033908690600401611a1b565b600060405180830381600087803b1580156111e957600080fd5b505af11580156111fd573d6000803e3d6000fd5b50505050506107aa6001600055565b6001546001600160a01b03163314610a775760405163118cdaa760e01b81523360048201526024016104f5565b60026000540361125c57604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6000806000611270610d7a565b905080156113b7576000805b855181101561139a57600086828151811061129957611299611a05565b60209081029190910181015160008181526008909252604082205490925060ff166112ce576112c9856003611a78565b6112d1565b60035b905060006112de83610c48565b604051632142170760e11b81526064690cb21e71cd8030600000858402020498909801979501946001600160a01b037f000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf91691506342842e0e9061134990339030908790600401611a1b565b600060405180830381600087803b15801561136357600080fd5b505af1158015611377573d6000803e3d6000fd5b5050505061138f82600661150890919063ffffffff16565b50505060010161127c565b506113af690cb21e71cd803060000082611a3f565b9350506114c0565b6000805b855181101561148e5760008682815181106113d8576113d8611a05565b602002602001015190506113eb81610c48565b604051632142170760e11b81529301926001600160a01b037f000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf916906342842e0e9061143e90339030908690600401611a1b565b600060405180830381600087803b15801561145857600080fd5b505af115801561146c573d6000803e3d6000fd5b5050505061148481600661150890919063ffffffff16565b50506001016113bb565b506114a3690cb21e71cd803060000082611a3f565b935060646114b2856003611a3f565b6114bc9190611a56565b9250505b50915091565b60006114d28383611514565b90505b92915050565b600280546001600160a01b0319169055610aba81611607565b6060600061150183611659565b9392505050565b60006114d283836116b5565b600081815260018301602052604081205480156115fd57600061153860018361198b565b855490915060009061154c9060019061198b565b90508082146115b157600086600001828154811061156c5761156c611a05565b906000526020600020015490508087600001848154811061158f5761158f611a05565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c2576115c2611ac4565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506114d5565b60009150506114d5565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156116a957602002820191906000526020600020905b815481526020019060010190808311611695575b50505050509050919050565b60008181526001830160205260408120546116fc575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556114d5565b5060006114d5565b60006020828403121561171657600080fd5b5035919050565b6001600160a01b0381168114610aba57600080fd5b60006020828403121561174457600080fd5b81356115018161171d565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561177b57600080fd5b84356117868161171d565b935060208501356117968161171d565b925060408501359150606085013567ffffffffffffffff808211156117ba57600080fd5b818701915087601f8301126117ce57600080fd5b8135818111156117e0576117e061174f565b604051601f8201601f19908116603f011681019083821181831017156118085761180861174f565b816040528281528a602084870101111561182157600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561185757600080fd5b813567ffffffffffffffff8116811461150157600080fd5b6000806020838503121561188257600080fd5b823567ffffffffffffffff8082111561189a57600080fd5b818501915085601f8301126118ae57600080fd5b8135818111156118bd57600080fd5b8660208260051b85010111156118d257600080fd5b60209290920196919550909350505050565b8015158114610aba57600080fd5b60006020828403121561190457600080fd5b8135611501816118e4565b6020808252825182820181905260009190848201906040850190845b818110156119475783518352928401929184019160010161192b565b50909695505050505050565b6000806040838503121561196657600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b818103818111156114d5576114d5611975565b6000602082840312156119b057600080fd5b8151611501816118e4565b6001600160a01b0384168152604060208201819052810182905260006001600160fb1b038311156119eb57600080fd5b8260051b8085606085013791909101606001949350505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b80820281158282048414176114d5576114d5611975565b600082611a7357634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156114d5576114d5611975565b600080600060608486031215611aa057600080fd5b83519250602084015191506040840151611ab98161171d565b809150509250925092565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220b974bdae2dc6582656b9f34af7cb678c0883d831ebcf94e0a4cf8541cef5b4aa64736f6c63430008180033

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

000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf9000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d

-----Decoded View---------------
Arg [0] : _titanLegends (address): 0x964D3Fa46faa9B341Ac7247F21607a4364D3DdF9
Arg [1] : _titanX (address): 0xF19308F923582A6f7c465e5CE7a9Dc1BEC6665B1
Arg [2] : _marketplace (address): 0xb97B9c207d9adbf22eC3791658ecE4C55211dC1d

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000964d3fa46faa9b341ac7247f21607a4364d3ddf9
Arg [1] : 000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1
Arg [2] : 000000000000000000000000b97b9c207d9adbf22ec3791658ece4c55211dc1d


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  ]

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.