ETH Price: $3,486.46 (-1.18%)
Gas: 4 Gwei

Token

NFT Rewards Audit Bannys (AUDIT)
 

Overview

Max Total Supply

101 AUDIT

Holders

69

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
cyprien.eth
Balance
1 AUDIT
0x42a63047a1cd8449e3e70adeb7363c4ca01db528
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
NFT

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 24 : NFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {ERC721} from "solmate/tokens/ERC721.sol";
import "juice-contracts-v2/JBETHERC20ProjectPayer.sol";
import {ReentrancyGuard} from "solmate/utils/ReentrancyGuard.sol";
import {Strings} from "openzeppelin-contracts/utils/Strings.sol";

contract NFT is ERC721, ReentrancyGuard, JBETHERC20ProjectPayer {
    mapping(uint256 => uint256) public tierOf;
    uint256 private immutable projectId;
    string public baseUri;
    string private imageUri;
    uint256 public totalSupply;
    uint256 private immutable deadline;

    constructor(
        string memory _name, // NFT Rewards Audit Fund
        string memory _symbol, // AUDIT
        uint256 _projectId, // 256
        address _beneficiary, // 0xb0a1b2f7f7a2093da2247ed16f0c06cf02ce164f (safe.auditfund.eth)
        string memory _baseUri, // IPFS directory containing metadata for 3 tiers ipfs://QmXQoVyXbCt1ccjAExKjVLcamGgr2USLftNGEWx4ZzmGpi
        string memory _imageUri, // IPFS image directory ipfs://QmT3SQdAQojLUo11ugU2rRPUWvhSQZeZupFSFJq9xGAX7G
        uint256 _deadline // Oct 18 00:00 UTC - 1666051200
    )
        ERC721(_name, _symbol)
        JBETHERC20ProjectPayer(
            _projectId,
            payable(_beneficiary),
            false,
            "",
            "",
            false,
            IJBDirectory(0xCc8f7a89d89c2AB3559f484E0C656423E979ac9C),
            msg.sender
        )
    {
        projectId = _projectId;
        baseUri = _baseUri;
        imageUri = _imageUri;
        deadline = _deadline;
    }

    function _mint(address _to, uint256 _tier) internal override(ERC721) {
        uint256 tokenId = totalSupply + 1;
        tierOf[tokenId] = _tier;
        require(_tier > 0 && _tier < 4, "Tier out of range");
        unchecked {
            ++totalSupply;
        }
        ERC721._mint(_to, tokenId);
    }

    // Public Mint
    function mint() external payable nonReentrant {
        uint256 tier;
        if (msg.value >= 10 ether) {
            tier = 3;
        } else if (msg.value >= 1 ether) {
            tier = 2;
        } else if (msg.value >= 0.1 ether) {
            tier = 1;
        } else {
            revert("Minimum price 0.1 ETH");
        }
        _pay(
            projectId, //uint256 _projectId,`
            JBTokens.ETH, // address _token
            msg.value, //uint256 _amount,
            18, //uint256 _decimals,
            msg.sender, //address _beneficiary,
            0, //uint256 _minReturnedTokens,
            false, //bool _preferClaimedTokens,
            string(abi.encodePacked(imageUri, "/", Strings.toString(tier), ".png")), //string memory _metadata,
            "" //bytes calldata _metadata
        );

        require(block.timestamp < deadline, "Deadline over");
        _mint(msg.sender, tier);
    }

    function ownerMint(address _to, uint256 _tier)
        public
        onlyOwner
        nonReentrant
    {
        _mint(_to, _tier);
    }

    function ownerBatchMint(address[] calldata _to, uint256[] calldata _tiers)
        external
        onlyOwner
    {
        require(
            _to.length == _tiers.length,
            "Recipients and tiers must be same length"
        );
        uint256 recipientLength = _to.length;
        for (uint256 i = 0; i < recipientLength;) {
            ownerMint(_to[i], _tiers[i]);
            unchecked{
                ++i;
            }
        }
    }

    function setBaseUri(string memory _baseUri) external onlyOwner {
        baseUri = _baseUri;
    }

    function tokenURI(uint256 id) public view override returns (string memory) {
        return
            string(
                abi.encodePacked(baseUri, "/", Strings.toString(tierOf[id]))
            );
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, JBETHERC20ProjectPayer)
        returns (bool)
    {
        return
            JBETHERC20ProjectPayer.supportsInterface(interfaceId) ||
            ERC721.supportsInterface(interfaceId);
    }
}

File 2 of 24 : 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 3 of 24 : JBETHERC20ProjectPayer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import './interfaces/IJBProjectPayer.sol';
import './libraries/JBTokens.sol';

