ETH Price: $3,095.91 (+0.41%)
Gas: 10 Gwei

Contract

0x1FbFe1d86e9B349172fb4994857991A0Cd00f979
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Burn Pet For Mad190525472024-01-21 3:27:47171 days ago1705807667IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0016037511.56111271
Burn Pet For Mad190515252024-01-21 0:02:11171 days ago1705795331IN
0x1FbFe1d8...0Cd00f979
0 ETH0.001911112.48205924
Burn Pet For Mad190504662024-01-20 20:29:11171 days ago1705782551IN
0x1FbFe1d8...0Cd00f979
0 ETH0.001555713.70218308
Burn Pet For Mad190496622024-01-20 17:46:59171 days ago1705772819IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0020876919.19738538
Burn Loot For Ma...190491672024-01-20 16:07:11171 days ago1705766831IN
0x1FbFe1d8...0Cd00f979
0 ETH0.004980616.60849253
Burn Pet For Mad190491412024-01-20 16:01:59171 days ago1705766519IN
0x1FbFe1d8...0Cd00f979
0 ETH0.002386619.62543388
Burn Loot For Ma...190483392024-01-20 13:21:11171 days ago1705756871IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0042228413.50803206
Burn Loot For Ma...190483082024-01-20 13:14:59171 days ago1705756499IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0027640314.50638493
Burn Loot For Ma...190478352024-01-20 11:39:35171 days ago1705750775IN
0x1FbFe1d8...0Cd00f979
0 ETH0.021830113.26364433
Burn Loot For Ma...190477892024-01-20 11:30:23171 days ago1705750223IN
0x1FbFe1d8...0Cd00f979
0 ETH0.014810714.27912214
Burn Pet For Mad190477482024-01-20 11:22:11172 days ago1705749731IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0013795213.78046883
Burn Pet For Mad190387982024-01-19 5:24:11173 days ago1705641851IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0025937920.61037117
Burn Pet For Mad189942752024-01-13 0:04:35179 days ago1705104275IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0019731819.71073867
Burn Pet For Mad189897702024-01-12 8:57:35180 days ago1705049855IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0017543118.29963939
Burn Pet For Mad189511732024-01-06 22:45:35185 days ago1704581135IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0024174119.21070112
Burn Pet For Mad189038902023-12-31 7:10:59192 days ago1704006659IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0009858711.87696618
Burn Loot For Ma...189038872023-12-31 7:10:23192 days ago1704006623IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0034057110.93575907
Burn Loot For Ma...188914632023-12-29 13:13:47193 days ago1703855627IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0037241519.34236386
Burn Loot For Ma...188569522023-12-24 16:56:11198 days ago1703436971IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0058826318.3582691
Burn Pet For Mad188569412023-12-24 16:53:59198 days ago1703436839IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0034525919.66404388
Burn Loot For Ma...188044662023-12-17 8:08:47206 days ago1702800527IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0063714532.72076017
Burn Pet For Mad188044592023-12-17 8:07:23206 days ago1702800443IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0036774532.55021882
Burn Loot For Ma...187840722023-12-14 11:25:35209 days ago1702553135IN
0x1FbFe1d8...0Cd00f979
0 ETH0.011282735.42771862
Burn Pet For Mad187840572023-12-14 11:22:35209 days ago1702552955IN
0x1FbFe1d8...0Cd00f979
0 ETH0.0063491940.20821141
Burn Pet For Mad186127342023-11-20 11:34:59232 days ago1700480099IN
0x1FbFe1d8...0Cd00f979
0 ETH0.002263822.61383491
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:
MADExchange

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : MADExchange.sol
/* @author
 * ___ ___   ___    ___   ____    ____  ____   ___  _       ____  ____
 * |   |   | /   \  /   \ |    \  /    ||    \ /  _]| |     /    ||    \
 * | _   _ ||     ||     ||  _  ||  o  ||  o  )  [_ | |    |  o  ||  o  )
 * |  \_/  ||  O  ||  O  ||  |  ||     ||   _/    _]| |___ |     ||     |
 * |   |   ||     ||     ||  |  ||  _  ||  | |   [_ |     ||  _  ||  O  |
 * |   |   ||     ||     ||  |  ||  |  ||  | |     || end ||  |  || re  |
 * |___|___| \___/  \___/ |__|__||__|__||__| |_____||_____||__|__||_____|
 *
 */
// SPDX-License-Identifier: MIT
pragma solidity "0.8.17";

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";

error MADExchange_NotOpen();
error MADExchange_MustBeClosed();
error MADExchange_MutantSellingNotOpen();
error MADExchange_ContractIsOutOfMAD();
error MADExchange_NotTheOwnerOfToken();
error MADExchange_NoTokenSendt();
error MADExchange_ContractIsMissing();
error MADExchange_TooManyTokens();

interface IMoonStaking {
    function getTokenYield(
        address contractAddress,
        uint256 tokenId
    ) external view returns (uint256);

    function getStakerNFT(
        address staker
    )
        external
        view
        returns (
            uint256[] memory,
            uint256[] memory,
            uint256[] memory,
            uint256[] memory,
            uint256[] memory
        );

    function balanceOf(address owner) external view returns (uint256 balance);
}

