Goerli Testnet

Contract

0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9
Transaction Hash
Method
Block
From
To
Value
Stake96836462023-09-12 20:08:24171 days ago1694549304IN
0x78b2d65d...a101EC2B9
0 ETH0.001318372.50000001
Unstake96836432023-09-12 20:07:36171 days ago1694549256IN
0x78b2d65d...a101EC2B9
0 ETH0.000704132.50000001
Stake96836062023-09-12 19:58:36171 days ago1694548716IN
0x78b2d65d...a101EC2B9
0 ETH0.001318372.50000001
Unstake96835942023-09-12 19:55:36171 days ago1694548536IN
0x78b2d65d...a101EC2B9
0 ETH0.000704132.50000001
Stake96835332023-09-12 19:41:12171 days ago1694547672IN
0x78b2d65d...a101EC2B9
0 ETH0.001399772.50000001
Flash Stake94865482023-08-09 3:46:24206 days ago1691552784IN
0x78b2d65d...a101EC2B9
0 ETH0.000964031.5000106
Stake92166182023-06-21 17:09:12254 days ago1687367352IN
0x78b2d65d...a101EC2B9
0 ETH0.001313962.50014979
Issue NFT91773452023-06-14 12:34:00261 days ago1686746040IN
0x78b2d65d...a101EC2B9
0 ETH0.000335142.59469997
Issue NFT91771602023-06-14 11:45:24261 days ago1686743124IN
0x78b2d65d...a101EC2B9
0 ETH0.000333372.58101525
Issue NFT91679492023-06-12 20:08:24263 days ago1686600504IN
0x78b2d65d...a101EC2B9
0 ETH0.000271672.1033095
Issue NFT91486212023-06-09 9:28:48266 days ago1686302928IN
0x78b2d65d...a101EC2B9
0 ETH0.000129161.00000019
Stake91108502023-06-02 20:34:00273 days ago1685738040IN
0x78b2d65d...a101EC2B9
0 ETH0.004895929.20045368
Stake91108142023-06-02 20:25:12273 days ago1685737512IN
0x78b2d65d...a101EC2B9
0 ETH0.004535158.52269521
Issue NFT91106932023-06-02 19:54:48273 days ago1685735688IN
0x78b2d65d...a101EC2B9
0 ETH0.00033532.59593451
Issue NFT90907882023-05-30 10:33:36276 days ago1685442816IN
0x78b2d65d...a101EC2B9
0 ETH0.000322912.50000044
Issue NFT90859862023-05-29 15:31:48277 days ago1685374308IN
0x78b2d65d...a101EC2B9
0 ETH0.0014843611.49210006
Issue NFT90843442023-05-29 9:02:36277 days ago1685350956IN
0x78b2d65d...a101EC2B9
0 ETH0.000323032.50094507
Issue NFT90842692023-05-29 8:44:48277 days ago1685349888IN
0x78b2d65d...a101EC2B9
0 ETH0.000322952.50031156
Set Mint Fee Inf...90614932023-05-25 13:11:24281 days ago1685020284IN
0x78b2d65d...a101EC2B9
0 ETH0.0012888544.11913611
Set Mint Fee Inf...88571142023-04-19 19:27:48317 days ago1681932468IN
0x78b2d65d...a101EC2B9
0 ETH0.0004552515.59055496
Set Mint Fee Inf...88513862023-04-18 17:29:24318 days ago1681838964IN
0x78b2d65d...a101EC2B9
0 ETH0.0012520742.8603025
Unstake87721522023-04-04 11:30:24332 days ago1680607824IN
0x78b2d65d...a101EC2B9
0 ETH0.01203629102.49848141
Unstake87103842023-03-24 14:12:00343 days ago1679667120IN
0x78b2d65d...a101EC2B9
0 ETH0.01715587146.09572013
Stake86157792023-03-08 0:18:48360 days ago1678234728IN
0x78b2d65d...a101EC2B9
0 ETH0.00049041.0917446
Unstake85354982023-02-22 8:54:00373 days ago1677056040IN
0x78b2d65d...a101EC2B9
0 ETH0.012333845.55338647
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
96836632023-09-12 20:12:36171 days ago1694549556
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836462023-09-12 20:08:24171 days ago1694549304
0x78b2d65d...a101EC2B9
0 ETH
96836432023-09-12 20:07:36171 days ago1694549256
0x78b2d65d...a101EC2B9
0 ETH
96836432023-09-12 20:07:36171 days ago1694549256
0x78b2d65d...a101EC2B9
0 ETH
96836432023-09-12 20:07:36171 days ago1694549256
0x78b2d65d...a101EC2B9
0 ETH
96836332023-09-12 20:05:24171 days ago1694549124
0x78b2d65d...a101EC2B9
0 ETH
96836332023-09-12 20:05:24171 days ago1694549124
0x78b2d65d...a101EC2B9
0 ETH
96836142023-09-12 20:01:00171 days ago1694548860
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96836062023-09-12 19:58:36171 days ago1694548716
0x78b2d65d...a101EC2B9
0 ETH
96835942023-09-12 19:55:36171 days ago1694548536
0x78b2d65d...a101EC2B9
0 ETH
96835942023-09-12 19:55:36171 days ago1694548536
0x78b2d65d...a101EC2B9
0 ETH
96835942023-09-12 19:55:36171 days ago1694548536
0x78b2d65d...a101EC2B9
0 ETH
96835882023-09-12 19:54:00171 days ago1694548440
0x78b2d65d...a101EC2B9
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FlashProtocol

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : FlashProtocol.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IFlashStrategy.sol";
import "./interfaces/IFlashFToken.sol";
import "./interfaces/IFlashNFT.sol";
import "./interfaces/IFlashFTokenFactory.sol";

