ETH Price: $3,578.65 (+0.64%)
Gas: 4 Gwei

Contract

0xB4d9AcB0a6735058908E943e966867A266619fBD
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Public Summon149052072022-06-04 20:46:22742 days ago1654375582IN
0xB4d9AcB0...266619fBD
12 ETH0.025710843.06999383
Public Summon149052052022-06-04 20:45:52742 days ago1654375552IN
0xB4d9AcB0...266619fBD
12 ETH0.0247230941.41541028
Public Summon149022112022-06-04 8:07:05743 days ago1654330025IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0022196826.66891011
Public Summon149022012022-06-04 8:05:11743 days ago1654329911IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0026480331.81552682
Public Summon149011992022-06-04 4:11:01743 days ago1654315861IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0031775738.17772509
Claim Summon148970062022-06-03 12:02:10744 days ago1654257730IN
0xB4d9AcB0...266619fBD
0 ETH0.0048482336.83064881
Public Summon148934792022-06-02 22:12:19744 days ago1654207939IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0042372350.90929421
Public Summon148925602022-06-02 18:43:48744 days ago1654195428IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0052211462.73074865
Public Summon148924472022-06-02 18:21:14744 days ago1654194074IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0068316382.08036425
Public Summon148924442022-06-02 18:19:23744 days ago1654193963IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0056185767.50579042
Public Summon148924242022-06-02 18:14:02744 days ago1654193642IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0043216951.92406003
Public Summon148923962022-06-02 18:09:23744 days ago1654193363IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0079135895.07983242
Public Summon148893492022-06-02 6:08:31745 days ago1654150111IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0039233247.1377779
Public Summon148875162022-06-01 22:55:15745 days ago1654124115IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0031480637.82328116
Public Summon148792662022-05-31 14:40:54747 days ago1654008054IN
0xB4d9AcB0...266619fBD
0.6 ETH0.002252422.44979028
Public Summon148779012022-05-31 9:17:44747 days ago1653988664IN
0xB4d9AcB0...266619fBD
1.2 ETH0.0030873424.23934079
Public Summon148765692022-05-31 3:52:42747 days ago1653969162IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0082284798.8631525
Public Summon148757622022-05-31 0:53:32747 days ago1653958412IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0024601324.52019861
Public Summon148742862022-05-30 19:02:50747 days ago1653937370IN
0xB4d9AcB0...266619fBD
0.6 ETH0.002086625.07001175
Claim Summon148742762022-05-30 19:00:08747 days ago1653937208IN
0xB4d9AcB0...266619fBD
0 ETH0.0031810524.16367472
Public Summon148724552022-05-30 12:11:51748 days ago1653912711IN
0xB4d9AcB0...266619fBD
1.2 ETH0.0037790429.67008591
Public Summon148715512022-05-30 8:26:22748 days ago1653899182IN
0xB4d9AcB0...266619fBD
1.8 ETH0.0039172225.36947599
Public Summon148644092022-05-29 4:16:10749 days ago1653797770IN
0xB4d9AcB0...266619fBD
3.6 ETH0.0028165412.89502941
Public Summon148586212022-05-28 6:07:06750 days ago1653718026IN
0xB4d9AcB0...266619fBD
0.6 ETH0.0017647517.58934355
Public Summon148551132022-05-27 16:19:16750 days ago1653668356IN
0xB4d9AcB0...266619fBD
0.6 ETH0.003194338.37874171
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
149213262022-06-07 14:27:47740 days ago1654612067
0xB4d9AcB0...266619fBD
33.65 ETH
148764362022-05-31 3:22:36747 days ago1653967356
0xB4d9AcB0...266619fBD
95 ETH
148010132022-05-18 20:56:01759 days ago1652907361
0xB4d9AcB0...266619fBD
110 ETH
147881292022-05-16 19:37:29761 days ago1652729849
0xB4d9AcB0...266619fBD
158 ETH
147761712022-05-14 22:04:24763 days ago1652565864
0xB4d9AcB0...266619fBD
574 ETH
147645102022-05-13 1:29:02765 days ago1652405342
0xB4d9AcB0...266619fBD
546 ETH
147625062022-05-12 17:53:43765 days ago1652378023
0xB4d9AcB0...266619fBD
0.6 ETH
147586812022-05-12 3:07:12766 days ago1652324832
0xB4d9AcB0...266619fBD
382 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.1 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.1 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.05 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.25 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.05 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.1 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.15 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.3 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.1 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.05 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.15 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.15 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.5 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.05 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.15 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.05 ETH
147582202022-05-12 1:17:46766 days ago1652318266
0xB4d9AcB0...266619fBD
0.2 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ForgottenRunesWarriorsMinter

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : ForgottenRunesWarriorsMinter.sol
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@  ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@    ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@     ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@     ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@       ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@       ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@       ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@  ..@@@@@@@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@((        ((@@@@@@@@@@  ..@@@@@@@@@@@@((            ((@@@@@@@@@@@@@@  ,,,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@  ..  @@@@@@@@      ..            @@@@@@@@@@  ..///@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@//....                                      ../////@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@//........                      ..........////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@%%%%////                    ,,,,,,,,//%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@@@@@@@@@                        @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@          @@@@@@@@@@@@@@@@@@@@..####  ..########      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@        ..@@@@@@@@@@@@@@@@@@..**##  ..**##****      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@          ((@@@@((@@@@@@@@@@....//,,,,..//..,,      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@    ..  //  @@  ..@@@@@@@@@@..................      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@  //////..  ..  @@@@@@@@@@@@....//////......**##    @@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..  ..  ..  ..@@@@@@@@@@@@  ............****##        @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@((((((  ..........((@@@@@@@@&&((((**..,,,,,,,,((**##..        ((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@......      ..@@@@@@@@@@##**  ..  ..******....**  ....        ..  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@      **..  @@@@@@@@##**  ..  ............**..##%%....    ..    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**    ..**@@@@##**  **..  ....  **..**  ####%%%%...............@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**..,,    ##((##  ....((....,,,,,,,,**####%%%%,,**..,,,,//((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**..****    ..##......%%****    ####%%%%****%%**######%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##**##%%  ..  **....**      ####%%%%********####    ........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##......  ##..******########%%**  ..**..**####          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@((    ..**((**((&&%%((//,,,,,,,,,,..,,##,,##..  ..  ((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  ##%%%%@@@@..              ....##  ..####%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..            ......##**  ..****%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##############%%%%%%%%%%********%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##,,//##########%%##((((((((((##&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##  ....**##%%%%##  ....**##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##......**##@@##**  ....**##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    ..##..####@@##**......##    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**    **((##@@@@##((//**    **@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##      ....((@@@@((      ......##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##    ......((@@@@@@((    ..    ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##      ......((@@@@@@((    ........((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%((((((((((((((&&@@@@@@&&((((((((((((((%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//
// Forgotten Runes Warrior's Guild
// https://forgottenrunes.com
pragma solidity 0.8.6;

import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import './interfaces/IWETH.sol';
import './interfaces/IForgottenRunesWarriorsGuild.sol';

/**
 * @dev This implements the minter of the Forgotten Runes Warriors Guild. They are {ERC721} tokens.
 */
contract ForgottenRunesWarriorsMinter is Ownable, Pausable, ReentrancyGuard {
    using Address for address payable;

    /// @notice The start timestamp for the Dutch Auction (DA) sale and price
    uint256 public daStartTime =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice The start timestamp for mintlisters
    /// @dev This is the end of DA phase. No more DA bids when this is hit
    uint256 public mintlistStartTime =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice The start timestamp for the public sale
    uint256 public publicStartTime =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice The start timestamp for the claims
    uint256 public claimsStartTime =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice The start timestamp for self refunds
    uint256 public selfRefundsStartTime =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice The main Merkle root
    bytes32 public mintlist1MerkleRoot;

    /// @notice The secondary Merkle root
    /// @dev Having a backup merkle root lets us atomically update the merkletree without downtime on the frontend
    bytes32 public mintlist2MerkleRoot;

    /// @notice The claimslist Merkle root
    bytes32 public claimlistMerkleRoot;

    /// @notice The address of the Warriors contract
    IForgottenRunesWarriorsGuild public warriors;

    /// @notice The address of the vault
    address payable public vault;

    /// @notice The address of the WETH contract
    address public weth;

    /// @notice The address of the refund operator
    /// @dev The owner may be a multisig but refunding is easier with a script, so we allow a separate refunder/operator address
    address public refunder;

    /// @notice The start price of the DA
    uint256 public startPrice = 2.5 ether;

    /// @notice The lowest price of the DA
    uint256 public lowestPrice = 0.6 ether;

    /// @notice The length of time for the price curve in the DA
    uint256 public daPriceCurveLength = 380 minutes;

    /// @notice The interval of time in which the price steps down
    uint256 public daDropInterval = 10 minutes;

    /// @notice The final price of the DA. Will be updated when DA is over and then used for subsequent phases
    uint256 public finalPrice = 2.5 ether;

    /// @notice An array of the addresses of the DA minters
    /// @dev An entry is created for every da minting tx, so the same minter address is quite likely to appear more than once
    address[] public daMinters;

    /// @notice Tracks the total amount paid by a given address in the DA
    mapping(address => uint256) public daAmountPaid;

    /// @notice Tracks the total amount refunded to a given address for the DA
    mapping(address => uint256) public daAmountRefunded;

    /// @notice Tracks the total count of NFTs minted by a given address in the DA
    mapping(address => uint256) public daNumMinted;

    /// @notice Tracks if a given address minted in the mintlist
    mapping(address => bool) public mintlistMinted;

    /// @notice Tracks whether an address claimed a free NFT
    mapping(address => bool) public claimlistMinted;

    /// @notice The total number of tokens reserved for the DA phase
    uint256 public maxDaSupply = 8000;

    /// @notice Tracks the total count of NFTs sold (vs. freebies)
    uint256 public numSold;

    /// @notice Tracks the total count of NFTs for sale
    uint256 public maxForSale = 14190;

    /// @notice Tracks the total count of NFTs claimed for free
    uint256 public numClaimed;

    /// @notice Tracks the total count of NFTs that can be claimed
    /// @dev While we will have a merkle root set for this group, putting a hard cap helps limit the damage of any problems with an overly-generous merkle tree
    uint256 public maxForClaim = 1100;

    /**
     * @dev Create the contract and set the initial baseURI
     * @param _warriors address the initial warriors contract address
     */
    constructor(IForgottenRunesWarriorsGuild _warriors, address _weth) {
        setWarriorsAddress(_warriors);
        setWethAddress(_weth);
        setVaultAddress(payable(msg.sender));
        setRefunderAddress(msg.sender);
    }

    /*
     * Timeline:
     *
     * bidSummon       : |------------|
     * mintlistSummon  :              |------------|-------------------------------------|
     * publicSummon    :                           |------------|------------------------|
     * claimSummon     :                                        |------------|-----------|
     * teamSummon      : |---------------------------------------------------------------|
     */

    /**
     * @notice Mint a Warrior in the Dutch Auction phase
     * @param numWarriors uint256 of the number of warriors you're trying to mint
     */
    function bidSummon(uint256 numWarriors)
        external
        payable
        nonReentrant
        whenNotPaused
    {
        require(numSold < maxDaSupply, 'Auction sold out');
        require(numSold + numWarriors <= maxDaSupply, 'Not enough remaining');
        require(daStarted(), 'Auction not started');
        require(!mintlistStarted(), 'Auction phase over');
        require(
            numWarriors > 0 && numWarriors <= 20,
            'You can summon no more than 20 Warriors at a time'
        );

        uint256 currentPrice = currentDaPrice();
        require(
            msg.value >= (currentPrice * numWarriors),
            'Ether value sent is not sufficient'
        );

        daMinters.push(msg.sender);
        daAmountPaid[msg.sender] += msg.value;
        daNumMinted[msg.sender] += numWarriors;
        numSold += numWarriors;

        if (numSold == maxDaSupply) {
            // optimistic: save gas by not setting on every mint, but will
            // require manual `setFinalPrice` before refunds if da falls short
            finalPrice = currentPrice;
        }

        for (uint256 i = 0; i < numWarriors; i++) {
            _mint(msg.sender);
        }
    }

    /**
     * @notice Mint a Warrior in the mintlist phase (paid)
     * @param _merkleProof bytes32[] your proof of being able to mint
     */
    function mintlistSummon(bytes32[] calldata _merkleProof)
        external
        payable
        nonReentrant
        whenNotPaused
    {
        require(numSold < maxForSale, 'Sold out');
        require(mintlistStarted(), 'Mintlist phase not started');
        require(msg.value == finalPrice, 'Ether value incorrect');

        // verify didn't already mint
        require(mintlistMinted[msg.sender] == false, 'Already minted');
        mintlistMinted[msg.sender] = true;

        // verify mintlist merkle
        bytes32 node = keccak256(abi.encodePacked(msg.sender));
        require(
            MerkleProof.verify(_merkleProof, mintlist1MerkleRoot, node) ||
                MerkleProof.verify(_merkleProof, mintlist2MerkleRoot, node),
            'Invalid proof'
        );

        numSold += 1;
        _mint(msg.sender);
    }

    /**
     * @notice Mint a Warrior in the Public phase (paid)
     * @param numWarriors uint256 of the number of warriors you're trying to mint
     */
    function publicSummon(uint256 numWarriors)
        external
        payable
        nonReentrant
        whenNotPaused
    {
        require(numSold < maxForSale, 'Sold out');
        require(numSold + numWarriors <= maxForSale, 'Not enough remaining');
        require(publicStarted(), 'Public sale not started');
        require(
            numWarriors > 0 && numWarriors <= 20,
            'You can summon no more than 20 Warriors at a time'
        );
        require(
            msg.value == (finalPrice * numWarriors),
            'Ether value sent is incorrect'
        );

        numSold += numWarriors;
        for (uint256 i = 0; i < numWarriors; i++) {
            _mint(msg.sender);
        }
    }

    /**
     * @dev claim a warrior for free if you're in the claimlist
     * @param _merkleProof bytes32[] the proof that you're eligible to mint here
     */
    function claimSummon(bytes32[] calldata _merkleProof)
        external
        nonReentrant
        whenNotPaused
    {
        require(numClaimed < maxForClaim, 'No more claims');
        require(claimsStarted(), 'Claim phase not started');

        // verify didn't already claim
        require(claimlistMinted[msg.sender] == false, 'Already claimed');
        claimlistMinted[msg.sender] = true;

        // verify claimlist
        bytes32 node = keccak256(abi.encodePacked(msg.sender));
        require(
            MerkleProof.verify(_merkleProof, claimlistMerkleRoot, node),
            'Invalid proof'
        );

        numClaimed += 1;
        _mint(msg.sender);
    }

    /**
     * @notice Mint a Warrior (owner only)
     * @param recipient address the address of the recipient
     * @param count uint256 of the number of warriors you're trying to mint
     */
    function teamSummon(address recipient, uint256 count) external onlyOwner {
        require(address(recipient) != address(0), 'address req');
        for (uint256 i = 0; i < count; i++) {
            _mint(recipient);
        }
    }

    function _mint(address recipient) private {
        warriors.mint(recipient);
    }

    /*
     * View utilities
     */

    /**
     * @notice returns the current dutch auction price
     */
    function currentDaPrice() public view returns (uint256) {
        if (!daStarted()) {
            return startPrice;
        }
        if (block.timestamp >= daStartTime + daPriceCurveLength) {
            // end of the curve
            return lowestPrice;
        }

        uint256 dropPerStep = (startPrice - lowestPrice) /
            (daPriceCurveLength / daDropInterval);

        uint256 elapsed = block.timestamp - daStartTime;
        uint256 steps = elapsed / daDropInterval;
        uint256 stepDeduction = steps * dropPerStep;

        // don't go negative in the next step
        if (stepDeduction > startPrice) {
            return lowestPrice;
        }
        uint256 currentPrice = startPrice - stepDeduction;
        return currentPrice > lowestPrice ? currentPrice : lowestPrice;
    }

    /**
     * @notice returns whether the dutch auction has started
     */
    function daStarted() public view returns (bool) {
        return block.timestamp > daStartTime;
    }

    /**
     * @notice returns whether the mintlist has started
     */
    function mintlistStarted() public view returns (bool) {
        return block.timestamp > mintlistStartTime;
    }

    /**
     * @notice returns whether the public mint has started
     */
    function publicStarted() public view returns (bool) {
        return block.timestamp > publicStartTime;
    }

    /**
     * @notice returns whether the claims phase has started
     */
    function claimsStarted() public view returns (bool) {
        return block.timestamp > claimsStartTime;
    }

    /**
     * @notice returns whether self refunds phase has started
     */
    function selfRefundsStarted() public view returns (bool) {
        return block.timestamp > selfRefundsStartTime;
    }

    /**
     * @notice returns the number of minter addresses in the DA phase (includes duplicates)
     */
    function numDaMinters() public view returns (uint256) {
        return daMinters.length;
    }

    /*
     * Refund logic
     */

    /**
     * @notice issues refunds for the accounts in minters between startIdx and endIdx inclusive
     * @param startIdx uint256 the starting index of daMinters
     * @param endIdx uint256 the ending index of daMinters, inclusive
     */
    function issueRefunds(uint256 startIdx, uint256 endIdx)
        public
        nonReentrant
    {
        require(refunder == msg.sender, 'caller is not the refunder');
        for (uint256 i = startIdx; i < endIdx + 1; i++) {
            _refundAddress(daMinters[i]);
        }
    }

    /**
     * @notice issues a refund for the address
     * @param minter address the address to refund
     */
    function refundAddress(address minter) public nonReentrant {
        require(refunder == msg.sender, 'caller is not the refunder');
        _refundAddress(minter);
    }

    /**
     * @notice refunds msg.sender what they're owed
     */
    function selfRefund() public nonReentrant {
        require(selfRefundsStarted(), 'Self refund period not started');
        _refundAddress(msg.sender);
    }

    function _refundAddress(address minter) private {
        uint256 owed = refundOwed(minter);
        if (owed > 0) {
            daAmountRefunded[minter] += owed;
            _safeTransferETHWithFallback(minter, owed);
        }
    }

    /**
     * @notice returns the amount owed the address
     * @param minter address the address of the account that wants a refund
     */
    function refundOwed(address minter) public view returns (uint256) {
        uint256 totalCostOfMints = finalPrice * daNumMinted[minter];
        uint256 refundsPaidAlready = daAmountRefunded[minter];
        return daAmountPaid[minter] - totalCostOfMints - refundsPaidAlready;
    }

    /**
     * @notice Transfer ETH. If the ETH transfer fails, wrap the ETH and try send it as WETH.
     * @param to account who to send the ETH or WETH to
     * @param amount uint256 how much ETH or WETH to send
     */
    function _safeTransferETHWithFallback(address to, uint256 amount) internal {
        if (!_safeTransferETH(to, amount)) {
            IWETH(weth).deposit{value: amount}();
            IERC20(weth).transfer(to, amount);
        }
    }

    /**
     * @notice Transfer ETH and return the success status.
     * @dev This function only forwards 30,000 gas to the callee.
     * @param to account who to send the ETH to
     * @param value uint256 how much ETH to send
     */
    function _safeTransferETH(address to, uint256 value)
        internal
        returns (bool)
    {
        (bool success, ) = to.call{value: value, gas: 30_000}(new bytes(0));
        return success;
    }

    /*
     * Only the owner can do these things
     */

    /**
     * @notice pause the contract
     */
    function pause() public onlyOwner {
        _pause();
    }

    /**
     * @notice unpause the contract
     */
    function unpause() public onlyOwner {
        _unpause();
    }

    /**
     * @notice set the dutch auction start timestamp
     */
    function setDaStartTime(uint256 _newTime) public onlyOwner {
        daStartTime = _newTime;
    }

    /**
     * @notice set the mintlist start timestamp
     */
    function setMintlistStartTime(uint256 _newTime) public onlyOwner {
        mintlistStartTime = _newTime;
    }

    /**
     * @notice set the public sale start timestamp
     */
    function setPublicStartTime(uint256 _newTime) public onlyOwner {
        publicStartTime = _newTime;
    }

    /**
     * @notice set the claims phase start timestamp
     */
    function setClaimsStartTime(uint256 _newTime) public onlyOwner {
        claimsStartTime = _newTime;
    }

    /**
     * @notice set the self refund phase start timestamp
     */
    function setSelfRefundsStartTime(uint256 _newTime) public onlyOwner {
        selfRefundsStartTime = _newTime;
    }

    /**
     * @notice A convenient way to set all phase times at once
     * @param newDaStartTime uint256 the dutch auction start time
     * @param newMintlistStartTime uint256 the mintlst phase start time
     * @param newPublicStartTime uint256 the public phase start time
     * @param newClaimsStartTime uint256 the claims phase start time
     */
    function setPhaseTimes(
        uint256 newDaStartTime,
        uint256 newMintlistStartTime,
        uint256 newPublicStartTime,
        uint256 newClaimsStartTime
    ) public onlyOwner {
        // we put these checks here instead of in the setters themselves
        // because they're just guardrails of the typical case
        require(
            newPublicStartTime >= newMintlistStartTime,
            'Set public after mintlist'
        );
        require(
            newClaimsStartTime >= newPublicStartTime,
            'Set claims after public'
        );
        setDaStartTime(newDaStartTime);
        setMintlistStartTime(newMintlistStartTime);
        setPublicStartTime(newPublicStartTime);
        setClaimsStartTime(newClaimsStartTime);
    }

    /**
     * @notice set the merkle root for the mintlist phase
     */
    function setMintlist1MerkleRoot(bytes32 newMerkleRoot) public onlyOwner {
        mintlist1MerkleRoot = newMerkleRoot;
    }

    /**
     * @notice set the alternate merkle root for the mintlist phase
     * @dev we have two because it lets us idempotently update the website without downtime
     */
    function setMintlist2MerkleRoot(bytes32 newMerkleRoot) public onlyOwner {
        mintlist2MerkleRoot = newMerkleRoot;
    }

    /**
     * @notice set the merkle root for the claimslist phase
     */
    function setClaimlistMerkleRoot(bytes32 newMerkleRoot) public onlyOwner {
        claimlistMerkleRoot = newMerkleRoot;
    }

    /**
     * @notice set the vault address where the funds are withdrawn
     */
    function setVaultAddress(address payable _newVaultAddress)
        public
        onlyOwner
    {
        vault = _newVaultAddress;
    }

    /**
     * @notice set the warriors token address
     */
    function setWarriorsAddress(
        IForgottenRunesWarriorsGuild _newWarriorsAddress
    ) public onlyOwner {
        warriors = _newWarriorsAddress;
    }

    /**
     * @notice set the weth token address
     */
    function setWethAddress(address _newWethAddress) public onlyOwner {
        weth = _newWethAddress;
    }

    /**
     * @notice set the refunder address
     */
    function setRefunderAddress(address _newRefunderAddress) public onlyOwner {
        refunder = _newRefunderAddress;
    }

    /**
     * @notice set the dutch auction start price
     */
    function setStartPrice(uint256 _newPrice) public onlyOwner {
        startPrice = _newPrice;
    }

    /**
     * @notice set the dutch auction lowest price
     */
    function setLowestPrice(uint256 _newPrice) public onlyOwner {
        lowestPrice = _newPrice;
    }

    /**
     * @notice set the length of time the dutch auction price should change
     */
    function setDaPriceCurveLength(uint256 _newTime) public onlyOwner {
        daPriceCurveLength = _newTime;
    }

    /**
     * @notice set how long it takes for the dutch auction to step down in price
     */
    function setDaDropInterval(uint256 _newTime) public onlyOwner {
        daDropInterval = _newTime;
    }

    /**
     * @notice set "final" price of the dutch auction
     * @dev this is set automatically if the dutch-auction sells out, but needs to be set manually if the DA fails to sell out
     */
    function setFinalPrice(uint256 _newPrice) public onlyOwner {
        require(
            _newPrice >= lowestPrice,
            'finalPrice cant be less than lowestPrice'
        );
        finalPrice = _newPrice;
    }

    /**
     * @notice the max supply available in the dutch auction
     */
    function setMaxDaSupply(uint256 _newSupply) public onlyOwner {
        maxDaSupply = _newSupply;
    }

    /**
     * @notice the total max supply available for sale in any phase
     */
    function setMaxForSale(uint256 _newSupply) public onlyOwner {
        maxForSale = _newSupply;
    }

    /**
     * @notice the max supply available in the claimlist
     */
    function setMaxForClaim(uint256 _newSupply) public onlyOwner {
        maxForClaim = _newSupply;
    }

    /**
     * @notice Withdraw funds to the vault using sendValue
     * @param _amount uint256 the amount to withdraw
     */
    function withdraw(uint256 _amount) public onlyOwner {
        require(address(vault) != address(0), 'no vault');
        vault.sendValue(_amount);
    }

    /**
     * @notice Withdraw funds to the vault, the old-school way
     * @param _amount uint256 the amount to withdraw
     */
    function withdrawClassic(uint256 _amount) public onlyOwner {
        require(address(vault) != address(0), 'no vault');
        require(payable(vault).send(_amount));
    }

    /**
     * @notice Withdraw all funds to the vault
     */
    function withdrawAll() public onlyOwner {
        require(address(vault) != address(0), 'no vault');
        require(payable(vault).send(address(this).balance));
    }

    /**
     * @dev ERC20s should not be sent to this contract, but if someone
     * does, it's nice to be able to recover them
     * @param token IERC20 the token address
     * @param amount uint256 the amount to send
     */
    function forwardERC20s(IERC20 token, uint256 amount) public onlyOwner {
        require(address(msg.sender) != address(0));
        token.transfer(msg.sender, amount);
    }

    /**
     * @dev Include a payable function in case we need to refill funds for any reason
     */
    function deposit() external payable onlyOwner {}
}

File 2 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 3 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

File 4 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 5 of 17 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 7 of 17 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 8 of 17 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 17 : IWETH.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.6;

interface IWETH {
    function deposit() external payable;

    function withdraw(uint256 wad) external;

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

File 10 of 17 : IForgottenRunesWarriorsGuild.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for ForgottenRunesWarriorsGuild ERC721 token

pragma solidity ^0.8.6;

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

interface IForgottenRunesWarriorsGuild is IERC721 {
    function mint(address recipient) external returns (uint256);
}

File 11 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT

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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 12 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 13 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 14 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 16 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IForgottenRunesWarriorsGuild","name":"_warriors","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"numWarriors","type":"uint256"}],"name":"bidSummon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"claimSummon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimlistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimlistMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimsStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimsStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentDaPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"daAmountPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"daAmountRefunded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daDropInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"daMinters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"daNumMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daPriceCurveLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"finalPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"forwardERC20s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIdx","type":"uint256"},{"internalType":"uint256","name":"endIdx","type":"uint256"}],"name":"issueRefunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lowestPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDaSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxForClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxForSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintlist1MerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintlist2MerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintlistMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintlistStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintlistStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintlistSummon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"numClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numDaMinters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numWarriors","type":"uint256"}],"name":"publicSummon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"refundAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"refundOwed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refunder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"selfRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"selfRefundsStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"selfRefundsStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setClaimlistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setClaimsStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setDaDropInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setDaPriceCurveLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setDaStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setFinalPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setLowestPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"name":"setMaxDaSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"name":"setMaxForClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"name":"setMaxForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMintlist1MerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMintlist2MerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setMintlistStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDaStartTime","type":"uint256"},{"internalType":"uint256","name":"newMintlistStartTime","type":"uint256"},{"internalType":"uint256","name":"newPublicStartTime","type":"uint256"},{"internalType":"uint256","name":"newClaimsStartTime","type":"uint256"}],"name":"setPhaseTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setPublicStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRefunderAddress","type":"address"}],"name":"setRefunderAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setSelfRefundsStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setStartPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newVaultAddress","type":"address"}],"name":"setVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IForgottenRunesWarriorsGuild","name":"_newWarriorsAddress","type":"address"}],"name":"setWarriorsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newWethAddress","type":"address"}],"name":"setWethAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"teamSummon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"warriors","outputs":[{"internalType":"contract IForgottenRunesWarriorsGuild","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawClassic","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000196002556000196003556000196004556000196005556000196006556722b1c8c1227a0000600e55670853a0d2313c0000600f556159106010556102586011556722b1c8c1227a0000601255611f4060195561376e601b5561044c601d553480156200007157600080fd5b5060405162002ffd38038062002ffd8339810160408190526200009491620002ec565b6200009f33620000e4565b6000805460ff60a01b1916905560018055620000bb8262000134565b620000c681620001a5565b620000d13362000212565b620000dc336200027f565b505062000344565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620001835760405162461bcd60e51b8152602060048201819052602482015260008051602062002fdd83398151915260448201526064015b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620001f05760405162461bcd60e51b8152602060048201819052602482015260008051602062002fdd83398151915260448201526064016200017a565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146200025d5760405162461bcd60e51b8152602060048201819052602482015260008051602062002fdd83398151915260448201526064016200017a565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620002ca5760405162461bcd60e51b8152602060048201819052602482015260008051602062002fdd83398151915260448201526064016200017a565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b600080604083850312156200030057600080fd5b82516200030d816200032b565b602084015190925062000320816200032b565b809150509250929050565b6001600160a01b03811681146200034157600080fd5b50565b612c8980620003546000396000f3fe6080604052600436106104475760003560e01c80638c6d8ef611610234578063c639052d1161012e578063e49618c1116100b6578063f2fde38b1161007a578063f2fde38b14610c5a578063f309455a14610c7a578063f4cde4c014610c90578063fbfa77cf14610ca6578063ff081be014610cc657600080fd5b8063e49618c114610bbf578063e770949a14610bef578063e7e59e1714610c04578063f1a9af8914610c24578063f23c85bf14610c3a57600080fd5b8063d4823370116100fd578063d482337014610b1c578063db8cc8fa14610b49578063df4f5a7214610b69578063e081260d14610b89578063e1d15c9b14610ba957600080fd5b8063c639052d14610ab4578063c9c1710914610ac7578063d0e30db014610ae7578063d3af256a14610aef57600080fd5b8063a0523b99116101bc578063b4c2776711610180578063b4c2776714610a3f578063b68046c814610a55578063bb55f25c14610a6b578063be29b05614610a8b578063c1aafcb714610aa157600080fd5b8063a0523b99146109a9578063a6b513ee146109c9578063a96a7412146109df578063a96e2423146109ff578063b3081ea914610a1f57600080fd5b80639727151a116102035780639727151a1461092657806398611866146109465780639935b60b1461095c5780639abc825f146109735780639c2f2a421461099357600080fd5b80638c6d8ef6146108c45780638d56a17b146108db5780638da5cb5b146108f157806393cb41471461090f57600080fd5b806348a3e8891161034557806374cd5a0e116102cd5780638456cb59116102915780638456cb591461083a578063853828b61461084f57806385535cc514610864578063868057b7146108845780638a4d1da4146108a457600080fd5b806374cd5a0e146107b15780637737893a146107d1578063780d567f146107f15780637cbff1a714610811578063812100b91461082457600080fd5b80636138f236116103145780636138f236146107165780636e1a1a60146107465780637142a1e014610766578063715018a614610786578063730847ac1461079b57600080fd5b806348a3e889146106a15780634b6be873146106c15780635c975abb146106e15780635fd1bbc41461070057600080fd5b8063323d03ae116103d35780633dc45343116103975780633dc45343146105f05780633e97414f1461061d5780633f4ba83a146106345780633fc8cef314610649578063411d13f71461068157600080fd5b8063323d03ae1461056557806335fdbb501461058557806336ce1f251461059b5780633cf901bf146105b05780633d6bcb16146105d057600080fd5b806317d861541161041a57806317d86154146104d95780631e3dc689146104f95780632560e3761461050f578063260c0886146105255780632e1a7d4d1461054557600080fd5b806301b87a121461044c57806302809ff71461046e57806308f2648a1461048e5780630a7f3614146104b6575b600080fd5b34801561045857600080fd5b5061046c6104673660046128d6565b610cdc565b005b34801561047a57600080fd5b5061046c6104893660046129bd565b610d31565b34801561049a57600080fd5b506104a3610d60565b6040519081526020015b60405180910390f35b3480156104c257600080fd5b5060065442115b60405190151581526020016104ad565b3480156104e557600080fd5b5061046c6104f43660046129bd565b610e3a565b34801561050557600080fd5b506104a360105481565b34801561051b57600080fd5b506104a360095481565b34801561053157600080fd5b5061046c6105403660046129bd565b610e69565b34801561055157600080fd5b5061046c6105603660046129bd565b610e98565b34801561057157600080fd5b5061046c610580366004612a11565b610f03565b34801561059157600080fd5b506104a360195481565b3480156105a757600080fd5b5061046c610ff7565b3480156105bc57600080fd5b5061046c6105cb3660046129ef565b61107f565b3480156105dc57600080fd5b5061046c6105eb3660046129bd565b611160565b3480156105fc57600080fd5b506104a361060b3660046128d6565b60156020526000908152604090205481565b34801561062957600080fd5b5060055442116104c9565b34801561064057600080fd5b5061046c61118f565b34801561065557600080fd5b50600c54610669906001600160a01b031681565b6040516001600160a01b0390911681526020016104ad565b34801561068d57600080fd5b5061046c61069c3660046129bd565b6111c3565b3480156106ad57600080fd5b5061046c6106bc3660046128d6565b6111f2565b3480156106cd57600080fd5b5061046c6106dc366004612926565b611284565b3480156106ed57600080fd5b50600054600160a01b900460ff166104c9565b34801561070c57600080fd5b506104a360045481565b34801561072257600080fd5b506104c96107313660046128d6565b60186020526000908152604090205460ff1681565b34801561075257600080fd5b5061046c6107613660046129bd565b6114b8565b34801561077257600080fd5b5061046c6107813660046129bd565b6114e7565b34801561079257600080fd5b5061046c611516565b3480156107a757600080fd5b506104a360075481565b3480156107bd57600080fd5b5061046c6107cc3660046129bd565b61154a565b3480156107dd57600080fd5b50600a54610669906001600160a01b031681565b3480156107fd57600080fd5b5061046c61080c3660046129bd565b6115ce565b61046c61081f366004612926565b6115fd565b34801561083057600080fd5b506104a360065481565b34801561084657600080fd5b5061046c6118ab565b34801561085b57600080fd5b5061046c6118dd565b34801561087057600080fd5b5061046c61087f3660046128d6565b611960565b34801561089057600080fd5b5061046c61089f3660046129bd565b6119ac565b3480156108b057600080fd5b5061046c6108bf3660046129bd565b6119db565b3480156108d057600080fd5b5060045442116104c9565b3480156108e757600080fd5b506104a360055481565b3480156108fd57600080fd5b506000546001600160a01b0316610669565b34801561091b57600080fd5b5060035442116104c9565b34801561093257600080fd5b5061046c6109413660046128fa565b611a0a565b34801561095257600080fd5b506104a360085481565b34801561096857600080fd5b5060025442116104c9565b34801561097f57600080fd5b506104a361098e3660046128d6565b611ac4565b34801561099f57600080fd5b506104a3601c5481565b3480156109b557600080fd5b5061046c6109c43660046128fa565b611b33565b3480156109d557600080fd5b506104a360125481565b3480156109eb57600080fd5b5061046c6109fa3660046129bd565b611bc7565b348015610a0b57600080fd5b5061046c610a1a3660046128d6565b611bf6565b348015610a2b57600080fd5b5061046c610a3a3660046129bd565b611c42565b348015610a4b57600080fd5b506104a360025481565b348015610a6157600080fd5b506104a3601b5481565b348015610a7757600080fd5b5061046c610a863660046129bd565b611c71565b348015610a9757600080fd5b506104a3600f5481565b61046c610aaf3660046129bd565b611d03565b61046c610ac23660046129bd565b611f09565b348015610ad357600080fd5b50610669610ae23660046129bd565b6121fa565b61046c612224565b348015610afb57600080fd5b506104a3610b0a3660046128d6565b60146020526000908152604090205481565b348015610b2857600080fd5b506104a3610b373660046128d6565b60166020526000908152604090205481565b348015610b5557600080fd5b5061046c610b643660046129bd565b61224e565b348015610b7557600080fd5b50600d54610669906001600160a01b031681565b348015610b9557600080fd5b5061046c610ba43660046129bd565b61227d565b348015610bb557600080fd5b506104a3601d5481565b348015610bcb57600080fd5b506104c9610bda3660046128d6565b60176020526000908152604090205460ff1681565b348015610bfb57600080fd5b506013546104a3565b348015610c1057600080fd5b5061046c610c1f3660046129bd565b6122ac565b348015610c3057600080fd5b506104a3600e5481565b348015610c4657600080fd5b5061046c610c553660046128d6565b6122db565b348015610c6657600080fd5b5061046c610c753660046128d6565b612327565b348015610c8657600080fd5b506104a3601a5481565b348015610c9c57600080fd5b506104a360035481565b348015610cb257600080fd5b50600b54610669906001600160a01b031681565b348015610cd257600080fd5b506104a360115481565b6000546001600160a01b03163314610d0f5760405162461bcd60e51b8152600401610d0690612aca565b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d5b5760405162461bcd60e51b8152600401610d0690612aca565b601055565b6000610d6d600254421190565b610d785750600e5490565b601054600254610d889190612b87565b4210610d955750600f5490565b6000601154601054610da79190612b9f565b600f54600e54610db79190612be0565b610dc19190612b9f565b9050600060025442610dd39190612be0565b9050600060115482610de59190612b9f565b90506000610df38483612bc1565b9050600e54811115610e0b57600f5494505050505090565b600081600e54610e1b9190612be0565b9050600f548111610e2e57600f54610e30565b805b9550505050505090565b6000546001600160a01b03163314610e645760405162461bcd60e51b8152600401610d0690612aca565b600e55565b6000546001600160a01b03163314610e935760405162461bcd60e51b8152600401610d0690612aca565b600555565b6000546001600160a01b03163314610ec25760405162461bcd60e51b8152600401610d0690612aca565b600b546001600160a01b0316610eea5760405162461bcd60e51b8152600401610d0690612aa8565b600b54610f00906001600160a01b0316826123bf565b50565b6000546001600160a01b03163314610f2d5760405162461bcd60e51b8152600401610d0690612aca565b82821015610f7d5760405162461bcd60e51b815260206004820152601960248201527f536574207075626c6963206166746572206d696e746c697374000000000000006044820152606401610d06565b81811015610fcd5760405162461bcd60e51b815260206004820152601760248201527f53657420636c61696d73206166746572207075626c69630000000000000000006044820152606401610d06565b610fd684611c42565b610fdf836114b8565b610fe88261224e565b610ff181610e69565b50505050565b6002600154141561101a5760405162461bcd60e51b8152600401610d0690612b50565b600260015560065442116110705760405162461bcd60e51b815260206004820152601e60248201527f53656c6620726566756e6420706572696f64206e6f74207374617274656400006044820152606401610d06565b611079336124d8565b60018055565b600260015414156110a25760405162461bcd60e51b8152600401610d0690612b50565b6002600155600d546001600160a01b031633146111015760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f742074686520726566756e6465720000000000006044820152606401610d06565b815b61110e826001612b87565b811015611157576111456013828154811061112b5761112b612c28565b6000918252602090912001546001600160a01b03166124d8565b8061114f81612bf7565b915050611103565b50506001805550565b6000546001600160a01b0316331461118a5760405162461bcd60e51b8152600401610d0690612aca565b601b55565b6000546001600160a01b031633146111b95760405162461bcd60e51b8152600401610d0690612aca565b6111c1612527565b565b6000546001600160a01b031633146111ed5760405162461bcd60e51b8152600401610d0690612aca565b600955565b600260015414156112155760405162461bcd60e51b8152600401610d0690612b50565b6002600155600d546001600160a01b031633146112745760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f742074686520726566756e6465720000000000006044820152606401610d06565b61127d816124d8565b5060018055565b600260015414156112a75760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff16156112d65760405162461bcd60e51b8152600401610d0690612a7e565b601d54601c541061131a5760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520636c61696d7360901b6044820152606401610d06565b600554421161136b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d207068617365206e6f7420737461727465640000000000000000006044820152606401610d06565b3360009081526018602052604090205460ff16156113bd5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610d06565b336000818152601860209081526040808320805460ff191660011790555191926114019290910160609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120905061145a8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060095491508490506125c4565b6114965760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610d06565b6001601c60008282546114a99190612b87565b90915550611157905033612673565b6000546001600160a01b031633146114e25760405162461bcd60e51b8152600401610d0690612aca565b600355565b6000546001600160a01b031633146115115760405162461bcd60e51b8152600401610d0690612aca565b600855565b6000546001600160a01b031633146115405760405162461bcd60e51b8152600401610d0690612aca565b6111c160006126f2565b6000546001600160a01b031633146115745760405162461bcd60e51b8152600401610d0690612aca565b600b546001600160a01b031661159c5760405162461bcd60e51b8152600401610d0690612aa8565b600b546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050610f0057600080fd5b6000546001600160a01b031633146115f85760405162461bcd60e51b8152600401610d0690612aca565b600f55565b600260015414156116205760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff161561164f5760405162461bcd60e51b8152600401610d0690612a7e565b601b54601a541061168d5760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610d06565b60035442116116de5760405162461bcd60e51b815260206004820152601a60248201527f4d696e746c697374207068617365206e6f7420737461727465640000000000006044820152606401610d06565b60125434146117275760405162461bcd60e51b8152602060048201526015602482015274115d1a195c881d985b1d59481a5b98dbdc9c9958dd605a1b6044820152606401610d06565b3360009081526017602052604090205460ff16156117785760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610d06565b336000818152601760209081526040808320805460ff191660011790555191926117bc9290910160609190911b6bffffffffffffffffffffffff1916815260140190565b6040516020818303038152906040528051906020012090506118158383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060075491508490506125c4565b8061185c575061185c8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060085491508490506125c4565b6118985760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610d06565b6001601a60008282546114a99190612b87565b6000546001600160a01b031633146118d55760405162461bcd60e51b8152600401610d0690612aca565b6111c1612742565b6000546001600160a01b031633146119075760405162461bcd60e51b8152600401610d0690612aca565b600b546001600160a01b031661192f5760405162461bcd60e51b8152600401610d0690612aa8565b600b546040516001600160a01b03909116904780156108fc02916000818181858888f193505050506111c157600080fd5b6000546001600160a01b0316331461198a5760405162461bcd60e51b8152600401610d0690612aca565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146119d65760405162461bcd60e51b8152600401610d0690612aca565b600755565b6000546001600160a01b03163314611a055760405162461bcd60e51b8152600401610d0690612aca565b601155565b6000546001600160a01b03163314611a345760405162461bcd60e51b8152600401610d0690612aca565b33611a3e57600080fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044015b602060405180830381600087803b158015611a8757600080fd5b505af1158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf919061299b565b505050565b6001600160a01b0381166000908152601660205260408120546012548291611aeb91612bc1565b6001600160a01b038416600090815260156020908152604080832054601490925290912054919250908190611b21908490612be0565b611b2b9190612be0565b949350505050565b6000546001600160a01b03163314611b5d5760405162461bcd60e51b8152600401610d0690612aca565b6001600160a01b038216611ba15760405162461bcd60e51b815260206004820152600b60248201526a616464726573732072657160a81b6044820152606401610d06565b60005b81811015611abf57611bb583612673565b80611bbf81612bf7565b915050611ba4565b6000546001600160a01b03163314611bf15760405162461bcd60e51b8152600401610d0690612aca565b600655565b6000546001600160a01b03163314611c205760405162461bcd60e51b8152600401610d0690612aca565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611c6c5760405162461bcd60e51b8152600401610d0690612aca565b600255565b6000546001600160a01b03163314611c9b5760405162461bcd60e51b8152600401610d0690612aca565b600f54811015611cfe5760405162461bcd60e51b815260206004820152602860248201527f66696e616c50726963652063616e74206265206c657373207468616e206c6f77604482015267657374507269636560c01b6064820152608401610d06565b601255565b60026001541415611d265760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff1615611d555760405162461bcd60e51b8152600401610d0690612a7e565b601b54601a5410611d935760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610d06565b601b5481601a54611da49190612b87565b1115611de95760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f7567682072656d61696e696e6760601b6044820152606401610d06565b6004544211611e3a5760405162461bcd60e51b815260206004820152601760248201527f5075626c69632073616c65206e6f7420737461727465640000000000000000006044820152606401610d06565b600081118015611e4b575060148111155b611e675760405162461bcd60e51b8152600401610d0690612aff565b80601254611e759190612bc1565b3414611ec35760405162461bcd60e51b815260206004820152601d60248201527f45746865722076616c75652073656e7420697320696e636f72726563740000006044820152606401610d06565b80601a6000828254611ed59190612b87565b90915550600090505b81811015611f0157611eef33612673565b80611ef981612bf7565b915050611ede565b505060018055565b60026001541415611f2c5760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff1615611f5b5760405162461bcd60e51b8152600401610d0690612a7e565b601954601a5410611fa15760405162461bcd60e51b815260206004820152601060248201526f105d58dd1a5bdb881cdbdb19081bdd5d60821b6044820152606401610d06565b60195481601a54611fb29190612b87565b1115611ff75760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f7567682072656d61696e696e6760601b6044820152606401610d06565b600254421161203e5760405162461bcd60e51b8152602060048201526013602482015272105d58dd1a5bdb881b9bdd081cdd185c9d1959606a1b6044820152606401610d06565b6003544211156120855760405162461bcd60e51b815260206004820152601260248201527120bab1ba34b7b710383430b9b29037bb32b960711b6044820152606401610d06565b600081118015612096575060148111155b6120b25760405162461bcd60e51b8152600401610d0690612aff565b60006120bc610d60565b90506120c88282612bc1565b3410156121225760405162461bcd60e51b815260206004820152602260248201527f45746865722076616c75652073656e74206973206e6f742073756666696369656044820152611b9d60f21b6064820152608401610d06565b60138054600181019091557f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b0319163390811790915560009081526014602052604081208054349290612180908490612b87565b909155505033600090815260166020526040812080548492906121a4908490612b87565b9250508190555081601a60008282546121bd9190612b87565b9091555050601954601a5414156121d45760128190555b60005b82811015611157576121e833612673565b806121f281612bf7565b9150506121d7565b6013818154811061220a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146111c15760405162461bcd60e51b8152600401610d0690612aca565b6000546001600160a01b031633146122785760405162461bcd60e51b8152600401610d0690612aca565b600455565b6000546001600160a01b031633146122a75760405162461bcd60e51b8152600401610d0690612aca565b601955565b6000546001600160a01b031633146122d65760405162461bcd60e51b8152600401610d0690612aca565b601d55565b6000546001600160a01b031633146123055760405162461bcd60e51b8152600401610d0690612aca565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146123515760405162461bcd60e51b8152600401610d0690612aca565b6001600160a01b0381166123b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d06565b610f00816126f2565b8047101561240f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d06565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461245c576040519150601f19603f3d011682016040523d82523d6000602084013e612461565b606091505b5050905080611abf5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d06565b60006124e382611ac4565b90508015612523576001600160a01b03821660009081526015602052604081208054839290612513908490612b87565b90915550612523905082826127a7565b5050565b600054600160a01b900460ff166125775760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d06565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600081815b85518110156126685760008682815181106125e6576125e6612c28565b60200260200101519050808311612628576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612655565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061266081612bf7565b9150506125c9565b509092149392505050565b600a546040516335313c2160e11b81526001600160a01b03838116600483015290911690636a62784290602401602060405180830381600087803b1580156126ba57600080fd5b505af11580156126ce573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252391906129d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff161561276c5760405162461bcd60e51b8152600401610d0690612a7e565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125a73390565b6127b18282612858565b61252357600c60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561280557600080fd5b505af1158015612819573d6000803e3d6000fd5b5050600c5460405163a9059cbb60e01b81526001600160a01b03878116600483015260248201879052909116935063a9059cbb92506044019050611a6d565b6040805160008082526020820190925281906001600160a01b038516906175309085906040516128889190612a43565b600060405180830381858888f193505050503d80600081146128c6576040519150601f19603f3d011682016040523d82523d6000602084013e6128cb565b606091505b509095945050505050565b6000602082840312156128e857600080fd5b81356128f381612c3e565b9392505050565b6000806040838503121561290d57600080fd5b823561291881612c3e565b946020939093013593505050565b6000806020838503121561293957600080fd5b823567ffffffffffffffff8082111561295157600080fd5b818501915085601f83011261296557600080fd5b81358181111561297457600080fd5b8660208260051b850101111561298957600080fd5b60209290920196919550909350505050565b6000602082840312156129ad57600080fd5b815180151581146128f357600080fd5b6000602082840312156129cf57600080fd5b5035919050565b6000602082840312156129e857600080fd5b5051919050565b60008060408385031215612a0257600080fd5b50508035926020909101359150565b60008060008060808587031215612a2757600080fd5b5050823594602084013594506040840135936060013592509050565b6000825160005b81811015612a645760208186018101518583015201612a4a565b81811115612a73576000828501525b509190910192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252600890820152671b9bc81d985d5b1d60c21b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f596f752063616e2073756d6d6f6e206e6f206d6f7265207468616e2032302057604082015270617272696f727320617420612074696d6560781b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612b9a57612b9a612c12565b500190565b600082612bbc57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612bdb57612bdb612c12565b500290565b600082821015612bf257612bf2612c12565b500390565b6000600019821415612c0b57612c0b612c12565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610f0057600080fdfea26469706673582212208761299786d95a4f97e23d784a21233a4c5570e98e370faa6b8f2fddbb35300664736f6c634300080600334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720000000000000000000000009690b63eb85467be5267a3603f770589ab12dc95000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106104475760003560e01c80638c6d8ef611610234578063c639052d1161012e578063e49618c1116100b6578063f2fde38b1161007a578063f2fde38b14610c5a578063f309455a14610c7a578063f4cde4c014610c90578063fbfa77cf14610ca6578063ff081be014610cc657600080fd5b8063e49618c114610bbf578063e770949a14610bef578063e7e59e1714610c04578063f1a9af8914610c24578063f23c85bf14610c3a57600080fd5b8063d4823370116100fd578063d482337014610b1c578063db8cc8fa14610b49578063df4f5a7214610b69578063e081260d14610b89578063e1d15c9b14610ba957600080fd5b8063c639052d14610ab4578063c9c1710914610ac7578063d0e30db014610ae7578063d3af256a14610aef57600080fd5b8063a0523b99116101bc578063b4c2776711610180578063b4c2776714610a3f578063b68046c814610a55578063bb55f25c14610a6b578063be29b05614610a8b578063c1aafcb714610aa157600080fd5b8063a0523b99146109a9578063a6b513ee146109c9578063a96a7412146109df578063a96e2423146109ff578063b3081ea914610a1f57600080fd5b80639727151a116102035780639727151a1461092657806398611866146109465780639935b60b1461095c5780639abc825f146109735780639c2f2a421461099357600080fd5b80638c6d8ef6146108c45780638d56a17b146108db5780638da5cb5b146108f157806393cb41471461090f57600080fd5b806348a3e8891161034557806374cd5a0e116102cd5780638456cb59116102915780638456cb591461083a578063853828b61461084f57806385535cc514610864578063868057b7146108845780638a4d1da4146108a457600080fd5b806374cd5a0e146107b15780637737893a146107d1578063780d567f146107f15780637cbff1a714610811578063812100b91461082457600080fd5b80636138f236116103145780636138f236146107165780636e1a1a60146107465780637142a1e014610766578063715018a614610786578063730847ac1461079b57600080fd5b806348a3e889146106a15780634b6be873146106c15780635c975abb146106e15780635fd1bbc41461070057600080fd5b8063323d03ae116103d35780633dc45343116103975780633dc45343146105f05780633e97414f1461061d5780633f4ba83a146106345780633fc8cef314610649578063411d13f71461068157600080fd5b8063323d03ae1461056557806335fdbb501461058557806336ce1f251461059b5780633cf901bf146105b05780633d6bcb16146105d057600080fd5b806317d861541161041a57806317d86154146104d95780631e3dc689146104f95780632560e3761461050f578063260c0886146105255780632e1a7d4d1461054557600080fd5b806301b87a121461044c57806302809ff71461046e57806308f2648a1461048e5780630a7f3614146104b6575b600080fd5b34801561045857600080fd5b5061046c6104673660046128d6565b610cdc565b005b34801561047a57600080fd5b5061046c6104893660046129bd565b610d31565b34801561049a57600080fd5b506104a3610d60565b6040519081526020015b60405180910390f35b3480156104c257600080fd5b5060065442115b60405190151581526020016104ad565b3480156104e557600080fd5b5061046c6104f43660046129bd565b610e3a565b34801561050557600080fd5b506104a360105481565b34801561051b57600080fd5b506104a360095481565b34801561053157600080fd5b5061046c6105403660046129bd565b610e69565b34801561055157600080fd5b5061046c6105603660046129bd565b610e98565b34801561057157600080fd5b5061046c610580366004612a11565b610f03565b34801561059157600080fd5b506104a360195481565b3480156105a757600080fd5b5061046c610ff7565b3480156105bc57600080fd5b5061046c6105cb3660046129ef565b61107f565b3480156105dc57600080fd5b5061046c6105eb3660046129bd565b611160565b3480156105fc57600080fd5b506104a361060b3660046128d6565b60156020526000908152604090205481565b34801561062957600080fd5b5060055442116104c9565b34801561064057600080fd5b5061046c61118f565b34801561065557600080fd5b50600c54610669906001600160a01b031681565b6040516001600160a01b0390911681526020016104ad565b34801561068d57600080fd5b5061046c61069c3660046129bd565b6111c3565b3480156106ad57600080fd5b5061046c6106bc3660046128d6565b6111f2565b3480156106cd57600080fd5b5061046c6106dc366004612926565b611284565b3480156106ed57600080fd5b50600054600160a01b900460ff166104c9565b34801561070c57600080fd5b506104a360045481565b34801561072257600080fd5b506104c96107313660046128d6565b60186020526000908152604090205460ff1681565b34801561075257600080fd5b5061046c6107613660046129bd565b6114b8565b34801561077257600080fd5b5061046c6107813660046129bd565b6114e7565b34801561079257600080fd5b5061046c611516565b3480156107a757600080fd5b506104a360075481565b3480156107bd57600080fd5b5061046c6107cc3660046129bd565b61154a565b3480156107dd57600080fd5b50600a54610669906001600160a01b031681565b3480156107fd57600080fd5b5061046c61080c3660046129bd565b6115ce565b61046c61081f366004612926565b6115fd565b34801561083057600080fd5b506104a360065481565b34801561084657600080fd5b5061046c6118ab565b34801561085b57600080fd5b5061046c6118dd565b34801561087057600080fd5b5061046c61087f3660046128d6565b611960565b34801561089057600080fd5b5061046c61089f3660046129bd565b6119ac565b3480156108b057600080fd5b5061046c6108bf3660046129bd565b6119db565b3480156108d057600080fd5b5060045442116104c9565b3480156108e757600080fd5b506104a360055481565b3480156108fd57600080fd5b506000546001600160a01b0316610669565b34801561091b57600080fd5b5060035442116104c9565b34801561093257600080fd5b5061046c6109413660046128fa565b611a0a565b34801561095257600080fd5b506104a360085481565b34801561096857600080fd5b5060025442116104c9565b34801561097f57600080fd5b506104a361098e3660046128d6565b611ac4565b34801561099f57600080fd5b506104a3601c5481565b3480156109b557600080fd5b5061046c6109c43660046128fa565b611b33565b3480156109d557600080fd5b506104a360125481565b3480156109eb57600080fd5b5061046c6109fa3660046129bd565b611bc7565b348015610a0b57600080fd5b5061046c610a1a3660046128d6565b611bf6565b348015610a2b57600080fd5b5061046c610a3a3660046129bd565b611c42565b348015610a4b57600080fd5b506104a360025481565b348015610a6157600080fd5b506104a3601b5481565b348015610a7757600080fd5b5061046c610a863660046129bd565b611c71565b348015610a9757600080fd5b506104a3600f5481565b61046c610aaf3660046129bd565b611d03565b61046c610ac23660046129bd565b611f09565b348015610ad357600080fd5b50610669610ae23660046129bd565b6121fa565b61046c612224565b348015610afb57600080fd5b506104a3610b0a3660046128d6565b60146020526000908152604090205481565b348015610b2857600080fd5b506104a3610b373660046128d6565b60166020526000908152604090205481565b348015610b5557600080fd5b5061046c610b643660046129bd565b61224e565b348015610b7557600080fd5b50600d54610669906001600160a01b031681565b348015610b9557600080fd5b5061046c610ba43660046129bd565b61227d565b348015610bb557600080fd5b506104a3601d5481565b348015610bcb57600080fd5b506104c9610bda3660046128d6565b60176020526000908152604090205460ff1681565b348015610bfb57600080fd5b506013546104a3565b348015610c1057600080fd5b5061046c610c1f3660046129bd565b6122ac565b348015610c3057600080fd5b506104a3600e5481565b348015610c4657600080fd5b5061046c610c553660046128d6565b6122db565b348015610c6657600080fd5b5061046c610c753660046128d6565b612327565b348015610c8657600080fd5b506104a3601a5481565b348015610c9c57600080fd5b506104a360035481565b348015610cb257600080fd5b50600b54610669906001600160a01b031681565b348015610cd257600080fd5b506104a360115481565b6000546001600160a01b03163314610d0f5760405162461bcd60e51b8152600401610d0690612aca565b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d5b5760405162461bcd60e51b8152600401610d0690612aca565b601055565b6000610d6d600254421190565b610d785750600e5490565b601054600254610d889190612b87565b4210610d955750600f5490565b6000601154601054610da79190612b9f565b600f54600e54610db79190612be0565b610dc19190612b9f565b9050600060025442610dd39190612be0565b9050600060115482610de59190612b9f565b90506000610df38483612bc1565b9050600e54811115610e0b57600f5494505050505090565b600081600e54610e1b9190612be0565b9050600f548111610e2e57600f54610e30565b805b9550505050505090565b6000546001600160a01b03163314610e645760405162461bcd60e51b8152600401610d0690612aca565b600e55565b6000546001600160a01b03163314610e935760405162461bcd60e51b8152600401610d0690612aca565b600555565b6000546001600160a01b03163314610ec25760405162461bcd60e51b8152600401610d0690612aca565b600b546001600160a01b0316610eea5760405162461bcd60e51b8152600401610d0690612aa8565b600b54610f00906001600160a01b0316826123bf565b50565b6000546001600160a01b03163314610f2d5760405162461bcd60e51b8152600401610d0690612aca565b82821015610f7d5760405162461bcd60e51b815260206004820152601960248201527f536574207075626c6963206166746572206d696e746c697374000000000000006044820152606401610d06565b81811015610fcd5760405162461bcd60e51b815260206004820152601760248201527f53657420636c61696d73206166746572207075626c69630000000000000000006044820152606401610d06565b610fd684611c42565b610fdf836114b8565b610fe88261224e565b610ff181610e69565b50505050565b6002600154141561101a5760405162461bcd60e51b8152600401610d0690612b50565b600260015560065442116110705760405162461bcd60e51b815260206004820152601e60248201527f53656c6620726566756e6420706572696f64206e6f74207374617274656400006044820152606401610d06565b611079336124d8565b60018055565b600260015414156110a25760405162461bcd60e51b8152600401610d0690612b50565b6002600155600d546001600160a01b031633146111015760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f742074686520726566756e6465720000000000006044820152606401610d06565b815b61110e826001612b87565b811015611157576111456013828154811061112b5761112b612c28565b6000918252602090912001546001600160a01b03166124d8565b8061114f81612bf7565b915050611103565b50506001805550565b6000546001600160a01b0316331461118a5760405162461bcd60e51b8152600401610d0690612aca565b601b55565b6000546001600160a01b031633146111b95760405162461bcd60e51b8152600401610d0690612aca565b6111c1612527565b565b6000546001600160a01b031633146111ed5760405162461bcd60e51b8152600401610d0690612aca565b600955565b600260015414156112155760405162461bcd60e51b8152600401610d0690612b50565b6002600155600d546001600160a01b031633146112745760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f742074686520726566756e6465720000000000006044820152606401610d06565b61127d816124d8565b5060018055565b600260015414156112a75760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff16156112d65760405162461bcd60e51b8152600401610d0690612a7e565b601d54601c541061131a5760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520636c61696d7360901b6044820152606401610d06565b600554421161136b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d207068617365206e6f7420737461727465640000000000000000006044820152606401610d06565b3360009081526018602052604090205460ff16156113bd5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610d06565b336000818152601860209081526040808320805460ff191660011790555191926114019290910160609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120905061145a8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060095491508490506125c4565b6114965760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610d06565b6001601c60008282546114a99190612b87565b90915550611157905033612673565b6000546001600160a01b031633146114e25760405162461bcd60e51b8152600401610d0690612aca565b600355565b6000546001600160a01b031633146115115760405162461bcd60e51b8152600401610d0690612aca565b600855565b6000546001600160a01b031633146115405760405162461bcd60e51b8152600401610d0690612aca565b6111c160006126f2565b6000546001600160a01b031633146115745760405162461bcd60e51b8152600401610d0690612aca565b600b546001600160a01b031661159c5760405162461bcd60e51b8152600401610d0690612aa8565b600b546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050610f0057600080fd5b6000546001600160a01b031633146115f85760405162461bcd60e51b8152600401610d0690612aca565b600f55565b600260015414156116205760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff161561164f5760405162461bcd60e51b8152600401610d0690612a7e565b601b54601a541061168d5760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610d06565b60035442116116de5760405162461bcd60e51b815260206004820152601a60248201527f4d696e746c697374207068617365206e6f7420737461727465640000000000006044820152606401610d06565b60125434146117275760405162461bcd60e51b8152602060048201526015602482015274115d1a195c881d985b1d59481a5b98dbdc9c9958dd605a1b6044820152606401610d06565b3360009081526017602052604090205460ff16156117785760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610d06565b336000818152601760209081526040808320805460ff191660011790555191926117bc9290910160609190911b6bffffffffffffffffffffffff1916815260140190565b6040516020818303038152906040528051906020012090506118158383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060075491508490506125c4565b8061185c575061185c8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060085491508490506125c4565b6118985760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610d06565b6001601a60008282546114a99190612b87565b6000546001600160a01b031633146118d55760405162461bcd60e51b8152600401610d0690612aca565b6111c1612742565b6000546001600160a01b031633146119075760405162461bcd60e51b8152600401610d0690612aca565b600b546001600160a01b031661192f5760405162461bcd60e51b8152600401610d0690612aa8565b600b546040516001600160a01b03909116904780156108fc02916000818181858888f193505050506111c157600080fd5b6000546001600160a01b0316331461198a5760405162461bcd60e51b8152600401610d0690612aca565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146119d65760405162461bcd60e51b8152600401610d0690612aca565b600755565b6000546001600160a01b03163314611a055760405162461bcd60e51b8152600401610d0690612aca565b601155565b6000546001600160a01b03163314611a345760405162461bcd60e51b8152600401610d0690612aca565b33611a3e57600080fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044015b602060405180830381600087803b158015611a8757600080fd5b505af1158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf919061299b565b505050565b6001600160a01b0381166000908152601660205260408120546012548291611aeb91612bc1565b6001600160a01b038416600090815260156020908152604080832054601490925290912054919250908190611b21908490612be0565b611b2b9190612be0565b949350505050565b6000546001600160a01b03163314611b5d5760405162461bcd60e51b8152600401610d0690612aca565b6001600160a01b038216611ba15760405162461bcd60e51b815260206004820152600b60248201526a616464726573732072657160a81b6044820152606401610d06565b60005b81811015611abf57611bb583612673565b80611bbf81612bf7565b915050611ba4565b6000546001600160a01b03163314611bf15760405162461bcd60e51b8152600401610d0690612aca565b600655565b6000546001600160a01b03163314611c205760405162461bcd60e51b8152600401610d0690612aca565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611c6c5760405162461bcd60e51b8152600401610d0690612aca565b600255565b6000546001600160a01b03163314611c9b5760405162461bcd60e51b8152600401610d0690612aca565b600f54811015611cfe5760405162461bcd60e51b815260206004820152602860248201527f66696e616c50726963652063616e74206265206c657373207468616e206c6f77604482015267657374507269636560c01b6064820152608401610d06565b601255565b60026001541415611d265760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff1615611d555760405162461bcd60e51b8152600401610d0690612a7e565b601b54601a5410611d935760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610d06565b601b5481601a54611da49190612b87565b1115611de95760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f7567682072656d61696e696e6760601b6044820152606401610d06565b6004544211611e3a5760405162461bcd60e51b815260206004820152601760248201527f5075626c69632073616c65206e6f7420737461727465640000000000000000006044820152606401610d06565b600081118015611e4b575060148111155b611e675760405162461bcd60e51b8152600401610d0690612aff565b80601254611e759190612bc1565b3414611ec35760405162461bcd60e51b815260206004820152601d60248201527f45746865722076616c75652073656e7420697320696e636f72726563740000006044820152606401610d06565b80601a6000828254611ed59190612b87565b90915550600090505b81811015611f0157611eef33612673565b80611ef981612bf7565b915050611ede565b505060018055565b60026001541415611f2c5760405162461bcd60e51b8152600401610d0690612b50565b6002600155600054600160a01b900460ff1615611f5b5760405162461bcd60e51b8152600401610d0690612a7e565b601954601a5410611fa15760405162461bcd60e51b815260206004820152601060248201526f105d58dd1a5bdb881cdbdb19081bdd5d60821b6044820152606401610d06565b60195481601a54611fb29190612b87565b1115611ff75760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f7567682072656d61696e696e6760601b6044820152606401610d06565b600254421161203e5760405162461bcd60e51b8152602060048201526013602482015272105d58dd1a5bdb881b9bdd081cdd185c9d1959606a1b6044820152606401610d06565b6003544211156120855760405162461bcd60e51b815260206004820152601260248201527120bab1ba34b7b710383430b9b29037bb32b960711b6044820152606401610d06565b600081118015612096575060148111155b6120b25760405162461bcd60e51b8152600401610d0690612aff565b60006120bc610d60565b90506120c88282612bc1565b3410156121225760405162461bcd60e51b815260206004820152602260248201527f45746865722076616c75652073656e74206973206e6f742073756666696369656044820152611b9d60f21b6064820152608401610d06565b60138054600181019091557f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b0319163390811790915560009081526014602052604081208054349290612180908490612b87565b909155505033600090815260166020526040812080548492906121a4908490612b87565b9250508190555081601a60008282546121bd9190612b87565b9091555050601954601a5414156121d45760128190555b60005b82811015611157576121e833612673565b806121f281612bf7565b9150506121d7565b6013818154811061220a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146111c15760405162461bcd60e51b8152600401610d0690612aca565b6000546001600160a01b031633146122785760405162461bcd60e51b8152600401610d0690612aca565b600455565b6000546001600160a01b031633146122a75760405162461bcd60e51b8152600401610d0690612aca565b601955565b6000546001600160a01b031633146122d65760405162461bcd60e51b8152600401610d0690612aca565b601d55565b6000546001600160a01b031633146123055760405162461bcd60e51b8152600401610d0690612aca565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146123515760405162461bcd60e51b8152600401610d0690612aca565b6001600160a01b0381166123b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d06565b610f00816126f2565b8047101561240f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d06565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461245c576040519150601f19603f3d011682016040523d82523d6000602084013e612461565b606091505b5050905080611abf5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d06565b60006124e382611ac4565b90508015612523576001600160a01b03821660009081526015602052604081208054839290612513908490612b87565b90915550612523905082826127a7565b5050565b600054600160a01b900460ff166125775760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d06565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600081815b85518110156126685760008682815181106125e6576125e6612c28565b60200260200101519050808311612628576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612655565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061266081612bf7565b9150506125c9565b509092149392505050565b600a546040516335313c2160e11b81526001600160a01b03838116600483015290911690636a62784290602401602060405180830381600087803b1580156126ba57600080fd5b505af11580156126ce573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252391906129d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff161561276c5760405162461bcd60e51b8152600401610d0690612a7e565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125a73390565b6127b18282612858565b61252357600c60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561280557600080fd5b505af1158015612819573d6000803e3d6000fd5b5050600c5460405163a9059cbb60e01b81526001600160a01b03878116600483015260248201879052909116935063a9059cbb92506044019050611a6d565b6040805160008082526020820190925281906001600160a01b038516906175309085906040516128889190612a43565b600060405180830381858888f193505050503d80600081146128c6576040519150601f19603f3d011682016040523d82523d6000602084013e6128cb565b606091505b509095945050505050565b6000602082840312156128e857600080fd5b81356128f381612c3e565b9392505050565b6000806040838503121561290d57600080fd5b823561291881612c3e565b946020939093013593505050565b6000806020838503121561293957600080fd5b823567ffffffffffffffff8082111561295157600080fd5b818501915085601f83011261296557600080fd5b81358181111561297457600080fd5b8660208260051b850101111561298957600080fd5b60209290920196919550909350505050565b6000602082840312156129ad57600080fd5b815180151581146128f357600080fd5b6000602082840312156129cf57600080fd5b5035919050565b6000602082840312156129e857600080fd5b5051919050565b60008060408385031215612a0257600080fd5b50508035926020909101359150565b60008060008060808587031215612a2757600080fd5b5050823594602084013594506040840135936060013592509050565b6000825160005b81811015612a645760208186018101518583015201612a4a565b81811115612a73576000828501525b509190910192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252600890820152671b9bc81d985d5b1d60c21b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f596f752063616e2073756d6d6f6e206e6f206d6f7265207468616e2032302057604082015270617272696f727320617420612074696d6560781b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612b9a57612b9a612c12565b500190565b600082612bbc57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612bdb57612bdb612c12565b500290565b600082821015612bf257612bf2612c12565b500390565b6000600019821415612c0b57612c0b612c12565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610f0057600080fdfea26469706673582212208761299786d95a4f97e23d784a21233a4c5570e98e370faa6b8f2fddbb35300664736f6c63430008060033

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

0000000000000000000000009690b63eb85467be5267a3603f770589ab12dc95000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _warriors (address): 0x9690b63Eb85467BE5267A3603f770589Ab12Dc95
Arg [1] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009690b63eb85467be5267a3603f770589ab12dc95
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.