ETH Price: $3,411.28 (+1.60%)

Contract

0xF1177d2e783B80A75951EA221F591E6D798a50c7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Vesting To...198270762024-05-08 18:18:11202 days ago1715192291IN
0xF1177d2e...D798a50c7
0 ETH0.000204255.48168099
Buy With Eth191593992024-02-05 3:27:35296 days ago1707103655IN
0xF1177d2e...D798a50c7
0.11 ETH0.0006470312.5820589
Buy With Eth191593962024-02-05 3:26:59296 days ago1707103619IN
0xF1177d2e...D798a50c7
0.11 ETH0.00062712.19259986
Buy With Eth191543122024-02-04 10:19:35296 days ago1707041975IN
0xF1177d2e...D798a50c7
0.022 ETH0.0017257114.50634635
Buy With Eth191504662024-02-03 21:20:47297 days ago1706995247IN
0xF1177d2e...D798a50c7
0.0221 ETH0.0016777814.10339171
Buy With Eth191496542024-02-03 18:37:47297 days ago1706985467IN
0xF1177d2e...D798a50c7
0.025 ETH0.0014924717.60764827
Buy With Usdt191484342024-02-03 14:30:35297 days ago1706970635IN
0xF1177d2e...D798a50c7
0 ETH0.0022595719.36923198
Buy With Usdt191483892024-02-03 14:21:35297 days ago1706970095IN
0xF1177d2e...D798a50c7
0 ETH0.0022656119.42101911
Buy With Eth191479492024-02-03 12:51:59297 days ago1706964719IN
0xF1177d2e...D798a50c7
0.035 ETH0.0017951115.08968674
Buy With Usdt191478722024-02-03 12:36:23297 days ago1706963783IN
0xF1177d2e...D798a50c7
0 ETH0.0016590214.22124265
Buy With Eth191478662024-02-03 12:35:11297 days ago1706963711IN
0xF1177d2e...D798a50c7
0.03 ETH0.0018448215.50756267
Buy With Usdt191476512024-02-03 11:51:59297 days ago1706961119IN
0xF1177d2e...D798a50c7
0 ETH0.001724314.78085652
Buy With Usdt191476492024-02-03 11:51:35297 days ago1706961095IN
0xF1177d2e...D798a50c7
0 ETH0.0015946113.66916871
Buy With Eth191476422024-02-03 11:50:11297 days ago1706961011IN
0xF1177d2e...D798a50c7
0.0221 ETH0.0017092214.36767862
Buy With Eth191476012024-02-03 11:41:47297 days ago1706960507IN
0xF1177d2e...D798a50c7
0.041 ETH0.0018327315.40589631
Buy With Usdt191475822024-02-03 11:37:59297 days ago1706960279IN
0xF1177d2e...D798a50c7
0 ETH0.0017352514.87315457
Buy With Eth191475542024-02-03 11:32:23297 days ago1706959943IN
0xF1177d2e...D798a50c7
0.035 ETH0.0018259215.34868518
Buy With Usdt191475532024-02-03 11:32:11297 days ago1706959931IN
0xF1177d2e...D798a50c7
0 ETH0.0018514815.86942567
Buy With Eth191475402024-02-03 11:29:35297 days ago1706959775IN
0xF1177d2e...D798a50c7
0.865 ETH0.0014017816.53775702
Buy With Eth191475332024-02-03 11:27:47297 days ago1706959667IN
0xF1177d2e...D798a50c7
0.0512 ETH0.00168814.18932297
Buy With Eth191475322024-02-03 11:27:35297 days ago1706959655IN
0xF1177d2e...D798a50c7
0.022 ETH0.0016654814
Buy With Usdt191475272024-02-03 11:26:35297 days ago1706959595IN
0xF1177d2e...D798a50c7
0 ETH0.0012198914.7920285
Buy With Usdt191475242024-02-03 11:25:59297 days ago1706959559IN
0xF1177d2e...D798a50c7
0 ETH0.0016778814.38438009
Buy With Eth191475232024-02-03 11:25:47297 days ago1706959547IN
0xF1177d2e...D798a50c7
0.08 ETH0.0019301616.22490852
Buy With Eth191475212024-02-03 11:25:11297 days ago1706959511IN
0xF1177d2e...D798a50c7
0.14 ETH0.0016045513.48924874
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
191543122024-02-04 10:19:35296 days ago1707041975
0xF1177d2e...D798a50c7
0.02176612 ETH
191543122024-02-04 10:19:35296 days ago1707041975
0xF1177d2e...D798a50c7
0.00023387 ETH
191504662024-02-03 21:20:47297 days ago1706995247
0xF1177d2e...D798a50c7
0.02181202 ETH
191504662024-02-03 21:20:47297 days ago1706995247
0xF1177d2e...D798a50c7
0.00028797 ETH
191496542024-02-03 18:37:47297 days ago1706985467
0xF1177d2e...D798a50c7
0.02474229 ETH
191496542024-02-03 18:37:47297 days ago1706985467
0xF1177d2e...D798a50c7
0.0002577 ETH
191479492024-02-03 12:51:59297 days ago1706964719
0xF1177d2e...D798a50c7
0.03462506 ETH
191479492024-02-03 12:51:59297 days ago1706964719
0xF1177d2e...D798a50c7
0.00037493 ETH
191478662024-02-03 12:35:11297 days ago1706963711
0xF1177d2e...D798a50c7
0.02970095 ETH
191478662024-02-03 12:35:11297 days ago1706963711
0xF1177d2e...D798a50c7
0.00029904 ETH
191476422024-02-03 11:50:11297 days ago1706961011
0xF1177d2e...D798a50c7
0.02186638 ETH
191476422024-02-03 11:50:11297 days ago1706961011
0xF1177d2e...D798a50c7
0.00023361 ETH
191476012024-02-03 11:41:47297 days ago1706960507
0xF1177d2e...D798a50c7
0.0405643 ETH
191476012024-02-03 11:41:47297 days ago1706960507
0xF1177d2e...D798a50c7
0.00043569 ETH
191475542024-02-03 11:32:23297 days ago1706959943
0xF1177d2e...D798a50c7
0.03463686 ETH
191475542024-02-03 11:32:23297 days ago1706959943
0xF1177d2e...D798a50c7
0.00036313 ETH
191475402024-02-03 11:29:35297 days ago1706959775
0xF1177d2e...D798a50c7
0.85642561 ETH
191475402024-02-03 11:29:35297 days ago1706959775
0xF1177d2e...D798a50c7
0.00857438 ETH
191475332024-02-03 11:27:47297 days ago1706959667
0xF1177d2e...D798a50c7
0.050671 ETH
191475332024-02-03 11:27:47297 days ago1706959667
0xF1177d2e...D798a50c7
0.00052899 ETH
191475322024-02-03 11:27:35297 days ago1706959655
0xF1177d2e...D798a50c7
0.02175506 ETH
191475322024-02-03 11:27:35297 days ago1706959655
0xF1177d2e...D798a50c7
0.00024493 ETH
191475232024-02-03 11:25:47297 days ago1706959547
0xF1177d2e...D798a50c7
0.07919777 ETH
191475232024-02-03 11:25:47297 days ago1706959547
0xF1177d2e...D798a50c7
0.00080222 ETH
191475212024-02-03 11:25:11297 days ago1706959511
0xF1177d2e...D798a50c7
0.13858636 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CatchTokenLaunchpad

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : CatchTokenLaunchpad.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract CatchTokenLaunchpad is AccessControl, EIP712, Ownable {
	bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE");

	event Bought(address user, uint256 tokenAmount);
	event PhaseChanged(Phase phase);
	event ClaimedTGE(address user, uint256 tokenAmount);
	event ClaimedVesting(address user, uint256 tokenAmount);

	enum Phase {
		INIT,
		BUY,
		CLAIM
	}

	address payable immutable public buyRecipient;
	IERC20 immutable public catchToken;
	AggregatorV3Interface immutable public priceFeed;
	IERC20 immutable public usdt;

	/// @notice 8 decimals; e.g. value `100000000` represents $1.00 for 1 full CATCH token
	uint256 immutable public tokenPriceUsd;

	/// @notice 8 decimals; e.g. value `5000000000` represents $50.00 minimal USDT amount
	uint256 immutable public minUsdAmount;

	/// @notice 0 decimals, e.g. value `10` represents 10% discount
	uint8 immutable public nftHolderDiscountPercent;

	// @notice 8 decimals, e.g. value 13 000 000 0000 0000 is 13 000 000 CATCH token
	uint256 immutable public presaleSupply;

	/// @notice 0 decimals, e.g. value `10` represents 10% unlock at TGE
	uint8 immutable public unlockPercentAtTGE;
	uint8 immutable public cliffMonths;
	uint8 immutable public linearVestingMonths;

	Phase public currentPhase;

	mapping(bytes32 => bool) public usedNonces;

	uint256 public vestingStartDate;
	uint256 public vestingEndDate;

	mapping(address user => uint256 tokens) public totalTGETokensByUser;
	mapping(address user => uint256 tokens) public totalVestingTokensByUser;
	mapping(address user => uint256 tokens) public claimedTGETokensByUser;
	mapping(address user => uint256 tokens) public claimedVestingTokensByUser;

	uint256 public totalTokensBought;

	uint256[4] private volumeThresholds = [50000000000, 150100000000, 300100000000, 500100000000];
	uint8[4] private volumeBonuses = [3, 5, 7, 12];

	modifier onlyCurrentPhase(Phase _phase) {
		require(currentPhase == _phase, "CatchTokenLaunchpad: Unexpected current phase");
		_;
	}

	struct PresaleParams {
		address payable _buyRecipient;
		uint256 _tokenPriceUsd;
		uint256 _minUsdAmount;
		uint8 _nftHolderDiscountPercent;
		uint256 _presaleSupply;
		uint8 _unlockPercentAtTGE;
		uint8 _cliffMonths;
		uint8 _linearVestingMonths;
	}

	constructor(
		address[] memory admins,
		address[] memory signers,
		IERC20 _catchToken,
		AggregatorV3Interface _priceFeed,
		IERC20 _usdt,
		PresaleParams memory presaleParams
	) EIP712("CatchTokenLaunchpad", "1") {
		for (uint i; i < admins.length; i++) {
			_grantRole(DEFAULT_ADMIN_ROLE, admins[i]);
		}
		for (uint i; i < admins.length; i++) {
			_grantRole(SIGNER_ROLE, signers[i]);
		}

		catchToken = _catchToken;
		priceFeed = _priceFeed;
		usdt = _usdt;

		buyRecipient = presaleParams._buyRecipient;
		tokenPriceUsd = presaleParams._tokenPriceUsd;
		minUsdAmount = presaleParams._minUsdAmount;
		nftHolderDiscountPercent = presaleParams._nftHolderDiscountPercent;
		presaleSupply = presaleParams._presaleSupply;
		unlockPercentAtTGE = presaleParams._unlockPercentAtTGE;
		cliffMonths = presaleParams._cliffMonths;
		linearVestingMonths = presaleParams._linearVestingMonths;
	}

	function buyWithEth(uint256 tokenAmount) external payable onlyCurrentPhase(Phase.BUY) {
		require(this.getUsdAmount(tokenAmount) >= minUsdAmount, "CatchTokenLaunchpad: Below min amount");
		_buyWithEth(tokenAmount, false);
	}

	function buyWithUsdt(uint256 tokenAmount) external onlyCurrentPhase(Phase.BUY) {
		require(this.getUsdAmount(tokenAmount) >= minUsdAmount, "CatchTokenLaunchpad: Below min amount");
		_buyWithUsdt(tokenAmount, false);
	}

	function buyWithEthNftHolder(uint256 tokenAmount, bytes32 nonce, bytes memory signature) external payable onlyCurrentPhase(Phase.BUY) {
		require(this.getUsdAmount(tokenAmount) >= minUsdAmount, "CatchTokenLaunchpad: Below min amount");
		bytes32 digest = _hashTypedDataV4(
			keccak256(abi.encode(keccak256("BuyWithEthNftHolder(bytes32 nonce)"), nonce))
		);
		address recoveredSigner = ECDSA.recover(digest, signature);
		require(hasRole(SIGNER_ROLE, recoveredSigner), "CatchTokenLaunchpad: Invalid signature");
		require(!usedNonces[nonce], "CatchTokenLaunchpad: Nonce already used");
		usedNonces[nonce] = true;
		_buyWithEth(tokenAmount, true);
	}

	function buyWithUsdtNftHolder(uint256 tokenAmount, bytes32 nonce, bytes memory signature) external onlyCurrentPhase(Phase.BUY) {
		require(this.getUsdAmount(tokenAmount) >= minUsdAmount, "CatchTokenLaunchpad: Below min amount");
		bytes32 digest = _hashTypedDataV4(
			keccak256(abi.encode(keccak256("BuyWithUsdtNftHolder(bytes32 nonce)"), nonce))
		);
		address recoveredSigner = ECDSA.recover(digest, signature);
		require(hasRole(SIGNER_ROLE, recoveredSigner), "CatchTokenLaunchpad: Invalid signature");
		require(!usedNonces[nonce], "CatchTokenLaunchpad: Nonce already used");
		usedNonces[nonce] = true;
		_buyWithUsdt(tokenAmount, true);
	}

	function availableTGETokensToClaim(address user) public view returns (uint256) {
		if (currentPhase != Phase.CLAIM) {
			return 0;
		}

		return totalTGETokensByUser[user] - claimedTGETokensByUser[user];
	}

	function availableVestingTokensToClaim(address user) public view returns (uint256) {
		if (currentPhase != Phase.CLAIM) {
			return 0;
		}

		uint256 vestingDays = (vestingEndDate - vestingStartDate) / 1 days;
		uint256 tokensPerDay = totalVestingTokensByUser[user] / vestingDays;
		uint256 daysSinceVestingStart = block.timestamp > vestingStartDate
			? (block.timestamp - vestingStartDate) / 1 days
			: 0;
		return (daysSinceVestingStart * tokensPerDay) - claimedVestingTokensByUser[user];
	}

	function claimTGETokens() external {
		uint256 tokenAmount = availableTGETokensToClaim(msg.sender);
		claimedTGETokensByUser[msg.sender] = tokenAmount;
		catchToken.transfer(msg.sender, tokenAmount);
		emit ClaimedTGE(msg.sender, tokenAmount);
	}

	function claimVestingTokens() external {
		uint256 tokenAmount = availableVestingTokensToClaim(msg.sender);
		claimedVestingTokensByUser[msg.sender] += tokenAmount;
		catchToken.transfer(msg.sender, tokenAmount);
		emit ClaimedVesting(msg.sender, tokenAmount);
	}

	function calculateEthAmountRequired(uint256 tokenAmount, bool isNftHolder) external view returns (uint256) {
		uint256 usdAmount = this.tokenAmountToUsdAmount(tokenAmount, isNftHolder);
		(,int256 ethUsdPrice,,,) = priceFeed.latestRoundData();
		uint256 ethAmount = (usdAmount * 1e18) / uint256(ethUsdPrice);
		return ethAmount;
	}

	function calculateUsdtAmountRequired(uint256 tokenAmount, bool isNftHolder) external view returns (uint256) {
		uint256 usdAmount = this.tokenAmountToUsdAmount(tokenAmount, isNftHolder);
		uint256 usdtAmount = usdAmount / 1e2;
		return usdtAmount;
	}

	function calculateTokenAmountByEth(uint256 ethAmount, bool isNftHolder) public view returns (uint256) {
		(,int256 ethUsdPrice,,,) = priceFeed.latestRoundData();
		uint256 usdAmount = (ethAmount * uint256(ethUsdPrice)) / 1e18;
		uint256 tokenAmount = this.usdAmountToTokenAmount(usdAmount, isNftHolder);
		return tokenAmount;
	}

	function calculateTokenAmountByUsdt(uint256 usdtAmount, bool isNftHolder) public view returns (uint256) {
		uint256 usdAmount = usdtAmount * 1e2;
		uint256 tokenAmount = this.usdAmountToTokenAmount(usdAmount, isNftHolder);
		return tokenAmount;
	}

	function usdAmountToTokenAmount(uint256 usdAmount, bool isNftHolder) external view returns (uint256) {
		uint256 volumeDiscount = getVolumeDiscount(usdAmount);
		uint256 discountedTokenPriceUsd = (tokenPriceUsd * (100 - volumeDiscount)) / 100;

		if (isNftHolder) {
			discountedTokenPriceUsd = (discountedTokenPriceUsd * (100 - nftHolderDiscountPercent)) / 100;
		}

		uint256 tokenAmount = (usdAmount * 1e18) / discountedTokenPriceUsd;
		return tokenAmount;
	}

	function tokenAmountToUsdAmount(uint256 tokenAmount, bool isNftHolder) external view returns (uint256) {
		uint256 usdAmountBeforeDiscount = (tokenAmount * tokenPriceUsd) / 1e18;
		uint256 volumeDiscount = getVolumeDiscount(usdAmountBeforeDiscount);
		uint256 discountedUsdAmount = (usdAmountBeforeDiscount * (100 - volumeDiscount)) / 100;

		if (isNftHolder) {
			discountedUsdAmount = (discountedUsdAmount * (100 - nftHolderDiscountPercent)) / 100;
		}

		return discountedUsdAmount;
	}

	function startBuyPhase() external onlyCurrentPhase(Phase.INIT) onlyRole(DEFAULT_ADMIN_ROLE) {
		require(catchToken.balanceOf(address(this)) >= presaleSupply, "CatchTokenLaunchpad: Not enough supply. Send first.");
		_changeCurrentPhase(Phase.BUY);
	}

	function startClaimPhase() external onlyCurrentPhase(Phase.BUY) onlyRole(DEFAULT_ADMIN_ROLE) {
		_changeCurrentPhase(Phase.CLAIM);
		vestingStartDate = block.timestamp + (uint256(cliffMonths) * (30 days));
		vestingEndDate = vestingStartDate + (uint256(linearVestingMonths) * (30 days));
	}

	function _buyWithEth(uint256 tokenAmount, bool isNftHolder) internal {
		uint256 currentBalance = catchToken.balanceOf(address(this));
		if (tokenAmount >= currentBalance) {
			tokenAmount = currentBalance;
		}

		uint256 ethAmountRequired = this.calculateEthAmountRequired(tokenAmount, isNftHolder);
		require(msg.value >= ethAmountRequired, "CatchTokenLaunchpad: Insufficient value");

		totalTokensBought += tokenAmount;

		uint256 TGEAmount = (tokenAmount / 100) * unlockPercentAtTGE;
		totalTGETokensByUser[msg.sender] += TGEAmount;
		totalVestingTokensByUser[msg.sender] += tokenAmount - TGEAmount;
		emit Bought(msg.sender, tokenAmount);

		if (msg.value > ethAmountRequired) {
			// return overpaid ETH back to the sender
			uint256 overpaid = msg.value - ethAmountRequired;
			payable(msg.sender).transfer(overpaid);
		}

		buyRecipient.transfer(ethAmountRequired);
	}

	function _buyWithUsdt(uint256 tokenAmount, bool isNftHolder) internal {
		uint256 currentBalance = catchToken.balanceOf(address(this));
		if (tokenAmount >= currentBalance) {
			tokenAmount = currentBalance;
		}

		totalTokensBought += tokenAmount;
		uint256 usdtAmountRequired = this.calculateUsdtAmountRequired(tokenAmount, isNftHolder);

		(bool success, ) = address(usdt).call(
			abi.encodeWithSignature(
				"transferFrom(address,address,uint256)",
				msg.sender,
				buyRecipient,
				usdtAmountRequired
			)
		);
		require(success, "CatchTokenLaunchpad: Could not transfer usdt");

		uint256 TGEAmount = (tokenAmount / 100) * unlockPercentAtTGE;
		totalTGETokensByUser[msg.sender] += TGEAmount;
		totalVestingTokensByUser[msg.sender] += tokenAmount - TGEAmount;
		emit Bought(msg.sender, tokenAmount);
	}

	function getUsdAmount(uint256 tokenAmount) external view returns (uint256) {
		return (tokenAmount * tokenPriceUsd) / 1e18;
	}

	function getVolumeDiscount(uint256 amountInUsd) internal pure returns (uint256) {
		return 0;
	}

	function _changeCurrentPhase(Phase _phase) internal {
		currentPhase = _phase;
		emit PhaseChanged(_phase);
	}
}

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

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

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

  function version() external view returns (uint256);

  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 3 of 17 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 4 of 17 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 5 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 6 of 17 : IERC5267.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.0;