/** 
  @notice 
  Sends ETH or ERC20's to a project treasury as it receives direct payments or has it's functions called.

  @dev
  Inherit from this contract or borrow from its logic to forward ETH or ERC20's to project treasuries from within other contracts.

  @dev
  Adheres to -
  IJBProjectPayer:  General interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.

  @dev
  Inherits from -
  Ownable: Includes convenience functionality for checking a message sender's permissions before executing certain transactions.
  ERC165: Introspection on interface adherance. 
*/
contract JBETHERC20ProjectPayer is Ownable, ERC165, IJBProjectPayer {
  //*********************************************************************//
  // -------------------------- custom errors -------------------------- //
  //*********************************************************************//
  error INCORRECT_DECIMAL_AMOUNT();
  error NO_MSG_VALUE_ALLOWED();
  error TERMINAL_NOT_FOUND();

  //*********************************************************************//
  // ---------------- public immutable stored properties --------------- //
  //*********************************************************************//

  /**
    @notice 
    A contract storing directories of terminals and controllers for each project.
  */
  IJBDirectory public immutable override directory;

  //*********************************************************************//
  // --------------------- public stored properties -------------------- //
  //*********************************************************************//

  /** 
    @notice 
    The ID of the project that should be used to forward this contract's received payments.
  */
  uint256 public override defaultProjectId;

  /** 
    @notice 
    The beneficiary that should be used in the payment made when this contract receives payments.
  */
  address payable public override defaultBeneficiary;

  /** 
    @notice 
    A flag indicating whether issued tokens should be automatically claimed into the beneficiary's wallet. Leaving tokens unclaimed saves gas.
  */
  bool public override defaultPreferClaimedTokens;

  /** 
    @notice 
    The memo that should be used in the payment made when this contract receives payments.
  */
  string public override defaultMemo;

  /** 
    @notice 
    The metadata that should be used in the payment made when this contract receives payments.
  */
  bytes public override defaultMetadata;

  /**
    @notice 
    A flag indicating if received payments should call the `pay` function or the `addToBalance` function of a project.
  */
  bool public override defaultPreferAddToBalance;

  //*********************************************************************//
  // ------------------------- public views -------------------------- //
  //*********************************************************************//

  /**
    @notice
    Indicates if this contract adheres to the specified interface.

    @dev 
    See {IERC165-supportsInterface}.

    @param _interfaceId The ID of the interface to check for adherance to.
  */
  function supportsInterface(bytes4 _interfaceId)
    public
    view
    virtual
    override(ERC165, IERC165)
    returns (bool)
  {
    return
      _interfaceId == type(IJBProjectPayer).interfaceId || super.supportsInterface(_interfaceId);
  }

  //*********************************************************************//
  // -------------------------- constructor ---------------------------- //
  //*********************************************************************//

  /** 
    @param _defaultProjectId The ID of the project whose treasury should be forwarded this contract's received payments.
    @param _defaultBeneficiary The address that'll receive the project's tokens. 
    @param _defaultPreferClaimedTokens A flag indicating whether issued tokens should be automatically claimed into the beneficiary's wallet. 
    @param _defaultMemo A memo to pass along to the emitted event, and passed along the the funding cycle's data source and delegate.  A data source can alter the memo before emitting in the event and forwarding to the delegate.
    @param _defaultMetadata Bytes to send along to the project's data source and delegate, if provided.
    @param _defaultPreferAddToBalance A flag indicating if received payments should call the `pay` function or the `addToBalance` function of a project.
    @param _directory A contract storing directories of terminals and controllers for each project.
    @param _owner The address that will own the contract.
  */
  constructor(
    uint256 _defaultProjectId,
    address payable _defaultBeneficiary,
    bool _defaultPreferClaimedTokens,
    string memory _defaultMemo,
    bytes memory _defaultMetadata,
    bool _defaultPreferAddToBalance,
    IJBDirectory _directory,
    address _owner
  ) {
    defaultProjectId = _defaultProjectId;
    defaultBeneficiary = _defaultBeneficiary;
    defaultPreferClaimedTokens = _defaultPreferClaimedTokens;
    defaultMemo = _defaultMemo;
    defaultMetadata = _defaultMetadata;
    defaultPreferAddToBalance = _defaultPreferAddToBalance;
    directory = _directory;

    _transferOwnership(_owner);
  }

  //*********************************************************************//
  // ------------------------- default receive ------------------------- //
  //*********************************************************************//

  /** 
    @notice
    Received funds are paid to the default project ID using the stored default properties.

    @dev
    Use the `addToBalance` function if there's a preference to do so. Otherwise use `pay`.

    @dev
    This function is called automatically when the contract receives an ETH payment.
  */
  receive() external payable virtual override {
    if (defaultPreferAddToBalance)
      _addToBalanceOf(
        defaultProjectId,
        JBTokens.ETH,
        address(this).balance,
        18, // balance is a fixed point number with 18 decimals.
        defaultMemo,
        defaultMetadata
      );
    else
      _pay(
        defaultProjectId,
        JBTokens.ETH,
        address(this).balance,
        18, // balance is a fixed point number with 18 decimals.
        defaultBeneficiary == address(0) ? msg.sender : defaultBeneficiary,
        0, // Can't determine expectation of returned tokens ahead of time.
        defaultPreferClaimedTokens,
        defaultMemo,
        defaultMetadata
      );
  }

  //*********************************************************************//
  // ---------------------- external transactions ---------------------- //
  //*********************************************************************//

  /** 
    @notice 
    Sets the default values that determine how to interact with a protocol treasury when this contract receives ETH directly.

    @param _projectId The ID of the project whose treasury should be forwarded this contract's received payments.
    @param _beneficiary The address that'll receive the project's tokens. 
    @param _preferClaimedTokens A flag indicating whether issued tokens should be automatically claimed into the beneficiary's wallet. 
    @param _memo The memo that'll be used. 
    @param _metadata The metadata that'll be sent. 
    @param _defaultPreferAddToBalance A flag indicating if received payments should call the `pay` function or the `addToBalance` function of a project.
  */
  function setDefaultValues(
    uint256 _projectId,
    address payable _beneficiary,
    bool _preferClaimedTokens,
    string memory _memo,
    bytes memory _metadata,
    bool _defaultPreferAddToBalance
  ) external virtual override onlyOwner {
    // Set the default project ID if it has changed.
    if (_projectId != defaultProjectId) defaultProjectId = _projectId;

    // Set the default beneficiary if it has changed.
    if (_beneficiary != defaultBeneficiary) defaultBeneficiary = _beneficiary;

    // Set the default claimed token preference if it has changed.
    if (_preferClaimedTokens != defaultPreferClaimedTokens)
      defaultPreferClaimedTokens = _preferClaimedTokens;

    // Set the default memo if it has changed.
    if (keccak256(abi.encodePacked(_memo)) != keccak256(abi.encodePacked(defaultMemo)))
      defaultMemo = _memo;

    // Set the default metadata if it has changed.
    if (keccak256(abi.encodePacked(_metadata)) != keccak256(abi.encodePacked(defaultMetadata)))
      defaultMetadata = _metadata;

    // Set the add to balance preference if it has changed.
    if (_defaultPreferAddToBalance != defaultPreferAddToBalance)
      defaultPreferAddToBalance = _defaultPreferAddToBalance;

    emit SetDefaultValues(
      _projectId,
      _beneficiary,
      _preferClaimedTokens,
      _memo,
      _metadata,
      _defaultPreferAddToBalance,
      msg.sender
    );
  }

  //*********************************************************************//
  // ----------------------- public transactions ----------------------- //
  //*********************************************************************//

  /** 
    @notice 
    Make a payment to the specified project.

    @param _projectId The ID of the project that is being paid.
    @param _token The token being paid in.
    @param _amount The amount of tokens being paid, as a fixed point number. If the token is ETH, this is ignored and msg.value is used in its place.
    @param _decimals The number of decimals in the `_amount` fixed point number. If the token is ETH, this is ignored and 18 is used in its place, which corresponds to the amount of decimals expected in msg.value.
    @param _beneficiary The address who will receive tokens from the payment.
    @param _minReturnedTokens The minimum number of project tokens expected in return, as a fixed point number with 18 decimals.
    @param _preferClaimedTokens A flag indicating whether the request prefers to mint project tokens into the beneficiaries wallet rather than leaving them unclaimed. This is only possible if the project has an attached token contract. Leaving them unclaimed saves gas.
    @param _memo A memo to pass along to the emitted event, and passed along the the funding cycle's data source and delegate. A data source can alter the memo before emitting in the event and forwarding to the delegate.
    @param _metadata Bytes to send along to the data source, delegate, and emitted event, if provided.
  */
  function pay(
    uint256 _projectId,
    address _token,
    uint256 _amount,
    uint256 _decimals,
    address _beneficiary,
    uint256 _minReturnedTokens,
    bool _preferClaimedTokens,
    string calldata _memo,
    bytes calldata _metadata
  ) public payable virtual override {
    // ETH shouldn't be sent if the token isn't ETH.
    if (address(_token) != JBTokens.ETH) {
      if (msg.value > 0) revert NO_MSG_VALUE_ALLOWED();

      // Transfer tokens to this contract from the msg sender.
      IERC20(_token).transferFrom(msg.sender, address(this), _amount);
    } else {
      // If ETH is being paid, set the amount to the message value, and decimals to 18.
      _amount = msg.value;
      _decimals = 18;
    }

    _pay(
      _projectId,
      _token,
      _amount,
      _decimals,
      _beneficiary,
      _minReturnedTokens,
      _preferClaimedTokens,
      _memo,
      _metadata
    );
  }

  /** 
    @notice 
    Add to the balance of the specified project.

    @param _projectId The ID of the project that is being paid.
    @param _token The token being paid in.
    @param _amount The amount of tokens being paid, as a fixed point number. If the token is ETH, this is ignored and msg.value is used in its place.
    @param _decimals The number of decimals in the `_amount` fixed point number. If the token is ETH, this is ignored and 18 is used in its place, which corresponds to the amount of decimals expected in msg.value.
    @param _memo A memo to pass along to the emitted event.
    @param _metadata Extra data to pass along to the terminal.
  */
  function addToBalanceOf(
    uint256 _projectId,
    address _token,
    uint256 _amount,
    uint256 _decimals,
    string calldata _memo,
    bytes calldata _metadata
  ) public payable virtual override {
    // ETH shouldn't be sent if the token isn't ETH.
    if (address(_token) != JBTokens.ETH) {
      if (msg.value > 0) revert NO_MSG_VALUE_ALLOWED();

      // Transfer tokens to this contract from the msg sender.
      IERC20(_token).transferFrom(msg.sender, address(this), _amount);
    } else {
      // If ETH is being paid, set the amount to the message value, and decimals to 18.
      _amount = msg.value;
      _decimals = 18;
    }

    _addToBalanceOf(_projectId, _token, _amount, _decimals, _memo, _metadata);
  }

  //*********************************************************************//
  // ---------------------- internal transactions ---------------------- //
  //*********************************************************************//

  /** 
    @notice 
    Make a payment to the specified project.

    @param _projectId The ID of the project that is being paid.
    @param _token The token being paid in.
    @param _amount The amount of tokens being paid, as a fixed point number. 
    @param _decimals The number of decimals in the `_amount` fixed point number. 
    @param _beneficiary The address who will receive tokens from the payment.
    @param _minReturnedTokens The minimum number of project tokens expected in return, as a fixed point number with 18 decimals.
    @param _preferClaimedTokens A flag indicating whether the request prefers to mint project tokens into the beneficiaries wallet rather than leaving them unclaimed. This is only possible if the project has an attached token contract. Leaving them unclaimed saves gas.
    @param _memo A memo to pass along to the emitted event, and passed along the the funding cycle's data source and delegate.  A data source can alter the memo before emitting in the event and forwarding to the delegate.
    @param _metadata Bytes to send along to the data source and delegate, if provided.
  */
  function _pay(
    uint256 _projectId,
    address _token,
    uint256 _amount,
    uint256 _decimals,
    address _beneficiary,
    uint256 _minReturnedTokens,
    bool _preferClaimedTokens,
    string memory _memo,
    bytes memory _metadata
  ) internal virtual {
    // Find the terminal for the specified project.
    IJBPaymentTerminal _terminal = directory.primaryTerminalOf(_projectId, _token);

    // There must be a terminal.
    if (_terminal == IJBPaymentTerminal(address(0))) revert TERMINAL_NOT_FOUND();

    // The amount's decimals must match the terminal's expected decimals.
    if (_terminal.decimalsForToken(_token) != _decimals) revert INCORRECT_DECIMAL_AMOUNT();

    // Approve the `_amount` of tokens from the destination terminal to transfer tokens from this contract.
    if (_token != JBTokens.ETH) IERC20(_token).approve(address(_terminal), _amount);

    // If the token is ETH, send it in msg.value.
    uint256 _payableValue = _token == JBTokens.ETH ? _amount : 0;

    // Send funds to the terminal.
    // If the token is ETH, send it in msg.value.
    _terminal.pay{value: _payableValue}(
      _projectId,
      _amount, // ignored if the token is JBTokens.ETH.
      _token,
      _beneficiary != address(0) ? _beneficiary : msg.sender,
      _minReturnedTokens,
      _preferClaimedTokens,
      _memo,
      _metadata
    );
  }

  /** 
    @notice 
    Add to the balance of the specified project.

    @param _projectId The ID of the project that is being paid.
    @param _token The token being paid in.
    @param _amount The amount of tokens being paid, as a fixed point number. If the token is ETH, this is ignored and msg.value is used in its place.
    @param _decimals The number of decimals in the `_amount` fixed point number. If the token is ETH, this is ignored and 18 is used in its place, which corresponds to the amount of decimals expected in msg.value.
    @param _memo A memo to pass along to the emitted event.
    @param _metadata Extra data to pass along to the terminal.
  */
  function _addToBalanceOf(
    uint256 _projectId,
    address _token,
    uint256 _amount,
    uint256 _decimals,
    string memory _memo,
    bytes memory _metadata
  ) internal virtual {
    // Find the terminal for the specified project.
    IJBPaymentTerminal _terminal = directory.primaryTerminalOf(_projectId, _token);

    // There must be a terminal.
    if (_terminal == IJBPaymentTerminal(address(0))) revert TERMINAL_NOT_FOUND();

    // The amount's decimals must match the terminal's expected decimals.
    if (_terminal.decimalsForToken(_token) != _decimals) revert INCORRECT_DECIMAL_AMOUNT();

    // Approve the `_amount` of tokens from the destination terminal to transfer tokens from this contract.
    if (_token != JBTokens.ETH) IERC20(_token).approve(address(_terminal), _amount);

    // If the token is ETH, send it in msg.value.
    uint256 _payableValue = _token == JBTokens.ETH ? _amount : 0;

    // Add to balance so tokens don't get issued.
    _terminal.addToBalanceOf{value: _payableValue}(_projectId, _amount, _token, _memo, _metadata);
  }
}

