ETH Price: $3,958.80 (+1.25%)

Contract

0xAE78de29c0eBE2c9fDe2E288471c3A2E8729c2A7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit Tokens139117492021-12-31 7:18:051081 days ago1640935085IN
0xAE78de29...E8729c2A7
0 ETH0.0161602668
Deposit Tokens138426032021-12-20 14:32:311092 days ago1640010751IN
0xAE78de29...E8729c2A7
0 ETH0.010561243.55153033
Deposit Tokens137672232021-12-08 21:42:051103 days ago1638999725IN
0xAE78de29...E8729c2A7
0 ETH0.0104485576
Deposit Tokens137524152021-12-06 12:56:211106 days ago1638795381IN
0xAE78de29...E8729c2A7
0 ETH0.0199138882.13978028
Deposit Tokens137511882021-12-06 8:18:121106 days ago1638778692IN
0xAE78de29...E8729c2A7
0 ETH0.0204555786.07835133
Deposit Tokens137190002021-12-01 4:28:231111 days ago1638332903IN
0xAE78de29...E8729c2A7
0 ETH0.01765656123.98138499
Deposit Tokens137189842021-12-01 4:25:251111 days ago1638332725IN
0xAE78de29...E8729c2A7
0 ETH0.00589601147.40049606
With Draw Tokens137189012021-12-01 4:07:471111 days ago1638331667IN
0xAE78de29...E8729c2A7
0 ETH0.01026583158.09643567
Deposit Tokens137178102021-11-30 23:52:021111 days ago1638316322IN
0xAE78de29...E8729c2A7
0 ETH0.01507096105.97760161
Deposit Tokens137153942021-11-30 14:50:011112 days ago1638283801IN
0xAE78de29...E8729c2A7
0 ETH0.02547236107.16769724
Deposit Tokens137138102021-11-30 8:41:001112 days ago1638261660IN
0xAE78de29...E8729c2A7
0 ETH0.02709495114
Deposit Tokens136799682021-11-24 22:58:161117 days ago1637794696IN
0xAE78de29...E8729c2A7
0 ETH0.02812113118.32357941
Deposit Tokens136794142021-11-24 20:49:191117 days ago1637786959IN
0xAE78de29...E8729c2A7
0 ETH0.03062214128.83390627
Deposit Tokens136705442021-11-23 11:20:201119 days ago1637666420IN
0xAE78de29...E8729c2A7
0 ETH0.0170341771.63387528
Deposit Tokens136699232021-11-23 8:58:411119 days ago1637657921IN
0xAE78de29...E8729c2A7
0 ETH0.0201971884.98244705
Deposit Tokens136580472021-11-21 11:58:171121 days ago1637495897IN
0xAE78de29...E8729c2A7
0 ETH0.0160025566
Deposit Tokens136568402021-11-21 7:32:481121 days ago1637479968IN
0xAE78de29...E8729c2A7
0 ETH0.0217442389.68505322
Deposit Tokens136496252021-11-20 3:54:431122 days ago1637380483IN
0xAE78de29...E8729c2A7
0 ETH0.0282682686.31399485
Deposit Tokens136484512021-11-19 23:26:541122 days ago1637364414IN
0xAE78de29...E8729c2A7
0 ETH0.0316672130.64513155
With Draw Tokens136484192021-11-19 23:19:391122 days ago1637363979IN
0xAE78de29...E8729c2A7
0 ETH0.01124087119.09852885
Deposit Tokens136480762021-11-19 22:03:451122 days ago1637359425IN
0xAE78de29...E8729c2A7
0 ETH0.0322258132.92994882
Set Minimum Stak...136469812021-11-19 17:51:041122 days ago1637344264IN
0xAE78de29...E8729c2A7
0 ETH0.00454389158.55585416
Approve Admin136438052021-11-19 5:25:551123 days ago1637299555IN
0xAE78de29...E8729c2A7
0 ETH0.01158795125.26844887
Deposit Tokens136437632021-11-19 5:15:061123 days ago1637298906IN
0xAE78de29...E8729c2A7
0 ETH0.03312506129.04645696
Set FUD Contract136437592021-11-19 5:14:111123 days ago1637298851IN
0xAE78de29...E8729c2A7
0 ETH0.00621307134.63360144
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
139117492021-12-31 7:18:051081 days ago1640935085
0xAE78de29...E8729c2A7
0 ETH
139117492021-12-31 7:18:051081 days ago1640935085
0xAE78de29...E8729c2A7
0 ETH
139117492021-12-31 7:18:051081 days ago1640935085
0xAE78de29...E8729c2A7
0 ETH
138426032021-12-20 14:32:311092 days ago1640010751
0xAE78de29...E8729c2A7
0 ETH
138426032021-12-20 14:32:311092 days ago1640010751
0xAE78de29...E8729c2A7
0 ETH
138426032021-12-20 14:32:311092 days ago1640010751
0xAE78de29...E8729c2A7
0 ETH
137672232021-12-08 21:42:051103 days ago1638999725
0xAE78de29...E8729c2A7
0 ETH
137672232021-12-08 21:42:051103 days ago1638999725
0xAE78de29...E8729c2A7
0 ETH
137672232021-12-08 21:42:051103 days ago1638999725
0xAE78de29...E8729c2A7
0 ETH
137524152021-12-06 12:56:211106 days ago1638795381
0xAE78de29...E8729c2A7
0 ETH
137524152021-12-06 12:56:211106 days ago1638795381
0xAE78de29...E8729c2A7
0 ETH
137524152021-12-06 12:56:211106 days ago1638795381
0xAE78de29...E8729c2A7
0 ETH
137511882021-12-06 8:18:121106 days ago1638778692
0xAE78de29...E8729c2A7
0 ETH
137511882021-12-06 8:18:121106 days ago1638778692
0xAE78de29...E8729c2A7
0 ETH
137511882021-12-06 8:18:121106 days ago1638778692
0xAE78de29...E8729c2A7
0 ETH
137190002021-12-01 4:28:231111 days ago1638332903
0xAE78de29...E8729c2A7
0 ETH
137190002021-12-01 4:28:231111 days ago1638332903
0xAE78de29...E8729c2A7
0 ETH
137190002021-12-01 4:28:231111 days ago1638332903
0xAE78de29...E8729c2A7
0 ETH
137189842021-12-01 4:25:251111 days ago1638332725
0xAE78de29...E8729c2A7
0 ETH
137189012021-12-01 4:07:471111 days ago1638331667
0xAE78de29...E8729c2A7
0 ETH
137178102021-11-30 23:52:021111 days ago1638316322
0xAE78de29...E8729c2A7
0 ETH
137178102021-11-30 23:52:021111 days ago1638316322
0xAE78de29...E8729c2A7
0 ETH
137178102021-11-30 23:52:021111 days ago1638316322
0xAE78de29...E8729c2A7
0 ETH
137153942021-11-30 14:50:011112 days ago1638283801
0xAE78de29...E8729c2A7
0 ETH
137153942021-11-30 14:50:011112 days ago1638283801
0xAE78de29...E8729c2A7
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AttentionFUD

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : FUDstaking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9 <0.9.0;