interface IERC5267 {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

File 7 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 9 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 10 of 17 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.8;

import "./ECDSA.sol";
import "../ShortStrings.sol";
import "../../interfaces/IERC5267.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * _Available since v3.4._
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
 */
abstract contract EIP712 is IERC5267 {
    using ShortStrings for *;

    bytes32 private constant _TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _cachedDomainSeparator;
    uint256 private immutable _cachedChainId;
    address private immutable _cachedThis;

    bytes32 private immutable _hashedName;
    bytes32 private immutable _hashedVersion;

    ShortString private immutable _name;
    ShortString private immutable _version;
    string private _nameFallback;
    string private _versionFallback;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        _name = name.toShortStringWithFallback(_nameFallback);
        _version = version.toShortStringWithFallback(_versionFallback);
        _hashedName = keccak256(bytes(name));
        _hashedVersion = keccak256(bytes(version));

        _cachedChainId = block.chainid;
        _cachedDomainSeparator = _buildDomainSeparator();
        _cachedThis = address(this);
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
            return _cachedDomainSeparator;
        } else {
            return _buildDomainSeparator();
        }
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {EIP-5267}.
     *
     * _Available since v4.9._
     */
    function eip712Domain()
        public
        view
        virtual
        override
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _name.toStringWithFallback(_nameFallback),
            _version.toStringWithFallback(_versionFallback),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 13 of 17 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 14 of 17 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 15 of 17 : ShortStrings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)

