ETH Price: $3,405.09 (-1.57%)
Gas: 6 Gwei

Token

Brain Machine Ratio (BMR)
 

Overview

Max Total Supply

0 BMR

Holders

198

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
5 BMR
0x354640486e3e8e9f151158197e4667daa2ad0bdc
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Brain-Machine-Ratio symbolizes confrontation-symbiosis relationship between human and machine. BMRs are a series of NFTs built-up by BMRLab, consists of BMR Greats and BMR Creations. BMRs come in a joyful range of colors, various humans and machines traits with a collection size of 6,666.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
BMR

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 11 : BMR.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "lib/solmate/src/auth/Owned.sol";
import "lib/solmate/src/tokens/ERC721.sol";
import "lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol";
import "./utils/Receivable.sol";


contract BMR is ERC721, IERC2981, Owned, Receivable {

    constructor() ERC721("Brain Machine Ratio", "BMR") Owned(msg.sender) {}

    /**
     *  @dev mint logic
     */
    address public mintController;

    function setMintController(address mintController_) external onlyOwner {
        mintController = mintController_;
    }

    function mint(address to, uint256 tokenId) external {
        require(msg.sender == mintController, "UNAUTHORIZED");
        require(tokenId >= 1 && tokenId <= 6666, "INVALID_TOKEN_ID");
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev {IERC721Metadata-tokenURI}
     */

    address public renderer;

    function setRenderer(address renderer_) external onlyOwner {
        renderer = renderer_;
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_ownerOf[tokenId] != address(0), "NONEXISTENT_TOKEN");
        return IRenderer(renderer).tokenURI(tokenId);
    }

    /**
     * @dev {IERC2981-royaltyInfo}
     */

    function royaltyInfo(
        uint256 tokenId, uint256 salePrice
    ) public view override returns (address receiver, uint256 royaltyAmount) {
        require(_ownerOf[tokenId] != address(0), "NONEXISTENT_TOKEN");
        return (address(this), salePrice * 5 / 100);
    }

    function supportsInterface(
        bytes4 interfaceId
    ) public view override(ERC721, IERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

}

interface IRenderer {
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 2 of 11 : Owned.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnerUpdated(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnerUpdated(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function setOwner(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnerUpdated(msg.sender, newOwner);
    }
}

File 3 of 11 : ERC721.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 indexed id);

    event Approval(address indexed owner, address indexed spender, uint256 indexed id);

    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /*//////////////////////////////////////////////////////////////
                         METADATA STORAGE/LOGIC
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    function tokenURI(uint256 id) public view virtual returns (string memory);

    /*//////////////////////////////////////////////////////////////
                      ERC721 BALANCE/OWNER STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) internal _ownerOf;

    mapping(address => uint256) internal _balanceOf;

    function ownerOf(uint256 id) public view virtual returns (address owner) {
        require((owner = _ownerOf[id]) != address(0), "NOT_MINTED");
    }

    function balanceOf(address owner) public view virtual returns (uint256) {
        require(owner != address(0), "ZERO_ADDRESS");

        return _balanceOf[owner];
    }

    /*//////////////////////////////////////////////////////////////
                         ERC721 APPROVAL STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) public getApproved;

    mapping(address => mapping(address => bool)) public isApprovedForAll;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(string memory _name, string memory _symbol) {
        name = _name;
        symbol = _symbol;
    }

    /*//////////////////////////////////////////////////////////////
                              ERC721 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 id) public virtual {
        address owner = _ownerOf[id];

        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");

        getApproved[id] = spender;

        emit Approval(owner, spender, id);
    }

    function setApprovalForAll(address operator, bool approved) public virtual {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    function transferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        require(from == _ownerOf[id], "WRONG_FROM");

        require(to != address(0), "INVALID_RECIPIENT");

        require(
            msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],
            "NOT_AUTHORIZED"
        );

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        unchecked {
            _balanceOf[from]--;

            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        delete getApproved[id];

        emit Transfer(from, to, id);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        bytes calldata data
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    /*//////////////////////////////////////////////////////////////
                              ERC165 LOGIC
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 id) internal virtual {
        require(to != address(0), "INVALID_RECIPIENT");

        require(_ownerOf[id] == address(0), "ALREADY_MINTED");

        // Counter overflow is incredibly unrealistic.
        unchecked {
            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        emit Transfer(address(0), to, id);
    }

    function _burn(uint256 id) internal virtual {
        address owner = _ownerOf[id];

        require(owner != address(0), "NOT_MINTED");

        // Ownership check above ensures no underflow.
        unchecked {
            _balanceOf[owner]--;
        }

        delete _ownerOf[id];

        delete getApproved[id];

        emit Transfer(owner, address(0), id);
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL SAFE MINT LOGIC
    //////////////////////////////////////////////////////////////*/

    function _safeMint(address to, uint256 id) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function _safeMint(
        address to,
        uint256 id,
        bytes memory data
    ) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }
}