contract FlashProtocol is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    address public immutable flashNFTAddress;
    address immutable flashFTokenFactoryAddress;

    // Define the structure for each strategy
    struct StrategyInformation {
        address fTokenAddress;
        address principalTokenAddress;
    }
    mapping(address => StrategyInformation) strategies;

    // This will store the NFT ID to StakeID mapping
    mapping(uint256 => uint256) nftIdMappingsToStakeIds;

    // This will store how many stakes we have
    uint256 stakeCount = 0;

    // The global fToken mint fee
    uint96 globalMintFee = 0;
    address globalMintFeeRecipient = 0x5089722613C2cCEe071C39C59e9889641f435F15;

    // This defines the structure of the Stake information we store
    struct StakeStruct {
        address stakerAddress; // Address of staker
        address strategyAddress; // Address of strategy being used
        uint256 stakeStartTs; // Unix timestamp of when stake started
        uint256 stakeDuration; // Time in seconds from start time until stake ends
        uint256 stakedAmount; // The amount of tokens staked
        bool active; // Stake has been removed/unstaked
        uint256 nftId; // NFT id if set
        uint256 fTokensToUser; // How many fERC20 tokens were minted
        uint256 fTokensFee; // How many fERC20 tokens were taken as fee
        uint256 totalFTokenBurned;
        uint256 totalStakedWithdrawn;
    }
    mapping(uint256 => StakeStruct) stakes;

    // Define events
    event StrategyRegistered(
        address indexed _strategyAddress,
        address indexed _principalTokenAddress,
        address indexed _fTokenAddress
    );
    event Staked(uint256 _stakeId);
    event Unstaked(uint256 _stakeId, uint256 _tokensReturned, uint256 _fTokensBurned, bool _stakeFinished);
    event NFTIssued(uint256 _stakeId, uint256 nftId);

    constructor(address _flashNFTAddress, address _flashFTokenFactoryAddress) public {
        flashNFTAddress = _flashNFTAddress;
        flashFTokenFactoryAddress = _flashFTokenFactoryAddress;
    }

    function registerStrategy(
        address _strategyAddress,
        address _principalTokenAddress,
        string calldata _fTokenName,
        string calldata _fTokenSymbol
    ) external {
        require(
            strategies[_strategyAddress].principalTokenAddress == address(0) &&
                _strategyAddress != address(0) &&
                _principalTokenAddress != address(0)
        );

        address flashFToken = IFlashFTokenFactory(flashFTokenFactoryAddress).createFToken(_fTokenName, _fTokenSymbol);

        // Store the appropriate information
        strategies[_strategyAddress].fTokenAddress = flashFToken;
        strategies[_strategyAddress].principalTokenAddress = _principalTokenAddress;

        IFlashStrategy(_strategyAddress).setFTokenAddress(flashFToken);

        emit StrategyRegistered(_strategyAddress, _principalTokenAddress, flashFToken);
    }

    function stake(
        address _strategyAddress,
        uint256 _tokenAmount,
        uint256 _stakeDuration,
        address _fTokensTo,
        bool _issueNFT
    ) public nonReentrant returns (StakeStruct memory _stake) {
        require(strategies[_strategyAddress].principalTokenAddress != address(0));
        require(
            _stakeDuration >= 60 && _stakeDuration <= IFlashStrategy(_strategyAddress).getMaxStakeDuration(),
            "ISD"
        );

        // Transfer the tokens from caller to the strategy contract
        IERC20(strategies[_strategyAddress].principalTokenAddress).safeTransferFrom(
            msg.sender,
            address(_strategyAddress),
            _tokenAmount
        );

        // Determine how many fERC20 tokens to mint (ask strategy)
        uint256 tokensToMint = IFlashStrategy(_strategyAddress).quoteMintFToken(_tokenAmount, _stakeDuration);

        // Deposit into the strategy
        uint256 principalAfterDeductions = IFlashStrategy(_strategyAddress).depositPrincipal(_tokenAmount);

        // Calculate fee and if this is more than 0, transfer fee
        uint256 fee = (tokensToMint * globalMintFee) / 10000;
        if (fee > 0) {
            IFlashFToken(strategies[_strategyAddress].fTokenAddress).mint(globalMintFeeRecipient, fee);
        }

        // Mint fERC20 tokens to the user
        IFlashFToken(strategies[_strategyAddress].fTokenAddress).mint(_fTokensTo, (tokensToMint - fee));

        // Save the stake details
        stakeCount = stakeCount + 1;
        stakes[stakeCount] = StakeStruct(
            msg.sender,
            _strategyAddress,
            block.timestamp,
            _stakeDuration,
            principalAfterDeductions,
            true,
            0,
            (tokensToMint - fee),
            fee,
            0,
            0
        );

        // Mint NFT if requested
        if (_issueNFT) {
            issueNFT(stakeCount);
        }

        emit Staked(stakeCount);

        return stakes[stakeCount];
    }

    function unstake(
        uint256 _id,
        bool _isNFT,
        uint256 _fTokenToBurn
    ) external nonReentrant returns (uint256 _principalReturned, uint256 _fTokensBurned) {
        StakeStruct memory p;
        uint256 stakeId;
        address returnAddress;
        if (_isNFT) {
            stakeId = nftIdMappingsToStakeIds[_id];
            p = stakes[stakeId];
            returnAddress = msg.sender;
            require(p.nftId == _id, "SNM");
            require(IFlashNFT(flashNFTAddress).ownerOf(_id) == msg.sender, "NNO");
        } else {
            stakeId = _id;
            p = stakes[stakeId];
            returnAddress = p.stakerAddress;

            require(p.nftId == 0, "NTR");
            require(p.stakerAddress == msg.sender, "NSO");
        }
        require(p.active == true, "SNE");

        bool stakeFinished;
        uint256 principalToReturn;
        uint256 percentageIntoStake = (((block.timestamp - p.stakeStartTs) * (10**18)) / p.stakeDuration);

        if (percentageIntoStake >= (10**18)) {
            // Stake has ended, simply return principal
            principalToReturn = p.stakedAmount - p.totalStakedWithdrawn;
            _fTokenToBurn = 0;

            stakeFinished = true;
        } else {
            require(block.timestamp >= (p.stakeStartTs + 3600), "MIN DUR 1HR");

            // Stake has not ended yet, user is trying to withdraw early
            uint256 fTokenBurnForFullUnstake = ((((10**18) - percentageIntoStake) * (p.fTokensToUser + p.fTokensFee)) /
                (10**18));

            if (p.totalFTokenBurned > fTokenBurnForFullUnstake) {
                // The total number of fTokens burned is greater than the amount required, no burn required
                fTokenBurnForFullUnstake = 0;
            } else {
                fTokenBurnForFullUnstake = fTokenBurnForFullUnstake - p.totalFTokenBurned;
            }

            // Ensure the user cannot burn more fTokens than required
            if (_fTokenToBurn > fTokenBurnForFullUnstake) {
                _fTokenToBurn = fTokenBurnForFullUnstake;
            }

            // Is the user trying to withdraw everything early?
            if (_fTokenToBurn == fTokenBurnForFullUnstake) {
                // Yes, return all principal
                principalToReturn = p.stakedAmount - p.totalStakedWithdrawn;
                stakeFinished = true;
            } else {
                // No - only a partial withdraw
                principalToReturn =
                    (((_fTokenToBurn * (10**18)) / (p.fTokensToUser + p.fTokensFee)) * p.stakedAmount) /
                    (10**18);
            }

            // Burn these fTokens
            IFlashFToken(strategies[p.strategyAddress].fTokenAddress).burnFrom(msg.sender, _fTokenToBurn);

            // Update stake information
            stakes[stakeId].totalFTokenBurned = p.totalFTokenBurned + _fTokenToBurn;
            stakes[stakeId].totalStakedWithdrawn = p.totalStakedWithdrawn + principalToReturn;
        }
        require(principalToReturn > 0);
        require(p.stakedAmount >= stakes[stakeId].totalStakedWithdrawn);

        // if the stake is finished, delete all data related to it (nice to have)
        if (stakeFinished) {
            delete stakes[stakeId];
        }
        // if the stake finished and it was NFT based, remove the mapping (nice to have)
        if (stakeFinished && _isNFT) {
            delete nftIdMappingsToStakeIds[_id];
        }
        emit Unstaked(stakeId, principalToReturn, _fTokenToBurn, stakeFinished);

        // Remove tokens from Strategy and transfer to user
        IFlashStrategy(p.strategyAddress).withdrawPrincipal(principalToReturn);
        IERC20(strategies[p.strategyAddress].principalTokenAddress).safeTransfer(returnAddress, principalToReturn);

        return (principalToReturn, _fTokenToBurn);
    }

    function issueNFT(uint256 _stakeId) public returns (uint256 _nftId) {
        StakeStruct memory p = stakes[_stakeId];
        require(p.active == true && p.nftId == 0 && p.stakerAddress == msg.sender);

        // Mint the NFT
        uint256 nftId = IFlashNFT(flashNFTAddress).mint(msg.sender);

        // Store the NFT ID
        stakes[_stakeId].nftId = nftId;

        // Update the NFT Mapping so we can look it up later
        nftIdMappingsToStakeIds[nftId] = _stakeId;

        emit NFTIssued(_stakeId, nftId);

        return nftId;
    }

    function setMintFeeInfo(address _feeRecipient, uint96 _feePercentageBasis) external onlyOwner {
        require(_feePercentageBasis <= 2000);
        globalMintFeeRecipient = _feeRecipient;
        globalMintFee = _feePercentageBasis;
    }

    function getStakeInfo(uint256 _id, bool _isNFT) external view returns (StakeStruct memory _stake) {
        uint256 stakeId;
        if (_isNFT) {
            stakeId = nftIdMappingsToStakeIds[_id];
            require(stakes[stakeId].nftId == _id);
        } else {
            stakeId = _id;
        }

        return stakes[stakeId];
    }

    function flashStake(
        address _strategyAddress,
        uint256 _tokenAmount,
        uint256 _stakeDuration,
        uint256 _minimumReceived,
        address _yieldTo,
        bool _mintNFT
    ) external {
        // Stake (re-direct fTokens to this contract)
        uint256 fTokensToUser = stake(_strategyAddress, _tokenAmount, _stakeDuration, address(this), _mintNFT)
            .fTokensToUser;

        IERC20 fToken = IERC20(strategies[_strategyAddress].fTokenAddress);

        // Approve, burn and send yield to specified address
        fToken.approve(_strategyAddress, fTokensToUser);
        IFlashStrategy(_strategyAddress).burnFToken(fTokensToUser, _minimumReceived, _yieldTo);
    }
}