pragma solidity ^0.8.8;

import "./StorageSlot.sol";

// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |
// | length  | 0x                                                              BB |
type ShortString is bytes32;

/**
 * @dev This library provides functions to convert short memory strings
 * into a `ShortString` type that can be used as an immutable variable.
 *
 * Strings of arbitrary length can be optimized using this library if
 * they are short enough (up to 31 bytes) by packing them with their
 * length (1 byte) in a single EVM word (32 bytes). Additionally, a
 * fallback mechanism can be used for every other case.
 *
 * Usage example:
 *
 * ```solidity
 * contract Named {
 *     using ShortStrings for *;
 *
 *     ShortString private immutable _name;
 *     string private _nameFallback;
 *
 *     constructor(string memory contractName) {
 *         _name = contractName.toShortStringWithFallback(_nameFallback);
 *     }
 *
 *     function name() external view returns (string memory) {
 *         return _name.toStringWithFallback(_nameFallback);
 *     }
 * }
 * ```
 */
library ShortStrings {
    // Used as an identifier for strings longer than 31 bytes.
    bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;

    error StringTooLong(string str);
    error InvalidShortString();

    /**
     * @dev Encode a string of at most 31 chars into a `ShortString`.
     *
     * This will trigger a `StringTooLong` error is the input string is too long.
     */
    function toShortString(string memory str) internal pure returns (ShortString) {
        bytes memory bstr = bytes(str);
        if (bstr.length > 31) {
            revert StringTooLong(str);
        }
        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
    }

    /**
     * @dev Decode a `ShortString` back to a "normal" string.
     */
    function toString(ShortString sstr) internal pure returns (string memory) {
        uint256 len = byteLength(sstr);
        // using `new string(len)` would work locally but is not memory safe.
        string memory str = new string(32);
        /// @solidity memory-safe-assembly
        assembly {
            mstore(str, len)
            mstore(add(str, 0x20), sstr)
        }
        return str;
    }

    /**
     * @dev Return the length of a `ShortString`.
     */
    function byteLength(ShortString sstr) internal pure returns (uint256) {
        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
        if (result > 31) {
            revert InvalidShortString();
        }
        return result;
    }

    /**
     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
     */
    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
        if (bytes(value).length < 32) {
            return toShortString(value);
        } else {
            StorageSlot.getStringSlot(store).value = value;
            return ShortString.wrap(_FALLBACK_SENTINEL);
        }
    }

    /**
     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     */
    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return toString(value);
        } else {
            return store;
        }
    }

    /**
     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     *
     * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
     */
    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return byteLength(value);
        } else {
            return bytes(store).length;
        }
    }
}

File 16 of 17 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
 * _Available since v4.9 for `string`, `bytes`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

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

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

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

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

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

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"admins","type":"address[]"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"contract IERC20","name":"_catchToken","type":"address"},{"internalType":"contract AggregatorV3Interface","name":"_priceFeed","type":"address"},{"internalType":"contract IERC20","name":"_usdt","type":"address"},{"components":[{"internalType":"address payable","name":"_buyRecipient","type":"address"},{"internalType":"uint256","name":"_tokenPriceUsd","type":"uint256"},{"internalType":"uint256","name":"_minUsdAmount","type":"uint256"},{"internalType":"uint8","name":"_nftHolderDiscountPercent","type":"uint8"},{"internalType":"uint256","name":"_presaleSupply","type":"uint256"},{"internalType":"uint8","name":"_unlockPercentAtTGE","type":"uint8"},{"internalType":"uint8","name":"_cliffMonths","type":"uint8"},{"internalType":"uint8","name":"_linearVestingMonths","type":"uint8"}],"internalType":"struct CatchTokenLaunchpad.PresaleParams","name":"presaleParams","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"Bought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"ClaimedTGE","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"ClaimedVesting","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum CatchTokenLaunchpad.Phase","name":"phase","type":"uint8"}],"name":"PhaseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"availableTGETokensToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"availableVestingTokensToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyRecipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"buyWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"buyWithEthNftHolder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"buyWithUsdt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"buyWithUsdtNftHolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bool","name":"isNftHolder","type":"bool"}],"name":"calculateEthAmountRequired","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"bool","name":"isNftHolder","type":"bool"}],"name":"calculateTokenAmountByEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdtAmount","type":"uint256"},{"internalType":"bool","name":"isNftHolder","type":"bool"}],"name":"calculateTokenAmountByUsdt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bool","name":"isNftHolder","type":"bool"}],"name":"calculateUsdtAmountRequired","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"catchToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimTGETokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimVestingTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"claimedTGETokensByUser","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"claimedVestingTokensByUser","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cliffMonths","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPhase","outputs":[{"internalType":"enum CatchTokenLaunchpad.Phase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"getUsdAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"linearVestingMonths","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minUsdAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftHolderDiscountPercent","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBuyPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startClaimPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bool","name":"isNftHolder","type":"bool"}],"name":"tokenAmountToUsdAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPriceUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalTGETokensByUser","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensBought","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalVestingTokensByUser","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockPercentAtTGE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"bool","name":"isNftHolder","type":"bool"}],"name":"usdAmountToTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedNonces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingEndDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingStartDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