/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC721TokenReceiver.onERC721Received.selector;
    }
}

File 4 of 11 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 5 of 11 : Receivable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "lib/solmate/src/auth/Owned.sol";
import "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol";


abstract contract Receivable is Owned {

    receive() external payable {}

    function withdrawETH() external onlyOwner {
        uint256 balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    function withdrawERC20(IERC20 token) external onlyOwner {
        uint256 balance = token.balanceOf(address(this));
        token.transfer(msg.sender, balance);
    }

}

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

pragma solidity ^0.8.0;

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

File 7 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

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

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

File 9 of 11 : BMRMinter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "lib/solmate/src/auth/Owned.sol";
import "./utils/Receivable.sol";
import "lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol";


contract BMRMinter is Owned, Receivable {

    address public immutable bmrnft;

    constructor(address bmrnft_) Owned(msg.sender) {
        bmrnft = bmrnft_;
    }

    /**
     *  @dev mint logic
     */

    uint256 public mintIndex;
    uint256 public mintPrice;

    bytes32 public merkleRoot;
    mapping(address => uint256) public merkleProofClaimed;

    function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner {
        merkleRoot = merkleRoot_;
    }

    function setMintPrice(uint256 mintPrice_) external onlyOwner {
        mintPrice = mintPrice_;
    }

    function mintByOwner(uint256 numberOfTokens) external onlyOwner {
        require(mintIndex + numberOfTokens <= 300, "NOT_ENOUGH");
        for (uint256 i=1; i<=numberOfTokens; ++i) {
            IBMRNFT(bmrnft).mint(msg.sender, mintIndex + i);
        }
        mintIndex += numberOfTokens;
    }

    function mintWithProof(
        bytes32[] calldata _merkleProof,
        uint256 numberOfTokens
    ) external {
        // check index
        require(mintIndex >= 300 && mintIndex + numberOfTokens <= 666, "MINT_CLOSED");
        // check quota
        merkleProofClaimed[msg.sender] += numberOfTokens;
        require(merkleProofClaimed[msg.sender] <= 2, "QUOTA_EXCEEDED");
        // verify proof
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "INVALID_PROOF");
        // mint
        for (uint256 i=1; i<=numberOfTokens; ++i) {
            IBMRNFT(bmrnft).mint(msg.sender, mintIndex + i);
        }
        mintIndex += numberOfTokens;
    }

    function mint(uint256 numberOfTokens) external payable {
        // check index
        require(mintIndex >= 666 && mintIndex + numberOfTokens <= 6666, "MINT_CLOSED");
        require(mintPrice > 0, "MINT_PRICE_NOT_SET");
        require(msg.value >= mintPrice * numberOfTokens, "INSUFFICIENT_VALUE");
        // mint
        for (uint256 i=1; i<=numberOfTokens; ++i) {
            IBMRNFT(bmrnft).mint(msg.sender, mintIndex + i);
        }
        mintIndex += numberOfTokens;
    }

    /**
     *  @dev destroy itself after mint ends
     */

    function selfDestruct() external onlyOwner {
        selfdestruct(payable(msg.sender));
    }

}

interface IBMRNFT {
    function mint(address to, uint256 tokenId) external;
}

File 10 of 11 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 11 of 11 : BMRRenderer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "lib/solmate/src/auth/Owned.sol";