contract MADExchange is ERC1155Holder, Ownable, ReentrancyGuard {
    IERC1155 public pet;
    IERC721 public loot;
    IERC20 public mad;
    IMoonStaking public orgStaking;
    IERC721 public breeding;

    mapping(uint256 => uint256) private _petMADrate;
    mapping(uint256 => uint256) private _mutantTypeRate;
    mapping(uint256 => uint256) private _lootMADrate;
    address private LOOT_CONTRACT;

    bool public isMADExchangeOpen;
    bool public mutantSalesStatus;
    address public mutantBuyerAddress;

    event BurnPets(address, uint256);
    event BurnLoot(address, uint256);
    event SellMutant(address, uint256);

    address DEAD;

    constructor(address _mad, address _orgStaking) {
        mad = IERC20(_mad);
        orgStaking = IMoonStaking(_orgStaking);

        isMADExchangeOpen = false;
        mutantSalesStatus = false;

        _petMADrate[0] = 1000000000000000000;
        _petMADrate[1] = 1250000000000000000;
        _petMADrate[2] = 1500000000000000000;
        _petMADrate[3] = 1750000000000000000;
        _petMADrate[4] = 2000000000000000000;
        _petMADrate[5] = 2250000000000000000;
        _petMADrate[6] = 2500000000000000000;

        _lootMADrate[12] = 1300000000000000000;
        _lootMADrate[15] = 1500000000000000000;
        _lootMADrate[20] = 1700000000000000000;
        _lootMADrate[30] = 1900000000000000000;

        _mutantTypeRate[0] = 5000000000000000000;
        _mutantTypeRate[1] = 10000000000000000000;
        _mutantTypeRate[2] = 15000000000000000000;

        DEAD = address(0x000000000000000000000000000000000000dEaD);
    }

    function setContracts(address _pet, address _loot) public onlyOwner {
        pet = IERC1155(_pet);
        loot = IERC721(_loot);
        LOOT_CONTRACT = _loot;
    }

    function setBreedingContract(address _breeding) public onlyOwner {
        breeding = IERC721(_breeding);
    }

    function burnPetForMad(
        uint256[] memory tokenIds,
        uint256[] memory amounts
    ) public nonReentrant {
        if (!isMADExchangeOpen) {
            revert MADExchange_NotOpen();
        }
        uint256 MADtoTransfer = 0;

        for (uint256 i; i < tokenIds.length; i++) {
            if (amounts[i] <= 0) revert MADExchange_NoTokenSendt();
            if (pet.balanceOf(_msgSender(), tokenIds[i]) < amounts[i])
                revert MADExchange_NotTheOwnerOfToken();

            MADtoTransfer += _petMADrate[tokenIds[i]] * amounts[i];
        }

        if (MADtoTransfer > mad.balanceOf(address(this))) revert MADExchange_ContractIsOutOfMAD();

        pet.safeBatchTransferFrom(_msgSender(), DEAD, tokenIds, amounts, "");

        emit BurnPets(_msgSender(), tokenIds.length);

        require(
            mad.transfer(_msgSender(), MADtoTransfer),
            "Failed to transfer MAD token"
        );
    }

    function burnLootForMad(uint256[] memory tokenIds) public nonReentrant {
        if (!isMADExchangeOpen) {
            revert MADExchange_NotOpen();
        }

        uint256 MADtoTransfer = 0;

        for (uint256 i; i < tokenIds.length; i++) {
            if (loot.ownerOf(tokenIds[i]) != _msgSender()) revert MADExchange_NotTheOwnerOfToken();

            MADtoTransfer += _lootMADrate[
                orgStaking.getTokenYield(LOOT_CONTRACT, tokenIds[i])
            ];
            loot.safeTransferFrom(_msgSender(), DEAD, tokenIds[i]);
        }

        if (MADtoTransfer > mad.balanceOf(address(this))) revert MADExchange_ContractIsOutOfMAD();
        
        require(
            mad.transfer(_msgSender(), MADtoTransfer),
            "Failed to transfer MAD token"
        );
        emit BurnLoot(_msgSender(), tokenIds.length);
    }

    function setIsMADExchangeOpen(bool _openStatus) public onlyOwner {
        if (address(pet) == address(0)) revert MADExchange_ContractIsMissing();
        if (address(loot) == address(0)) revert MADExchange_ContractIsMissing();

        isMADExchangeOpen = _openStatus;
    }

    function setMadExchangeBreedingStatus(
        bool _mutantSaleStatus
    ) public onlyOwner {
        if (address(breeding) == address(0)) revert MADExchange_ContractIsMissing();
        mutantSalesStatus = _mutantSaleStatus;
    }

    function setMutantWallet(address _mutantwallet) public onlyOwner {
        mutantBuyerAddress = _mutantwallet;
    }

    function mutantMADPrice(uint256 tokenId) internal view returns (uint256) {
        if (tokenId < 0) return 0;

        if (tokenId <= 8000) {
            return _mutantTypeRate[0];
        } else if (tokenId <= 16000) {
            return _mutantTypeRate[1];
        } else if (tokenId <= 18000) {
            return _mutantTypeRate[1];
        } else {
            return 0;
        }
    }

    function sellMutantsForMAD(uint256[] memory tokenIds) public nonReentrant {
        if (!mutantSalesStatus) {
            revert MADExchange_MutantSellingNotOpen();
        }

        if (tokenIds.length > 50) revert MADExchange_TooManyTokens();

        uint256 MADtoTransfer = 0;
        for (uint256 i; i < tokenIds.length; i++) {
            if (breeding.ownerOf(tokenIds[i]) != _msgSender()) {
                revert MADExchange_NotTheOwnerOfToken();
            }

            MADtoTransfer += mutantMADPrice(tokenIds[i]);
        }

        if (mad.balanceOf(address(this)) < MADtoTransfer) {
            revert MADExchange_ContractIsOutOfMAD();
        }

        for (uint256 i; i < tokenIds.length; i++) {
            breeding.safeTransferFrom(
                _msgSender(),
                address(mutantBuyerAddress),
                tokenIds[i]
            );
        }

        require(
            mad.transfer(_msgSender(), MADtoTransfer),
            "Failed to transfer MAD token"
        );

        emit SellMutant(_msgSender(), tokenIds.length);
    }

    function checkMADbalance() public view returns (uint256) {
        return mad.balanceOf(address(this));
    }

    function withdrawMAD() public onlyOwner {
        if (!isMADExchangeOpen) revert MADExchange_MustBeClosed();

        uint256 _amount = checkMADbalance();
        
        require(
            mad.transfer(_msgSender(), _amount),
            "Failed to transfer MAD token"
        );

    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure returns (bytes4) {
        return
            bytes4(
                keccak256("onERC721Received(address,address,uint256,bytes)")
            );
    }
}

File 2 of 12 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 3 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // 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;
    }
}