File 2 of 12 : IFlashFToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IFlashFToken {
    function mint(address account, uint256 amount) external;

    function burnFrom(address from, uint256 amount) external;

    function decimals() external returns (uint8);
}

File 3 of 12 : IFlashStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IFlashStrategy {
    event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned);

    // This is how principal will be deposited into the contract
    // The Flash protocol allows the strategy to specify how much
    // should be registered. This allows the strategy to manipulate (eg take fee)
    // on the principal if the strategy requires
    function depositPrincipal(uint256 _tokenAmount) external returns (uint256);

    // This is how principal will be returned from the contract
    function withdrawPrincipal(uint256 _tokenAmount) external;

    // Responsible for instant upfront yield. Takes fERC20 tokens specific to this
    // strategy. The strategy is responsible for returning some amount of principal tokens
    function burnFToken(
        uint256 _tokenAmount,
        uint256 _minimumReturned,
        address _yieldTo
    ) external returns (uint256);

    // This should return the current total of all principal within the contract
    function getPrincipalBalance() external view returns (uint256);

    // This should return the current total of all yield generated to date (including bootstrapped tokens)
    function getYieldBalance() external view returns (uint256);

    // This should return the principal token address (eg DAI)
    function getPrincipalAddress() external view returns (address);

    // View function which quotes how many principal tokens would be returned if x
    // fERC20 tokens are burned
    function quoteMintFToken(uint256 _tokenAmount, uint256 duration) external view returns (uint256);

    // View function which quotes how many principal tokens would be returned if x
    // fERC20 tokens are burned
    // IMPORTANT NOTE: This should utilise bootstrap tokens if they exist
    // bootstrapped tokens are any principal tokens that exist within the smart contract
    function quoteBurnFToken(uint256 _tokenAmount) external view returns (uint256);

    // The function to set the fERC20 address within the strategy
    function setFTokenAddress(address _fTokenAddress) external;

    // This should return what the maximum stake duration is
    function getMaxStakeDuration() external view returns (uint256);
}