contract BMRRenderer is Owned {

    address public immutable bmrnft;
    string public baseURI;

    constructor(address bmrnft_, string memory baseURI_) Owned(msg.sender) {
        bmrnft = bmrnft_;
        baseURI = baseURI_;
    }

    function setBaseURI(string memory baseURI_) external onlyOwner {
        baseURI = baseURI_;
    }

    function tokenURI(uint256 tokenId) external view returns (string memory) {
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : "";
    }

    function _toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintController","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mintController_","type":"address"}],"name":"setMintController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"renderer_","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604080518082018252601381527f427261696e204d616368696e6520526174696f000000000000000000000000006020808301918252835180850190945260038452622126a960e91b908401528151339391620000739160009190620000de565b50805162000089906001906020840190620000de565b5050600680546001600160a01b0319166001600160a01b0384169081179091556040519091506000907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350620001c1565b828054620000ec9062000184565b90600052602060002090601f0160209004810192826200011057600085556200015b565b82601f106200012b57805160ff19168380011785556200015b565b828001600101855582156200015b579182015b828111156200015b5782518255916020019190600101906200013e565b50620001699291506200016d565b5090565b5b808211156200016957600081556001016200016e565b600181811c908216806200019957607f821691505b60208210811415620001bb57634e487b7160e01b600052602260045260246000fd5b50919050565b61164880620001d16000396000f3fe6080604052600436106101445760003560e01c806370a08231116100b6578063aad3a7ee1161006f578063aad3a7ee146103d9578063b88d4fde146103f9578063c87b56dd14610419578063e086e5ec14610439578063e985e9c51461044e578063f4f3b2001461048957600080fd5b806370a082311461031657806370ac1fa5146103445780638ada6b0f146103645780638da5cb5b1461038457806395d89b41146103a4578063a22cb465146103b957600080fd5b806323b872dd1161010857806323b872dd146102375780632a55205a1461025757806340c10f191461029657806342842e0e146102b657806356d3163d146102d65780636352211e146102f657600080fd5b806301ffc9a71461015057806306fdde0314610185578063081812fc146101a7578063095ea7b3146101f557806313af40351461021757600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b5061017061016b36600461113a565b6104a9565b60405190151581526020015b60405180910390f35b34801561019157600080fd5b5061019a6104d4565b60405161017c91906111ba565b3480156101b357600080fd5b506101dd6101c23660046111cd565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161017c565b34801561020157600080fd5b506102156102103660046111fb565b610562565b005b34801561022357600080fd5b50610215610232366004611227565b610649565b34801561024357600080fd5b50610215610252366004611244565b6106bf565b34801561026357600080fd5b50610277610272366004611285565b610886565b604080516001600160a01b03909316835260208301919091520161017c565b3480156102a257600080fd5b506102156102b13660046111fb565b610903565b3480156102c257600080fd5b506102156102d1366004611244565b61099d565b3480156102e257600080fd5b506102156102f1366004611227565b610a96565b34801561030257600080fd5b506101dd6103113660046111cd565b610ae2565b34801561032257600080fd5b50610336610331366004611227565b610b39565b60405190815260200161017c565b34801561035057600080fd5b506007546101dd906001600160a01b031681565b34801561037057600080fd5b506008546101dd906001600160a01b031681565b34801561039057600080fd5b506006546101dd906001600160a01b031681565b3480156103b057600080fd5b5061019a610b9c565b3480156103c557600080fd5b506102156103d43660046112b5565b610ba9565b3480156103e557600080fd5b506102156103f4366004611227565b610c15565b34801561040557600080fd5b506102156104143660046112ee565b610c61565b34801561042557600080fd5b5061019a6104343660046111cd565b610d49565b34801561044557600080fd5b50610215610e15565b34801561045a57600080fd5b5061017061046936600461138d565b600560209081526000928352604080842090915290825290205460ff1681565b34801561049557600080fd5b506102156104a4366004611227565b610e6e565b60006001600160e01b0319821663152a902d60e11b14806104ce57506104ce82610f77565b92915050565b600080546104e1906113bb565b80601f016020809104026020016040519081016040528092919081815260200182805461050d906113bb565b801561055a5780601f1061052f5761010080835404028352916020019161055a565b820191906000526020600020905b81548152906001019060200180831161053d57829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b0316338114806105ab57506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6105ed5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6006546001600160a01b031633146106735760405162461bcd60e51b81526004016105e4906113f6565b600680546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b6000818152600260205260409020546001600160a01b038481169116146107155760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b60448201526064016105e4565b6001600160a01b03821661075f5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105e4565b336001600160a01b038416148061079957506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b806107ba57506000818152600460205260409020546001600160a01b031633145b6107f75760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064016105e4565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008281526002602052604081205481906001600160a01b03166108e05760405162461bcd60e51b81526020600482015260116024820152702727a722ac24a9aa22a72a2faa27a5a2a760791b60448201526064016105e4565b3060646108ee85600561141c565b6108f89190611449565b915091509250929050565b6007546001600160a01b0316331461092d5760405162461bcd60e51b81526004016105e4906113f6565b600181101580156109405750611a0a8111155b61097f5760405162461bcd60e51b815260206004820152601060248201526f1253959053125117d513d2d15397d25160821b60448201526064016105e4565b610999828260405180602001604052806000815250610fc5565b5050565b6109a88383836106bf565b6001600160a01b0382163b1580610a525750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4015b6020604051808303816000875af1158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a46919061146b565b6001600160e01b031916145b610a915760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016105e4565b505050565b6006546001600160a01b03163314610ac05760405162461bcd60e51b81526004016105e4906113f6565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260409020546001600160a01b031680610b345760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b60448201526064016105e4565b919050565b60006001600160a01b038216610b805760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b60448201526064016105e4565b506001600160a01b031660009081526003602052604090205490565b600180546104e1906113bb565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b03163314610c3f5760405162461bcd60e51b81526004016105e4906113f6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b610c6c8585856106bf565b6001600160a01b0384163b1580610d035750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610cb49033908a90899089908990600401611488565b6020604051808303816000875af1158015610cd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf7919061146b565b6001600160e01b031916145b610d425760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016105e4565b5050505050565b6000818152600260205260409020546060906001600160a01b0316610da45760405162461bcd60e51b81526020600482015260116024820152702727a722ac24a9aa22a72a2faa27a5a2a760791b60448201526064016105e4565b60085460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd90602401600060405180830381865afa158015610ded573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104ce91908101906114f2565b6006546001600160a01b03163314610e3f5760405162461bcd60e51b81526004016105e4906113f6565b6040514790339082156108fc029083906000818181858888f19350505050158015610999573d6000803e3d6000fd5b6006546001600160a01b03163314610e985760405162461bcd60e51b81526004016105e4906113f6565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610edf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f03919061159f565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9191906115b8565b60006301ffc9a760e01b6001600160e01b031983161480610fa857506380ac58cd60e01b6001600160e01b03198316145b806104ce5750506001600160e01b031916635b5e139f60e01b1490565b610fcf8383611016565b6001600160a01b0383163b1580610a525750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a0290610a03903390600090889088906004016115d5565b6001600160a01b0382166110605760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105e4565b6000818152600260205260409020546001600160a01b0316156110b65760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b60448201526064016105e4565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461113757600080fd5b50565b60006020828403121561114c57600080fd5b813561115781611121565b9392505050565b60005b83811015611179578181015183820152602001611161565b83811115611188576000848401525b50505050565b600081518084526111a681602086016020860161115e565b601f01601f19169290920160200192915050565b602081526000611157602083018461118e565b6000602082840312156111df57600080fd5b5035919050565b6001600160a01b038116811461113757600080fd5b6000806040838503121561120e57600080fd5b8235611219816111e6565b946020939093013593505050565b60006020828403121561123957600080fd5b8135611157816111e6565b60008060006060848603121561125957600080fd5b8335611264816111e6565b92506020840135611274816111e6565b929592945050506040919091013590565b6000806040838503121561129857600080fd5b50508035926020909101359150565b801515811461113757600080fd5b600080604083850312156112c857600080fd5b82356112d3816111e6565b915060208301356112e3816112a7565b809150509250929050565b60008060008060006080868803121561130657600080fd5b8535611311816111e6565b94506020860135611321816111e6565b935060408601359250606086013567ffffffffffffffff8082111561134557600080fd5b818801915088601f83011261135957600080fd5b81358181111561136857600080fd5b89602082850101111561137a57600080fd5b9699959850939650602001949392505050565b600080604083850312156113a057600080fd5b82356113ab816111e6565b915060208301356112e3816111e6565b600181811c908216806113cf57607f821691505b602082108114156113f057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b600081600019048311821515161561144457634e487b7160e01b600052601160045260246000fd5b500290565b60008261146657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561147d57600080fd5b815161115781611121565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561150457600080fd5b815167ffffffffffffffff8082111561151c57600080fd5b818401915084601f83011261153057600080fd5b815181811115611542576115426114dc565b604051601f8201601f19908116603f0116810190838211818310171561156a5761156a6114dc565b8160405282815287602084870101111561158357600080fd5b61159483602083016020880161115e565b979650505050505050565b6000602082840312156115b157600080fd5b5051919050565b6000602082840312156115ca57600080fd5b8151611157816112a7565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906116089083018461118e565b969550505050505056fea2646970667358221220192bf341c70dab358fb39a8dd450b421ada2b17921d92aacd331eb69a9bc57a864736f6c634300080b0033

Deployed Bytecode

0x6080604052600436106101445760003560e01c806370a08231116100b6578063aad3a7ee1161006f578063aad3a7ee146103d9578063b88d4fde146103f9578063c87b56dd14610419578063e086e5ec14610439578063e985e9c51461044e578063f4f3b2001461048957600080fd5b806370a082311461031657806370ac1fa5146103445780638ada6b0f146103645780638da5cb5b1461038457806395d89b41146103a4578063a22cb465146103b957600080fd5b806323b872dd1161010857806323b872dd146102375780632a55205a1461025757806340c10f191461029657806342842e0e146102b657806356d3163d146102d65780636352211e146102f657600080fd5b806301ffc9a71461015057806306fdde0314610185578063081812fc146101a7578063095ea7b3146101f557806313af40351461021757600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b5061017061016b36600461113a565b6104a9565b60405190151581526020015b60405180910390f35b34801561019157600080fd5b5061019a6104d4565b60405161017c91906111ba565b3480156101b357600080fd5b506101dd6101c23660046111cd565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161017c565b34801561020157600080fd5b506102156102103660046111fb565b610562565b005b34801561022357600080fd5b50610215610232366004611227565b610649565b34801561024357600080fd5b50610215610252366004611244565b6106bf565b34801561026357600080fd5b50610277610272366004611285565b610886565b604080516001600160a01b03909316835260208301919091520161017c565b3480156102a257600080fd5b506102156102b13660046111fb565b610903565b3480156102c257600080fd5b506102156102d1366004611244565b61099d565b3480156102e257600080fd5b506102156102f1366004611227565b610a96565b34801561030257600080fd5b506101dd6103113660046111cd565b610ae2565b34801561032257600080fd5b50610336610331366004611227565b610b39565b60405190815260200161017c565b34801561035057600080fd5b506007546101dd906001600160a01b031681565b34801561037057600080fd5b506008546101dd906001600160a01b031681565b34801561039057600080fd5b506006546101dd906001600160a01b031681565b3480156103b057600080fd5b5061019a610b9c565b3480156103c557600080fd5b506102156103d43660046112b5565b610ba9565b3480156103e557600080fd5b506102156103f4366004611227565b610c15565b34801561040557600080fd5b506102156104143660046112ee565b610c61565b34801561042557600080fd5b5061019a6104343660046111cd565b610d49565b34801561044557600080fd5b50610215610e15565b34801561045a57600080fd5b5061017061046936600461138d565b600560209081526000928352604080842090915290825290205460ff1681565b34801561049557600080fd5b506102156104a4366004611227565b610e6e565b60006001600160e01b0319821663152a902d60e11b14806104ce57506104ce82610f77565b92915050565b600080546104e1906113bb565b80601f016020809104026020016040519081016040528092919081815260200182805461050d906113bb565b801561055a5780601f1061052f5761010080835404028352916020019161055a565b820191906000526020600020905b81548152906001019060200180831161053d57829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b0316338114806105ab57506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6105ed5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6006546001600160a01b031633146106735760405162461bcd60e51b81526004016105e4906113f6565b600680546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b6000818152600260205260409020546001600160a01b038481169116146107155760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b60448201526064016105e4565b6001600160a01b03821661075f5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105e4565b336001600160a01b038416148061079957506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b806107ba57506000818152600460205260409020546001600160a01b031633145b6107f75760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064016105e4565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008281526002602052604081205481906001600160a01b03166108e05760405162461bcd60e51b81526020600482015260116024820152702727a722ac24a9aa22a72a2faa27a5a2a760791b60448201526064016105e4565b3060646108ee85600561141c565b6108f89190611449565b915091509250929050565b6007546001600160a01b0316331461092d5760405162461bcd60e51b81526004016105e4906113f6565b600181101580156109405750611a0a8111155b61097f5760405162461bcd60e51b815260206004820152601060248201526f1253959053125117d513d2d15397d25160821b60448201526064016105e4565b610999828260405180602001604052806000815250610fc5565b5050565b6109a88383836106bf565b6001600160a01b0382163b1580610a525750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4015b6020604051808303816000875af1158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a46919061146b565b6001600160e01b031916145b610a915760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016105e4565b505050565b6006546001600160a01b03163314610ac05760405162461bcd60e51b81526004016105e4906113f6565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260409020546001600160a01b031680610b345760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b60448201526064016105e4565b919050565b60006001600160a01b038216610b805760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b60448201526064016105e4565b506001600160a01b031660009081526003602052604090205490565b600180546104e1906113bb565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b03163314610c3f5760405162461bcd60e51b81526004016105e4906113f6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b610c6c8585856106bf565b6001600160a01b0384163b1580610d035750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610cb49033908a90899089908990600401611488565b6020604051808303816000875af1158015610cd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf7919061146b565b6001600160e01b031916145b610d425760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016105e4565b5050505050565b6000818152600260205260409020546060906001600160a01b0316610da45760405162461bcd60e51b81526020600482015260116024820152702727a722ac24a9aa22a72a2faa27a5a2a760791b60448201526064016105e4565b60085460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd90602401600060405180830381865afa158015610ded573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104ce91908101906114f2565b6006546001600160a01b03163314610e3f5760405162461bcd60e51b81526004016105e4906113f6565b6040514790339082156108fc029083906000818181858888f19350505050158015610999573d6000803e3d6000fd5b6006546001600160a01b03163314610e985760405162461bcd60e51b81526004016105e4906113f6565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610edf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f03919061159f565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9191906115b8565b60006301ffc9a760e01b6001600160e01b031983161480610fa857506380ac58cd60e01b6001600160e01b03198316145b806104ce5750506001600160e01b031916635b5e139f60e01b1490565b610fcf8383611016565b6001600160a01b0383163b1580610a525750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a0290610a03903390600090889088906004016115d5565b6001600160a01b0382166110605760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105e4565b6000818152600260205260409020546001600160a01b0316156110b65760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b60448201526064016105e4565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461113757600080fd5b50565b60006020828403121561114c57600080fd5b813561115781611121565b9392505050565b60005b83811015611179578181015183820152602001611161565b83811115611188576000848401525b50505050565b600081518084526111a681602086016020860161115e565b601f01601f19169290920160200192915050565b602081526000611157602083018461118e565b6000602082840312156111df57600080fd5b5035919050565b6001600160a01b038116811461113757600080fd5b6000806040838503121561120e57600080fd5b8235611219816111e6565b946020939093013593505050565b60006020828403121561123957600080fd5b8135611157816111e6565b60008060006060848603121561125957600080fd5b8335611264816111e6565b92506020840135611274816111e6565b929592945050506040919091013590565b6000806040838503121561129857600080fd5b50508035926020909101359150565b801515811461113757600080fd5b600080604083850312156112c857600080fd5b82356112d3816111e6565b915060208301356112e3816112a7565b809150509250929050565b60008060008060006080868803121561130657600080fd5b8535611311816111e6565b94506020860135611321816111e6565b935060408601359250606086013567ffffffffffffffff8082111561134557600080fd5b818801915088601f83011261135957600080fd5b81358181111561136857600080fd5b89602082850101111561137a57600080fd5b9699959850939650602001949392505050565b600080604083850312156113a057600080fd5b82356113ab816111e6565b915060208301356112e3816111e6565b600181811c908216806113cf57607f821691505b602082108114156113f057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b600081600019048311821515161561144457634e487b7160e01b600052601160045260246000fd5b500290565b60008261146657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561147d57600080fd5b815161115781611121565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561150457600080fd5b815167ffffffffffffffff8082111561151c57600080fd5b818401915084601f83011261153057600080fd5b815181811115611542576115426114dc565b604051601f8201601f19908116603f0116810190838211818310171561156a5761156a6114dc565b8160405282815287602084870101111561158357600080fd5b61159483602083016020880161115e565b979650505050505050565b6000602082840312156115b157600080fd5b5051919050565b6000602082840312156115ca57600080fd5b8151611157816112a7565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906116089083018461118e565b969550505050505056fea2646970667358221220192bf341c70dab358fb39a8dd450b421ada2b17921d92aacd331eb69a9bc57a864736f6c634300080b0033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.