File 4 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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 5 of 12 : IERC20.sol
// 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);
}

File 6 of 12 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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: 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 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);
}

File 7 of 12 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 8 of 12 : IERC165.sol
// 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);
}

File 9 of 12 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 10 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

File 11 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 12 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_mad","type":"address"},{"internalType":"address","name":"_orgStaking","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MADExchange_ContractIsMissing","type":"error"},{"inputs":[],"name":"MADExchange_ContractIsOutOfMAD","type":"error"},{"inputs":[],"name":"MADExchange_MustBeClosed","type":"error"},{"inputs":[],"name":"MADExchange_MutantSellingNotOpen","type":"error"},{"inputs":[],"name":"MADExchange_NoTokenSendt","type":"error"},{"inputs":[],"name":"MADExchange_NotOpen","type":"error"},{"inputs":[],"name":"MADExchange_NotTheOwnerOfToken","type":"error"},{"inputs":[],"name":"MADExchange_TooManyTokens","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"BurnLoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"BurnPets","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":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"SellMutant","type":"event"},{"inputs":[],"name":"breeding","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burnLootForMad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnPetForMad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkMADbalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMADExchangeOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loot","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mad","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mutantBuyerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mutantSalesStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":"pure","type":"function"},{"inputs":[],"name":"orgStaking","outputs":[{"internalType":"contract IMoonStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pet","outputs":[{"internalType":"contract IERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"sellMutantsForMAD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_breeding","type":"address"}],"name":"setBreedingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pet","type":"address"},{"internalType":"address","name":"_loot","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openStatus","type":"bool"}],"name":"setIsMADExchangeOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_mutantSaleStatus","type":"bool"}],"name":"setMadExchangeBreedingStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mutantwallet","type":"address"}],"name":"setMutantWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawMAD","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200318d3803806200318d833981810160405281019062000037919062000463565b620000576200004b6200032d60201b60201c565b6200033560201b60201c565b6001808190555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600a60146101000a81548160ff0219169083151502179055506000600a60156101000a81548160ff021916908315150217905550670de0b6b3a76400006007600080815260200190815260200160002081905550671158e460913d00006007600060018152602001908152602001600020819055506714d1120d7b1600006007600060028152602001908152602001600020819055506718493fba64ef0000600760006003815260200190815260200160002081905550671bc16d674ec80000600760006004815260200190815260200160002081905550671f399b1438a100006007600060058152602001908152602001600020819055506722b1c8c1227a000060076000600681526020019081526020016000208190555067120a871cc002000060096000600c8152602001908152602001600020819055506714d1120d7b16000060096000600f8152602001908152602001600020819055506717979cfe362a0000600960006014815260200190815260200160002081905550671a5e27eef13e000060096000601e815260200190815260200160002081905550674563918244f400006008600080815260200190815260200160002081905550678ac7230489e8000060086000600181526020019081526020016000208190555067d02ab486cedc000060086000600281526020019081526020016000208190555061dead600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620004aa565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200042b82620003fe565b9050919050565b6200043d816200041e565b81146200044957600080fd5b50565b6000815190506200045d8162000432565b92915050565b600080604083850312156200047d576200047c620003f9565b5b60006200048d858286016200044c565b9250506020620004a0858286016200044c565b9150509250929050565b612cd380620004ba6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80638cc02dd6116100de578063d6a7dbe011610097578063e9b7d7dd11610071578063e9b7d7dd146103ee578063f23a6e611461040c578063f2fde38b1461043c578063f620e6581461045857610173565b8063d6a7dbe0146103ac578063d8952a49146103b6578063dfc8934a146103d257610173565b80638cc02dd6146102ea5780638da5cb5b146103065780639b7b2ab014610324578063a53e03d814610342578063a83990341461035e578063bc197c811461037c57610173565b8063322d1bac11610130578063322d1bac1461024e57806333d9fb5f1461026c5780633954fe771461028a57806339fa1791146102a6578063715018a6146102c45780638c5527cf146102ce57610173565b806301ffc9a714610178578063150b7a02146101a857806318097196146101d857806328556bbb146101f65780632a9c3777146102145780632de908fb14610232575b600080fd5b610192600480360381019061018d9190611e98565b610474565b60405161019f9190611ee0565b60405180910390f35b6101c260048036038101906101bd9190611ff4565b6104ee565b6040516101cf919061208b565b60405180910390f35b6101e061051c565b6040516101ed9190612105565b60405180910390f35b6101fe610542565b60405161020b9190612141565b60405180910390f35b61021c610568565b604051610229919061217d565b60405180910390f35b61024c600480360381019061024791906122e7565b61058e565b005b610256610a86565b604051610263919061233f565b60405180910390f35b610274610b29565b6040516102819190611ee0565b60405180910390f35b6102a4600480360381019061029f9190612386565b610b3c565b005b6102ae610be9565b6040516102bb91906123c2565b60405180910390f35b6102cc610c0f565b005b6102e860048036038101906102e391906123dd565b610c23565b005b61030460048036038101906102ff91906122e7565b610c6f565b005b61030e6111d5565b60405161031b91906123c2565b60405180910390f35b61032c6111fe565b6040516103399190612141565b60405180910390f35b61035c6004803603810190610357919061240a565b611224565b005b61036661171c565b6040516103739190611ee0565b60405180910390f35b61039660048036038101906103919190612537565b61172f565b6040516103a3919061208b565b60405180910390f35b6103b4611744565b005b6103d060048036038101906103cb9190612606565b611887565b005b6103ec60048036038101906103e79190612386565b611956565b005b6103f6611a8b565b6040516104039190612667565b60405180910390f35b61042660048036038101906104219190612682565b611ab1565b604051610433919061208b565b60405180910390f35b610456600480360381019061045191906123dd565b611ac6565b005b610472600480360381019061046d91906123dd565b611b49565b005b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104e757506104e682611b95565b5b9050919050565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610596611bff565b600a60159054906101000a900460ff166105dc576040517fd7428be000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603281511115610618576040517fba7c6bdb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b82518110156107895761062d611c4e565b73ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e85848151811061069457610693612719565b5b60200260200101516040518263ffffffff1660e01b81526004016106b8919061233f565b602060405180830381865afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f9919061275d565b73ffffffffffffffffffffffffffffffffffffffff1614610746576040517f40244d9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61076983828151811061075c5761075b612719565b5b6020026020010151611c56565b8261077491906127b9565b91508080610781906127ed565b91505061061c565b5080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107e691906123c2565b602060405180830381865afa158015610803573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610827919061284a565b101561085f576040517f37b98df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561095257600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e6108b1611c4e565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168685815181106108e7576108e6612719565b5b60200260200101516040518463ffffffff1660e01b815260040161090d93929190612877565b600060405180830381600087803b15801561092757600080fd5b505af115801561093b573d6000803e3d6000fd5b50505050808061094a906127ed565b915050610862565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610999611c4e565b836040518363ffffffff1660e01b81526004016109b79291906128ae565b6020604051808303816000875af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fa91906128ec565b610a39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3090612976565b60405180910390fd5b7f93635baef7d3c86e1011a03ee793bf0ea5e233a570a3b1701b3620df7cecd16e610a62611c4e565b8351604051610a729291906128ae565b60405180910390a150610a83611ce1565b50565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610ae391906123c2565b602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b24919061284a565b905090565b600a60149054906101000a900460ff1681565b610b44611cea565b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610bcc576040517fe6ea851200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600a60156101000a81548160ff02191690831515021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610c17611cea565b610c216000611d68565b565b610c2b611cea565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c77611bff565b600a60149054906101000a900460ff16610cbd576040517f7a6a59ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8251811015610fcc57610cd2611c4e565b73ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e858481518110610d3957610d38612719565b5b60200260200101516040518263ffffffff1660e01b8152600401610d5d919061233f565b602060405180830381865afa158015610d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9e919061275d565b73ffffffffffffffffffffffffffffffffffffffff1614610deb576040517f40244d9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60096000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166361499ab9600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878681518110610e6357610e62612719565b5b60200260200101516040518363ffffffff1660e01b8152600401610e889291906128ae565b602060405180830381865afa158015610ea5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec9919061284a565b81526020019081526020016000205482610ee391906127b9565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e610f2b611c4e565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868581518110610f6157610f60612719565b5b60200260200101516040518463ffffffff1660e01b8152600401610f8793929190612877565b600060405180830381600087803b158015610fa157600080fd5b505af1158015610fb5573d6000803e3d6000fd5b505050508080610fc4906127ed565b915050610cc1565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161102891906123c2565b602060405180830381865afa158015611045573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611069919061284a565b8111156110a2576040517f37b98df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6110e8611c4e565b836040518363ffffffff1660e01b81526004016111069291906128ae565b6020604051808303816000875af1158015611125573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114991906128ec565b611188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117f90612976565b60405180910390fd5b7f24306982c4cae4153f08634680a26395e5400b172b978317092b5fa80e8a1ec86111b1611c4e565b83516040516111c19291906128ae565b60405180910390a1506111d2611ce1565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61122c611bff565b600a60149054906101000a900460ff16611272576040517f7a6a59ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b835181101561145757600083828151811061129457611293612719565b5b6020026020010151116112d3576040517fdd4dbbb100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8281815181106112e6576112e5612719565b5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e611333611c4e565b87858151811061134657611345612719565b5b60200260200101516040518363ffffffff1660e01b815260040161136b9291906128ae565b602060405180830381865afa158015611388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ac919061284a565b10156113e4576040517f40244d9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8281815181106113f7576113f6612719565b5b60200260200101516007600086848151811061141657611415612719565b5b60200260200101518152602001908152602001600020546114379190612996565b8261144291906127b9565b9150808061144f906127ed565b915050611276565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016114b391906123c2565b602060405180830381865afa1580156114d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f4919061284a565b81111561152d576040517f37b98df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6611573611c4e565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686866040518563ffffffff1660e01b81526004016115b79493929190612acd565b600060405180830381600087803b1580156115d157600080fd5b505af11580156115e5573d6000803e3d6000fd5b505050507eb667dae2bf8039fdb89cd8aff64fb456d85bda7b553017828159d531678115611611611c4e565b84516040516116219291906128ae565b60405180910390a1600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61166f611c4e565b836040518363ffffffff1660e01b815260040161168d9291906128ae565b6020604051808303816000875af11580156116ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d091906128ec565b61170f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170690612976565b60405180910390fd5b50611718611ce1565b5050565b600a60159054906101000a900460ff1681565b600063bc197c8160e01b905095945050505050565b61174c611cea565b600a60149054906101000a900460ff16611792576040517f9e529d8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061179c610a86565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6117e4611c4e565b836040518363ffffffff1660e01b81526004016118029291906128ae565b6020604051808303816000875af1158015611821573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184591906128ec565b611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90612976565b60405180910390fd5b50565b61188f611cea565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b61195e611cea565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036119e6576040517fe6ea851200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611a6e576040517fe6ea851200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600a60146101000a81548160ff02191690831515021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600063f23a6e6160e01b905095945050505050565b611ace611cea565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611b3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3490612ba5565b60405180910390fd5b611b4681611d68565b50565b611b51611cea565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600260015403611c44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3b90612c11565b60405180910390fd5b6002600181905550565b600033905090565b600080821015611c695760009050611cdc565b611f408211611c8d5760086000808152602001908152602001600020549050611cdc565b613e808211611cb2576008600060018152602001908152602001600020549050611cdc565b6146508211611cd7576008600060018152602001908152602001600020549050611cdc565b600090505b919050565b60018081905550565b611cf2611c4e565b73ffffffffffffffffffffffffffffffffffffffff16611d106111d5565b73ffffffffffffffffffffffffffffffffffffffff1614611d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5d90612c7d565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611e7581611e40565b8114611e8057600080fd5b50565b600081359050611e9281611e6c565b92915050565b600060208284031215611eae57611ead611e36565b5b6000611ebc84828501611e83565b91505092915050565b60008115159050919050565b611eda81611ec5565b82525050565b6000602082019050611ef56000830184611ed1565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f2682611efb565b9050919050565b611f3681611f1b565b8114611f4157600080fd5b50565b600081359050611f5381611f2d565b92915050565b6000819050919050565b611f6c81611f59565b8114611f7757600080fd5b50565b600081359050611f8981611f63565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611fb457611fb3611f8f565b5b8235905067ffffffffffffffff811115611fd157611fd0611f94565b5b602083019150836001820283011115611fed57611fec611f99565b5b9250929050565b6000806000806000608086880312156120105761200f611e36565b5b600061201e88828901611f44565b955050602061202f88828901611f44565b945050604061204088828901611f7a565b935050606086013567ffffffffffffffff81111561206157612060611e3b565b5b61206d88828901611f9e565b92509250509295509295909350565b61208581611e40565b82525050565b60006020820190506120a0600083018461207c565b92915050565b6000819050919050565b60006120cb6120c66120c184611efb565b6120a6565b611efb565b9050919050565b60006120dd826120b0565b9050919050565b60006120ef826120d2565b9050919050565b6120ff816120e4565b82525050565b600060208201905061211a60008301846120f6565b92915050565b600061212b826120d2565b9050919050565b61213b81612120565b82525050565b60006020820190506121566000830184612132565b92915050565b6000612167826120d2565b9050919050565b6121778161215c565b82525050565b6000602082019050612192600083018461216e565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6121e182612198565b810181811067ffffffffffffffff82111715612200576121ff6121a9565b5b80604052505050565b6000612213611e2c565b905061221f82826121d8565b919050565b600067ffffffffffffffff82111561223f5761223e6121a9565b5b602082029050602081019050919050565b600061226361225e84612224565b612209565b9050808382526020820190506020840283018581111561228657612285611f99565b5b835b818110156122af578061229b8882611f7a565b845260208401935050602081019050612288565b5050509392505050565b600082601f8301126122ce576122cd611f8f565b5b81356122de848260208601612250565b91505092915050565b6000602082840312156122fd576122fc611e36565b5b600082013567ffffffffffffffff81111561231b5761231a611e3b565b5b612327848285016122b9565b91505092915050565b61233981611f59565b82525050565b60006020820190506123546000830184612330565b92915050565b61236381611ec5565b811461236e57600080fd5b50565b6000813590506123808161235a565b92915050565b60006020828403121561239c5761239b611e36565b5b60006123aa84828501612371565b91505092915050565b6123bc81611f1b565b82525050565b60006020820190506123d760008301846123b3565b92915050565b6000602082840312156123f3576123f2611e36565b5b600061240184828501611f44565b91505092915050565b6000806040838503121561242157612420611e36565b5b600083013567ffffffffffffffff81111561243f5761243e611e3b565b5b61244b858286016122b9565b925050602083013567ffffffffffffffff81111561246c5761246b611e3b565b5b612478858286016122b9565b9150509250929050565b600080fd5b600067ffffffffffffffff8211156124a2576124a16121a9565b5b6124ab82612198565b9050602081019050919050565b82818337600083830152505050565b60006124da6124d584612487565b612209565b9050828152602081018484840111156124f6576124f5612482565b5b6125018482856124b8565b509392505050565b600082601f83011261251e5761251d611f8f565b5b813561252e8482602086016124c7565b91505092915050565b600080600080600060a0868803121561255357612552611e36565b5b600061256188828901611f44565b955050602061257288828901611f44565b945050604086013567ffffffffffffffff81111561259357612592611e3b565b5b61259f888289016122b9565b935050606086013567ffffffffffffffff8111156125c0576125bf611e3b565b5b6125cc888289016122b9565b925050608086013567ffffffffffffffff8111156125ed576125ec611e3b565b5b6125f988828901612509565b9150509295509295909350565b6000806040838503121561261d5761261c611e36565b5b600061262b85828601611f44565b925050602061263c85828601611f44565b9150509250929050565b6000612651826120d2565b9050919050565b61266181612646565b82525050565b600060208201905061267c6000830184612658565b92915050565b600080600080600060a0868803121561269e5761269d611e36565b5b60006126ac88828901611f44565b95505060206126bd88828901611f44565b94505060406126ce88828901611f7a565b93505060606126df88828901611f7a565b925050608086013567ffffffffffffffff811115612700576126ff611e3b565b5b61270c88828901612509565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008151905061275781611f2d565b92915050565b60006020828403121561277357612772611e36565b5b600061278184828501612748565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006127c482611f59565b91506127cf83611f59565b92508282019050808211156127e7576127e661278a565b5b92915050565b60006127f882611f59565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361282a5761282961278a565b5b600182019050919050565b60008151905061284481611f63565b92915050565b6000602082840312156128605761285f611e36565b5b600061286e84828501612835565b91505092915050565b600060608201905061288c60008301866123b3565b61289960208301856123b3565b6128a66040830184612330565b949350505050565b60006040820190506128c360008301856123b3565b6128d06020830184612330565b9392505050565b6000815190506128e68161235a565b92915050565b60006020828403121561290257612901611e36565b5b6000612910848285016128d7565b91505092915050565b600082825260208201905092915050565b7f4661696c656420746f207472616e73666572204d414420746f6b656e00000000600082015250565b6000612960601c83612919565b915061296b8261292a565b602082019050919050565b6000602082019050818103600083015261298f81612953565b9050919050565b60006129a182611f59565b91506129ac83611f59565b92508282026129ba81611f59565b915082820484148315176129d1576129d061278a565b5b5092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a0d81611f59565b82525050565b6000612a1f8383612a04565b60208301905092915050565b6000602082019050919050565b6000612a43826129d8565b612a4d81856129e3565b9350612a58836129f4565b8060005b83811015612a89578151612a708882612a13565b9750612a7b83612a2b565b925050600181019050612a5c565b5085935050505092915050565b600082825260208201905092915050565b50565b6000612ab7600083612a96565b9150612ac282612aa7565b600082019050919050565b600060a082019050612ae260008301876123b3565b612aef60208301866123b3565b8181036040830152612b018185612a38565b90508181036060830152612b158184612a38565b90508181036080830152612b2881612aaa565b905095945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612b8f602683612919565b9150612b9a82612b33565b604082019050919050565b60006020820190508181036000830152612bbe81612b82565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000612bfb601f83612919565b9150612c0682612bc5565b602082019050919050565b60006020820190508181036000830152612c2a81612bee565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612c67602083612919565b9150612c7282612c31565b602082019050919050565b60006020820190508181036000830152612c9681612c5a565b905091905056fea26469706673582212204151801bfdca9d65f90dce4c4b0f5dcbaf8230926eb589dff02d87a25e7f519964736f6c634300081100330000000000000000000000005ef5c77c15ec367769c6f4cc8e7766b16865646800000000000000000000000000a103267a22971375c3c37d6e1f1bdfb548e946

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101735760003560e01c80638cc02dd6116100de578063d6a7dbe011610097578063e9b7d7dd11610071578063e9b7d7dd146103ee578063f23a6e611461040c578063f2fde38b1461043c578063f620e6581461045857610173565b8063d6a7dbe0146103ac578063d8952a49146103b6578063dfc8934a146103d257610173565b80638cc02dd6146102ea5780638da5cb5b146103065780639b7b2ab014610324578063a53e03d814610342578063a83990341461035e578063bc197c811461037c57610173565b8063322d1bac11610130578063322d1bac1461024e57806333d9fb5f1461026c5780633954fe771461028a57806339fa1791146102a6578063715018a6146102c45780638c5527cf146102ce57610173565b806301ffc9a714610178578063150b7a02146101a857806318097196146101d857806328556bbb146101f65780632a9c3777146102145780632de908fb14610232575b600080fd5b610192600480360381019061018d9190611e98565b610474565b60405161019f9190611ee0565b60405180910390f35b6101c260048036038101906101bd9190611ff4565b6104ee565b6040516101cf919061208b565b60405180910390f35b6101e061051c565b6040516101ed9190612105565b60405180910390f35b6101fe610542565b60405161020b9190612141565b60405180910390f35b61021c610568565b604051610229919061217d565b60405180910390f35b61024c600480360381019061024791906122e7565b61058e565b005b610256610a86565b604051610263919061233f565b60405180910390f35b610274610b29565b6040516102819190611ee0565b60405180910390f35b6102a4600480360381019061029f9190612386565b610b3c565b005b6102ae610be9565b6040516102bb91906123c2565b60405180910390f35b6102cc610c0f565b005b6102e860048036038101906102e391906123dd565b610c23565b005b61030460048036038101906102ff91906122e7565b610c6f565b005b61030e6111d5565b60405161031b91906123c2565b60405180910390f35b61032c6111fe565b6040516103399190612141565b60405180910390f35b61035c6004803603810190610357919061240a565b611224565b005b61036661171c565b6040516103739190611ee0565b60405180910390f35b61039660048036038101906103919190612537565b61172f565b6040516103a3919061208b565b60405180910390f35b6103b4611744565b005b6103d060048036038101906103cb9190612606565b611887565b005b6103ec60048036038101906103e79190612386565b611956565b005b6103f6611a8b565b6040516104039190612667565b60405180910390f35b61042660048036038101906104219190612682565b611ab1565b604051610433919061208b565b60405180910390f35b610456600480360381019061045191906123dd565b611ac6565b005b610472600480360381019061046d91906123dd565b611b49565b005b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104e757506104e682611b95565b5b9050919050565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610596611bff565b600a60159054906101000a900460ff166105dc576040517fd7428be000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603281511115610618576040517fba7c6bdb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b82518110156107895761062d611c4e565b73ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e85848151811061069457610693612719565b5b60200260200101516040518263ffffffff1660e01b81526004016106b8919061233f565b602060405180830381865afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f9919061275d565b73ffffffffffffffffffffffffffffffffffffffff1614610746576040517f40244d9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61076983828151811061075c5761075b612719565b5b6020026020010151611c56565b8261077491906127b9565b91508080610781906127ed565b91505061061c565b5080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107e691906123c2565b602060405180830381865afa158015610803573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610827919061284a565b101561085f576040517f37b98df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561095257600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e6108b1611c4e565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168685815181106108e7576108e6612719565b5b60200260200101516040518463ffffffff1660e01b815260040161090d93929190612877565b600060405180830381600087803b15801561092757600080fd5b505af115801561093b573d6000803e3d6000fd5b50505050808061094a906127ed565b915050610862565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610999611c4e565b836040518363ffffffff1660e01b81526004016109b79291906128ae565b6020604051808303816000875af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fa91906128ec565b610a39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3090612976565b60405180910390fd5b7f93635baef7d3c86e1011a03ee793bf0ea5e233a570a3b1701b3620df7cecd16e610a62611c4e565b8351604051610a729291906128ae565b60405180910390a150610a83611ce1565b50565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610ae391906123c2565b602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b24919061284a565b905090565b600a60149054906101000a900460ff1681565b610b44611cea565b600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610bcc576040517fe6ea851200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600a60156101000a81548160ff02191690831515021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610c17611cea565b610c216000611d68565b565b610c2b611cea565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c77611bff565b600a60149054906101000a900460ff16610cbd576040517f7a6a59ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8251811015610fcc57610cd2611c4e565b73ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e858481518110610d3957610d38612719565b5b60200260200101516040518263ffffffff1660e01b8152600401610d5d919061233f565b602060405180830381865afa158015610d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9e919061275d565b73ffffffffffffffffffffffffffffffffffffffff1614610deb576040517f40244d9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60096000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166361499ab9600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878681518110610e6357610e62612719565b5b60200260200101516040518363ffffffff1660e01b8152600401610e889291906128ae565b602060405180830381865afa158015610ea5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec9919061284a565b81526020019081526020016000205482610ee391906127b9565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e610f2b611c4e565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868581518110610f6157610f60612719565b5b60200260200101516040518463ffffffff1660e01b8152600401610f8793929190612877565b600060405180830381600087803b158015610fa157600080fd5b505af1158015610fb5573d6000803e3d6000fd5b505050508080610fc4906127ed565b915050610cc1565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161102891906123c2565b602060405180830381865afa158015611045573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611069919061284a565b8111156110a2576040517f37b98df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6110e8611c4e565b836040518363ffffffff1660e01b81526004016111069291906128ae565b6020604051808303816000875af1158015611125573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114991906128ec565b611188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117f90612976565b60405180910390fd5b7f24306982c4cae4153f08634680a26395e5400b172b978317092b5fa80e8a1ec86111b1611c4e565b83516040516111c19291906128ae565b60405180910390a1506111d2611ce1565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61122c611bff565b600a60149054906101000a900460ff16611272576040517f7a6a59ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b835181101561145757600083828151811061129457611293612719565b5b6020026020010151116112d3576040517fdd4dbbb100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8281815181106112e6576112e5612719565b5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e611333611c4e565b87858151811061134657611345612719565b5b60200260200101516040518363ffffffff1660e01b815260040161136b9291906128ae565b602060405180830381865afa158015611388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ac919061284a565b10156113e4576040517f40244d9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8281815181106113f7576113f6612719565b5b60200260200101516007600086848151811061141657611415612719565b5b60200260200101518152602001908152602001600020546114379190612996565b8261144291906127b9565b9150808061144f906127ed565b915050611276565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016114b391906123c2565b602060405180830381865afa1580156114d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f4919061284a565b81111561152d576040517f37b98df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6611573611c4e565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686866040518563ffffffff1660e01b81526004016115b79493929190612acd565b600060405180830381600087803b1580156115d157600080fd5b505af11580156115e5573d6000803e3d6000fd5b505050507eb667dae2bf8039fdb89cd8aff64fb456d85bda7b553017828159d531678115611611611c4e565b84516040516116219291906128ae565b60405180910390a1600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61166f611c4e565b836040518363ffffffff1660e01b815260040161168d9291906128ae565b6020604051808303816000875af11580156116ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d091906128ec565b61170f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170690612976565b60405180910390fd5b50611718611ce1565b5050565b600a60159054906101000a900460ff1681565b600063bc197c8160e01b905095945050505050565b61174c611cea565b600a60149054906101000a900460ff16611792576040517f9e529d8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061179c610a86565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6117e4611c4e565b836040518363ffffffff1660e01b81526004016118029291906128ae565b6020604051808303816000875af1158015611821573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184591906128ec565b611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90612976565b60405180910390fd5b50565b61188f611cea565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b61195e611cea565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036119e6576040517fe6ea851200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611a6e576040517fe6ea851200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600a60146101000a81548160ff02191690831515021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600063f23a6e6160e01b905095945050505050565b611ace611cea565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611b3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3490612ba5565b60405180910390fd5b611b4681611d68565b50565b611b51611cea565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600260015403611c44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3b90612c11565b60405180910390fd5b6002600181905550565b600033905090565b600080821015611c695760009050611cdc565b611f408211611c8d5760086000808152602001908152602001600020549050611cdc565b613e808211611cb2576008600060018152602001908152602001600020549050611cdc565b6146508211611cd7576008600060018152602001908152602001600020549050611cdc565b600090505b919050565b60018081905550565b611cf2611c4e565b73ffffffffffffffffffffffffffffffffffffffff16611d106111d5565b73ffffffffffffffffffffffffffffffffffffffff1614611d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5d90612c7d565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611e7581611e40565b8114611e8057600080fd5b50565b600081359050611e9281611e6c565b92915050565b600060208284031215611eae57611ead611e36565b5b6000611ebc84828501611e83565b91505092915050565b60008115159050919050565b611eda81611ec5565b82525050565b6000602082019050611ef56000830184611ed1565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f2682611efb565b9050919050565b611f3681611f1b565b8114611f4157600080fd5b50565b600081359050611f5381611f2d565b92915050565b6000819050919050565b611f6c81611f59565b8114611f7757600080fd5b50565b600081359050611f8981611f63565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611fb457611fb3611f8f565b5b8235905067ffffffffffffffff811115611fd157611fd0611f94565b5b602083019150836001820283011115611fed57611fec611f99565b5b9250929050565b6000806000806000608086880312156120105761200f611e36565b5b600061201e88828901611f44565b955050602061202f88828901611f44565b945050604061204088828901611f7a565b935050606086013567ffffffffffffffff81111561206157612060611e3b565b5b61206d88828901611f9e565b92509250509295509295909350565b61208581611e40565b82525050565b60006020820190506120a0600083018461207c565b92915050565b6000819050919050565b60006120cb6120c66120c184611efb565b6120a6565b611efb565b9050919050565b60006120dd826120b0565b9050919050565b60006120ef826120d2565b9050919050565b6120ff816120e4565b82525050565b600060208201905061211a60008301846120f6565b92915050565b600061212b826120d2565b9050919050565b61213b81612120565b82525050565b60006020820190506121566000830184612132565b92915050565b6000612167826120d2565b9050919050565b6121778161215c565b82525050565b6000602082019050612192600083018461216e565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6121e182612198565b810181811067ffffffffffffffff82111715612200576121ff6121a9565b5b80604052505050565b6000612213611e2c565b905061221f82826121d8565b919050565b600067ffffffffffffffff82111561223f5761223e6121a9565b5b602082029050602081019050919050565b600061226361225e84612224565b612209565b9050808382526020820190506020840283018581111561228657612285611f99565b5b835b818110156122af578061229b8882611f7a565b845260208401935050602081019050612288565b5050509392505050565b600082601f8301126122ce576122cd611f8f565b5b81356122de848260208601612250565b91505092915050565b6000602082840312156122fd576122fc611e36565b5b600082013567ffffffffffffffff81111561231b5761231a611e3b565b5b612327848285016122b9565b91505092915050565b61233981611f59565b82525050565b60006020820190506123546000830184612330565b92915050565b61236381611ec5565b811461236e57600080fd5b50565b6000813590506123808161235a565b92915050565b60006020828403121561239c5761239b611e36565b5b60006123aa84828501612371565b91505092915050565b6123bc81611f1b565b82525050565b60006020820190506123d760008301846123b3565b92915050565b6000602082840312156123f3576123f2611e36565b5b600061240184828501611f44565b91505092915050565b6000806040838503121561242157612420611e36565b5b600083013567ffffffffffffffff81111561243f5761243e611e3b565b5b61244b858286016122b9565b925050602083013567ffffffffffffffff81111561246c5761246b611e3b565b5b612478858286016122b9565b9150509250929050565b600080fd5b600067ffffffffffffffff8211156124a2576124a16121a9565b5b6124ab82612198565b9050602081019050919050565b82818337600083830152505050565b60006124da6124d584612487565b612209565b9050828152602081018484840111156124f6576124f5612482565b5b6125018482856124b8565b509392505050565b600082601f83011261251e5761251d611f8f565b5b813561252e8482602086016124c7565b91505092915050565b600080600080600060a0868803121561255357612552611e36565b5b600061256188828901611f44565b955050602061257288828901611f44565b945050604086013567ffffffffffffffff81111561259357612592611e3b565b5b61259f888289016122b9565b935050606086013567ffffffffffffffff8111156125c0576125bf611e3b565b5b6125cc888289016122b9565b925050608086013567ffffffffffffffff8111156125ed576125ec611e3b565b5b6125f988828901612509565b9150509295509295909350565b6000806040838503121561261d5761261c611e36565b5b600061262b85828601611f44565b925050602061263c85828601611f44565b9150509250929050565b6000612651826120d2565b9050919050565b61266181612646565b82525050565b600060208201905061267c6000830184612658565b92915050565b600080600080600060a0868803121561269e5761269d611e36565b5b60006126ac88828901611f44565b95505060206126bd88828901611f44565b94505060406126ce88828901611f7a565b93505060606126df88828901611f7a565b925050608086013567ffffffffffffffff811115612700576126ff611e3b565b5b61270c88828901612509565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008151905061275781611f2d565b92915050565b60006020828403121561277357612772611e36565b5b600061278184828501612748565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006127c482611f59565b91506127cf83611f59565b92508282019050808211156127e7576127e661278a565b5b92915050565b60006127f882611f59565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361282a5761282961278a565b5b600182019050919050565b60008151905061284481611f63565b92915050565b6000602082840312156128605761285f611e36565b5b600061286e84828501612835565b91505092915050565b600060608201905061288c60008301866123b3565b61289960208301856123b3565b6128a66040830184612330565b949350505050565b60006040820190506128c360008301856123b3565b6128d06020830184612330565b9392505050565b6000815190506128e68161235a565b92915050565b60006020828403121561290257612901611e36565b5b6000612910848285016128d7565b91505092915050565b600082825260208201905092915050565b7f4661696c656420746f207472616e73666572204d414420746f6b656e00000000600082015250565b6000612960601c83612919565b915061296b8261292a565b602082019050919050565b6000602082019050818103600083015261298f81612953565b9050919050565b60006129a182611f59565b91506129ac83611f59565b92508282026129ba81611f59565b915082820484148315176129d1576129d061278a565b5b5092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a0d81611f59565b82525050565b6000612a1f8383612a04565b60208301905092915050565b6000602082019050919050565b6000612a43826129d8565b612a4d81856129e3565b9350612a58836129f4565b8060005b83811015612a89578151612a708882612a13565b9750612a7b83612a2b565b925050600181019050612a5c565b5085935050505092915050565b600082825260208201905092915050565b50565b6000612ab7600083612a96565b9150612ac282612aa7565b600082019050919050565b600060a082019050612ae260008301876123b3565b612aef60208301866123b3565b8181036040830152612b018185612a38565b90508181036060830152612b158184612a38565b90508181036080830152612b2881612aaa565b905095945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612b8f602683612919565b9150612b9a82612b33565b604082019050919050565b60006020820190508181036000830152612bbe81612b82565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000612bfb601f83612919565b9150612c0682612bc5565b602082019050919050565b60006020820190508181036000830152612c2a81612bee565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612c67602083612919565b9150612c7282612c31565b602082019050919050565b60006020820190508181036000830152612c9681612c5a565b905091905056fea26469706673582212204151801bfdca9d65f90dce4c4b0f5dcbaf8230926eb589dff02d87a25e7f519964736f6c63430008110033

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

0000000000000000000000005ef5c77c15ec367769c6f4cc8e7766b16865646800000000000000000000000000a103267a22971375c3c37d6e1f1bdfb548e946

-----Decoded View---------------
Arg [0] : _mad (address): 0x5ef5C77c15ec367769c6F4cC8e7766b168656468
Arg [1] : _orgStaking (address): 0x00a103267A22971375C3C37d6E1f1BDfb548e946

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005ef5c77c15ec367769c6f4cc8e7766b168656468
Arg [1] : 00000000000000000000000000a103267a22971375c3c37d6e1f1bdfb548e946


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.