610340604052640ba43b74006102c09081526422f2a83d006102e0526445df5a990061030052647470486900610320526200003f90600c90600462000460565b50604080516080810182526003815260056020820152600791810191909152600c606082015262000075906010906004620004ac565b503480156200008357600080fd5b5060405162003cbe38038062003cbe833981016040819052620000a69162000674565b6040518060400160405280601381526020017f4361746368546f6b656e4c61756e636870616400000000000000000000000000815250604051806040016040528060018152602001603160f81b8152506200010c600183620002e860201b90919060201c565b610120526200011d816002620002e8565b61014052815160208084019190912060e052815190820120610100524660a052620001ab60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052620001bf3362000321565b60005b86518110156200021257620001fd6000801b888381518110620001e957620001e9620007c6565b60200260200101516200037360201b60201c565b806200020981620007dc565b915050620001c2565b5060005b86518110156200026f576200025a7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f70878381518110620001e957620001e9620007c6565b806200026681620007dc565b91505062000216565b506001600160a01b03938416610180529183166101a05282166101c05280519091166101605260208101516101e052604081015161020052606081015160ff9081166102205260808201516102405260a082015181166102605260c082015181166102805260e090910151166102a05250620009d49050565b60006020835110156200030857620003008362000414565b90506200031b565b8162000315848262000893565b5060ff90505b92915050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000410576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620003cf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080829050601f815111156200044b578260405163305a27a960e01b81526004016200044291906200095f565b60405180910390fd5b80516200045882620009af565b179392505050565b82600481019282156200049a579160200282015b828111156200049a578251829064ffffffffff1690559160200191906001019062000474565b50620004a89291506200053c565b5090565b6001830191839082156200049a5791602002820160005b838211156200050357835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302620004c3565b8015620005325782816101000a81549060ff021916905560010160208160000104928301926001030262000503565b5050620004a89291505b5b80821115620004a857600081556001016200053d565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b03811182821017156200058f576200058f62000553565b60405290565b6001600160a01b0381168114620005ab57600080fd5b50565b600082601f830112620005c057600080fd5b815160206001600160401b0380831115620005df57620005df62000553565b8260051b604051601f19603f8301168101818110848211171562000607576200060762000553565b6040529384528581018301938381019250878511156200062657600080fd5b83870191505b8482101562000652578151620006428162000595565b835291830191908301906200062c565b979650505050505050565b805160ff811681146200066f57600080fd5b919050565b6000806000806000808688036101a08112156200069057600080fd5b87516001600160401b0380821115620006a857600080fd5b620006b68b838c01620005ae565b985060208a0151915080821115620006cd57600080fd5b50620006dc8a828b01620005ae565b9650506040880151620006ef8162000595565b6060890151909550620007028162000595565b6080890151909450620007158162000595565b9250610100609f1982018113156200072c57600080fd5b6200073662000569565b915060a0890151620007488162000595565b825260c0890151602083015260e089015160408301526200076b818a016200065d565b60608301525061012088015160808201526200078b61014089016200065d565b60a08201526200079f61016089016200065d565b60c0820152620007b361018089016200065d565b60e0820152809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b600060018201620007fd57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806200081957607f821691505b6020821081036200083a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200088e57600081815260208120601f850160051c81016020861015620008695750805b601f850160051c820191505b818110156200088a5782815560010162000875565b5050505b505050565b81516001600160401b03811115620008af57620008af62000553565b620008c781620008c0845462000804565b8462000840565b602080601f831160018114620008ff5760008415620008e65750858301515b600019600386901b1c1916600185901b1785556200088a565b600085815260208120601f198616915b8281101562000930578886015182559484019460019091019084016200090f565b50858210156200094f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b818110156200098e5785810183015185820160400152820162000970565b506000604082860101526040601f19601f8301168501019250505092915050565b805160208083015191908110156200083a5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a05161316e62000b50600039600081816108cf0152611b000152600081816109580152611ac301526000818161049601528181611eaf01526122f80152600081816107b00152610f450152600081816104fc01528181610a73015261111c01526000818161085b01528181610b4f015281816111d801528181611584015261188c01526000818161053001528181610a10015281816110df0152611bc60152600081816104140152611da801526000818161063e015281816112de01526117230152600081816107fa01528181610f67015281816114540152818161196701528181611c5e015261218d01526000818161077c01528181611d730152612412015260006113b401526000611389015260006125e0015260006125b8015260006125130152600061253d01526000612567015261316e6000f3fe6080604052600436106102ad5760003560e01c806380d975bf11610175578063c4b31a42116100dc578063d95b977f11610095578063eddd21431161006f578063eddd21431461097a578063f2fde38b1461098f578063facce976146109af578063feb61724146109cf57600080fd5b8063d95b977f14610911578063dfde347f14610926578063e3b9b22d1461094657600080fd5b8063c4b31a421461081c578063ce8e483014610849578063d547741f1461087d578063d5f0e6451461089d578063d60035bc146108bd578063d707dfd1146108f157600080fd5b8063a1ebf35d1161012e578063a1ebf35d14610721578063a217fddf14610755578063a32683d41461076a578063b3a196e91461079e578063baa9e531146107d2578063c4a69348146107e857600080fd5b806380d975bf1461067357806384b0196e14610693578063890bb0e0146106bb5780638da5cb5b146106d057806391d14854146106ee5780639b0986e21461070e57600080fd5b80635138ecd31161021957806369cebcf2116101d257806369cebcf2146105aa5780636f7adf67146105ca5780636fbaea1b146105f7578063715018a614610617578063741bef1a1461062c5780637649b9571461066057600080fd5b80635138ecd3146104ca5780635176e323146104ea5780635249be251461051e578063579acacc146105525780635a7dfc9b1461056857806365be4aa51461059557600080fd5b8063248a9ca31161026b578063248a9ca3146103b25780632f2ff15d146103e25780632f48ab7d1461040257806336568abe1461044e5780633db5a5241461046e5780634610fe7c1461048457600080fd5b806217dcc5146102b257806301ffc9a7146102e5578063055ad42e146103155780631885d312146103435780631c696f391461037057806320ba282d14610392575b600080fd5b3480156102be57600080fd5b506102d26102cd366004612b0c565b6109ff565b6040519081526020015b60405180910390f35b3480156102f157600080fd5b50610305610300366004612b3c565b610abd565b60405190151581526020016102dc565b34801561032157600080fd5b5060035461033690600160a01b900460ff1681565b6040516102dc9190612b7c565b34801561034f57600080fd5b506102d261035e366004612bc0565b600a6020526000908152604090205481565b34801561037c57600080fd5b5061039061038b366004612bf1565b610af2565b005b34801561039e57600080fd5b506102d26103ad366004612b0c565b610ce3565b3480156103be57600080fd5b506102d26103cd366004612cb5565b60009081526020819052604090206001015490565b3480156103ee57600080fd5b506103906103fd366004612cce565b610d5f565b34801561040e57600080fd5b506104367f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102dc565b34801561045a57600080fd5b50610390610469366004612cce565b610d89565b34801561047a57600080fd5b506102d260065481565b34801561049057600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016102dc565b3480156104d657600080fd5b506102d26104e5366004612bc0565b610e07565b3480156104f657600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506102d27f000000000000000000000000000000000000000000000000000000000000000081565b34801561055e57600080fd5b506102d260055481565b34801561057457600080fd5b506102d2610583366004612bc0565b60096020526000908152604090205481565b3480156105a157600080fd5b50610390610ee7565b3480156105b657600080fd5b506102d26105c5366004612b0c565b61104e565b3480156105d657600080fd5b506102d26105e5366004612bc0565b60076020526000908152604090205481565b34801561060357600080fd5b506102d2610612366004612b0c565b6110c8565b34801561062357600080fd5b50610390611170565b34801561063857600080fd5b506104367f000000000000000000000000000000000000000000000000000000000000000081565b61039061066e366004612cb5565b611184565b34801561067f57600080fd5b506102d261068e366004612b0c565b61126d565b34801561069f57600080fd5b506106a861137b565b6040516102dc9796959493929190612d4a565b3480156106c757600080fd5b50610390611404565b3480156106dc57600080fd5b506003546001600160a01b0316610436565b3480156106fa57600080fd5b50610305610709366004612cce565b611507565b61039061071c366004612bf1565b611530565b34801561072d57600080fd5b506102d27fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561076157600080fd5b506102d2600081565b34801561077657600080fd5b506104367f000000000000000000000000000000000000000000000000000000000000000081565b3480156107aa57600080fd5b506102d27f000000000000000000000000000000000000000000000000000000000000000081565b3480156107de57600080fd5b506102d2600b5481565b3480156107f457600080fd5b506104367f000000000000000000000000000000000000000000000000000000000000000081565b34801561082857600080fd5b506102d2610837366004612bc0565b60086020526000908152604090205481565b34801561085557600080fd5b506102d27f000000000000000000000000000000000000000000000000000000000000000081565b34801561088957600080fd5b50610390610898366004612cce565b6116f9565b3480156108a957600080fd5b506102d26108b8366004612b0c565b61171e565b3480156108c957600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000081565b3480156108fd57600080fd5b5061039061090c366004612cb5565b611838565b34801561091d57600080fd5b50610390611921565b34801561093257600080fd5b506102d2610941366004612bc0565b611a0b565b34801561095257600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000081565b34801561098657600080fd5b50610390611a69565b34801561099b57600080fd5b506103906109aa366004612bc0565b611b3d565b3480156109bb57600080fd5b506102d26109ca366004612cb5565b611bb6565b3480156109db57600080fd5b506103056109ea366004612cb5565b60046020526000908152604090205460ff1681565b600080670de0b6b3a7640000610a357f000000000000000000000000000000000000000000000000000000000000000086612df6565b610a3f9190612e0d565b90506000806064610a508382612e2f565b610a5a9085612df6565b610a649190612e0d565b90508415610ab2576064610a987f000000000000000000000000000000000000000000000000000000000000000082612e42565b610aa59060ff1683612df6565b610aaf9190612e0d565b90505b925050505b92915050565b60006001600160e01b03198216637965db0b60e01b1480610ab757506301ffc9a760e01b6001600160e01b0319831614610ab7565b600180600354600160a01b900460ff166002811115610b1357610b13612b66565b14610b395760405162461bcd60e51b8152600401610b3090612e5b565b60405180910390fd5b604051637d6674bb60e11b8152600481018590527f000000000000000000000000000000000000000000000000000000000000000090309063facce97690602401602060405180830381865afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb9190612ea8565b1015610bd95760405162461bcd60e51b8152600401610b3090612ec1565b604080517fc39426da28b92313088f1a2a66c3ece8e42469247f971fd1139b79c0885bf95d6020820152908101849052600090610c2f906060015b60405160208183030381529060405280519060200120611bf5565b90506000610c3d8285611c22565b9050610c697fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082611507565b610c855760405162461bcd60e51b8152600401610b3090612f06565b60008581526004602052604090205460ff1615610cb45760405162461bcd60e51b8152600401610b3090612f4c565b6000858152600460205260409020805460ff19166001908117909155610cdb908790611c46565b505050505050565b600080610cf1846064612df6565b604051636fbaea1b60e01b81526004810182905284151560248201529091506000903090636fbaea1b90604401602060405180830381865afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190612ea8565b600082815260208190526040902060010154610d7a81611f7d565b610d848383611f87565b505050565b6001600160a01b0381163314610df95760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b30565b610e03828261200b565b5050565b60006002600354600160a01b900460ff166002811115610e2957610e29612b66565b14610e3657506000919050565b600062015180600554600654610e4c9190612e2f565b610e569190612e0d565b6001600160a01b03841660009081526008602052604081205491925090610e7e908390612e0d565b905060006005544211610e92576000610eae565b6201518060055442610ea49190612e2f565b610eae9190612e0d565b6001600160a01b0386166000908152600a6020526040902054909150610ed48383612df6565b610ede9190612e2f565b95945050505050565b600080600354600160a01b900460ff166002811115610f0857610f08612b66565b14610f255760405162461bcd60e51b8152600401610b3090612e5b565b6000610f3081611f7d565b6040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190612ea8565b10156110445760405162461bcd60e51b815260206004820152603360248201527f4361746368546f6b656e4c61756e63687061643a204e6f7420656e6f7567682060448201527239bab838363c971029b2b732103334b939ba1760691b6064820152608401610b30565b610e036001612070565b6040516217dcc560e01b8152600481018390528115156024820152600090819030906217dcc590604401602060405180830381865afa158015611095573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b99190612ea8565b90506000610ab2606483612e0d565b600080600060646110d98382612e2f565b611103907f0000000000000000000000000000000000000000000000000000000000000000612df6565b61110d9190612e0d565b9050831561115b5760646111417f000000000000000000000000000000000000000000000000000000000000000082612e42565b61114e9060ff1683612df6565b6111589190612e0d565b90505b600081610aa587670de0b6b3a7640000612df6565b6111786120c9565b6111826000612123565b565b600180600354600160a01b900460ff1660028111156111a5576111a5612b66565b146111c25760405162461bcd60e51b8152600401610b3090612e5b565b604051637d6674bb60e11b8152600481018390527f000000000000000000000000000000000000000000000000000000000000000090309063facce97690602401602060405180830381865afa158015611220573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112449190612ea8565b10156112625760405162461bcd60e51b8152600401610b3090612ec1565b610e03826000612175565b6040516217dcc560e01b8152600481018390528115156024820152600090819030906217dcc590604401602060405180830381865afa1580156112b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d89190612ea8565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561133a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135e9190612fad565b50505091505060008183670de0b6b3a7640000610aa59190612df6565b6000606080828080836113af7f0000000000000000000000000000000000000000000000000000000000000000600161245b565b6113da7f0000000000000000000000000000000000000000000000000000000000000000600261245b565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600061140f33610e07565b336000908152600a6020526040812080549293508392909190611433908490612ffd565b909155505060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190613010565b5060408051338152602081018390527fb2d84ea6f935b15fed127c4844c9ef741d12c97e8924002d93ca92d0c044bbfc91015b60405180910390a150565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600180600354600160a01b900460ff16600281111561155157611551612b66565b1461156e5760405162461bcd60e51b8152600401610b3090612e5b565b604051637d6674bb60e11b8152600481018590527f000000000000000000000000000000000000000000000000000000000000000090309063facce97690602401602060405180830381865afa1580156115cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f09190612ea8565b101561160e5760405162461bcd60e51b8152600401610b3090612ec1565b604080517f9a206d4546afa0aa00085c8bfd09faad9350c09515019b5555ea500aef88054b602082015290810184905260009061164d90606001610c14565b9050600061165b8285611c22565b90506116877fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082611507565b6116a35760405162461bcd60e51b8152600401610b3090612f06565b60008581526004602052604090205460ff16156116d25760405162461bcd60e51b8152600401610b3090612f4c565b6000858152600460205260409020805460ff19166001908117909155610cdb908790612175565b60008281526020819052604090206001015461171481611f7d565b610d84838361200b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a39190612fad565b5050509150506000670de0b6b3a764000082866117c09190612df6565b6117ca9190612e0d565b604051636fbaea1b60e01b81526004810182905285151560248201529091506000903090636fbaea1b90604401602060405180830381865afa158015611814573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaf9190612ea8565b600180600354600160a01b900460ff16600281111561185957611859612b66565b146118765760405162461bcd60e51b8152600401610b3090612e5b565b604051637d6674bb60e11b8152600481018390527f000000000000000000000000000000000000000000000000000000000000000090309063facce97690602401602060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190612ea8565b10156119165760405162461bcd60e51b8152600401610b3090612ec1565b610e03826000611c46565b600061192c33611a0b565b33600081815260096020526040908190208390555163a9059cbb60e01b81526004810191909152602481018290529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156119b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d49190613010565b5060408051338152602081018390527ffa5eb272d14a1abca6db7cfa4ebb3aa755a76da51f81b9563105354f5a7d070891016114fc565b60006002600354600160a01b900460ff166002811115611a2d57611a2d612b66565b14611a3a57506000919050565b6001600160a01b038216600090815260096020908152604080832054600790925290912054610ab79190612e2f565b600180600354600160a01b900460ff166002811115611a8a57611a8a612b66565b14611aa75760405162461bcd60e51b8152600401610b3090612e5b565b6000611ab281611f7d565b611abc6002612070565b611aec60ff7f00000000000000000000000000000000000000000000000000000000000000001662278d00612df6565b611af69042612ffd565b600555611b2960ff7f00000000000000000000000000000000000000000000000000000000000000001662278d00612df6565b600554611b369190612ffd565b6006555050565b611b456120c9565b6001600160a01b038116611baa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b30565b611bb381612123565b50565b6000670de0b6b3a7640000611beb7f000000000000000000000000000000000000000000000000000000000000000084612df6565b610ab79190612e0d565b6000610ab7611c02612506565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000611c318585612636565b91509150611c3e8161267b565b509392505050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611cad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd19190612ea8565b9050808310611cde578092505b82600b6000828254611cf09190612ffd565b90915550506040516334e75e7960e11b815260048101849052821515602482015260009030906369cebcf290604401602060405180830381865afa158015611d3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d609190612ea8565b6040513360248201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166044830152606482018390529192506000917f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251611e01919061302d565b6000604051808303816000865af19150503d8060008114611e3e576040519150601f19603f3d011682016040523d82523d6000602084013e611e43565b606091505b5050905080611ea95760405162461bcd60e51b815260206004820152602c60248201527f4361746368546f6b656e4c61756e63687061643a20436f756c64206e6f74207460448201526b1c985b9cd9995c881d5cd91d60a21b6064820152608401610b30565b600060ff7f000000000000000000000000000000000000000000000000000000000000000016611eda606488612e0d565b611ee49190612df6565b33600090815260076020526040812080549293508392909190611f08908490612ffd565b90915550611f1890508187612e2f565b3360009081526008602052604081208054909190611f37908490612ffd565b909155505060408051338152602081018890527fc55650ccda1011e1cdc769b1fbf546ebb8c97800b6072b49e06cd560305b1d67910160405180910390a1505050505050565b611bb381336127c5565b611f918282611507565b610e03576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611fc73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6120158282611507565b15610e03576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6003805482919060ff60a01b1916600160a01b83600281111561209557612095612b66565b02179055507fa6dcc92f45df25789d5639b7a0c97ba1edf3bb1c0b5dd3376fd96a0db87c4642816040516114fc9190612b7c565b6003546001600160a01b031633146111825760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b30565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156121dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122009190612ea8565b905080831061220d578092505b6040516380d975bf60e01b815260048101849052821515602482015260009030906380d975bf90604401602060405180830381865afa158015612254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122789190612ea8565b9050803410156122da5760405162461bcd60e51b815260206004820152602760248201527f4361746368546f6b656e4c61756e63687061643a20496e73756666696369656e604482015266742076616c756560c81b6064820152608401610b30565b83600b60008282546122ec9190612ffd565b909155506000905060ff7f000000000000000000000000000000000000000000000000000000000000000016612323606487612e0d565b61232d9190612df6565b33600090815260076020526040812080549293508392909190612351908490612ffd565b9091555061236190508186612e2f565b3360009081526008602052604081208054909190612380908490612ffd565b909155505060408051338152602081018790527fc55650ccda1011e1cdc769b1fbf546ebb8c97800b6072b49e06cd560305b1d67910160405180910390a1813411156124055760006123d28334612e2f565b604051909150339082156108fc029083906000818181858888f19350505050158015612402573d6000803e3d6000fd5b50505b6040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083156108fc029084906000818181858888f19350505050158015610cdb573d6000803e3d6000fd5b606060ff83146124755761246e8361281e565b9050610ab7565b81805461248190613049565b80601f01602080910402602001604051908101604052809291908181526020018280546124ad90613049565b80156124fa5780601f106124cf576101008083540402835291602001916124fa565b820191906000526020600020905b8154815290600101906020018083116124dd57829003601f168201915b50505050509050610ab7565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561255f57507f000000000000000000000000000000000000000000000000000000000000000046145b1561258957507f000000000000000000000000000000000000000000000000000000000000000090565b612631604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b600080825160410361266c5760208301516040840151606085015160001a6126608782858561285d565b94509450505050612674565b506000905060025b9250929050565b600081600481111561268f5761268f612b66565b036126975750565b60018160048111156126ab576126ab612b66565b036126f85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b30565b600281600481111561270c5761270c612b66565b036127595760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b30565b600381600481111561276d5761276d612b66565b03611bb35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b30565b6127cf8282611507565b610e03576127dc81612921565b6127e7836020612933565b6040516020016127f8929190613083565b60408051601f198184030181529082905262461bcd60e51b8252610b30916004016130f8565b6060600061282b83612ad6565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128945750600090506003612918565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156128e8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661291157600060019250925050612918565b9150600090505b94509492505050565b6060610ab76001600160a01b03831660145b60606000612942836002612df6565b61294d906002612ffd565b67ffffffffffffffff81111561296557612965612bdb565b6040519080825280601f01601f19166020018201604052801561298f576020820181803683370190505b509050600360fc1b816000815181106129aa576129aa61310b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106129d9576129d961310b565b60200101906001600160f81b031916908160001a90535060006129fd846002612df6565b612a08906001612ffd565b90505b6001811115612a80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a3c57612a3c61310b565b1a60f81b828281518110612a5257612a5261310b565b60200101906001600160f81b031916908160001a90535060049490941c93612a7981613121565b9050612a0b565b508315612acf5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b30565b9392505050565b600060ff8216601f811115610ab757604051632cd44ac360e21b815260040160405180910390fd5b8015158114611bb357600080fd5b60008060408385031215612b1f57600080fd5b823591506020830135612b3181612afe565b809150509250929050565b600060208284031215612b4e57600080fd5b81356001600160e01b031981168114612acf57600080fd5b634e487b7160e01b600052602160045260246000fd5b6020810160038310612b9e57634e487b7160e01b600052602160045260246000fd5b91905290565b80356001600160a01b0381168114612bbb57600080fd5b919050565b600060208284031215612bd257600080fd5b612acf82612ba4565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215612c0657600080fd5b8335925060208401359150604084013567ffffffffffffffff80821115612c2c57600080fd5b818601915086601f830112612c4057600080fd5b813581811115612c5257612c52612bdb565b604051601f8201601f19908116603f01168101908382118183101715612c7a57612c7a612bdb565b81604052828152896020848701011115612c9357600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215612cc757600080fd5b5035919050565b60008060408385031215612ce157600080fd5b82359150612cf160208401612ba4565b90509250929050565b60005b83811015612d15578181015183820152602001612cfd565b50506000910152565b60008151808452612d36816020860160208601612cfa565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e081840152612d6a60e084018a612d1e565b8381036040850152612d7c818a612d1e565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612dce57835183529284019291840191600101612db2565b50909c9b505050505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ab757610ab7612de0565b600082612e2a57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610ab757610ab7612de0565b60ff8281168282160390811115610ab757610ab7612de0565b6020808252602d908201527f4361746368546f6b656e4c61756e63687061643a20556e65787065637465642060408201526c63757272656e7420706861736560981b606082015260800190565b600060208284031215612eba57600080fd5b5051919050565b60208082526025908201527f4361746368546f6b656e4c61756e63687061643a2042656c6f77206d696e20616040820152641b5bdd5b9d60da1b606082015260800190565b60208082526026908201527f4361746368546f6b656e4c61756e63687061643a20496e76616c6964207369676040820152656e617475726560d01b606082015260800190565b60208082526027908201527f4361746368546f6b656e4c61756e63687061643a204e6f6e636520616c726561604082015266191e481d5cd95960ca1b606082015260800190565b805169ffffffffffffffffffff81168114612bbb57600080fd5b600080600080600060a08688031215612fc557600080fd5b612fce86612f93565b9450602086015193506040860151925060608601519150612ff160808701612f93565b90509295509295909350565b80820180821115610ab757610ab7612de0565b60006020828403121561302257600080fd5b8151612acf81612afe565b6000825161303f818460208701612cfa565b9190910192915050565b600181811c9082168061305d57607f821691505b60208210810361307d57634e487b7160e01b600052602260045260246000fd5b50919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516130bb816017850160208801612cfa565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516130ec816028840160208801612cfa565b01602801949350505050565b602081526000612acf6020830184612d1e565b634e487b7160e01b600052603260045260246000fd5b60008161313057613130612de0565b50600019019056fea264697066735822122078f694d1b09ba2274a7c92c2c08144af69f2b1ba07ec470a9cedb15bd1f742d164736f6c6343000813003300000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000308a31a6acc3b3b36d39c6f87703e00ea06a52e20000000000000000000000000000000000000000000000000000000000895440000000000000000000000000000000000000000000000000000000011e1a300000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000ac0db698068112d000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b5c424db8827186671f9f77b112415255477c5c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b5c424db8827186671f9f77b112415255477c5c0