import "https://github.com/fuegonft/library/blob/main/AdminControl.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC1155/IERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC1155/utils/ERC1155Receiver.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/utils/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";

/**
 * @title AttentionFUD contract
 * 
 * @author @FrankPoncelet
 * @dev @FuegoNFT
 * 
 */

contract AttentionFUD is AdminControl, ERC1155Receiver{
    using SafeMath for uint256;
    
    address public contractAddressFUD;
    
    struct DepositInfo {
        mapping (address => uint256)  amount;       // current staked FUD
        address[] wallet;       // Wallet that did stake
        bool inUse;             // to find if mapping exists
        uint index;             // index of project in the array
    }
    
    struct ProjectInfo {
        string project;         // the project name
        uint tokens;            // amount of tokens staked.
        
    }
    
    // A record of the stakes
    mapping (string => DepositInfo) private stakesByProject;
    mapping (address => string) public stakesByAddress;
    ProjectInfo[] private projects ;
    
    event DepositToken(address indexed to, uint amount, string project);
    event WithDrawDeposit(address indexed to, uint amount, string project);
    event BurnDeposit(uint amount, string project);
    
    bool public stakeIsActive;
    bool public emergencyLock=false;
    address private constant WALLETFUD = 0x756624F2c0816bFb6a09E6d463c695b39a146629;
    
    uint public minStake = 20;

    constructor(){
    }
    
    /**    
    * Set FUD block emergency escape.
    * WARNING: you can't turn it back on!
    */
    function LockEmergencyHatch() external onlyOwner {
        emergencyLock=true;
    }
    
    /**    
    * Set FUD Attention contract on/off
    */
    function flipStakeState() external onlyOwner {
        stakeIsActive = !stakeIsActive;
    }
    
    /**    
    * Set FUD Token contract address
    */
    function setFUDContract(address payable newAddress) public onlyOwner {
         contractAddressFUD = newAddress;
    }
    /**    
    * Set a new minimum stake.
    */
    function setMinimumStake(uint amount) public onlyOwner{
        minStake=amount;
    }
    
    /**
     * Stake tokens to a project
     */
    function depositTokens( uint256 total,string memory project ) external {
        require(total>=minStake, "AttentionFUD : you are not staking the min amount of coins.");
        require(stakeIsActive, "AttentionFUD: staking must be active to deposit Tokens!");
        require(bytes(project).length > 2 , "AttentionFUD : Bad project name");
        require(keccak256(abi.encodePacked(stakesByAddress[msg.sender])) == (keccak256(abi.encodePacked(("")))),"AttentionFUD : Wallet is already promoting a project.");
        require(IERC1155(contractAddressFUD).balanceOf(msg.sender,7123)>=total,"AttentionFUD : Wallet has insuficient tokens.");

        stakesByAddress[msg.sender]=project;
        if (!stakesByProject[project].inUse){
            stakesByProject[project].inUse = true;
            stakesByProject[project].index= projects.length;
            projects.push(ProjectInfo(project,total));
        } else {
            projects[stakesByProject[project].index].tokens += total;
        }
            stakesByProject[project].amount[msg.sender]=total;
            stakesByProject[project].wallet.push(msg.sender);
            
        IERC1155(contractAddressFUD).safeTransferFrom(
            msg.sender, address(this),7123, total,"");
        emit DepositToken(msg.sender, total, project);
    }
    
    /**
     * Stake tokens to a project
     */
    function withDrawTokens(string memory project) external {
        require(keccak256(abi.encodePacked(stakesByAddress[msg.sender])) != (keccak256(abi.encodePacked(("")))),"AttentionFUD : Wallet is NOT promoting a project.");
        require(stakesByProject[project].inUse,"AttentionFUD :Project not Found.");
        stakesByAddress[msg.sender]="";
        uint amount = stakesByProject[project].amount[msg.sender];

        projects[stakesByProject[project].index].tokens -= stakesByProject[project].amount[msg.sender];
        stakesByProject[project].amount[msg.sender]=uint256(0);

        if(projects[stakesByProject[project].index].tokens==0){ // project is empty, lets remove it.
            delete stakesByProject[project].wallet;
            stakesByProject[project].inUse = false;
            // delete from project array
            uint lastIndex = projects.length - 1;
            string memory lastProject = projects[lastIndex].project;
            uint lastAmount = projects[lastIndex].tokens;
            // swap index 
            projects[stakesByProject[project].index].project=lastProject;
            projects[stakesByProject[project].index].tokens=lastAmount;
            stakesByProject[lastProject].index=stakesByProject[project].index;
            projects.pop();
        }
        emit WithDrawDeposit(msg.sender, amount, project);
        IERC1155(contractAddressFUD).safeTransferFrom(address(this),msg.sender, 7123, amount,"" );
    }
    
    /**
     * Burn tokens to a project
     */
    function burnDeposit(string memory project) external adminRequired{
        require(stakesByProject[project].inUse,"AttentionFUD : NO such project!");
        uint256 total =0;
        for (uint i = 0; i < stakesByProject[project].wallet.length; i++) {
            // burn each wallet entry
            if (stakesByProject[project].wallet[i]!=address(0)){
                
                stakesByAddress[stakesByProject[project].wallet[i]]="";
                total += stakesByProject[project].amount[stakesByProject[project].wallet[i]];
            }
        }

        // reset the array
        delete stakesByProject[project].wallet;
        stakesByProject[project].inUse = false;
        // delete from project array
        uint lastIndex = projects.length - 1;
        string memory lastProject = projects[lastIndex].project;
        uint lastAmount = projects[lastIndex].tokens;
        projects[stakesByProject[project].index].project=lastProject;
        projects[stakesByProject[project].index].tokens=lastAmount;
        stakesByProject[lastProject].index=stakesByProject[project].index;
        projects.pop();
        
        emit BurnDeposit(total, project);
        ERC1155Burnable(contractAddressFUD).burn(address(this),7123, total); 
    }
    
     /**
      * Return the token balance of the contract.
      * 
      */
    function tokensInHolding() public view returns (uint){
         return IERC1155(contractAddressFUD).balanceOf(address(this),7123);
    }

    /**
     * Retrieve all project names.
     */
    function getProjects() public view returns (ProjectInfo[] memory){
        return projects;
    }
    
    /**
     * Retrieve project by Index.
     */
    function getProjectsByIndex(uint index) public view returns (ProjectInfo memory){
        return projects[index];
    }
    
    /**
     * Send all the staked tokens out of the contract so we can migrate them to the next version.
     * Calling this will turn off staking on the contract.
     * 
     */
    function emergencyTransfer() external onlyOwner{
        require(!emergencyLock,"AttentionFUD : Lock activated, can no monger be called.");
        stakeIsActive=false;
        uint total = tokensInHolding();
        IERC1155(contractAddressFUD).safeTransferFrom(address(this),WALLETFUD, 7123, total,"" );
    }
    
    /**
     * Methods needed to be an ERC1155 Reciever
     */
    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 2 of 15 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 3 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 15 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

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 5 of 15 : IERC1155.sol
// SPDX-License-Identifier: MIT

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 be 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 6 of 15 : AdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

/**
 * Based on AdminControl from manifold.xyz, but simplified.
 * @author @frankPoncelet
 * @dev @FuegoNFT
 */

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/utils/structs/EnumerableSet.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/access/Ownable.sol";

abstract contract AdminControl is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;
    
    event AdminApproved(address indexed account, address indexed sender);
    event AdminRevoked(address indexed account, address indexed sender);

    // Track registered admins
    EnumerableSet.AddressSet private _admins;

    /**
     * @dev Only allows approved admins to call the specified function
     */
    modifier adminRequired() {
        require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin");
        _;
    }   

    /**
     * @dev See {IAdminControl-getAdmins}.
     */
    function getAdmins() external view returns (address[] memory admins) {
        admins = new address[](_admins.length());
        for (uint i = 0; i < _admins.length(); i++) {
            admins[i] = _admins.at(i);
        }
        return admins;
    }

    /**
     * @dev See {IAdminControl-approveAdmin}.
     */
    function approveAdmin(address admin) external onlyOwner {
        if (!_admins.contains(admin)) {
            emit AdminApproved(admin, msg.sender);
            _admins.add(admin);
        }
    }

    /**
     * @dev See {IAdminControl-revokeAdmin}.
     */
    function revokeAdmin(address admin) external onlyOwner {
        if (_admins.contains(admin)) {
            emit AdminRevoked(admin, msg.sender);
            _admins.remove(admin);
        }
    }

    /**
     * @dev See {IAdminControl-isAdmin}.
     */
    function isAdmin(address admin) public view returns (bool) {
        return (owner() == admin || _admins.contains(admin));
    }

}