File 4 of 24 : ReentrancyGuard.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private locked = 1;

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }
}

File 5 of 24 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 8 of 24 : 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 24 : IJBProjectPayer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/IERC165.sol';
import './IJBDirectory.sol';

interface IJBProjectPayer is IERC165 {
  event SetDefaultValues(
    uint256 indexed projectId,
    address indexed beneficiary,
    bool preferClaimedTokens,
    string memo,
    bytes metadata,
    bool preferAddToBalance,
    address caller
  );

  function directory() external view returns (IJBDirectory);

  function defaultProjectId() external view returns (uint256);

  function defaultBeneficiary() external view returns (address payable);

  function defaultPreferClaimedTokens() external view returns (bool);

  function defaultMemo() external view returns (string memory);

  function defaultMetadata() external view returns (bytes memory);

  function defaultPreferAddToBalance() external view returns (bool);

  function setDefaultValues(
    uint256 _projectId,
    address payable _beneficiary,
    bool _preferClaimedTokens,
    string memory _memo,
    bytes memory _metadata,
    bool _defaultPreferAddToBalance
  ) external;

  function pay(
    uint256 _projectId,
    address _token,
    uint256 _amount,
    uint256 _decimals,
    address _beneficiary,
    uint256 _minReturnedTokens,
    bool _preferClaimedTokens,
    string memory _memo,
    bytes memory _metadata
  ) external payable;

  function addToBalanceOf(
    uint256 _projectId,
    address _token,
    uint256 _amount,
    uint256 _decimals,
    string memory _memo,
    bytes memory _metadata
  ) external payable;

  receive() external payable;
}

File 10 of 24 : JBTokens.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library JBTokens {
  /** 
    @notice 
    The ETH token address in Juicebox is represented by 0x000000000000000000000000000000000000EEEe.
  */
  address public constant ETH = address(0x000000000000000000000000000000000000EEEe);
}

File 11 of 24 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 12 of 24 : 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 13 of 24 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 14 of 24 : IJBDirectory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './IJBFundingCycleStore.sol';
import './IJBPaymentTerminal.sol';
import './IJBProjects.sol';

interface IJBDirectory {
  event SetController(uint256 indexed projectId, address indexed controller, address caller);

  event AddTerminal(uint256 indexed projectId, IJBPaymentTerminal indexed terminal, address caller);

  event SetTerminals(uint256 indexed projectId, IJBPaymentTerminal[] terminals, address caller);

  event SetPrimaryTerminal(
    uint256 indexed projectId,
    address indexed token,
    IJBPaymentTerminal indexed terminal,
    address caller
  );

  event SetIsAllowedToSetFirstController(address indexed addr, bool indexed flag, address caller);

  function projects() external view returns (IJBProjects);

  function fundingCycleStore() external view returns (IJBFundingCycleStore);

  function controllerOf(uint256 _projectId) external view returns (address);

  function isAllowedToSetFirstController(address _address) external view returns (bool);

  function terminalsOf(uint256 _projectId) external view returns (IJBPaymentTerminal[] memory);

  function isTerminalOf(uint256 _projectId, IJBPaymentTerminal _terminal)
    external
    view
    returns (bool);

  function primaryTerminalOf(uint256 _projectId, address _token)
    external
    view
    returns (IJBPaymentTerminal);

  function setControllerOf(uint256 _projectId, address _controller) external;

  function setTerminalsOf(uint256 _projectId, IJBPaymentTerminal[] calldata _terminals) external;

  function setPrimaryTerminalOf(
    uint256 _projectId,
    address _token,
    IJBPaymentTerminal _terminal
  ) external;

  function setIsAllowedToSetFirstController(address _address, bool _flag) external;
}

File 15 of 24 : IJBFundingCycleStore.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './../enums/JBBallotState.sol';
import './../structs/JBFundingCycle.sol';
import './../structs/JBFundingCycleData.sol';

interface IJBFundingCycleStore {
  event Configure(
    uint256 indexed configuration,
    uint256 indexed projectId,
    JBFundingCycleData data,
    uint256 metadata,
    uint256 mustStartAtOrAfter,
    address caller
  );

  event Init(uint256 indexed configuration, uint256 indexed projectId, uint256 indexed basedOn);

  function latestConfigurationOf(uint256 _projectId) external view returns (uint256);

  function get(uint256 _projectId, uint256 _configuration)
    external
    view
    returns (JBFundingCycle memory);

  function latestConfiguredOf(uint256 _projectId)
    external
    view
    returns (JBFundingCycle memory fundingCycle, JBBallotState ballotState);

  function queuedOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle);

  function currentOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle);

  function currentBallotStateOf(uint256 _projectId) external view returns (JBBallotState);

  function configureFor(
    uint256 _projectId,
    JBFundingCycleData calldata _data,
    uint256 _metadata,
    uint256 _mustStartAtOrAfter
  ) external returns (JBFundingCycle memory fundingCycle);
}

File 16 of 24 : IJBPaymentTerminal.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/IERC165.sol';

interface IJBPaymentTerminal is IERC165 {
  function acceptsToken(address _token, uint256 _projectId) external view returns (bool);

  function currencyForToken(address _token) external view returns (uint256);

  function decimalsForToken(address _token) external view returns (uint256);

  // Return value must be a fixed point number with 18 decimals.
  function currentEthOverflowOf(uint256 _projectId) external view returns (uint256);

  function pay(
    uint256 _projectId,
    uint256 _amount,
    address _token,
    address _beneficiary,
    uint256 _minReturnedTokens,
    bool _preferClaimedTokens,
    string calldata _memo,
    bytes calldata _metadata
  ) external payable returns (uint256 beneficiaryTokenCount);

  function addToBalanceOf(
    uint256 _projectId,
    uint256 _amount,
    address _token,
    string calldata _memo,
    bytes calldata _metadata
  ) external payable;
}

File 17 of 24 : IJBProjects.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import './../structs/JBProjectMetadata.sol';
import './IJBTokenUriResolver.sol';

interface IJBProjects is IERC721 {
  event Create(
    uint256 indexed projectId,
    address indexed owner,
    JBProjectMetadata metadata,
    address caller
  );

  event SetMetadata(uint256 indexed projectId, JBProjectMetadata metadata, address caller);

  event SetTokenUriResolver(IJBTokenUriResolver indexed resolver, address caller);

  function count() external view returns (uint256);

  function metadataContentOf(uint256 _projectId, uint256 _domain)
    external
    view
    returns (string memory);

  function tokenUriResolver() external view returns (IJBTokenUriResolver);

  function createFor(address _owner, JBProjectMetadata calldata _metadata)
    external
    returns (uint256 projectId);

  function setMetadataOf(uint256 _projectId, JBProjectMetadata calldata _metadata) external;

  function setTokenUriResolver(IJBTokenUriResolver _newResolver) external;
}

File 18 of 24 : JBBallotState.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

enum JBBallotState {
  Active,
  Approved,
  Failed
}

File 19 of 24 : JBFundingCycle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './../interfaces/IJBFundingCycleBallot.sol';