Deployed Bytecode

0x6080604052600436106102ad5760003560e01c806380d975bf11610175578063c4b31a42116100dc578063d95b977f11610095578063eddd21431161006f578063eddd21431461097a578063f2fde38b1461098f578063facce976146109af578063feb61724146109cf57600080fd5b8063d95b977f14610911578063dfde347f14610926578063e3b9b22d1461094657600080fd5b8063c4b31a421461081c578063ce8e483014610849578063d547741f1461087d578063d5f0e6451461089d578063d60035bc146108bd578063d707dfd1146108f157600080fd5b8063a1ebf35d1161012e578063a1ebf35d14610721578063a217fddf14610755578063a32683d41461076a578063b3a196e91461079e578063baa9e531146107d2578063c4a69348146107e857600080fd5b806380d975bf1461067357806384b0196e14610693578063890bb0e0146106bb5780638da5cb5b146106d057806391d14854146106ee5780639b0986e21461070e57600080fd5b80635138ecd31161021957806369cebcf2116101d257806369cebcf2146105aa5780636f7adf67146105ca5780636fbaea1b146105f7578063715018a614610617578063741bef1a1461062c5780637649b9571461066057600080fd5b80635138ecd3146104ca5780635176e323146104ea5780635249be251461051e578063579acacc146105525780635a7dfc9b1461056857806365be4aa51461059557600080fd5b8063248a9ca31161026b578063248a9ca3146103b25780632f2ff15d146103e25780632f48ab7d1461040257806336568abe1461044e5780633db5a5241461046e5780634610fe7c1461048457600080fd5b806217dcc5146102b257806301ffc9a7146102e5578063055ad42e146103155780631885d312146103435780631c696f391461037057806320ba282d14610392575b600080fd5b3480156102be57600080fd5b506102d26102cd366004612b0c565b6109ff565b6040519081526020015b60405180910390f35b3480156102f157600080fd5b50610305610300366004612b3c565b610abd565b60405190151581526020016102dc565b34801561032157600080fd5b5060035461033690600160a01b900460ff1681565b6040516102dc9190612b7c565b34801561034f57600080fd5b506102d261035e366004612bc0565b600a6020526000908152604090205481565b34801561037c57600080fd5b5061039061038b366004612bf1565b610af2565b005b34801561039e57600080fd5b506102d26103ad366004612b0c565b610ce3565b3480156103be57600080fd5b506102d26103cd366004612cb5565b60009081526020819052604090206001015490565b3480156103ee57600080fd5b506103906103fd366004612cce565b610d5f565b34801561040e57600080fd5b506104367f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b6040516001600160a01b0390911681526020016102dc565b34801561045a57600080fd5b50610390610469366004612cce565b610d89565b34801561047a57600080fd5b506102d260065481565b34801561049057600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000a81565b60405160ff90911681526020016102dc565b3480156104d657600080fd5b506102d26104e5366004612bc0565b610e07565b3480156104f657600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000581565b34801561052a57600080fd5b506102d27f000000000000000000000000000000000000000000000000000000000089544081565b34801561055e57600080fd5b506102d260055481565b34801561057457600080fd5b506102d2610583366004612bc0565b60096020526000908152604090205481565b3480156105a157600080fd5b50610390610ee7565b3480156105b657600080fd5b506102d26105c5366004612b0c565b61104e565b3480156105d657600080fd5b506102d26105e5366004612bc0565b60076020526000908152604090205481565b34801561060357600080fd5b506102d2610612366004612b0c565b6110c8565b34801561062357600080fd5b50610390611170565b34801561063857600080fd5b506104367f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841981565b61039061066e366004612cb5565b611184565b34801561067f57600080fd5b506102d261068e366004612b0c565b61126d565b34801561069f57600080fd5b506106a861137b565b6040516102dc9796959493929190612d4a565b3480156106c757600080fd5b50610390611404565b3480156106dc57600080fd5b506003546001600160a01b0316610436565b3480156106fa57600080fd5b50610305610709366004612cce565b611507565b61039061071c366004612bf1565b611530565b34801561072d57600080fd5b506102d27fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561076157600080fd5b506102d2600081565b34801561077657600080fd5b506104367f000000000000000000000000308a31a6acc3b3b36d39c6f87703e00ea06a52e281565b3480156107aa57600080fd5b506102d27f0000000000000000000000000000000000000000000ac0db698068112d00000081565b3480156107de57600080fd5b506102d2600b5481565b3480156107f457600080fd5b506104367f0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f81565b34801561082857600080fd5b506102d2610837366004612bc0565b60086020526000908152604090205481565b34801561085557600080fd5b506102d27f000000000000000000000000000000000000000000000000000000011e1a300081565b34801561088957600080fd5b50610390610898366004612cce565b6116f9565b3480156108a957600080fd5b506102d26108b8366004612b0c565b61171e565b3480156108c957600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000001281565b3480156108fd57600080fd5b5061039061090c366004612cb5565b611838565b34801561091d57600080fd5b50610390611921565b34801561093257600080fd5b506102d2610941366004612bc0565b611a0b565b34801561095257600080fd5b506104b87f000000000000000000000000000000000000000000000000000000000000000181565b34801561098657600080fd5b50610390611a69565b34801561099b57600080fd5b506103906109aa366004612bc0565b611b3d565b3480156109bb57600080fd5b506102d26109ca366004612cb5565b611bb6565b3480156109db57600080fd5b506103056109ea366004612cb5565b60046020526000908152604090205460ff1681565b600080670de0b6b3a7640000610a357f000000000000000000000000000000000000000000000000000000000089544086612df6565b610a3f9190612e0d565b90506000806064610a508382612e2f565b610a5a9085612df6565b610a649190612e0d565b90508415610ab2576064610a987f000000000000000000000000000000000000000000000000000000000000000582612e42565b610aa59060ff1683612df6565b610aaf9190612e0d565b90505b925050505b92915050565b60006001600160e01b03198216637965db0b60e01b1480610ab757506301ffc9a760e01b6001600160e01b0319831614610ab7565b600180600354600160a01b900460ff166002811115610b1357610b13612b66565b14610b395760405162461bcd60e51b8152600401610b3090612e5b565b60405180910390fd5b604051637d6674bb60e11b8152600481018590527f000000000000000000000000000000000000000000000000000000011e1a300090309063facce97690602401602060405180830381865afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb9190612ea8565b1015610bd95760405162461bcd60e51b8152600401610b3090612ec1565b604080517fc39426da28b92313088f1a2a66c3ece8e42469247f971fd1139b79c0885bf95d6020820152908101849052600090610c2f906060015b60405160208183030381529060405280519060200120611bf5565b90506000610c3d8285611c22565b9050610c697fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082611507565b610c855760405162461bcd60e51b8152600401610b3090612f06565b60008581526004602052604090205460ff1615610cb45760405162461bcd60e51b8152600401610b3090612f4c565b6000858152600460205260409020805460ff19166001908117909155610cdb908790611c46565b505050505050565b600080610cf1846064612df6565b604051636fbaea1b60e01b81526004810182905284151560248201529091506000903090636fbaea1b90604401602060405180830381865afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190612ea8565b600082815260208190526040902060010154610d7a81611f7d565b610d848383611f87565b505050565b6001600160a01b0381163314610df95760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b30565b610e03828261200b565b5050565b60006002600354600160a01b900460ff166002811115610e2957610e29612b66565b14610e3657506000919050565b600062015180600554600654610e4c9190612e2f565b610e569190612e0d565b6001600160a01b03841660009081526008602052604081205491925090610e7e908390612e0d565b905060006005544211610e92576000610eae565b6201518060055442610ea49190612e2f565b610eae9190612e0d565b6001600160a01b0386166000908152600a6020526040902054909150610ed48383612df6565b610ede9190612e2f565b95945050505050565b600080600354600160a01b900460ff166002811115610f0857610f08612b66565b14610f255760405162461bcd60e51b8152600401610b3090612e5b565b6000610f3081611f7d565b6040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000ac0db698068112d000000907f0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f6001600160a01b0316906370a0823190602401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190612ea8565b10156110445760405162461bcd60e51b815260206004820152603360248201527f4361746368546f6b656e4c61756e63687061643a204e6f7420656e6f7567682060448201527239bab838363c971029b2b732103334b939ba1760691b6064820152608401610b30565b610e036001612070565b6040516217dcc560e01b8152600481018390528115156024820152600090819030906217dcc590604401602060405180830381865afa158015611095573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b99190612ea8565b90506000610ab2606483612e0d565b600080600060646110d98382612e2f565b611103907f0000000000000000000000000000000000000000000000000000000000895440612df6565b61110d9190612e0d565b9050831561115b5760646111417f000000000000000000000000000000000000000000000000000000000000000582612e42565b61114e9060ff1683612df6565b6111589190612e0d565b90505b600081610aa587670de0b6b3a7640000612df6565b6111786120c9565b6111826000612123565b565b600180600354600160a01b900460ff1660028111156111a5576111a5612b66565b146111c25760405162461bcd60e51b8152600401610b3090612e5b565b604051637d6674bb60e11b8152600481018390527f000000000000000000000000000000000000000000000000000000011e1a300090309063facce97690602401602060405180830381865afa158015611220573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112449190612ea8565b10156112625760405162461bcd60e51b8152600401610b3090612ec1565b610e03826000612175565b6040516217dcc560e01b8152600481018390528115156024820152600090819030906217dcc590604401602060405180830381865afa1580156112b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d89190612ea8565b905060007f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561133a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135e9190612fad565b50505091505060008183670de0b6b3a7640000610aa59190612df6565b6000606080828080836113af7f4361746368546f6b656e4c61756e636870616400000000000000000000000013600161245b565b6113da7f3100000000000000000000000000000000000000000000000000000000000001600261245b565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600061140f33610e07565b336000908152600a6020526040812080549293508392909190611433908490612ffd565b909155505060405163a9059cbb60e01b8152336004820152602481018290527f0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f6001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190613010565b5060408051338152602081018390527fb2d84ea6f935b15fed127c4844c9ef741d12c97e8924002d93ca92d0c044bbfc91015b60405180910390a150565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600180600354600160a01b900460ff16600281111561155157611551612b66565b1461156e5760405162461bcd60e51b8152600401610b3090612e5b565b604051637d6674bb60e11b8152600481018590527f000000000000000000000000000000000000000000000000000000011e1a300090309063facce97690602401602060405180830381865afa1580156115cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f09190612ea8565b101561160e5760405162461bcd60e51b8152600401610b3090612ec1565b604080517f9a206d4546afa0aa00085c8bfd09faad9350c09515019b5555ea500aef88054b602082015290810184905260009061164d90606001610c14565b9050600061165b8285611c22565b90506116877fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082611507565b6116a35760405162461bcd60e51b8152600401610b3090612f06565b60008581526004602052604090205460ff16156116d25760405162461bcd60e51b8152600401610b3090612f4c565b6000858152600460205260409020805460ff19166001908117909155610cdb908790612175565b60008281526020819052604090206001015461171481611f7d565b610d84838361200b565b6000807f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a39190612fad565b5050509150506000670de0b6b3a764000082866117c09190612df6565b6117ca9190612e0d565b604051636fbaea1b60e01b81526004810182905285151560248201529091506000903090636fbaea1b90604401602060405180830381865afa158015611814573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaf9190612ea8565b600180600354600160a01b900460ff16600281111561185957611859612b66565b146118765760405162461bcd60e51b8152600401610b3090612e5b565b604051637d6674bb60e11b8152600481018390527f000000000000000000000000000000000000000000000000000000011e1a300090309063facce97690602401602060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190612ea8565b10156119165760405162461bcd60e51b8152600401610b3090612ec1565b610e03826000611c46565b600061192c33611a0b565b33600081815260096020526040908190208390555163a9059cbb60e01b81526004810191909152602481018290529091506001600160a01b037f0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f169063a9059cbb906044016020604051808303816000875af11580156119b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d49190613010565b5060408051338152602081018390527ffa5eb272d14a1abca6db7cfa4ebb3aa755a76da51f81b9563105354f5a7d070891016114fc565b60006002600354600160a01b900460ff166002811115611a2d57611a2d612b66565b14611a3a57506000919050565b6001600160a01b038216600090815260096020908152604080832054600790925290912054610ab79190612e2f565b600180600354600160a01b900460ff166002811115611a8a57611a8a612b66565b14611aa75760405162461bcd60e51b8152600401610b3090612e5b565b6000611ab281611f7d565b611abc6002612070565b611aec60ff7f00000000000000000000000000000000000000000000000000000000000000011662278d00612df6565b611af69042612ffd565b600555611b2960ff7f00000000000000000000000000000000000000000000000000000000000000121662278d00612df6565b600554611b369190612ffd565b6006555050565b611b456120c9565b6001600160a01b038116611baa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b30565b611bb381612123565b50565b6000670de0b6b3a7640000611beb7f000000000000000000000000000000000000000000000000000000000089544084612df6565b610ab79190612e0d565b6000610ab7611c02612506565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000611c318585612636565b91509150611c3e8161267b565b509392505050565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f6001600160a01b0316906370a0823190602401602060405180830381865afa158015611cad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd19190612ea8565b9050808310611cde578092505b82600b6000828254611cf09190612ffd565b90915550506040516334e75e7960e11b815260048101849052821515602482015260009030906369cebcf290604401602060405180830381865afa158015611d3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d609190612ea8565b6040513360248201526001600160a01b037f000000000000000000000000308a31a6acc3b3b36d39c6f87703e00ea06a52e281166044830152606482018390529192506000917f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251611e01919061302d565b6000604051808303816000865af19150503d8060008114611e3e576040519150601f19603f3d011682016040523d82523d6000602084013e611e43565b606091505b5050905080611ea95760405162461bcd60e51b815260206004820152602c60248201527f4361746368546f6b656e4c61756e63687061643a20436f756c64206e6f74207460448201526b1c985b9cd9995c881d5cd91d60a21b6064820152608401610b30565b600060ff7f000000000000000000000000000000000000000000000000000000000000000a16611eda606488612e0d565b611ee49190612df6565b33600090815260076020526040812080549293508392909190611f08908490612ffd565b90915550611f1890508187612e2f565b3360009081526008602052604081208054909190611f37908490612ffd565b909155505060408051338152602081018890527fc55650ccda1011e1cdc769b1fbf546ebb8c97800b6072b49e06cd560305b1d67910160405180910390a1505050505050565b611bb381336127c5565b611f918282611507565b610e03576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611fc73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6120158282611507565b15610e03576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6003805482919060ff60a01b1916600160a01b83600281111561209557612095612b66565b02179055507fa6dcc92f45df25789d5639b7a0c97ba1edf3bb1c0b5dd3376fd96a0db87c4642816040516114fc9190612b7c565b6003546001600160a01b031633146111825760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b30565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f6001600160a01b0316906370a0823190602401602060405180830381865afa1580156121dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122009190612ea8565b905080831061220d578092505b6040516380d975bf60e01b815260048101849052821515602482015260009030906380d975bf90604401602060405180830381865afa158015612254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122789190612ea8565b9050803410156122da5760405162461bcd60e51b815260206004820152602760248201527f4361746368546f6b656e4c61756e63687061643a20496e73756666696369656e604482015266742076616c756560c81b6064820152608401610b30565b83600b60008282546122ec9190612ffd565b909155506000905060ff7f000000000000000000000000000000000000000000000000000000000000000a16612323606487612e0d565b61232d9190612df6565b33600090815260076020526040812080549293508392909190612351908490612ffd565b9091555061236190508186612e2f565b3360009081526008602052604081208054909190612380908490612ffd565b909155505060408051338152602081018790527fc55650ccda1011e1cdc769b1fbf546ebb8c97800b6072b49e06cd560305b1d67910160405180910390a1813411156124055760006123d28334612e2f565b604051909150339082156108fc029083906000818181858888f19350505050158015612402573d6000803e3d6000fd5b50505b6040516001600160a01b037f000000000000000000000000308a31a6acc3b3b36d39c6f87703e00ea06a52e2169083156108fc029084906000818181858888f19350505050158015610cdb573d6000803e3d6000fd5b606060ff83146124755761246e8361281e565b9050610ab7565b81805461248190613049565b80601f01602080910402602001604051908101604052809291908181526020018280546124ad90613049565b80156124fa5780601f106124cf576101008083540402835291602001916124fa565b820191906000526020600020905b8154815290600101906020018083116124dd57829003601f168201915b50505050509050610ab7565b6000306001600160a01b037f000000000000000000000000f1177d2e783b80a75951ea221f591e6d798a50c71614801561255f57507f000000000000000000000000000000000000000000000000000000000000000146145b1561258957507f078b0f8b6efe101afd261cadc52864c1abdc8ab5ff04e277f91662de64edc8e690565b612631604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f86bdd3d4bf7c094041af4d120a96a7145673ad007f4e994a7cf268395bdcb555918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b600080825160410361266c5760208301516040840151606085015160001a6126608782858561285d565b94509450505050612674565b506000905060025b9250929050565b600081600481111561268f5761268f612b66565b036126975750565b60018160048111156126ab576126ab612b66565b036126f85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b30565b600281600481111561270c5761270c612b66565b036127595760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b30565b600381600481111561276d5761276d612b66565b03611bb35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b30565b6127cf8282611507565b610e03576127dc81612921565b6127e7836020612933565b6040516020016127f8929190613083565b60408051601f198184030181529082905262461bcd60e51b8252610b30916004016130f8565b6060600061282b83612ad6565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128945750600090506003612918565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156128e8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661291157600060019250925050612918565b9150600090505b94509492505050565b6060610ab76001600160a01b03831660145b60606000612942836002612df6565b61294d906002612ffd565b67ffffffffffffffff81111561296557612965612bdb565b6040519080825280601f01601f19166020018201604052801561298f576020820181803683370190505b509050600360fc1b816000815181106129aa576129aa61310b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106129d9576129d961310b565b60200101906001600160f81b031916908160001a90535060006129fd846002612df6565b612a08906001612ffd565b90505b6001811115612a80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a3c57612a3c61310b565b1a60f81b828281518110612a5257612a5261310b565b60200101906001600160f81b031916908160001a90535060049490941c93612a7981613121565b9050612a0b565b508315612acf5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b30565b9392505050565b600060ff8216601f811115610ab757604051632cd44ac360e21b815260040160405180910390fd5b8015158114611bb357600080fd5b60008060408385031215612b1f57600080fd5b823591506020830135612b3181612afe565b809150509250929050565b600060208284031215612b4e57600080fd5b81356001600160e01b031981168114612acf57600080fd5b634e487b7160e01b600052602160045260246000fd5b6020810160038310612b9e57634e487b7160e01b600052602160045260246000fd5b91905290565b80356001600160a01b0381168114612bbb57600080fd5b919050565b600060208284031215612bd257600080fd5b612acf82612ba4565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215612c0657600080fd5b8335925060208401359150604084013567ffffffffffffffff80821115612c2c57600080fd5b818601915086601f830112612c4057600080fd5b813581811115612c5257612c52612bdb565b604051601f8201601f19908116603f01168101908382118183101715612c7a57612c7a612bdb565b81604052828152896020848701011115612c9357600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215612cc757600080fd5b5035919050565b60008060408385031215612ce157600080fd5b82359150612cf160208401612ba4565b90509250929050565b60005b83811015612d15578181015183820152602001612cfd565b50506000910152565b60008151808452612d36816020860160208601612cfa565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e081840152612d6a60e084018a612d1e565b8381036040850152612d7c818a612d1e565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612dce57835183529284019291840191600101612db2565b50909c9b505050505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ab757610ab7612de0565b600082612e2a57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610ab757610ab7612de0565b60ff8281168282160390811115610ab757610ab7612de0565b6020808252602d908201527f4361746368546f6b656e4c61756e63687061643a20556e65787065637465642060408201526c63757272656e7420706861736560981b606082015260800190565b600060208284031215612eba57600080fd5b5051919050565b60208082526025908201527f4361746368546f6b656e4c61756e63687061643a2042656c6f77206d696e20616040820152641b5bdd5b9d60da1b606082015260800190565b60208082526026908201527f4361746368546f6b656e4c61756e63687061643a20496e76616c6964207369676040820152656e617475726560d01b606082015260800190565b60208082526027908201527f4361746368546f6b656e4c61756e63687061643a204e6f6e636520616c726561604082015266191e481d5cd95960ca1b606082015260800190565b805169ffffffffffffffffffff81168114612bbb57600080fd5b600080600080600060a08688031215612fc557600080fd5b612fce86612f93565b9450602086015193506040860151925060608601519150612ff160808701612f93565b90509295509295909350565b80820180821115610ab757610ab7612de0565b60006020828403121561302257600080fd5b8151612acf81612afe565b6000825161303f818460208701612cfa565b9190910192915050565b600181811c9082168061305d57607f821691505b60208210810361307d57634e487b7160e01b600052602260045260246000fd5b50919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516130bb816017850160208801612cfa565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516130ec816028840160208801612cfa565b01602801949350505050565b602081526000612acf6020830184612d1e565b634e487b7160e01b600052603260045260246000fd5b60008161313057613130612de0565b50600019019056fea264697066735822122078f694d1b09ba2274a7c92c2c08144af69f2b1ba07ec470a9cedb15bd1f742d164736f6c63430008130033

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