File 4 of 12 : IFlashNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IFlashNFT {
    function mint(address _recipientAddress) external returns (uint256);

    function burn(uint256 _tokenId) external returns (bool);

    function ownerOf(uint256 tokenId) external view returns (address);
}

File 5 of 12 : IFlashFTokenFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IFlashFTokenFactory {
    function createFToken(string calldata _fTokenName, string calldata _fTokenSymbol) external returns (address);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 8 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 9 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 12 : 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 11 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 12 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_flashNFTAddress","type":"address"},{"internalType":"address","name":"_flashFTokenFactoryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_stakeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"NFTIssued","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":"uint256","name":"_stakeId","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_strategyAddress","type":"address"},{"indexed":true,"internalType":"address","name":"_principalTokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"_fTokenAddress","type":"address"}],"name":"StrategyRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_stakeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokensReturned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fTokensBurned","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_stakeFinished","type":"bool"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"flashNFTAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategyAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_stakeDuration","type":"uint256"},{"internalType":"uint256","name":"_minimumReceived","type":"uint256"},{"internalType":"address","name":"_yieldTo","type":"address"},{"internalType":"bool","name":"_mintNFT","type":"bool"}],"name":"flashStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_isNFT","type":"bool"}],"name":"getStakeInfo","outputs":[{"components":[{"internalType":"address","name":"stakerAddress","type":"address"},{"internalType":"address","name":"strategyAddress","type":"address"},{"internalType":"uint256","name":"stakeStartTs","type":"uint256"},{"internalType":"uint256","name":"stakeDuration","type":"uint256"},{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"uint256","name":"fTokensToUser","type":"uint256"},{"internalType":"uint256","name":"fTokensFee","type":"uint256"},{"internalType":"uint256","name":"totalFTokenBurned","type":"uint256"},{"internalType":"uint256","name":"totalStakedWithdrawn","type":"uint256"}],"internalType":"struct FlashProtocol.StakeStruct","name":"_stake","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakeId","type":"uint256"}],"name":"issueNFT","outputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategyAddress","type":"address"},{"internalType":"address","name":"_principalTokenAddress","type":"address"},{"internalType":"string","name":"_fTokenName","type":"string"},{"internalType":"string","name":"_fTokenSymbol","type":"string"}],"name":"registerStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"uint96","name":"_feePercentageBasis","type":"uint96"}],"name":"setMintFeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategyAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_stakeDuration","type":"uint256"},{"internalType":"address","name":"_fTokensTo","type":"address"},{"internalType":"bool","name":"_issueNFT","type":"bool"}],"name":"stake","outputs":[{"components":[{"internalType":"address","name":"stakerAddress","type":"address"},{"internalType":"address","name":"strategyAddress","type":"address"},{"internalType":"uint256","name":"stakeStartTs","type":"uint256"},{"internalType":"uint256","name":"stakeDuration","type":"uint256"},{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"uint256","name":"fTokensToUser","type":"uint256"},{"internalType":"uint256","name":"fTokensFee","type":"uint256"},{"internalType":"uint256","name":"totalFTokenBurned","type":"uint256"},{"internalType":"uint256","name":"totalStakedWithdrawn","type":"uint256"}],"internalType":"struct FlashProtocol.StakeStruct","name":"_stake","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_isNFT","type":"bool"},{"internalType":"uint256","name":"_fTokenToBurn","type":"uint256"}],"name":"unstake","outputs":[{"internalType":"uint256","name":"_principalReturned","type":"uint256"},{"internalType":"uint256","name":"_fTokensBurned","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60c060405260006004557f5089722613c2ccee071c39c59e9889641f435f150000000000000000000000006005553480156200003a57600080fd5b50604051620021fc380380620021fc8339810160408190526200005d91620000f1565b620000683362000084565b600180556001600160a01b039182166080521660a05262000129565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000ec57600080fd5b919050565b600080604083850312156200010557600080fd5b6200011083620000d4565b91506200012060208401620000d4565b90509250929050565b60805160a05161209f6200015d60003960006102c101526000818161018f0152818161051a01526110cc015261209f6000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063570587cf11610081578063715018a61161005b578063715018a6146101c95780638da5cb5b146101d1578063f2fde38b146101e257600080fd5b8063570587cf1461014f5780635b64f391146101625780636ba1c61c1461018a57600080fd5b806310b7e794116100b257806310b7e794146100f657806341614f001461011c578063436045171461013c57600080fd5b806308d3f998146100ce5780630bdb00d4146100e3575b600080fd5b6100e16100dc366004611bc2565b6101f5565b005b6100e16100f1366004611c55565b610257565b610109610104366004611cea565b610437565b6040519081526020015b60405180910390f35b61012f61012a366004611d11565b610603565b6040516101139190611d36565b61012f61014a366004611dd3565b610751565b6100e161015d366004611e32565b610db0565b610175610170366004611e99565b610ef2565b60408051928352602083019190915201610113565b6101b17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610113565b6100e161170d565b6000546001600160a01b03166101b1565b6100e16101f0366004611ed1565b611721565b6101fd6117b1565b6107d0816bffffffffffffffffffffffff16111561021a57600080fd5b6bffffffffffffffffffffffff166001600160a01b039091166c01000000000000000000000000026bffffffffffffffffffffffff191617600555565b6001600160a01b038681166000908152600260205260409020600101541615801561028a57506001600160a01b03861615155b801561029e57506001600160a01b03851615155b6102a757600080fd5b60405163182a775760e11b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633054eeae906102fc908890889088908890600401611f17565b602060405180830381600087803b15801561031657600080fd5b505af115801561032a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034e9190611f3e565b6001600160a01b038881166000818152600260205260409081902080546001600160a01b0319908116868616908117835560019092018054909116948c16949094179093555163e68c84cb60e01b8152600481019290925291925063e68c84cb90602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b50505050806001600160a01b0316866001600160a01b0316886001600160a01b03167fc775f148b1505cf5c3c3158b3bd09e79026cae37c17f0851eff0cac3a39027fb60405160405180910390a450505050505050565b600081815260066020818152604080842081516101608101835281546001600160a01b039081168252600180840154909116948201949094526002820154928101929092526003810154606083015260048101546080830152600581015460ff16151560a083018190529381015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a0154610140820152911480156104e4575060c0810151155b80156104f9575080516001600160a01b031633145b61050257600080fd5b6040516335313c2160e11b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636a62784290602401602060405180830381600087803b15801561056657600080fd5b505af115801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190611f5b565b6000858152600660208181526040808420909201849055838352600381529181902087905580518781529182018390529192507faca8712d748b9083cefccea89348bfc648176370ecc0c882ab01b686203abbcd910160405180910390a19392505050565b61067460405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b600082156106ac57506000838152600360209081526040808320548084526006928390529220015484146106a757600080fd5b6106af565b50825b60009081526006602081815260409283902083516101608101855281546001600160a01b039081168252600183015416928101929092526002810154938201939093526003830154606082015260048301546080820152600583015460ff16151560a08201529082015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a909101546101408201529392505050565b6107c260405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6002600154141561081a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260018181556001600160a01b038881166000908152602093909352604090922001541661084857600080fd5b603c84101580156108c95750856001600160a01b031663769729996040518163ffffffff1660e01b815260040160206040518083038186803b15801561088d57600080fd5b505afa1580156108a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c59190611f5b565b8411155b6108fb5760405162461bcd60e51b81526020600482015260036024820152621254d160ea1b6044820152606401610811565b6001600160a01b03808716600090815260026020526040902060010154610925911633888861180b565b6040516307b027af60e41b815260048101869052602481018590526000906001600160a01b03881690637b027af09060440160206040518083038186803b15801561096f57600080fd5b505afa158015610983573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a79190611f5b565b604051633be3525960e21b8152600481018890529091506000906001600160a01b0389169063ef8d496490602401602060405180830381600087803b1580156109ef57600080fd5b505af1158015610a03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a279190611f5b565b60055490915060009061271090610a4c906bffffffffffffffffffffffff1685611f8a565b610a569190611fa9565b90508015610ae8576001600160a01b03898116600090815260026020526040908190205460055491516340c10f1960e01b81526c010000000000000000000000009092048316600483015260248201849052909116906340c10f1990604401600060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b505050505b6001600160a01b03808a16600090815260026020526040902054166340c10f1987610b138487611fcb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610b7157600080fd5b505af1158015610b85573d6000803e3d6000fd5b505050506004546001610b989190611fe2565b60045560408051610160810182523381526001600160a01b038b16602082015242918101919091526060810188905260808101839052600160a0820152600060c082015260e08101610bea8386611fcb565b81526020808201849052600060408084018290526060938401829052600480548352600680855292829020865181546001600160a01b03199081166001600160a01b039283161783559588015160018301805490971691161790945590850151600284015592840151600383015560808401519282019290925560a083015160058201805460ff191691151591909117905560c08301519181019190915560e082015160078201556101008201516008820155610120820151600982015561014090910151600a909101558415610cc857610cc6600454610437565b505b7feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca27600454604051610cfb91815260200190565b60405180910390a150506004805460009081526006602081815260409283902083516101608101855281546001600160a01b0390811682526001830154169281019290925260028101549382019390935260038301546060820152928201546080840152600582015460ff16151560a084015281015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a01546101408201529150506001805595945050505050565b6000610dbf8787873086610751565b60e001516001600160a01b038881166000818152600260205260409081902054905163095ea7b360e01b8152600481019290925260248201849052929350911690819063095ea7b390604401602060405180830381600087803b158015610e2557600080fd5b505af1158015610e39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5d9190611ffa565b50604051632ca6634360e11b815260048101839052602481018690526001600160a01b03858116604483015289169063594cc68690606401602060405180830381600087803b158015610eaf57600080fd5b505af1158015610ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee79190611f5b565b505050505050505050565b60008060026001541415610f485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610811565b6002600181905550610fc160405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008086156111875750505060008581526003602081815260408084205480855260068084529482902082516101608101845281546001600160a01b0390811682526001830154169481019490945260028101549284019290925292810154606083015260048101546080830152600581015460ff16151560a08301529283015460c08201819052600784015460e083015260088401546101008301526009840154610120830152600a9093015461014082015291339088146110ac5760405162461bcd60e51b8152602060048201526003602482015262534e4d60e81b6044820152606401610811565b6040516331a9108f60e11b81526004810189905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e9060240160206040518083038186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111469190611f3e565b6001600160a01b0316146111825760405162461bcd60e51b81526020600482015260036024820152624e4e4f60e81b6044820152606401610811565b61129e565b50505060008581526006602081815260409283902083516101608101855281546001600160a01b039081168083526001840154909116938201939093526002820154948101949094526003810154606085015260048101546080850152600581015460ff16151560a08501529182015460c08401819052600783015460e085015260088301546101008501526009830154610120850152600a9092015461014084015287911561125f5760405162461bcd60e51b8152602060048201526003602482015262272a2960e91b6044820152606401610811565b82516001600160a01b0316331461129e5760405162461bcd60e51b81526020600482015260036024820152624e534f60e81b6044820152606401610811565b60a083015115156001146112da5760405162461bcd60e51b8152602060048201526003602482015262534e4560e81b6044820152606401610811565b600080600085606001518660400151426112f49190611fcb565b61130690670de0b6b3a7640000611f8a565b6113109190611fa9565b9050670de0b6b3a764000081106113455785610140015186608001516113369190611fcb565b91506000985060019250611560565b604086015161135690610e10611fe2565b4210156113a55760405162461bcd60e51b815260206004820152600b60248201527f4d494e20445552203148520000000000000000000000000000000000000000006044820152606401610811565b6000670de0b6b3a76400008761010001518860e001516113c59190611fe2565b6113d784670de0b6b3a7640000611fcb565b6113e19190611f8a565b6113eb9190611fa9565b905080876101200151111561140257506000611415565b6101208701516114129082611fcb565b90505b808a1115611421578099505b808a141561144957866101400151876080015161143e9190611fcb565b92506001935061149f565b670de0b6b3a764000087608001518861010001518960e0015161146c9190611fe2565b61147e8d670de0b6b3a7640000611f8a565b6114889190611fa9565b6114929190611f8a565b61149c9190611fa9565b92505b6020878101516001600160a01b039081166000908152600290925260409182902054915163079cc67960e41b8152336004820152602481018d90529116906379cc679090604401600060405180830381600087803b15801561150057600080fd5b505af1158015611514573d6000803e3d6000fd5b50505050898761012001516115299190611fe2565b60008781526006602052604090206009015561014087015161154c908490611fe2565b6000878152600660205260409020600a0155505b6000821161156d57600080fd5b6000858152600660205260409020600a01546080870151101561158f57600080fd5b8215611601576000858152600660208190526040822080546001600160a01b03199081168255600182018054909116905560028101839055600381018390556004810183905560058101805460ff19169055908101829055600781018290556008810182905560098101829055600a01555b82801561160b5750895b156116205760008b8152600360205260408120555b60408051868152602081018490529081018a905283151560608201527faf205e167b226d804a6329a560f0412a7673e16c1f60c47c5fedb8d2fad745509060800160405180910390a160208601516040516319638a2960e21b8152600481018490526001600160a01b039091169063658e28a490602401600060405180830381600087803b1580156116b157600080fd5b505af11580156116c5573d6000803e3d6000fd5b5050506020808801516001600160a01b03908116600090815260029092526040909120600101546116f992501685846118a9565b506001805599969850959650505050505050565b6117156117b1565b61171f60006118de565b565b6117296117b1565b6001600160a01b0381166117a55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610811565b6117ae816118de565b50565b6000546001600160a01b0316331461171f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610811565b6040516001600160a01b03808516602483015283166044820152606481018290526118a39085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261192e565b50505050565b6040516001600160a01b0383166024820152604481018290526118d990849063a9059cbb60e01b9060640161183f565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611983826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a139092919063ffffffff16565b8051909150156118d957808060200190518101906119a19190611ffa565b6118d95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610811565b6060611a228484600085611a2c565b90505b9392505050565b606082471015611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610811565b6001600160a01b0385163b611afb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610811565b600080866001600160a01b03168587604051611b179190612043565b60006040518083038185875af1925050503d8060008114611b54576040519150601f19603f3d011682016040523d82523d6000602084013e611b59565b606091505b5091509150611b69828286611b74565b979650505050505050565b60608315611b83575081611a25565b825115611b935782518084602001fd5b8160405162461bcd60e51b8152600401610811919061205f565b6001600160a01b03811681146117ae57600080fd5b60008060408385031215611bd557600080fd5b8235611be081611bad565b915060208301356bffffffffffffffffffffffff81168114611c0157600080fd5b809150509250929050565b60008083601f840112611c1e57600080fd5b50813567ffffffffffffffff811115611c3657600080fd5b602083019150836020828501011115611c4e57600080fd5b9250929050565b60008060008060008060808789031215611c6e57600080fd5b8635611c7981611bad565b95506020870135611c8981611bad565b9450604087013567ffffffffffffffff80821115611ca657600080fd5b611cb28a838b01611c0c565b90965094506060890135915080821115611ccb57600080fd5b50611cd889828a01611c0c565b979a9699509497509295939492505050565b600060208284031215611cfc57600080fd5b5035919050565b80151581146117ae57600080fd5b60008060408385031215611d2457600080fd5b823591506020830135611c0181611d03565b81516001600160a01b0316815261016081016020830151611d6260208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a0830151611d9460a084018215159052565b5060c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525092915050565b600080600080600060a08688031215611deb57600080fd5b8535611df681611bad565b945060208601359350604086013592506060860135611e1481611bad565b91506080860135611e2481611d03565b809150509295509295909350565b60008060008060008060c08789031215611e4b57600080fd5b8635611e5681611bad565b95506020870135945060408701359350606087013592506080870135611e7b81611bad565b915060a0870135611e8b81611d03565b809150509295509295509295565b600080600060608486031215611eae57600080fd5b833592506020840135611ec081611d03565b929592945050506040919091013590565b600060208284031215611ee357600080fd5b8135611a2581611bad565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000611f2b604083018688611eee565b8281036020840152611b69818587611eee565b600060208284031215611f5057600080fd5b8151611a2581611bad565b600060208284031215611f6d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611fa457611fa4611f74565b500290565b600082611fc657634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611fdd57611fdd611f74565b500390565b60008219821115611ff557611ff5611f74565b500190565b60006020828403121561200c57600080fd5b8151611a2581611d03565b60005b8381101561203257818101518382015260200161201a565b838111156118a35750506000910152565b60008251612055818460208701612017565b9190910192915050565b602081526000825180602084015261207e816040850160208701612017565b601f01601f1916919091016040019291505056fea164736f6c6343000809000a0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f00000000000000000000000005736a8d6bc208b9e3c9a7e20e7f53674aea6ab1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063570587cf11610081578063715018a61161005b578063715018a6146101c95780638da5cb5b146101d1578063f2fde38b146101e257600080fd5b8063570587cf1461014f5780635b64f391146101625780636ba1c61c1461018a57600080fd5b806310b7e794116100b257806310b7e794146100f657806341614f001461011c578063436045171461013c57600080fd5b806308d3f998146100ce5780630bdb00d4146100e3575b600080fd5b6100e16100dc366004611bc2565b6101f5565b005b6100e16100f1366004611c55565b610257565b610109610104366004611cea565b610437565b6040519081526020015b60405180910390f35b61012f61012a366004611d11565b610603565b6040516101139190611d36565b61012f61014a366004611dd3565b610751565b6100e161015d366004611e32565b610db0565b610175610170366004611e99565b610ef2565b60408051928352602083019190915201610113565b6101b17f0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f81565b6040516001600160a01b039091168152602001610113565b6100e161170d565b6000546001600160a01b03166101b1565b6100e16101f0366004611ed1565b611721565b6101fd6117b1565b6107d0816bffffffffffffffffffffffff16111561021a57600080fd5b6bffffffffffffffffffffffff166001600160a01b039091166c01000000000000000000000000026bffffffffffffffffffffffff191617600555565b6001600160a01b038681166000908152600260205260409020600101541615801561028a57506001600160a01b03861615155b801561029e57506001600160a01b03851615155b6102a757600080fd5b60405163182a775760e11b81526000906001600160a01b037f00000000000000000000000005736a8d6bc208b9e3c9a7e20e7f53674aea6ab11690633054eeae906102fc908890889088908890600401611f17565b602060405180830381600087803b15801561031657600080fd5b505af115801561032a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034e9190611f3e565b6001600160a01b038881166000818152600260205260409081902080546001600160a01b0319908116868616908117835560019092018054909116948c16949094179093555163e68c84cb60e01b8152600481019290925291925063e68c84cb90602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b50505050806001600160a01b0316866001600160a01b0316886001600160a01b03167fc775f148b1505cf5c3c3158b3bd09e79026cae37c17f0851eff0cac3a39027fb60405160405180910390a450505050505050565b600081815260066020818152604080842081516101608101835281546001600160a01b039081168252600180840154909116948201949094526002820154928101929092526003810154606083015260048101546080830152600581015460ff16151560a083018190529381015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a0154610140820152911480156104e4575060c0810151155b80156104f9575080516001600160a01b031633145b61050257600080fd5b6040516335313c2160e11b81523360048201526000907f0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f6001600160a01b031690636a62784290602401602060405180830381600087803b15801561056657600080fd5b505af115801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190611f5b565b6000858152600660208181526040808420909201849055838352600381529181902087905580518781529182018390529192507faca8712d748b9083cefccea89348bfc648176370ecc0c882ab01b686203abbcd910160405180910390a19392505050565b61067460405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b600082156106ac57506000838152600360209081526040808320548084526006928390529220015484146106a757600080fd5b6106af565b50825b60009081526006602081815260409283902083516101608101855281546001600160a01b039081168252600183015416928101929092526002810154938201939093526003830154606082015260048301546080820152600583015460ff16151560a08201529082015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a909101546101408201529392505050565b6107c260405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6002600154141561081a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260018181556001600160a01b038881166000908152602093909352604090922001541661084857600080fd5b603c84101580156108c95750856001600160a01b031663769729996040518163ffffffff1660e01b815260040160206040518083038186803b15801561088d57600080fd5b505afa1580156108a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c59190611f5b565b8411155b6108fb5760405162461bcd60e51b81526020600482015260036024820152621254d160ea1b6044820152606401610811565b6001600160a01b03808716600090815260026020526040902060010154610925911633888861180b565b6040516307b027af60e41b815260048101869052602481018590526000906001600160a01b03881690637b027af09060440160206040518083038186803b15801561096f57600080fd5b505afa158015610983573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a79190611f5b565b604051633be3525960e21b8152600481018890529091506000906001600160a01b0389169063ef8d496490602401602060405180830381600087803b1580156109ef57600080fd5b505af1158015610a03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a279190611f5b565b60055490915060009061271090610a4c906bffffffffffffffffffffffff1685611f8a565b610a569190611fa9565b90508015610ae8576001600160a01b03898116600090815260026020526040908190205460055491516340c10f1960e01b81526c010000000000000000000000009092048316600483015260248201849052909116906340c10f1990604401600060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b505050505b6001600160a01b03808a16600090815260026020526040902054166340c10f1987610b138487611fcb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610b7157600080fd5b505af1158015610b85573d6000803e3d6000fd5b505050506004546001610b989190611fe2565b60045560408051610160810182523381526001600160a01b038b16602082015242918101919091526060810188905260808101839052600160a0820152600060c082015260e08101610bea8386611fcb565b81526020808201849052600060408084018290526060938401829052600480548352600680855292829020865181546001600160a01b03199081166001600160a01b039283161783559588015160018301805490971691161790945590850151600284015592840151600383015560808401519282019290925560a083015160058201805460ff191691151591909117905560c08301519181019190915560e082015160078201556101008201516008820155610120820151600982015561014090910151600a909101558415610cc857610cc6600454610437565b505b7feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca27600454604051610cfb91815260200190565b60405180910390a150506004805460009081526006602081815260409283902083516101608101855281546001600160a01b0390811682526001830154169281019290925260028101549382019390935260038301546060820152928201546080840152600582015460ff16151560a084015281015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a01546101408201529150506001805595945050505050565b6000610dbf8787873086610751565b60e001516001600160a01b038881166000818152600260205260409081902054905163095ea7b360e01b8152600481019290925260248201849052929350911690819063095ea7b390604401602060405180830381600087803b158015610e2557600080fd5b505af1158015610e39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5d9190611ffa565b50604051632ca6634360e11b815260048101839052602481018690526001600160a01b03858116604483015289169063594cc68690606401602060405180830381600087803b158015610eaf57600080fd5b505af1158015610ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee79190611f5b565b505050505050505050565b60008060026001541415610f485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610811565b6002600181905550610fc160405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008086156111875750505060008581526003602081815260408084205480855260068084529482902082516101608101845281546001600160a01b0390811682526001830154169481019490945260028101549284019290925292810154606083015260048101546080830152600581015460ff16151560a08301529283015460c08201819052600784015460e083015260088401546101008301526009840154610120830152600a9093015461014082015291339088146110ac5760405162461bcd60e51b8152602060048201526003602482015262534e4d60e81b6044820152606401610811565b6040516331a9108f60e11b81526004810189905233906001600160a01b037f0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f1690636352211e9060240160206040518083038186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111469190611f3e565b6001600160a01b0316146111825760405162461bcd60e51b81526020600482015260036024820152624e4e4f60e81b6044820152606401610811565b61129e565b50505060008581526006602081815260409283902083516101608101855281546001600160a01b039081168083526001840154909116938201939093526002820154948101949094526003810154606085015260048101546080850152600581015460ff16151560a08501529182015460c08401819052600783015460e085015260088301546101008501526009830154610120850152600a9092015461014084015287911561125f5760405162461bcd60e51b8152602060048201526003602482015262272a2960e91b6044820152606401610811565b82516001600160a01b0316331461129e5760405162461bcd60e51b81526020600482015260036024820152624e534f60e81b6044820152606401610811565b60a083015115156001146112da5760405162461bcd60e51b8152602060048201526003602482015262534e4560e81b6044820152606401610811565b600080600085606001518660400151426112f49190611fcb565b61130690670de0b6b3a7640000611f8a565b6113109190611fa9565b9050670de0b6b3a764000081106113455785610140015186608001516113369190611fcb565b91506000985060019250611560565b604086015161135690610e10611fe2565b4210156113a55760405162461bcd60e51b815260206004820152600b60248201527f4d494e20445552203148520000000000000000000000000000000000000000006044820152606401610811565b6000670de0b6b3a76400008761010001518860e001516113c59190611fe2565b6113d784670de0b6b3a7640000611fcb565b6113e19190611f8a565b6113eb9190611fa9565b905080876101200151111561140257506000611415565b6101208701516114129082611fcb565b90505b808a1115611421578099505b808a141561144957866101400151876080015161143e9190611fcb565b92506001935061149f565b670de0b6b3a764000087608001518861010001518960e0015161146c9190611fe2565b61147e8d670de0b6b3a7640000611f8a565b6114889190611fa9565b6114929190611f8a565b61149c9190611fa9565b92505b6020878101516001600160a01b039081166000908152600290925260409182902054915163079cc67960e41b8152336004820152602481018d90529116906379cc679090604401600060405180830381600087803b15801561150057600080fd5b505af1158015611514573d6000803e3d6000fd5b50505050898761012001516115299190611fe2565b60008781526006602052604090206009015561014087015161154c908490611fe2565b6000878152600660205260409020600a0155505b6000821161156d57600080fd5b6000858152600660205260409020600a01546080870151101561158f57600080fd5b8215611601576000858152600660208190526040822080546001600160a01b03199081168255600182018054909116905560028101839055600381018390556004810183905560058101805460ff19169055908101829055600781018290556008810182905560098101829055600a01555b82801561160b5750895b156116205760008b8152600360205260408120555b60408051868152602081018490529081018a905283151560608201527faf205e167b226d804a6329a560f0412a7673e16c1f60c47c5fedb8d2fad745509060800160405180910390a160208601516040516319638a2960e21b8152600481018490526001600160a01b039091169063658e28a490602401600060405180830381600087803b1580156116b157600080fd5b505af11580156116c5573d6000803e3d6000fd5b5050506020808801516001600160a01b03908116600090815260029092526040909120600101546116f992501685846118a9565b506001805599969850959650505050505050565b6117156117b1565b61171f60006118de565b565b6117296117b1565b6001600160a01b0381166117a55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610811565b6117ae816118de565b50565b6000546001600160a01b0316331461171f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610811565b6040516001600160a01b03808516602483015283166044820152606481018290526118a39085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261192e565b50505050565b6040516001600160a01b0383166024820152604481018290526118d990849063a9059cbb60e01b9060640161183f565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611983826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a139092919063ffffffff16565b8051909150156118d957808060200190518101906119a19190611ffa565b6118d95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610811565b6060611a228484600085611a2c565b90505b9392505050565b606082471015611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610811565b6001600160a01b0385163b611afb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610811565b600080866001600160a01b03168587604051611b179190612043565b60006040518083038185875af1925050503d8060008114611b54576040519150601f19603f3d011682016040523d82523d6000602084013e611b59565b606091505b5091509150611b69828286611b74565b979650505050505050565b60608315611b83575081611a25565b825115611b935782518084602001fd5b8160405162461bcd60e51b8152600401610811919061205f565b6001600160a01b03811681146117ae57600080fd5b60008060408385031215611bd557600080fd5b8235611be081611bad565b915060208301356bffffffffffffffffffffffff81168114611c0157600080fd5b809150509250929050565b60008083601f840112611c1e57600080fd5b50813567ffffffffffffffff811115611c3657600080fd5b602083019150836020828501011115611c4e57600080fd5b9250929050565b60008060008060008060808789031215611c6e57600080fd5b8635611c7981611bad565b95506020870135611c8981611bad565b9450604087013567ffffffffffffffff80821115611ca657600080fd5b611cb28a838b01611c0c565b90965094506060890135915080821115611ccb57600080fd5b50611cd889828a01611c0c565b979a9699509497509295939492505050565b600060208284031215611cfc57600080fd5b5035919050565b80151581146117ae57600080fd5b60008060408385031215611d2457600080fd5b823591506020830135611c0181611d03565b81516001600160a01b0316815261016081016020830151611d6260208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a0830151611d9460a084018215159052565b5060c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525092915050565b600080600080600060a08688031215611deb57600080fd5b8535611df681611bad565b945060208601359350604086013592506060860135611e1481611bad565b91506080860135611e2481611d03565b809150509295509295909350565b60008060008060008060c08789031215611e4b57600080fd5b8635611e5681611bad565b95506020870135945060408701359350606087013592506080870135611e7b81611bad565b915060a0870135611e8b81611d03565b809150509295509295509295565b600080600060608486031215611eae57600080fd5b833592506020840135611ec081611d03565b929592945050506040919091013590565b600060208284031215611ee357600080fd5b8135611a2581611bad565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000611f2b604083018688611eee565b8281036020840152611b69818587611eee565b600060208284031215611f5057600080fd5b8151611a2581611bad565b600060208284031215611f6d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611fa457611fa4611f74565b500290565b600082611fc657634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611fdd57611fdd611f74565b500390565b60008219821115611ff557611ff5611f74565b500190565b60006020828403121561200c57600080fd5b8151611a2581611d03565b60005b8381101561203257818101518382015260200161201a565b838111156118a35750506000910152565b60008251612055818460208701612017565b9190910192915050565b602081526000825180602084015261207e816040850160208701612017565b601f01601f1916919091016040019291505056fea164736f6c6343000809000a

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

0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f00000000000000000000000005736a8d6bc208b9e3c9a7e20e7f53674aea6ab1

-----Decoded View---------------
Arg [0] : _flashNFTAddress (address): 0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F
Arg [1] : _flashFTokenFactoryAddress (address): 0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f
Arg [1] : 00000000000000000000000005736a8d6bc208b9e3c9a7e20e7f53674aea6ab1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.