/** 
  @member number The funding cycle number for the cycle's project. Each funding cycle has a number that is an increment of the cycle that directly preceded it. Each project's first funding cycle has a number of 1.
  @member configuration The timestamp when the parameters for this funding cycle were configured. This value will stay the same for subsequent funding cycles that roll over from an originally configured cycle.
  @member basedOn The `configuration` of the funding cycle that was active when this cycle was created.
  @member start The timestamp marking the moment from which the funding cycle is considered active. It is a unix timestamp measured in seconds.
  @member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`.
  @member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received.
  @member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`.
  @member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time.
  @member metadata Extra data that can be associated with a funding cycle.
*/
struct JBFundingCycle {
  uint256 number;
  uint256 configuration;
  uint256 basedOn;
  uint256 start;
  uint256 duration;
  uint256 weight;
  uint256 discountRate;
  IJBFundingCycleBallot ballot;
  uint256 metadata;
}

File 20 of 24 : JBFundingCycleData.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './../interfaces/IJBFundingCycleBallot.sol';

/** 
  @member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`.
  @member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received.
  @member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`.
  @member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time.
*/
struct JBFundingCycleData {
  uint256 duration;
  uint256 weight;
  uint256 discountRate;
  IJBFundingCycleBallot ballot;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 22 of 24 : JBProjectMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/** 
  @member content The metadata content.
  @member domain The domain within which the metadata applies.
*/
struct JBProjectMetadata {
  string content;
  uint256 domain;
}

File 23 of 24 : IJBTokenUriResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IJBTokenUriResolver {
  function getUri(uint256 _projectId) external view returns (string memory tokenUri);
}

File 24 of 24 : IJBFundingCycleBallot.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/IERC165.sol';
import './../enums/JBBallotState.sol';
import './IJBFundingCycleStore.sol';

interface IJBFundingCycleBallot is IERC165 {
  function duration() external view returns (uint256);