00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000308a31a6acc3b3b36d39c6f87703e00ea06a52e20000000000000000000000000000000000000000000000000000000000895440000000000000000000000000000000000000000000000000000000011e1a300000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000ac0db698068112d000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b5c424db8827186671f9f77b112415255477c5c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b5c424db8827186671f9f77b112415255477c5c0

-----Decoded View---------------
Arg [0] : admins (address[]): 0xB5C424db8827186671f9f77B112415255477c5C0
Arg [1] : signers (address[]): 0xB5C424db8827186671f9f77B112415255477c5C0
Arg [2] : _catchToken (address): 0x7B708Ac2c20200Ac4b241d5523C76691B96cA01f
Arg [3] : _priceFeed (address): 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
Arg [4] : _usdt (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [5] : presaleParams (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [2] : 0000000000000000000000007b708ac2c20200ac4b241d5523c76691b96ca01f
Arg [3] : 0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419
Arg [4] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [5] : 000000000000000000000000308a31a6acc3b3b36d39c6f87703e00ea06a52e2
Arg [6] : 0000000000000000000000000000000000000000000000000000000000895440
Arg [7] : 000000000000000000000000000000000000000000000000000000011e1a3000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [9] : 0000000000000000000000000000000000000000000ac0db698068112d000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [14] : 000000000000000000000000b5c424db8827186671f9f77b112415255477c5c0
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [16] : 000000000000000000000000b5c424db8827186671f9f77b112415255477c5c0


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.