File 7 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 8 of 15 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

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

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

File 9 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT

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 10 of 15 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

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.
        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. 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);
}

File 11 of 15 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `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 memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - 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[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][account] += amount;
        emit TransferSingle(operator, address(0), account, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `account`
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 accountBalance = _balances[id][account];
        require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferSingle(operator, account, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 accountBalance = _balances[id][account];
            require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][account] = accountBalance - amount;
            }
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver(to).onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 12 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT

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 13 of 15 : Context.sol
// SPDX-License-Identifier: MIT

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 14 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 15 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"project","type":"string"}],"name":"BurnDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"project","type":"string"}],"name":"DepositToken","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":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"project","type":"string"}],"name":"WithDrawDeposit","type":"event"},{"inputs":[],"name":"LockEmergencyHatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"project","type":"string"}],"name":"burnDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractAddressFUD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"string","name":"project","type":"string"}],"name":"depositTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipStakeState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProjects","outputs":[{"components":[{"internalType":"string","name":"project","type":"string"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"internalType":"struct AttentionFUD.ProjectInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getProjectsByIndex","outputs":[{"components":[{"internalType":"string","name":"project","type":"string"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"internalType":"struct AttentionFUD.ProjectInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAddress","type":"address"}],"name":"setFUDContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinimumStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakesByAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensInHolding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"project","type":"string"}],"name":"withDrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526007805461ff0019169055601460085534801561002057600080fd5b5061002a3361002f565b61007f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6126878061008e6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c8063658fd34d116100de578063c28449b311610097578063d9c693cb11610071578063d9c693cb1461036a578063dcc601281461037c578063f23a6e6114610391578063f2fde38b146103b057600080fd5b8063c28449b314610342578063ca1c6d011461034a578063cdc9fe811461035d57600080fd5b8063658fd34d146102935780636d73e669146102be578063715018a6146102d15780638da5cb5b146102d95780638fc806bc146102ea578063bc197c811461030a57600080fd5b806331ae450b1161014b5780633b520534116101255780633b520534146102505780634bdd1d571461027057806352759d0214610278578063564233791461028057600080fd5b806331ae450b1461021c578063375b3c0a1461023157806338e3eaef1461024857600080fd5b806301ffc9a71461019357806309e54361146101bb57806317bb2ada146101d0578063233e9903146101e357806324d7806c146101f65780632d34567014610209575b600080fd5b6101a66101a1366004611f92565b6103c3565b60405190151581526020015b60405180910390f35b6101ce6101c9366004612073565b6103fa565b005b6101ce6101de366004612073565b6109b8565b6101ce6101f13660046120b0565b610f5c565b6101a66102043660046120de565b610f8b565b6101ce6102173660046120de565b610fc4565b610224611044565b6040516101b291906120fb565b61023a60085481565b6040519081526020016101b2565b6101ce6110f3565b61026361025e3660046120de565b611231565b6040516101b291906121a4565b61023a6112cb565b6101ce611343565b6101ce61028e3660046120de565b61137e565b6003546102a6906001600160a01b031681565b6040516001600160a01b0390911681526020016101b2565b6101ce6102cc3660046120de565b6113ca565b6101ce611444565b6000546001600160a01b03166102a6565b6102fd6102f83660046120b0565b61147a565b6040516101b291906121e0565b610329610318366004612273565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016101b2565b6101ce61155e565b6101ce610358366004612321565b61159c565b6007546101a69060ff1681565b6007546101a690610100900460ff1681565b610384611af5565b6040516101b29190612368565b61032961039f3660046123ca565b63f23a6e6160e01b95945050505050565b6101ce6103be3660046120de565b611bf0565b60006001600160e01b03198216630271189760e51b14806103f457506301ffc9a760e01b6001600160e01b03198316145b92915050565b3361040d6000546001600160a01b031690565b6001600160a01b031614806104285750610428600133611c88565b6104855760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b60648201526084015b60405180910390fd5b6004816040516104959190612433565b9081526040519081900360200190206002015460ff166104f75760405162461bcd60e51b815260206004820152601f60248201527f417474656e74696f6e465544203a204e4f20737563682070726f6a6563742100604482015260640161047c565b6000805b60048360405161050b9190612433565b908152604051908190036020019020600101548110156106955760006001600160a01b03166004846040516105409190612433565b908152602001604051809103902060010182815481106105625761056261244f565b6000918252602090912001546001600160a01b0316146106835760405180602001604052806000815250600560006004866040516105a09190612433565b908152602001604051809103902060010184815481106105c2576105c261244f565b60009182526020808320909101546001600160a01b03168352828101939093526040909101902082516105fb9391929190910190611ea9565b5060048360405161060c9190612433565b9081526020016040518091039020600001600060048560405161062f9190612433565b908152602001604051809103902060010183815481106106515761065161244f565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610680908361247b565b91505b8061068d81612493565b9150506104fb565b506004826040516106a69190612433565b908152602001604051809103902060010160006106c39190611f29565b60006004836040516106d59190612433565b908152604051908190036020019020600201805491151560ff1990921691909117905560065460009061070a906001906124ae565b90506000600682815481106107215761072161244f565b9060005260206000209060020201600001805461073d906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610769906124c5565b80156107b65780601f1061078b576101008083540402835291602001916107b6565b820191906000526020600020905b81548152906001019060200180831161079957829003601f168201915b505050505090506000600683815481106107d2576107d261244f565b90600052602060002090600202016001015490508160066004876040516107f99190612433565b9081526020016040518091039020600301548154811061081b5761081b61244f565b9060005260206000209060020201600001908051906020019061083f929190611ea9565b508060066004876040516108539190612433565b908152602001604051809103902060030154815481106108755761087561244f565b90600052602060002090600202016001018190555060048560405161089a9190612433565b9081526020016040518091039020600301546004836040516108bc9190612433565b9081526040519081900360200190206003015560068054806108e0576108e0612500565b600082815260208120600019909201916002830201906109008282611f47565b6001820160009055505090557f7c8723923b70ef6e1f5ac6f97732225d62d4308636bdb56cf1c9fc45bd33924c848660405161093d929190612516565b60405180910390a1600354604051637a94c56560e11b8152306004820152611bd36024820152604481018690526001600160a01b039091169063f5298aca90606401600060405180830381600087803b15801561099957600080fd5b505af11580156109ad573d6000803e3d6000fd5b505050505050505050565b60408051600080825260208083018085528351902033835260059091529083902090926109e5920161252f565b604051602081830303815290604052805190602001201415610a635760405162461bcd60e51b815260206004820152603160248201527f417474656e74696f6e465544203a2057616c6c6574206973204e4f542070726f60448201527036b7ba34b733903090383937b532b1ba1760791b606482015260840161047c565b600481604051610a739190612433565b9081526040519081900360200190206002015460ff16610ad55760405162461bcd60e51b815260206004820181905260248201527f417474656e74696f6e465544203a50726f6a656374206e6f7420466f756e642e604482015260640161047c565b604080516020808201808452600080845233815260059092529290209051610afd9290611ea9565b506000600482604051610b109190612433565b908152604080519182900360209081018320336000908152915220549150600490610b3c908490612433565b9081526040805191829003602090810183203360009081529152205490600690600490610b6a908690612433565b90815260200160405180910390206003015481548110610b8c57610b8c61244f565b90600052602060002090600202016001016000828254610bac91906124ae565b925050819055506000600483604051610bc59190612433565b90815260408051918290036020908101832033600090815291522091909155600690600490610bf5908590612433565b90815260200160405180910390206003015481548110610c1757610c1761244f565b90600052602060002090600202016001015460001415610eab57600482604051610c419190612433565b90815260200160405180910390206001016000610c5e9190611f29565b6000600483604051610c709190612433565b908152604051908190036020019020600201805491151560ff19909216919091179055600654600090610ca5906001906124ae565b9050600060068281548110610cbc57610cbc61244f565b90600052602060002090600202016000018054610cd8906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610d04906124c5565b8015610d515780601f10610d2657610100808354040283529160200191610d51565b820191906000526020600020905b815481529060010190602001808311610d3457829003601f168201915b50505050509050600060068381548110610d6d57610d6d61244f565b9060005260206000209060020201600101549050816006600487604051610d949190612433565b90815260200160405180910390206003015481548110610db657610db661244f565b90600052602060002090600202016000019080519060200190610dda929190611ea9565b50806006600487604051610dee9190612433565b90815260200160405180910390206003015481548110610e1057610e1061244f565b906000526020600020906002020160010181905550600485604051610e359190612433565b908152602001604051809103902060030154600483604051610e579190612433565b908152604051908190036020019020600301556006805480610e7b57610e7b612500565b60008281526020812060001990920191600283020190610e9b8282611f47565b6001820160009055505090555050505b336001600160a01b03167f4ecd0045683b0d99249174aaf7000749f3c30752054f2b97f4e56767f2f26d478284604051610ee6929190612516565b60405180910390a2600354604051637921219560e11b81526001600160a01b039091169063f242432a90610f269030903390611bd39087906004016125cb565b600060405180830381600087803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610f865760405162461bcd60e51b815260040161047c90612603565b600855565b6000816001600160a01b0316610fa96000546001600160a01b031690565b6001600160a01b031614806103f457506103f4600183611c88565b6000546001600160a01b03163314610fee5760405162461bcd60e51b815260040161047c90612603565b610ff9600182611c88565b156110415760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a361103f600182611cad565b505b50565b60606110506001611cc2565b67ffffffffffffffff81111561106857611068611fbc565b604051908082528060200260200182016040528015611091578160200160208202803683370190505b50905060005b6110a16001611cc2565b8110156110ef576110b3600182611ccc565b8282815181106110c5576110c561244f565b6001600160a01b0390921660209283029190910190910152806110e781612493565b915050611097565b5090565b6000546001600160a01b0316331461111d5760405162461bcd60e51b815260040161047c90612603565b600754610100900460ff161561119b5760405162461bcd60e51b815260206004820152603760248201527f417474656e74696f6e465544203a204c6f636b206163746976617465642c206360448201527f616e206e6f206d6f6e6765722062652063616c6c65642e000000000000000000606482015260840161047c565b6007805460ff1916905560006111af6112cb565b600354604051637921219560e11b81529192506001600160a01b03169063f242432a906111fc90309073756624f2c0816bfb6a09e6d463c695b39a14662990611bd39087906004016125cb565b600060405180830381600087803b15801561121657600080fd5b505af115801561122a573d6000803e3d6000fd5b5050505050565b6005602052600090815260409020805461124a906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054611276906124c5565b80156112c35780601f10611298576101008083540402835291602001916112c3565b820191906000526020600020905b8154815290600101906020018083116112a657829003601f168201915b505050505081565b600354604051627eeac760e11b8152306004820152611bd360248201526000916001600160a01b03169062fdd58e90604401602060405180830381865afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190612638565b905090565b6000546001600160a01b0316331461136d5760405162461bcd60e51b815260040161047c90612603565b6007805461ff001916610100179055565b6000546001600160a01b031633146113a85760405162461bcd60e51b815260040161047c90612603565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146113f45760405162461bcd60e51b815260040161047c90612603565b6113ff600182611c88565b6110415760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a361103f600182611cd8565b6000546001600160a01b0316331461146e5760405162461bcd60e51b815260040161047c90612603565b6114786000611ced565b565b604080518082019091526060815260006020820152600682815481106114a2576114a261244f565b90600052602060002090600202016040518060400160405290816000820180546114cb906124c5565b80601f01602080910402602001604051908101604052809291908181526020018280546114f7906124c5565b80156115445780601f1061151957610100808354040283529160200191611544565b820191906000526020600020905b81548152906001019060200180831161152757829003601f168201915b505050505081526020016001820154815250509050919050565b6000546001600160a01b031633146115885760405162461bcd60e51b815260040161047c90612603565b6007805460ff19811660ff90911615179055565b6008548210156116145760405162461bcd60e51b815260206004820152603b60248201527f417474656e74696f6e465544203a20796f7520617265206e6f74207374616b6960448201527f6e6720746865206d696e20616d6f756e74206f6620636f696e732e0000000000606482015260840161047c565b60075460ff1661168c5760405162461bcd60e51b815260206004820152603760248201527f417474656e74696f6e4655443a207374616b696e67206d75737420626520616360448201527f7469766520746f206465706f73697420546f6b656e7321000000000000000000606482015260840161047c565b60028151116116dd5760405162461bcd60e51b815260206004820152601f60248201527f417474656e74696f6e465544203a204261642070726f6a656374206e616d6500604482015260640161047c565b604080516000808252602080830180855283519020338352600590915290839020909261170a920161252f565b604051602081830303815290604052805190602001201461178b5760405162461bcd60e51b815260206004820152603560248201527f417474656e74696f6e465544203a2057616c6c657420697320616c726561647960448201527410383937b6b7ba34b733903090383937b532b1ba1760591b606482015260840161047c565b600354604051627eeac760e11b8152336004820152611bd3602482015283916001600160a01b03169062fdd58e90604401602060405180830381865afa1580156117d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fd9190612638565b10156118615760405162461bcd60e51b815260206004820152602d60248201527f417474656e74696f6e465544203a2057616c6c65742068617320696e7375666960448201526c31b4b2b73a103a37b5b2b7399760991b606482015260840161047c565b336000908152600560209081526040909120825161188192840190611ea9565b506004816040516118929190612433565b9081526040519081900360200190206002015460ff166119785760016004826040516118be9190612433565b908152604051908190036020018120600201805492151560ff1990931692909217909155600654906004906118f4908490612433565b9081526040805191829003602090810183206003019390935581810190528281528082018490526006805460018101825560009190915281518051929360029092027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01926119669284920190611ea9565b506020820151816001015550506119d3565b81600660048360405161198b9190612433565b908152602001604051809103902060030154815481106119ad576119ad61244f565b906000526020600020906002020160010160008282546119cd919061247b565b90915550505b816004826040516119e49190612433565b90815260408051918290036020908101832033600090815291522091909155600490611a11908390612433565b90815260405190819003602090810182206001908101805491820181556000908152919091200180546001600160a01b03191633908117909155600354637921219560e11b83526001600160a01b03169163f242432a91611a7c913090611bd39088906004016125cb565b600060405180830381600087803b158015611a9657600080fd5b505af1158015611aaa573d6000803e3d6000fd5b50505050336001600160a01b03167ff8876551525db5e263eb82b8f2c45488bdace643603e84f1d3ebb394a34882ee8383604051611ae9929190612516565b60405180910390a25050565b60606006805480602002602001604051908101604052809291908181526020016000905b82821015611be75783829060005260206000209060020201604051806040016040529081600082018054611b4c906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054611b78906124c5565b8015611bc55780601f10611b9a57610100808354040283529160200191611bc5565b820191906000526020600020905b815481529060010190602001808311611ba857829003601f168201915b5050505050815260200160018201548152505081526020019060010190611b19565b50505050905090565b6000546001600160a01b03163314611c1a5760405162461bcd60e51b815260040161047c90612603565b6001600160a01b038116611c7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161047c565b61104181611ced565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6000611ca6836001600160a01b038416611d3d565b60006103f4825490565b6000611ca68383611e30565b6000611ca6836001600160a01b038416611e5a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008181526001830160205260408120548015611e26576000611d616001836124ae565b8554909150600090611d75906001906124ae565b9050818114611dda576000866000018281548110611d9557611d9561244f565b9060005260206000200154905080876000018481548110611db857611db861244f565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611deb57611deb612500565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103f4565b60009150506103f4565b6000826000018281548110611e4757611e4761244f565b9060005260206000200154905092915050565b6000818152600183016020526040812054611ea1575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103f4565b5060006103f4565b828054611eb5906124c5565b90600052602060002090601f016020900481019282611ed75760008555611f1d565b82601f10611ef057805160ff1916838001178555611f1d565b82800160010185558215611f1d579182015b82811115611f1d578251825591602001919060010190611f02565b506110ef929150611f7d565b50805460008255906000526020600020908101906110419190611f7d565b508054611f53906124c5565b6000825580601f10611f63575050565b601f01602090049060005260206000209081019061104191905b5b808211156110ef5760008155600101611f7e565b600060208284031215611fa457600080fd5b81356001600160e01b031981168114611ca657600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611ffb57611ffb611fbc565b604052919050565b600082601f83011261201457600080fd5b813567ffffffffffffffff81111561202e5761202e611fbc565b612041601f8201601f1916602001611fd2565b81815284602083860101111561205657600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561208557600080fd5b813567ffffffffffffffff81111561209c57600080fd5b6120a884828501612003565b949350505050565b6000602082840312156120c257600080fd5b5035919050565b6001600160a01b038116811461104157600080fd5b6000602082840312156120f057600080fd5b8135611ca6816120c9565b6020808252825182820181905260009190848201906040850190845b8181101561213c5783516001600160a01b031683529284019291840191600101612117565b50909695505050505050565b60005b8381101561216357818101518382015260200161214b565b83811115612172576000848401525b50505050565b60008151808452612190816020860160208601612148565b601f01601f19169290920160200192915050565b602081526000611ca66020830184612178565b60008151604084526121cc6040850182612178565b602093840151949093019390935250919050565b602081526000611ca660208301846121b7565b600082601f83011261220457600080fd5b8135602067ffffffffffffffff82111561222057612220611fbc565b8160051b61222f828201611fd2565b928352848101820192828101908785111561224957600080fd5b83870192505b848310156122685782358252918301919083019061224f565b979650505050505050565b600080600080600060a0868803121561228b57600080fd5b8535612296816120c9565b945060208601356122a6816120c9565b9350604086013567ffffffffffffffff808211156122c357600080fd5b6122cf89838a016121f3565b945060608801359150808211156122e557600080fd5b6122f189838a016121f3565b9350608088013591508082111561230757600080fd5b5061231488828901612003565b9150509295509295909350565b6000806040838503121561233457600080fd5b82359150602083013567ffffffffffffffff81111561235257600080fd5b61235e85828601612003565b9150509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156123bd57603f198886030184526123ab8583516121b7565b9450928501929085019060010161238f565b5092979650505050505050565b600080600080600060a086880312156123e257600080fd5b85356123ed816120c9565b945060208601356123fd816120c9565b93506040860135925060608601359150608086013567ffffffffffffffff81111561242757600080fd5b61231488828901612003565b60008251612445818460208701612148565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561248e5761248e612465565b500190565b60006000198214156124a7576124a7612465565b5060010190565b6000828210156124c0576124c0612465565b500390565b600181811c908216806124d957607f821691505b602082108114156124fa57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603160045260246000fd5b8281526040602082015260006120a86040830184612178565b600080835481600182811c91508083168061254b57607f831692505b602080841082141561256b57634e487b7160e01b86526022600452602486fd5b81801561257f5760018114612590576125bd565b60ff198616895284890196506125bd565b60008a81526020902060005b868110156125b55781548b82015290850190830161259c565b505084890196505b509498975050505050505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561264a57600080fd5b505191905056fea26469706673582212209c6d51b094bd6446f25d3e0da465e6259cb712c34f6ecc5c5a47749673f4300c64736f6c634300080a0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063658fd34d116100de578063c28449b311610097578063d9c693cb11610071578063d9c693cb1461036a578063dcc601281461037c578063f23a6e6114610391578063f2fde38b146103b057600080fd5b8063c28449b314610342578063ca1c6d011461034a578063cdc9fe811461035d57600080fd5b8063658fd34d146102935780636d73e669146102be578063715018a6146102d15780638da5cb5b146102d95780638fc806bc146102ea578063bc197c811461030a57600080fd5b806331ae450b1161014b5780633b520534116101255780633b520534146102505780634bdd1d571461027057806352759d0214610278578063564233791461028057600080fd5b806331ae450b1461021c578063375b3c0a1461023157806338e3eaef1461024857600080fd5b806301ffc9a71461019357806309e54361146101bb57806317bb2ada146101d0578063233e9903146101e357806324d7806c146101f65780632d34567014610209575b600080fd5b6101a66101a1366004611f92565b6103c3565b60405190151581526020015b60405180910390f35b6101ce6101c9366004612073565b6103fa565b005b6101ce6101de366004612073565b6109b8565b6101ce6101f13660046120b0565b610f5c565b6101a66102043660046120de565b610f8b565b6101ce6102173660046120de565b610fc4565b610224611044565b6040516101b291906120fb565b61023a60085481565b6040519081526020016101b2565b6101ce6110f3565b61026361025e3660046120de565b611231565b6040516101b291906121a4565b61023a6112cb565b6101ce611343565b6101ce61028e3660046120de565b61137e565b6003546102a6906001600160a01b031681565b6040516001600160a01b0390911681526020016101b2565b6101ce6102cc3660046120de565b6113ca565b6101ce611444565b6000546001600160a01b03166102a6565b6102fd6102f83660046120b0565b61147a565b6040516101b291906121e0565b610329610318366004612273565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016101b2565b6101ce61155e565b6101ce610358366004612321565b61159c565b6007546101a69060ff1681565b6007546101a690610100900460ff1681565b610384611af5565b6040516101b29190612368565b61032961039f3660046123ca565b63f23a6e6160e01b95945050505050565b6101ce6103be3660046120de565b611bf0565b60006001600160e01b03198216630271189760e51b14806103f457506301ffc9a760e01b6001600160e01b03198316145b92915050565b3361040d6000546001600160a01b031690565b6001600160a01b031614806104285750610428600133611c88565b6104855760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b60648201526084015b60405180910390fd5b6004816040516104959190612433565b9081526040519081900360200190206002015460ff166104f75760405162461bcd60e51b815260206004820152601f60248201527f417474656e74696f6e465544203a204e4f20737563682070726f6a6563742100604482015260640161047c565b6000805b60048360405161050b9190612433565b908152604051908190036020019020600101548110156106955760006001600160a01b03166004846040516105409190612433565b908152602001604051809103902060010182815481106105625761056261244f565b6000918252602090912001546001600160a01b0316146106835760405180602001604052806000815250600560006004866040516105a09190612433565b908152602001604051809103902060010184815481106105c2576105c261244f565b60009182526020808320909101546001600160a01b03168352828101939093526040909101902082516105fb9391929190910190611ea9565b5060048360405161060c9190612433565b9081526020016040518091039020600001600060048560405161062f9190612433565b908152602001604051809103902060010183815481106106515761065161244f565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610680908361247b565b91505b8061068d81612493565b9150506104fb565b506004826040516106a69190612433565b908152602001604051809103902060010160006106c39190611f29565b60006004836040516106d59190612433565b908152604051908190036020019020600201805491151560ff1990921691909117905560065460009061070a906001906124ae565b90506000600682815481106107215761072161244f565b9060005260206000209060020201600001805461073d906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610769906124c5565b80156107b65780601f1061078b576101008083540402835291602001916107b6565b820191906000526020600020905b81548152906001019060200180831161079957829003601f168201915b505050505090506000600683815481106107d2576107d261244f565b90600052602060002090600202016001015490508160066004876040516107f99190612433565b9081526020016040518091039020600301548154811061081b5761081b61244f565b9060005260206000209060020201600001908051906020019061083f929190611ea9565b508060066004876040516108539190612433565b908152602001604051809103902060030154815481106108755761087561244f565b90600052602060002090600202016001018190555060048560405161089a9190612433565b9081526020016040518091039020600301546004836040516108bc9190612433565b9081526040519081900360200190206003015560068054806108e0576108e0612500565b600082815260208120600019909201916002830201906109008282611f47565b6001820160009055505090557f7c8723923b70ef6e1f5ac6f97732225d62d4308636bdb56cf1c9fc45bd33924c848660405161093d929190612516565b60405180910390a1600354604051637a94c56560e11b8152306004820152611bd36024820152604481018690526001600160a01b039091169063f5298aca90606401600060405180830381600087803b15801561099957600080fd5b505af11580156109ad573d6000803e3d6000fd5b505050505050505050565b60408051600080825260208083018085528351902033835260059091529083902090926109e5920161252f565b604051602081830303815290604052805190602001201415610a635760405162461bcd60e51b815260206004820152603160248201527f417474656e74696f6e465544203a2057616c6c6574206973204e4f542070726f60448201527036b7ba34b733903090383937b532b1ba1760791b606482015260840161047c565b600481604051610a739190612433565b9081526040519081900360200190206002015460ff16610ad55760405162461bcd60e51b815260206004820181905260248201527f417474656e74696f6e465544203a50726f6a656374206e6f7420466f756e642e604482015260640161047c565b604080516020808201808452600080845233815260059092529290209051610afd9290611ea9565b506000600482604051610b109190612433565b908152604080519182900360209081018320336000908152915220549150600490610b3c908490612433565b9081526040805191829003602090810183203360009081529152205490600690600490610b6a908690612433565b90815260200160405180910390206003015481548110610b8c57610b8c61244f565b90600052602060002090600202016001016000828254610bac91906124ae565b925050819055506000600483604051610bc59190612433565b90815260408051918290036020908101832033600090815291522091909155600690600490610bf5908590612433565b90815260200160405180910390206003015481548110610c1757610c1761244f565b90600052602060002090600202016001015460001415610eab57600482604051610c419190612433565b90815260200160405180910390206001016000610c5e9190611f29565b6000600483604051610c709190612433565b908152604051908190036020019020600201805491151560ff19909216919091179055600654600090610ca5906001906124ae565b9050600060068281548110610cbc57610cbc61244f565b90600052602060002090600202016000018054610cd8906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610d04906124c5565b8015610d515780601f10610d2657610100808354040283529160200191610d51565b820191906000526020600020905b815481529060010190602001808311610d3457829003601f168201915b50505050509050600060068381548110610d6d57610d6d61244f565b9060005260206000209060020201600101549050816006600487604051610d949190612433565b90815260200160405180910390206003015481548110610db657610db661244f565b90600052602060002090600202016000019080519060200190610dda929190611ea9565b50806006600487604051610dee9190612433565b90815260200160405180910390206003015481548110610e1057610e1061244f565b906000526020600020906002020160010181905550600485604051610e359190612433565b908152602001604051809103902060030154600483604051610e579190612433565b908152604051908190036020019020600301556006805480610e7b57610e7b612500565b60008281526020812060001990920191600283020190610e9b8282611f47565b6001820160009055505090555050505b336001600160a01b03167f4ecd0045683b0d99249174aaf7000749f3c30752054f2b97f4e56767f2f26d478284604051610ee6929190612516565b60405180910390a2600354604051637921219560e11b81526001600160a01b039091169063f242432a90610f269030903390611bd39087906004016125cb565b600060405180830381600087803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610f865760405162461bcd60e51b815260040161047c90612603565b600855565b6000816001600160a01b0316610fa96000546001600160a01b031690565b6001600160a01b031614806103f457506103f4600183611c88565b6000546001600160a01b03163314610fee5760405162461bcd60e51b815260040161047c90612603565b610ff9600182611c88565b156110415760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a361103f600182611cad565b505b50565b60606110506001611cc2565b67ffffffffffffffff81111561106857611068611fbc565b604051908082528060200260200182016040528015611091578160200160208202803683370190505b50905060005b6110a16001611cc2565b8110156110ef576110b3600182611ccc565b8282815181106110c5576110c561244f565b6001600160a01b0390921660209283029190910190910152806110e781612493565b915050611097565b5090565b6000546001600160a01b0316331461111d5760405162461bcd60e51b815260040161047c90612603565b600754610100900460ff161561119b5760405162461bcd60e51b815260206004820152603760248201527f417474656e74696f6e465544203a204c6f636b206163746976617465642c206360448201527f616e206e6f206d6f6e6765722062652063616c6c65642e000000000000000000606482015260840161047c565b6007805460ff1916905560006111af6112cb565b600354604051637921219560e11b81529192506001600160a01b03169063f242432a906111fc90309073756624f2c0816bfb6a09e6d463c695b39a14662990611bd39087906004016125cb565b600060405180830381600087803b15801561121657600080fd5b505af115801561122a573d6000803e3d6000fd5b5050505050565b6005602052600090815260409020805461124a906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054611276906124c5565b80156112c35780601f10611298576101008083540402835291602001916112c3565b820191906000526020600020905b8154815290600101906020018083116112a657829003601f168201915b505050505081565b600354604051627eeac760e11b8152306004820152611bd360248201526000916001600160a01b03169062fdd58e90604401602060405180830381865afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190612638565b905090565b6000546001600160a01b0316331461136d5760405162461bcd60e51b815260040161047c90612603565b6007805461ff001916610100179055565b6000546001600160a01b031633146113a85760405162461bcd60e51b815260040161047c90612603565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146113f45760405162461bcd60e51b815260040161047c90612603565b6113ff600182611c88565b6110415760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a361103f600182611cd8565b6000546001600160a01b0316331461146e5760405162461bcd60e51b815260040161047c90612603565b6114786000611ced565b565b604080518082019091526060815260006020820152600682815481106114a2576114a261244f565b90600052602060002090600202016040518060400160405290816000820180546114cb906124c5565b80601f01602080910402602001604051908101604052809291908181526020018280546114f7906124c5565b80156115445780601f1061151957610100808354040283529160200191611544565b820191906000526020600020905b81548152906001019060200180831161152757829003601f168201915b505050505081526020016001820154815250509050919050565b6000546001600160a01b031633146115885760405162461bcd60e51b815260040161047c90612603565b6007805460ff19811660ff90911615179055565b6008548210156116145760405162461bcd60e51b815260206004820152603b60248201527f417474656e74696f6e465544203a20796f7520617265206e6f74207374616b6960448201527f6e6720746865206d696e20616d6f756e74206f6620636f696e732e0000000000606482015260840161047c565b60075460ff1661168c5760405162461bcd60e51b815260206004820152603760248201527f417474656e74696f6e4655443a207374616b696e67206d75737420626520616360448201527f7469766520746f206465706f73697420546f6b656e7321000000000000000000606482015260840161047c565b60028151116116dd5760405162461bcd60e51b815260206004820152601f60248201527f417474656e74696f6e465544203a204261642070726f6a656374206e616d6500604482015260640161047c565b604080516000808252602080830180855283519020338352600590915290839020909261170a920161252f565b604051602081830303815290604052805190602001201461178b5760405162461bcd60e51b815260206004820152603560248201527f417474656e74696f6e465544203a2057616c6c657420697320616c726561647960448201527410383937b6b7ba34b733903090383937b532b1ba1760591b606482015260840161047c565b600354604051627eeac760e11b8152336004820152611bd3602482015283916001600160a01b03169062fdd58e90604401602060405180830381865afa1580156117d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fd9190612638565b10156118615760405162461bcd60e51b815260206004820152602d60248201527f417474656e74696f6e465544203a2057616c6c65742068617320696e7375666960448201526c31b4b2b73a103a37b5b2b7399760991b606482015260840161047c565b336000908152600560209081526040909120825161188192840190611ea9565b506004816040516118929190612433565b9081526040519081900360200190206002015460ff166119785760016004826040516118be9190612433565b908152604051908190036020018120600201805492151560ff1990931692909217909155600654906004906118f4908490612433565b9081526040805191829003602090810183206003019390935581810190528281528082018490526006805460018101825560009190915281518051929360029092027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01926119669284920190611ea9565b506020820151816001015550506119d3565b81600660048360405161198b9190612433565b908152602001604051809103902060030154815481106119ad576119ad61244f565b906000526020600020906002020160010160008282546119cd919061247b565b90915550505b816004826040516119e49190612433565b90815260408051918290036020908101832033600090815291522091909155600490611a11908390612433565b90815260405190819003602090810182206001908101805491820181556000908152919091200180546001600160a01b03191633908117909155600354637921219560e11b83526001600160a01b03169163f242432a91611a7c913090611bd39088906004016125cb565b600060405180830381600087803b158015611a9657600080fd5b505af1158015611aaa573d6000803e3d6000fd5b50505050336001600160a01b03167ff8876551525db5e263eb82b8f2c45488bdace643603e84f1d3ebb394a34882ee8383604051611ae9929190612516565b60405180910390a25050565b60606006805480602002602001604051908101604052809291908181526020016000905b82821015611be75783829060005260206000209060020201604051806040016040529081600082018054611b4c906124c5565b80601f0160208091040260200160405190810160405280929190818152602001828054611b78906124c5565b8015611bc55780601f10611b9a57610100808354040283529160200191611bc5565b820191906000526020600020905b815481529060010190602001808311611ba857829003601f168201915b5050505050815260200160018201548152505081526020019060010190611b19565b50505050905090565b6000546001600160a01b03163314611c1a5760405162461bcd60e51b815260040161047c90612603565b6001600160a01b038116611c7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161047c565b61104181611ced565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6000611ca6836001600160a01b038416611d3d565b60006103f4825490565b6000611ca68383611e30565b6000611ca6836001600160a01b038416611e5a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008181526001830160205260408120548015611e26576000611d616001836124ae565b8554909150600090611d75906001906124ae565b9050818114611dda576000866000018281548110611d9557611d9561244f565b9060005260206000200154905080876000018481548110611db857611db861244f565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611deb57611deb612500565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103f4565b60009150506103f4565b6000826000018281548110611e4757611e4761244f565b9060005260206000200154905092915050565b6000818152600183016020526040812054611ea1575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103f4565b5060006103f4565b828054611eb5906124c5565b90600052602060002090601f016020900481019282611ed75760008555611f1d565b82601f10611ef057805160ff1916838001178555611f1d565b82800160010185558215611f1d579182015b82811115611f1d578251825591602001919060010190611f02565b506110ef929150611f7d565b50805460008255906000526020600020908101906110419190611f7d565b508054611f53906124c5565b6000825580601f10611f63575050565b601f01602090049060005260206000209081019061104191905b5b808211156110ef5760008155600101611f7e565b600060208284031215611fa457600080fd5b81356001600160e01b031981168114611ca657600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611ffb57611ffb611fbc565b604052919050565b600082601f83011261201457600080fd5b813567ffffffffffffffff81111561202e5761202e611fbc565b612041601f8201601f1916602001611fd2565b81815284602083860101111561205657600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561208557600080fd5b813567ffffffffffffffff81111561209c57600080fd5b6120a884828501612003565b949350505050565b6000602082840312156120c257600080fd5b5035919050565b6001600160a01b038116811461104157600080fd5b6000602082840312156120f057600080fd5b8135611ca6816120c9565b6020808252825182820181905260009190848201906040850190845b8181101561213c5783516001600160a01b031683529284019291840191600101612117565b50909695505050505050565b60005b8381101561216357818101518382015260200161214b565b83811115612172576000848401525b50505050565b60008151808452612190816020860160208601612148565b601f01601f19169290920160200192915050565b602081526000611ca66020830184612178565b60008151604084526121cc6040850182612178565b602093840151949093019390935250919050565b602081526000611ca660208301846121b7565b600082601f83011261220457600080fd5b8135602067ffffffffffffffff82111561222057612220611fbc565b8160051b61222f828201611fd2565b928352848101820192828101908785111561224957600080fd5b83870192505b848310156122685782358252918301919083019061224f565b979650505050505050565b600080600080600060a0868803121561228b57600080fd5b8535612296816120c9565b945060208601356122a6816120c9565b9350604086013567ffffffffffffffff808211156122c357600080fd5b6122cf89838a016121f3565b945060608801359150808211156122e557600080fd5b6122f189838a016121f3565b9350608088013591508082111561230757600080fd5b5061231488828901612003565b9150509295509295909350565b6000806040838503121561233457600080fd5b82359150602083013567ffffffffffffffff81111561235257600080fd5b61235e85828601612003565b9150509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156123bd57603f198886030184526123ab8583516121b7565b9450928501929085019060010161238f565b5092979650505050505050565b600080600080600060a086880312156123e257600080fd5b85356123ed816120c9565b945060208601356123fd816120c9565b93506040860135925060608601359150608086013567ffffffffffffffff81111561242757600080fd5b61231488828901612003565b60008251612445818460208701612148565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561248e5761248e612465565b500190565b60006000198214156124a7576124a7612465565b5060010190565b6000828210156124c0576124c0612465565b500390565b600181811c908216806124d957607f821691505b602082108114156124fa57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603160045260246000fd5b8281526040602082015260006120a86040830184612178565b600080835481600182811c91508083168061254b57607f831692505b602080841082141561256b57634e487b7160e01b86526022600452602486fd5b81801561257f5760018114612590576125bd565b60ff198616895284890196506125bd565b60008a81526020902060005b868110156125b55781548b82015290850190830161259c565b505084890196505b509498975050505050505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561264a57600080fd5b505191905056fea26469706673582212209c6d51b094bd6446f25d3e0da465e6259cb712c34f6ecc5c5a47749673f4300c64736f6c634300080a0033

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.