  function stateOf(
    uint256 _projectId,
    uint256 _configuration,
    uint256 _start
  ) external view returns (JBBallotState);
}

Settings
{
  "remappings": [
    "@chainlink/=lib/juice-contracts-v2/lib/chainlink/",
    "@juicebox/=lib/juice-contracts-v2/contracts/",
    "@openzeppelin/contracts/=lib/juice-contracts-v2/lib/openzeppelin-contracts/contracts/",
    "@paulrberg/contracts/math/=lib/juice-contracts-v2/lib/prb-math/contracts/",
    "chainlink/=lib/juice-contracts-v2/lib/chainlink/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "juice-contracts-v2/=lib/juice-contracts-v2/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin-contracts/contracts/=lib/juice-contracts-v2/lib/openzeppelin-contracts/contracts/",
    "prb-math/=lib/juice-contracts-v2/lib/prb-math/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"string","name":"_imageUri","type":"string"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"INCORRECT_DECIMAL_AMOUNT","type":"error"},{"inputs":[],"name":"NO_MSG_VALUE_ALLOWED","type":"error"},{"inputs":[],"name":"TERMINAL_NOT_FOUND","type":"error"},{"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"bool","name":"preferClaimedTokens","type":"bool"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"bytes","name":"metadata","type":"bytes"},{"indexed":false,"internalType":"bool","name":"preferAddToBalance","type":"bool"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"SetDefaultValues","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":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_decimals","type":"uint256"},{"internalType":"string","name":"_memo","type":"string"},{"internalType":"bytes","name":"_metadata","type":"bytes"}],"name":"addToBalanceOf","outputs":[],"stateMutability":"payable","type":"function"},{"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":[],"name":"baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultBeneficiary","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultMemo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultMetadata","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPreferAddToBalance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPreferClaimedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"directory","outputs":[{"internalType":"contract IJBDirectory","name":"","type":"address"}],"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":[],"name":"mint","outputs":[],"stateMutability":"payable","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":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_tiers","type":"uint256[]"}],"name":"ownerBatchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tier","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_decimals","type":"uint256"},{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_minReturnedTokens","type":"uint256"},{"internalType":"bool","name":"_preferClaimedTokens","type":"bool"},{"internalType":"string","name":"_memo","type":"string"},{"internalType":"bytes","name":"_metadata","type":"bytes"}],"name":"pay","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"string","name":"_baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_beneficiary","type":"address"},{"internalType":"bool","name":"_preferClaimedTokens","type":"bool"},{"internalType":"string","name":"_memo","type":"string"},{"internalType":"bytes","name":"_metadata","type":"bytes"},{"internalType":"bool","name":"_defaultPreferAddToBalance","type":"bool"}],"name":"setDefaultValues","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":"","type":"uint256"}],"name":"tierOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","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":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e060405260016006553480156200001657600080fd5b506040516200304f3803806200304f83398101604081905262000039916200029b565b848460006040518060200160405280600081525060405180602001604052806000815250600073cc8f7a89d89c2ab3559f484e0c656423e979ac9c338e8e816000908162000088919062000409565b50600162000097828262000409565b505050620000b4620000ae6200016360201b60201c565b62000167565b600888905560098054871515600160a01b026001600160a81b03199091166001600160a01b038a1617179055600a620000ee868262000409565b50600b620000fd858262000409565b50600c805460ff19168415151790556001600160a01b038216608052620001248162000167565b50505060a08a905250600e935062000143925086915083905062000409565b50600f62000152838262000409565b5060c05250620004d5945050505050565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001e157600080fd5b81516001600160401b0380821115620001fe57620001fe620001b9565b604051601f8301601f19908116603f01168101908282118183101715620002295762000229620001b9565b816040528381526020925086838588010111156200024657600080fd5b600091505b838210156200026a57858201830151818301840152908201906200024b565b600093810190920192909252949350505050565b80516001600160a01b03811681146200029657600080fd5b919050565b600080600080600080600060e0888a031215620002b757600080fd5b87516001600160401b0380821115620002cf57600080fd5b620002dd8b838c01620001cf565b985060208a0151915080821115620002f457600080fd5b620003028b838c01620001cf565b975060408a015196506200031960608b016200027e565b955060808a01519150808211156200033057600080fd5b6200033e8b838c01620001cf565b945060a08a01519150808211156200035557600080fd5b50620003648a828b01620001cf565b92505060c0880151905092959891949750929550565b600181811c908216806200038f57607f821691505b602082108103620003b057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200040457600081815260208120601f850160051c81016020861015620003df5750805b601f850160051c820191505b818110156200040057828155600101620003eb565b5050505b505050565b81516001600160401b03811115620004255762000425620001b9565b6200043d816200043684546200037a565b84620003b6565b602080601f8311600181146200047557600084156200045c5750858301515b600019600386901b1c1916600185901b17855562000400565b600085815260208120601f198616915b82811015620004a65788860151825594840194600190910190840162000485565b5085821015620004c55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c051612b3c620005136000396000611437015260006113d2015260008181610820015281816108e60152610b470152612b3c6000f3fe6080604052600436106101f25760003560e01c806370a082311161010d578063a0bcfc7f116100a0578063b96053df1161006f578063b96053df146107f9578063c41c2f241461080e578063c87b56dd14610842578063e985e9c514610862578063f2fde38b1461089d57600080fd5b8063a0bcfc7f14610778578063a22cb46514610798578063a4919eb1146107b8578063b88d4fde146107d957600080fd5b80638da5cb5b116100dc5780638da5cb5b1461071657806393b7f1541461073457806395d89b411461074e5780639abc83201461076357600080fd5b806370a08231146106b9578063715018a6146106d95780637e646549146106ee5780638293fee61461070357600080fd5b806318160ddd11610185578063484b973c11610154578063484b973c1461062c57806353f96df21461064c57806354ab58af146106795780636352211e1461069957600080fd5b806318160ddd146105b257806323b872dd146105d65780633ce9830b146105f657806342842e0e1461060c57600080fd5b806309a6b7e5116101c157806309a6b7e5146105575780630b26a09f1461056a5780630e45f78e1461058a5780631249c58b146105aa57600080fd5b806301ffc9a71461049257806306fdde03146104c7578063081812fc146104e9578063095ea7b31461053757600080fd5b3661048d57600c5460ff161561032b5761032960085461eeee476012600a805461021b90612058565b80601f016020809104026020016040519081016040528092919081815260200182805461024790612058565b80156102945780601f1061026957610100808354040283529160200191610294565b820191906000526020600020905b81548152906001019060200180831161027757829003601f168201915b5050505050600b80546102a690612058565b80601f01602080910402602001604051908101604052809291908181526020018280546102d290612058565b801561031f5780601f106102f45761010080835404028352916020019161031f565b820191906000526020600020905b81548152906001019060200180831161030257829003601f168201915b50505050506108bd565b005b600854600954610329919061eeee9047906012906001600160a01b03161561035e576009546001600160a01b0316610360565b335b6000600960149054906101000a900460ff16600a805461037f90612058565b80601f01602080910402602001604051908101604052809291908181526020018280546103ab90612058565b80156103f85780601f106103cd576101008083540402835291602001916103f8565b820191906000526020600020905b8154815290600101906020018083116103db57829003601f168201915b5050505050600b805461040a90612058565b80601f016020809104026020016040519081016040528092919081815260200182805461043690612058565b80156104835780601f1061045857610100808354040283529160200191610483565b820191906000526020600020905b81548152906001019060200180831161046657829003601f168201915b5050505050610b1e565b600080fd5b34801561049e57600080fd5b506104b26104ad3660046120a8565b610dbb565b60405190151581526020015b60405180910390f35b3480156104d357600080fd5b506104dc610ddb565b6040516104be919061211c565b3480156104f557600080fd5b5061051f61050436600461212f565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016104be565b34801561054357600080fd5b5061032961055236600461215d565b610e69565b6103296105653660046121d2565b610f50565b34801561057657600080fd5b506103296105853660046122b6565b611087565b34801561059657600080fd5b506103296105a53660046123e7565b611153565b610329611302565b3480156105be57600080fd5b506105c860105481565b6040519081526020016104be565b3480156105e257600080fd5b506103296105f136600461249d565b6114a6565b34801561060257600080fd5b506105c860085481565b34801561061857600080fd5b5061032961062736600461249d565b61166d565b34801561063857600080fd5b5061032961064736600461215d565b611765565b34801561065857600080fd5b506105c861066736600461212f565b600d6020526000908152604090205481565b34801561068557600080fd5b5060095461051f906001600160a01b031681565b3480156106a557600080fd5b5061051f6106b436600461212f565b6117c4565b3480156106c557600080fd5b506105c86106d43660046124de565b61181b565b3480156106e557600080fd5b5061032961187e565b3480156106fa57600080fd5b506104dc611892565b6103296107113660046124fb565b61189f565b34801561072257600080fd5b506007546001600160a01b031661051f565b34801561074057600080fd5b50600c546104b29060ff1681565b34801561075a57600080fd5b506104dc6119dc565b34801561076f57600080fd5b506104dc6119e9565b34801561078457600080fd5b506103296107933660046125d7565b6119f6565b3480156107a457600080fd5b506103296107b3366004612614565b611a0e565b3480156107c457600080fd5b506009546104b290600160a01b900460ff1681565b3480156107e557600080fd5b506103296107f436600461264d565b611a7a565b34801561080557600080fd5b506104dc611b62565b34801561081a57600080fd5b5061051f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561084e57600080fd5b506104dc61085d36600461212f565b611b6f565b34801561086e57600080fd5b506104b261087d3660046126c0565b600560209081526000928352604080842090915290825290205460ff1681565b3480156108a957600080fd5b506103296108b83660046124de565b611bb4565b604051630862026560e41b8152600481018790526001600160a01b0386811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690638620265090604401602060405180830381865afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095391906126ee565b90506001600160a01b03811661097c57604051637dd086eb60e11b815260040160405180910390fd5b60405163b7bad1b160e01b81526001600160a01b03878116600483015285919083169063b7bad1b190602401602060405180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e9919061270b565b14610a0757604051632e5c964960e21b815260040160405180910390fd5b6001600160a01b03861661eeee14610a8e5760405163095ea7b360e01b81526001600160a01b0382811660048301526024820187905287169063095ea7b3906044016020604051808303816000875af1158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190612724565b505b60006001600160a01b03871661eeee14610aa9576000610aab565b855b9050816001600160a01b0316630cf8e858828a898b89896040518763ffffffff1660e01b8152600401610ae2959493929190612741565b6000604051808303818588803b158015610afb57600080fd5b505af1158015610b0f573d6000803e3d6000fd5b50505050505050505050505050565b604051630862026560e41b8152600481018a90526001600160a01b0389811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690638620265090604401602060405180830381865afa158015610b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb491906126ee565b90506001600160a01b038116610bdd57604051637dd086eb60e11b815260040160405180910390fd5b60405163b7bad1b160e01b81526001600160a01b038a8116600483015288919083169063b7bad1b190602401602060405180830381865afa158015610c26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4a919061270b565b14610c6857604051632e5c964960e21b815260040160405180910390fd5b6001600160a01b03891661eeee14610cef5760405163095ea7b360e01b81526001600160a01b038281166004830152602482018a90528a169063095ea7b3906044016020604051808303816000875af1158015610cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ced9190612724565b505b60006001600160a01b038a1661eeee14610d0a576000610d0c565b885b9050816001600160a01b0316631ebc263f828d8c8e60006001600160a01b03168d6001600160a01b031603610d415733610d43565b8c5b8c8c8c8c6040518a63ffffffff1660e01b8152600401610d6a98979695949392919061278c565b60206040518083038185885af1158015610d88573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610dad919061270b565b505050505050505050505050565b6000610dc682611c2d565b80610dd55750610dd582611c62565b92915050565b60008054610de890612058565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1490612058565b8015610e615780601f10610e3657610100808354040283529160200191610e61565b820191906000526020600020905b815481529060010190602001808311610e4457829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b031633811480610eb257506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b610ef45760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6001600160a01b03871661eeee14610ffe573415610f8157604051635e7e9adf60e11b815260040160405180910390fd5b6040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038816906323b872dd906064016020604051808303816000875af1158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff89190612724565b50611006565b349550601294505b61107d8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506108bd92505050565b5050505050505050565b61108f611cb0565b8281146110ef5760405162461bcd60e51b815260206004820152602860248201527f526563697069656e747320616e64207469657273206d7573742062652073616d6044820152670ca40d8cadccee8d60c31b6064820152608401610eeb565b8260005b8181101561114b57611143868683818110611110576111106127f8565b905060200201602081019061112591906124de565b858584818110611137576111376127f8565b90506020020135611765565b6001016110f3565b505050505050565b61115b611cb0565b600854861461116a5760088690555b6009546001600160a01b0386811691161461119b57600980546001600160a01b0319166001600160a01b0387161790555b600960149054906101000a900460ff161515841515146111cd576009805460ff60a01b1916600160a01b861515021790555b600a6040516020016111df9190612881565b6040516020818303038152906040528051906020012083604051602001611206919061288d565b604051602081830303815290604052805190602001201461122f57600a61122d84826128ef565b505b600b6040516020016112419190612881565b6040516020818303038152906040528051906020012082604051602001611268919061288d565b604051602081830303815290604052805190602001201461129157600b61128f83826128ef565b505b600c5460ff161515811515146112b057600c805460ff19168215151790555b846001600160a01b0316867f36b1c5cef608e320317b9ee5155756634c65fe7055b424ce57e2f6c59eec794786868686336040516112f29594939291906129af565b60405180910390a3505050505050565b6006546001146113415760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610eeb565b60026006556000678ac7230489e80000341061135f575060036113cd565b670de0b6b3a76400003410611376575060026113cd565b67016345785d8a0000341061138d575060016113cd565b60405162461bcd60e51b815260206004820152601560248201527409ad2dcd2daeada40e0e4d2c6ca40605c62408aa89605b1b6044820152606401610eeb565b6114357f000000000000000000000000000000000000000000000000000000000000000061eeee34601233600080600f6114068a611d0a565b6040516020016114179291906129ff565b60408051601f19818403018152602083019091526000825290610b1e565b7f000000000000000000000000000000000000000000000000000000000000000042106114945760405162461bcd60e51b815260206004820152600d60248201526c2232b0b23634b7329037bb32b960991b6044820152606401610eeb565b61149e3382611d9d565b506001600655565b6000818152600260205260409020546001600160a01b038481169116146114fc5760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b6044820152606401610eeb565b6001600160a01b0382166115465760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610eeb565b336001600160a01b038416148061158057506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b806115a157506000818152600460205260409020546001600160a01b031633145b6115de5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610eeb565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6116788383836114a6565b6001600160a01b0382163b15806117215750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117159190612a42565b6001600160e01b031916145b6117605760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610eeb565b505050565b61176d611cb0565b6006546001146117ac5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610eeb565b60026006556117bb8282611d9d565b50506001600655565b6000818152600260205260409020546001600160a01b0316806118165760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610eeb565b919050565b60006001600160a01b0382166118625760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610eeb565b506001600160a01b031660009081526003602052604090205490565b611886611cb0565b6118906000611e23565b565b600b8054610de890612058565b6001600160a01b038a1661eeee1461194d5734156118d057604051635e7e9adf60e11b815260040160405180910390fd5b6040516323b872dd60e01b8152336004820152306024820152604481018a90526001600160a01b038b16906323b872dd906064016020604051808303816000875af1158015611923573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119479190612724565b50611955565b349850601297505b6119cf8b8b8b8b8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8f018190048102820181019092528d815292508d91508c9081908401838280828437600092019190915250610b1e92505050565b5050505050505050505050565b60018054610de890612058565b600e8054610de890612058565b6119fe611cb0565b600e611a0a82826128ef565b5050565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611a858585856114a6565b6001600160a01b0384163b1580611b1c5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290611acd9033908a90899089908990600401612a5f565b6020604051808303816000875af1158015611aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b109190612a42565b6001600160e01b031916145b611b5b5760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610eeb565b5050505050565b600a8054610de890612058565b6000818152600d6020526040902054606090600e90611b8d90611d0a565b604051602001611b9e929190612ab3565b6040516020818303038152906040529050919050565b611bbc611cb0565b6001600160a01b038116611c215760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610eeb565b611c2a81611e23565b50565b60006001600160e01b03198216636c8609bf60e11b1480610dd557506301ffc9a760e01b6001600160e01b0319831614610dd5565b60006301ffc9a760e01b6001600160e01b031983161480611c9357506380ac58cd60e01b6001600160e01b03198316145b80610dd55750506001600160e01b031916635b5e139f60e01b1490565b6007546001600160a01b031633146118905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610eeb565b60606000611d1783611e75565b600101905060008167ffffffffffffffff811115611d3757611d3761233b565b6040519080825280601f01601f191660200182016040528015611d61576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611d6b57509392505050565b60006010546001611dae9190612ae5565b6000818152600d6020526040902083905590508115801590611dd05750600482105b611e105760405162461bcd60e51b815260206004820152601160248201527054696572206f7574206f662072616e676560781b6044820152606401610eeb565b6010805460010190556117608382611f4d565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611eb45772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ee0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611efe57662386f26fc10000830492506010015b6305f5e1008310611f16576305f5e100830492506008015b6127108310611f2a57612710830492506004015b60648310611f3c576064830492506002015b600a8310610dd55760010192915050565b6001600160a01b038216611f975760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610eeb565b6000818152600260205260409020546001600160a01b031615611fed5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b6044820152606401610eeb565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600181811c9082168061206c57607f821691505b60208210810361208c57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160e01b031981168114611c2a57600080fd5b6000602082840312156120ba57600080fd5b81356120c581612092565b9392505050565b60005b838110156120e75781810151838201526020016120cf565b50506000910152565b600081518084526121088160208601602086016120cc565b601f01601f19169290920160200192915050565b6020815260006120c560208301846120f0565b60006020828403121561214157600080fd5b5035919050565b6001600160a01b0381168114611c2a57600080fd5b6000806040838503121561217057600080fd5b823561217b81612148565b946020939093013593505050565b60008083601f84011261219b57600080fd5b50813567ffffffffffffffff8111156121b357600080fd5b6020830191508360208285010111156121cb57600080fd5b9250929050565b60008060008060008060008060c0898b0312156121ee57600080fd5b88359750602089013561220081612148565b96506040890135955060608901359450608089013567ffffffffffffffff8082111561222b57600080fd5b6122378c838d01612189565b909650945060a08b013591508082111561225057600080fd5b5061225d8b828c01612189565b999c989b5096995094979396929594505050565b60008083601f84011261228357600080fd5b50813567ffffffffffffffff81111561229b57600080fd5b6020830191508360208260051b85010111156121cb57600080fd5b600080600080604085870312156122cc57600080fd5b843567ffffffffffffffff808211156122e457600080fd5b6122f088838901612271565b9096509450602087013591508082111561230957600080fd5b5061231687828801612271565b95989497509550505050565b8015158114611c2a57600080fd5b803561181681612322565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561236c5761236c61233b565b604051601f8501601f19908116603f011681019082821181831017156123945761239461233b565b816040528093508581528686860111156123ad57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126123d857600080fd5b6120c583833560208501612351565b60008060008060008060c0878903121561240057600080fd5b86359550602087013561241281612148565b9450604087013561242281612322565b9350606087013567ffffffffffffffff8082111561243f57600080fd5b61244b8a838b016123c7565b9450608089013591508082111561246157600080fd5b508701601f8101891361247357600080fd5b61248289823560208401612351565b92505061249160a08801612330565b90509295509295509295565b6000806000606084860312156124b257600080fd5b83356124bd81612148565b925060208401356124cd81612148565b929592945050506040919091013590565b6000602082840312156124f057600080fd5b81356120c581612148565b60008060008060008060008060008060006101208c8e03121561251d57600080fd5b8b359a5061252e60208d0135612148565b60208c0135995060408c0135985060608c0135975061255060808d0135612148565b60808c0135965060a08c0135955061256a60c08d01612330565b945067ffffffffffffffff8060e08e0135111561258657600080fd5b6125968e60e08f01358f01612189565b90955093506101008d01358110156125ad57600080fd5b506125bf8d6101008e01358e01612189565b81935080925050509295989b509295989b9093969950565b6000602082840312156125e957600080fd5b813567ffffffffffffffff81111561260057600080fd5b61260c848285016123c7565b949350505050565b6000806040838503121561262757600080fd5b823561263281612148565b9150602083013561264281612322565b809150509250929050565b60008060008060006080868803121561266557600080fd5b853561267081612148565b9450602086013561268081612148565b935060408601359250606086013567ffffffffffffffff8111156126a357600080fd5b6126af88828901612189565b969995985093965092949392505050565b600080604083850312156126d357600080fd5b82356126de81612148565b9150602083013561264281612148565b60006020828403121561270057600080fd5b81516120c581612148565b60006020828403121561271d57600080fd5b5051919050565b60006020828403121561273657600080fd5b81516120c581612322565b85815284602082015260018060a01b038416604082015260a06060820152600061276e60a08301856120f0565b828103608084015261278081856120f0565b98975050505050505050565b888152602081018890526001600160a01b038781166040830152861660608201526080810185905283151560a082015261010060c082018190526000906127d5838201866120f0565b905082810360e08401526127e981856120f0565b9b9a5050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b6000815461281b81612058565b60018281168015612833576001811461284857612877565b60ff1984168752821515830287019450612877565b8560005260208060002060005b8581101561286e5781548a820152908401908201612855565b50505082870194505b5050505092915050565b60006120c5828461280e565b6000825161289f8184602087016120cc565b9190910192915050565b601f82111561176057600081815260208120601f850160051c810160208610156128d05750805b601f850160051c820191505b8181101561114b578281556001016128dc565b815167ffffffffffffffff8111156129095761290961233b565b61291d816129178454612058565b846128a9565b602080601f831160018114612952576000841561293a5750858301515b600019600386901b1c1916600185901b17855561114b565b600085815260208120601f198616915b8281101561298157888601518255948401946001909101908401612962565b508582101561299f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b851515815260a0602082015260006129ca60a08301876120f0565b82810360408401526129dc81876120f0565b941515606084015250506001600160a01b03919091166080909101529392505050565b6000612a0b828561280e565b602f60f81b81528351612a258160018401602088016120cc565b632e706e6760e01b60019290910191820152600501949350505050565b600060208284031215612a5457600080fd5b81516120c581612092565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000612abf828561280e565b602f60f81b81528351612ad98160018401602088016120cc565b01600101949350505050565b80820180821115610dd557634e487b7160e01b600052601160045260246000fdfea26469706673582212202ec8f5ebd08364221a090d51fb26f20f63e82b2b3ca66f849e2a4128bb42143264736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000100000000000000000000000000b0a1b2f7f7a2093da2247ed16f0c06cf02ce164f000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000634dec8000000000000000000000000000000000000000000000000000000000000000184e465420526577617264732041756469742042616e6e79730000000000000000000000000000000000000000000000000000000000000000000000000000000541554449540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d58516f5679586243743163636a4145784b6a564c63616d4767723255534c66744e47455778345a7a6d47706900000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d543353516441516f6a4c556f3131756755327252505557766853515a655a75704653464a71397847415837470000000000000000000000

Deployed Bytecode

0x6080604052600436106101f25760003560e01c806370a082311161010d578063a0bcfc7f116100a0578063b96053df1161006f578063b96053df146107f9578063c41c2f241461080e578063c87b56dd14610842578063e985e9c514610862578063f2fde38b1461089d57600080fd5b8063a0bcfc7f14610778578063a22cb46514610798578063a4919eb1146107b8578063b88d4fde146107d957600080fd5b80638da5cb5b116100dc5780638da5cb5b1461071657806393b7f1541461073457806395d89b411461074e5780639abc83201461076357600080fd5b806370a08231146106b9578063715018a6146106d95780637e646549146106ee5780638293fee61461070357600080fd5b806318160ddd11610185578063484b973c11610154578063484b973c1461062c57806353f96df21461064c57806354ab58af146106795780636352211e1461069957600080fd5b806318160ddd146105b257806323b872dd146105d65780633ce9830b146105f657806342842e0e1461060c57600080fd5b806309a6b7e5116101c157806309a6b7e5146105575780630b26a09f1461056a5780630e45f78e1461058a5780631249c58b146105aa57600080fd5b806301ffc9a71461049257806306fdde03146104c7578063081812fc146104e9578063095ea7b31461053757600080fd5b3661048d57600c5460ff161561032b5761032960085461eeee476012600a805461021b90612058565b80601f016020809104026020016040519081016040528092919081815260200182805461024790612058565b80156102945780601f1061026957610100808354040283529160200191610294565b820191906000526020600020905b81548152906001019060200180831161027757829003601f168201915b5050505050600b80546102a690612058565b80601f01602080910402602001604051908101604052809291908181526020018280546102d290612058565b801561031f5780601f106102f45761010080835404028352916020019161031f565b820191906000526020600020905b81548152906001019060200180831161030257829003601f168201915b50505050506108bd565b005b600854600954610329919061eeee9047906012906001600160a01b03161561035e576009546001600160a01b0316610360565b335b6000600960149054906101000a900460ff16600a805461037f90612058565b80601f01602080910402602001604051908101604052809291908181526020018280546103ab90612058565b80156103f85780601f106103cd576101008083540402835291602001916103f8565b820191906000526020600020905b8154815290600101906020018083116103db57829003601f168201915b5050505050600b805461040a90612058565b80601f016020809104026020016040519081016040528092919081815260200182805461043690612058565b80156104835780601f1061045857610100808354040283529160200191610483565b820191906000526020600020905b81548152906001019060200180831161046657829003601f168201915b5050505050610b1e565b600080fd5b34801561049e57600080fd5b506104b26104ad3660046120a8565b610dbb565b60405190151581526020015b60405180910390f35b3480156104d357600080fd5b506104dc610ddb565b6040516104be919061211c565b3480156104f557600080fd5b5061051f61050436600461212f565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016104be565b34801561054357600080fd5b5061032961055236600461215d565b610e69565b6103296105653660046121d2565b610f50565b34801561057657600080fd5b506103296105853660046122b6565b611087565b34801561059657600080fd5b506103296105a53660046123e7565b611153565b610329611302565b3480156105be57600080fd5b506105c860105481565b6040519081526020016104be565b3480156105e257600080fd5b506103296105f136600461249d565b6114a6565b34801561060257600080fd5b506105c860085481565b34801561061857600080fd5b5061032961062736600461249d565b61166d565b34801561063857600080fd5b5061032961064736600461215d565b611765565b34801561065857600080fd5b506105c861066736600461212f565b600d6020526000908152604090205481565b34801561068557600080fd5b5060095461051f906001600160a01b031681565b3480156106a557600080fd5b5061051f6106b436600461212f565b6117c4565b3480156106c557600080fd5b506105c86106d43660046124de565b61181b565b3480156106e557600080fd5b5061032961187e565b3480156106fa57600080fd5b506104dc611892565b6103296107113660046124fb565b61189f565b34801561072257600080fd5b506007546001600160a01b031661051f565b34801561074057600080fd5b50600c546104b29060ff1681565b34801561075a57600080fd5b506104dc6119dc565b34801561076f57600080fd5b506104dc6119e9565b34801561078457600080fd5b506103296107933660046125d7565b6119f6565b3480156107a457600080fd5b506103296107b3366004612614565b611a0e565b3480156107c457600080fd5b506009546104b290600160a01b900460ff1681565b3480156107e557600080fd5b506103296107f436600461264d565b611a7a565b34801561080557600080fd5b506104dc611b62565b34801561081a57600080fd5b5061051f7f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c81565b34801561084e57600080fd5b506104dc61085d36600461212f565b611b6f565b34801561086e57600080fd5b506104b261087d3660046126c0565b600560209081526000928352604080842090915290825290205460ff1681565b3480156108a957600080fd5b506103296108b83660046124de565b611bb4565b604051630862026560e41b8152600481018790526001600160a01b0386811660248301526000917f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c90911690638620265090604401602060405180830381865afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095391906126ee565b90506001600160a01b03811661097c57604051637dd086eb60e11b815260040160405180910390fd5b60405163b7bad1b160e01b81526001600160a01b03878116600483015285919083169063b7bad1b190602401602060405180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e9919061270b565b14610a0757604051632e5c964960e21b815260040160405180910390fd5b6001600160a01b03861661eeee14610a8e5760405163095ea7b360e01b81526001600160a01b0382811660048301526024820187905287169063095ea7b3906044016020604051808303816000875af1158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190612724565b505b60006001600160a01b03871661eeee14610aa9576000610aab565b855b9050816001600160a01b0316630cf8e858828a898b89896040518763ffffffff1660e01b8152600401610ae2959493929190612741565b6000604051808303818588803b158015610afb57600080fd5b505af1158015610b0f573d6000803e3d6000fd5b50505050505050505050505050565b604051630862026560e41b8152600481018a90526001600160a01b0389811660248301526000917f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c90911690638620265090604401602060405180830381865afa158015610b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb491906126ee565b90506001600160a01b038116610bdd57604051637dd086eb60e11b815260040160405180910390fd5b60405163b7bad1b160e01b81526001600160a01b038a8116600483015288919083169063b7bad1b190602401602060405180830381865afa158015610c26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4a919061270b565b14610c6857604051632e5c964960e21b815260040160405180910390fd5b6001600160a01b03891661eeee14610cef5760405163095ea7b360e01b81526001600160a01b038281166004830152602482018a90528a169063095ea7b3906044016020604051808303816000875af1158015610cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ced9190612724565b505b60006001600160a01b038a1661eeee14610d0a576000610d0c565b885b9050816001600160a01b0316631ebc263f828d8c8e60006001600160a01b03168d6001600160a01b031603610d415733610d43565b8c5b8c8c8c8c6040518a63ffffffff1660e01b8152600401610d6a98979695949392919061278c565b60206040518083038185885af1158015610d88573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610dad919061270b565b505050505050505050505050565b6000610dc682611c2d565b80610dd55750610dd582611c62565b92915050565b60008054610de890612058565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1490612058565b8015610e615780601f10610e3657610100808354040283529160200191610e61565b820191906000526020600020905b815481529060010190602001808311610e4457829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b031633811480610eb257506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b610ef45760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6001600160a01b03871661eeee14610ffe573415610f8157604051635e7e9adf60e11b815260040160405180910390fd5b6040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038816906323b872dd906064016020604051808303816000875af1158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff89190612724565b50611006565b349550601294505b61107d8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506108bd92505050565b5050505050505050565b61108f611cb0565b8281146110ef5760405162461bcd60e51b815260206004820152602860248201527f526563697069656e747320616e64207469657273206d7573742062652073616d6044820152670ca40d8cadccee8d60c31b6064820152608401610eeb565b8260005b8181101561114b57611143868683818110611110576111106127f8565b905060200201602081019061112591906124de565b858584818110611137576111376127f8565b90506020020135611765565b6001016110f3565b505050505050565b61115b611cb0565b600854861461116a5760088690555b6009546001600160a01b0386811691161461119b57600980546001600160a01b0319166001600160a01b0387161790555b600960149054906101000a900460ff161515841515146111cd576009805460ff60a01b1916600160a01b861515021790555b600a6040516020016111df9190612881565b6040516020818303038152906040528051906020012083604051602001611206919061288d565b604051602081830303815290604052805190602001201461122f57600a61122d84826128ef565b505b600b6040516020016112419190612881565b6040516020818303038152906040528051906020012082604051602001611268919061288d565b604051602081830303815290604052805190602001201461129157600b61128f83826128ef565b505b600c5460ff161515811515146112b057600c805460ff19168215151790555b846001600160a01b0316867f36b1c5cef608e320317b9ee5155756634c65fe7055b424ce57e2f6c59eec794786868686336040516112f29594939291906129af565b60405180910390a3505050505050565b6006546001146113415760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610eeb565b60026006556000678ac7230489e80000341061135f575060036113cd565b670de0b6b3a76400003410611376575060026113cd565b67016345785d8a0000341061138d575060016113cd565b60405162461bcd60e51b815260206004820152601560248201527409ad2dcd2daeada40e0e4d2c6ca40605c62408aa89605b1b6044820152606401610eeb565b6114357f000000000000000000000000000000000000000000000000000000000000010061eeee34601233600080600f6114068a611d0a565b6040516020016114179291906129ff565b60408051601f19818403018152602083019091526000825290610b1e565b7f00000000000000000000000000000000000000000000000000000000634dec8042106114945760405162461bcd60e51b815260206004820152600d60248201526c2232b0b23634b7329037bb32b960991b6044820152606401610eeb565b61149e3382611d9d565b506001600655565b6000818152600260205260409020546001600160a01b038481169116146114fc5760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b6044820152606401610eeb565b6001600160a01b0382166115465760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610eeb565b336001600160a01b038416148061158057506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b806115a157506000818152600460205260409020546001600160a01b031633145b6115de5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610eeb565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6116788383836114a6565b6001600160a01b0382163b15806117215750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117159190612a42565b6001600160e01b031916145b6117605760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610eeb565b505050565b61176d611cb0565b6006546001146117ac5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610eeb565b60026006556117bb8282611d9d565b50506001600655565b6000818152600260205260409020546001600160a01b0316806118165760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610eeb565b919050565b60006001600160a01b0382166118625760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610eeb565b506001600160a01b031660009081526003602052604090205490565b611886611cb0565b6118906000611e23565b565b600b8054610de890612058565b6001600160a01b038a1661eeee1461194d5734156118d057604051635e7e9adf60e11b815260040160405180910390fd5b6040516323b872dd60e01b8152336004820152306024820152604481018a90526001600160a01b038b16906323b872dd906064016020604051808303816000875af1158015611923573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119479190612724565b50611955565b349850601297505b6119cf8b8b8b8b8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8f018190048102820181019092528d815292508d91508c9081908401838280828437600092019190915250610b1e92505050565b5050505050505050505050565b60018054610de890612058565b600e8054610de890612058565b6119fe611cb0565b600e611a0a82826128ef565b5050565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611a858585856114a6565b6001600160a01b0384163b1580611b1c5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290611acd9033908a90899089908990600401612a5f565b6020604051808303816000875af1158015611aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b109190612a42565b6001600160e01b031916145b611b5b5760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610eeb565b5050505050565b600a8054610de890612058565b6000818152600d6020526040902054606090600e90611b8d90611d0a565b604051602001611b9e929190612ab3565b6040516020818303038152906040529050919050565b611bbc611cb0565b6001600160a01b038116611c215760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610eeb565b611c2a81611e23565b50565b60006001600160e01b03198216636c8609bf60e11b1480610dd557506301ffc9a760e01b6001600160e01b0319831614610dd5565b60006301ffc9a760e01b6001600160e01b031983161480611c9357506380ac58cd60e01b6001600160e01b03198316145b80610dd55750506001600160e01b031916635b5e139f60e01b1490565b6007546001600160a01b031633146118905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610eeb565b60606000611d1783611e75565b600101905060008167ffffffffffffffff811115611d3757611d3761233b565b6040519080825280601f01601f191660200182016040528015611d61576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611d6b57509392505050565b60006010546001611dae9190612ae5565b6000818152600d6020526040902083905590508115801590611dd05750600482105b611e105760405162461bcd60e51b815260206004820152601160248201527054696572206f7574206f662072616e676560781b6044820152606401610eeb565b6010805460010190556117608382611f4d565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611eb45772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ee0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611efe57662386f26fc10000830492506010015b6305f5e1008310611f16576305f5e100830492506008015b6127108310611f2a57612710830492506004015b60648310611f3c576064830492506002015b600a8310610dd55760010192915050565b6001600160a01b038216611f975760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610eeb565b6000818152600260205260409020546001600160a01b031615611fed5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b6044820152606401610eeb565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600181811c9082168061206c57607f821691505b60208210810361208c57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160e01b031981168114611c2a57600080fd5b6000602082840312156120ba57600080fd5b81356120c581612092565b9392505050565b60005b838110156120e75781810151838201526020016120cf565b50506000910152565b600081518084526121088160208601602086016120cc565b601f01601f19169290920160200192915050565b6020815260006120c560208301846120f0565b60006020828403121561214157600080fd5b5035919050565b6001600160a01b0381168114611c2a57600080fd5b6000806040838503121561217057600080fd5b823561217b81612148565b946020939093013593505050565b60008083601f84011261219b57600080fd5b50813567ffffffffffffffff8111156121b357600080fd5b6020830191508360208285010111156121cb57600080fd5b9250929050565b60008060008060008060008060c0898b0312156121ee57600080fd5b88359750602089013561220081612148565b96506040890135955060608901359450608089013567ffffffffffffffff8082111561222b57600080fd5b6122378c838d01612189565b909650945060a08b013591508082111561225057600080fd5b5061225d8b828c01612189565b999c989b5096995094979396929594505050565b60008083601f84011261228357600080fd5b50813567ffffffffffffffff81111561229b57600080fd5b6020830191508360208260051b85010111156121cb57600080fd5b600080600080604085870312156122cc57600080fd5b843567ffffffffffffffff808211156122e457600080fd5b6122f088838901612271565b9096509450602087013591508082111561230957600080fd5b5061231687828801612271565b95989497509550505050565b8015158114611c2a57600080fd5b803561181681612322565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561236c5761236c61233b565b604051601f8501601f19908116603f011681019082821181831017156123945761239461233b565b816040528093508581528686860111156123ad57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126123d857600080fd5b6120c583833560208501612351565b60008060008060008060c0878903121561240057600080fd5b86359550602087013561241281612148565b9450604087013561242281612322565b9350606087013567ffffffffffffffff8082111561243f57600080fd5b61244b8a838b016123c7565b9450608089013591508082111561246157600080fd5b508701601f8101891361247357600080fd5b61248289823560208401612351565b92505061249160a08801612330565b90509295509295509295565b6000806000606084860312156124b257600080fd5b83356124bd81612148565b925060208401356124cd81612148565b929592945050506040919091013590565b6000602082840312156124f057600080fd5b81356120c581612148565b60008060008060008060008060008060006101208c8e03121561251d57600080fd5b8b359a5061252e60208d0135612148565b60208c0135995060408c0135985060608c0135975061255060808d0135612148565b60808c0135965060a08c0135955061256a60c08d01612330565b945067ffffffffffffffff8060e08e0135111561258657600080fd5b6125968e60e08f01358f01612189565b90955093506101008d01358110156125ad57600080fd5b506125bf8d6101008e01358e01612189565b81935080925050509295989b509295989b9093969950565b6000602082840312156125e957600080fd5b813567ffffffffffffffff81111561260057600080fd5b61260c848285016123c7565b949350505050565b6000806040838503121561262757600080fd5b823561263281612148565b9150602083013561264281612322565b809150509250929050565b60008060008060006080868803121561266557600080fd5b853561267081612148565b9450602086013561268081612148565b935060408601359250606086013567ffffffffffffffff8111156126a357600080fd5b6126af88828901612189565b969995985093965092949392505050565b600080604083850312156126d357600080fd5b82356126de81612148565b9150602083013561264281612148565b60006020828403121561270057600080fd5b81516120c581612148565b60006020828403121561271d57600080fd5b5051919050565b60006020828403121561273657600080fd5b81516120c581612322565b85815284602082015260018060a01b038416604082015260a06060820152600061276e60a08301856120f0565b828103608084015261278081856120f0565b98975050505050505050565b888152602081018890526001600160a01b038781166040830152861660608201526080810185905283151560a082015261010060c082018190526000906127d5838201866120f0565b905082810360e08401526127e981856120f0565b9b9a5050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b6000815461281b81612058565b60018281168015612833576001811461284857612877565b60ff1984168752821515830287019450612877565b8560005260208060002060005b8581101561286e5781548a820152908401908201612855565b50505082870194505b5050505092915050565b60006120c5828461280e565b6000825161289f8184602087016120cc565b9190910192915050565b601f82111561176057600081815260208120601f850160051c810160208610156128d05750805b601f850160051c820191505b8181101561114b578281556001016128dc565b815167ffffffffffffffff8111156129095761290961233b565b61291d816129178454612058565b846128a9565b602080601f831160018114612952576000841561293a5750858301515b600019600386901b1c1916600185901b17855561114b565b600085815260208120601f198616915b8281101561298157888601518255948401946001909101908401612962565b508582101561299f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b851515815260a0602082015260006129ca60a08301876120f0565b82810360408401526129dc81876120f0565b941515606084015250506001600160a01b03919091166080909101529392505050565b6000612a0b828561280e565b602f60f81b81528351612a258160018401602088016120cc565b632e706e6760e01b60019290910191820152600501949350505050565b600060208284031215612a5457600080fd5b81516120c581612092565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000612abf828561280e565b602f60f81b81528351612ad98160018401602088016120cc565b01600101949350505050565b80820180821115610dd557634e487b7160e01b600052601160045260246000fdfea26469706673582212202ec8f5ebd08364221a090d51fb26f20f63e82b2b3ca66f849e2a4128bb42143264736f6c63430008110033

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

00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000100000000000000000000000000b0a1b2f7f7a2093da2247ed16f0c06cf02ce164f000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000634dec8000000000000000000000000000000000000000000000000000000000000000184e465420526577617264732041756469742042616e6e79730000000000000000000000000000000000000000000000000000000000000000000000000000000541554449540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d58516f5679586243743163636a4145784b6a564c63616d4767723255534c66744e47455778345a7a6d47706900000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d543353516441516f6a4c556f3131756755327252505557766853515a655a75704653464a71397847415837470000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): NFT Rewards Audit Bannys
Arg [1] : _symbol (string): AUDIT
Arg [2] : _projectId (uint256): 256
Arg [3] : _beneficiary (address): 0xB0A1B2F7f7A2093dA2247ED16F0c06Cf02CE164F
Arg [4] : _baseUri (string): ipfs://QmXQoVyXbCt1ccjAExKjVLcamGgr2USLftNGEWx4ZzmGpi
Arg [5] : _imageUri (string): ipfs://QmT3SQdAQojLUo11ugU2rRPUWvhSQZeZupFSFJq9xGAX7G
Arg [6] : _deadline (uint256): 1666051200

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 000000000000000000000000b0a1b2f7f7a2093da2247ed16f0c06cf02ce164f
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [6] : 00000000000000000000000000000000000000000000000000000000634dec80
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [8] : 4e465420526577617264732041756469742042616e6e79730000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 4155444954000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [12] : 697066733a2f2f516d58516f5679586243743163636a4145784b6a564c63616d
Arg [13] : 4767723255534c66744e47455778345a7a6d4770690000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [15] : 697066733a2f2f516d543353516441516f6a4c556f3131756755327252505557
Arg [16] : 766853515a655a75704653464a71397847415837470000000000000000000000


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.