ETH Price: $3,573.16 (-1.07%)

Contract

0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake210580272024-10-27 16:01:5937 days ago1730044919IN
Flashstake: Protocol
0 ETH0.002349777.10432622
Unstake210580272024-10-27 16:01:5937 days ago1730044919IN
Flashstake: Protocol
0 ETH0.002492777.08330658
Unstake210421222024-10-25 10:45:5939 days ago1729853159IN
Flashstake: Protocol
0 ETH0.00186645.96734716
Unstake209733622024-10-15 20:30:3548 days ago1729024235IN
Flashstake: Protocol
0 ETH0.0055119419.3
Unstake207901812024-09-20 7:02:2374 days ago1726815743IN
Flashstake: Protocol
0 ETH0.0029573110.87594701
Unstake207732642024-09-17 22:20:1176 days ago1726611611IN
Flashstake: Protocol
0 ETH0.0029250910.24216282
Unstake201572342024-06-23 22:01:35162 days ago1719180095IN
Flashstake: Protocol
0 ETH0.000721164.70482496
Unstake199508322024-05-26 1:41:11191 days ago1716687671IN
Flashstake: Protocol
0 ETH0.000929975.57619974
Unstake198853002024-05-16 21:44:23200 days ago1715895863IN
Flashstake: Protocol
0 ETH0.001098796.58843797
Unstake196509262024-04-14 2:53:35233 days ago1713063215IN
Flashstake: Protocol
0 ETH0.0039501314.52809649
Unstake196320962024-04-11 11:30:59236 days ago1712835059IN
Flashstake: Protocol
0 ETH0.0030216418.11798366
Unstake196320662024-04-11 11:24:59236 days ago1712834699IN
Flashstake: Protocol
0 ETH0.0031561318.92438548
Unstake196278192024-04-10 21:09:11236 days ago1712783351IN
Flashstake: Protocol
0 ETH0.0029765819.44259737
Unstake196277192024-04-10 20:49:11236 days ago1712782151IN
Flashstake: Protocol
0 ETH0.0051871417.08285682
Unstake195772332024-04-03 19:08:47243 days ago1712171327IN
Flashstake: Protocol
0 ETH0.0073820844.26350087
Unstake194472562024-03-16 11:47:59262 days ago1710589679IN
Flashstake: Protocol
0 ETH0.0082125125.88607165
Unstake193648412024-03-04 22:38:59273 days ago1709591939IN
Flashstake: Protocol
0 ETH0.0107675570.33207849
Unstake192636342024-02-19 18:43:59288 days ago1708368239IN
Flashstake: Protocol
0 ETH0.0090137133.15132924
Unstake192233982024-02-14 3:01:47293 days ago1707879707IN
Flashstake: Protocol
0 ETH0.0065826223.05034031
Unstake192151452024-02-12 23:12:35294 days ago1707779555IN
Flashstake: Protocol
0 ETH0.0242803881.89691571
Unstake191349662024-02-01 17:08:11306 days ago1706807291IN
Flashstake: Protocol
0 ETH0.00717435.49116371
Unstake191221412024-01-30 21:55:35307 days ago1706651735IN
Flashstake: Protocol
0 ETH0.0052015224.10288457
Unstake187038542023-12-03 5:42:11366 days ago1701582131IN
Flashstake: Protocol
0 ETH0.0084416527.125
Unstake186624932023-11-27 10:49:47372 days ago1701082187IN
Flashstake: Protocol
0 ETH0.009963934.7213232
Unstake186243012023-11-22 2:26:47377 days ago1700620007IN
Flashstake: Protocol
0 ETH0.0057466724.93489352
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
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
File 1 of 11 : 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 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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 3 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.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));
        }
    }

    /**
     * @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 5 of 11 : 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 6 of 11 : 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 7 of 11 : 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 8 of 11 : 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 9 of 11 : 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 10 of 11 : 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 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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

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

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

Contract Security Audit

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"}]

60c060405260006004557f5089722613c2ccee071c39c59e9889641f435f150000000000000000000000006005553480156200003a57600080fd5b5060405162002298380380620022988339810160408190526200005d91620000f1565b620000683362000084565b600180556001600160a01b039182166080521660a05262000129565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000ec57600080fd5b919050565b600080604083850312156200010557600080fd5b6200011083620000d4565b91506200012060208401620000d4565b90509250929050565b60805160a05161213b6200015d600039600061031801526000818161018f01528181610571015261111e015261213b6000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063570587cf11610081578063715018a61161005b578063715018a6146101c95780638da5cb5b146101d1578063f2fde38b146101e257600080fd5b8063570587cf1461014f5780635b64f391146101625780636ba1c61c1461018a57600080fd5b806310b7e794116100b257806310b7e794146100f657806341614f001461011c578063436045171461013c57600080fd5b806308d3f998146100ce5780630bdb00d4146100e3575b600080fd5b6100e16100dc366004611c5e565b6101f5565b005b6100e16100f1366004611cf1565b6102ae565b610109610104366004611d86565b61048e565b6040519081526020015b60405180910390f35b61012f61012a366004611dad565b61065a565b6040516101139190611dd2565b61012f61014a366004611e6f565b6107a8565b6100e161015d366004611ece565b610e02565b610175610170366004611f35565b610f44565b60408051928352602083019190915201610113565b6101b17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610113565b6100e161175f565b6000546001600160a01b03166101b1565b6100e16101f0366004611f6d565b6117c5565b6000546001600160a01b031633146102545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107d0816bffffffffffffffffffffffff16111561027157600080fd5b6bffffffffffffffffffffffff166001600160a01b039091166c01000000000000000000000000026bffffffffffffffffffffffff191617600555565b6001600160a01b03868116600090815260026020526040902060010154161580156102e157506001600160a01b03861615155b80156102f557506001600160a01b03851615155b6102fe57600080fd5b60405163182a775760e11b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633054eeae90610353908890889088908890600401611fb3565b602060405180830381600087803b15801561036d57600080fd5b505af1158015610381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a59190611fda565b6001600160a01b038881166000818152600260205260409081902080546001600160a01b0319908116868616908117835560019092018054909116948c16949094179093555163e68c84cb60e01b8152600481019290925291925063e68c84cb90602401600060405180830381600087803b15801561042357600080fd5b505af1158015610437573d6000803e3d6000fd5b50505050806001600160a01b0316866001600160a01b0316886001600160a01b03167fc775f148b1505cf5c3c3158b3bd09e79026cae37c17f0851eff0cac3a39027fb60405160405180910390a450505050505050565b600081815260066020818152604080842081516101608101835281546001600160a01b039081168252600180840154909116948201949094526002820154928101929092526003810154606083015260048101546080830152600581015460ff16151560a083018190529381015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a01546101408201529114801561053b575060c0810151155b8015610550575080516001600160a01b031633145b61055957600080fd5b6040516335313c2160e11b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636a62784290602401602060405180830381600087803b1580156105bd57600080fd5b505af11580156105d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f59190611ff7565b6000858152600660208181526040808420909201849055838352600381529181902087905580518781529182018390529192507faca8712d748b9083cefccea89348bfc648176370ecc0c882ab01b686203abbcd910160405180910390a19392505050565b6106cb60405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000821561070357506000838152600360209081526040808320548084526006928390529220015484146106fe57600080fd5b610706565b50825b60009081526006602081815260409283902083516101608101855281546001600160a01b039081168252600183015416928101929092526002810154938201939093526003830154606082015260048301546080820152600583015460ff16151560a08201529082015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a909101546101408201529392505050565b61081960405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6002600154141561086c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024b565b600260018181556001600160a01b038881166000908152602093909352604090922001541661089a57600080fd5b603c841015801561091b5750856001600160a01b031663769729996040518163ffffffff1660e01b815260040160206040518083038186803b1580156108df57600080fd5b505afa1580156108f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109179190611ff7565b8411155b61094d5760405162461bcd60e51b81526020600482015260036024820152621254d160ea1b604482015260640161024b565b6001600160a01b0380871660009081526002602052604090206001015461097791163388886118a7565b6040516307b027af60e41b815260048101869052602481018590526000906001600160a01b03881690637b027af09060440160206040518083038186803b1580156109c157600080fd5b505afa1580156109d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f99190611ff7565b604051633be3525960e21b8152600481018890529091506000906001600160a01b0389169063ef8d496490602401602060405180830381600087803b158015610a4157600080fd5b505af1158015610a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a799190611ff7565b60055490915060009061271090610a9e906bffffffffffffffffffffffff1685612026565b610aa89190612045565b90508015610b3a576001600160a01b03898116600090815260026020526040908190205460055491516340c10f1960e01b81526c010000000000000000000000009092048316600483015260248201849052909116906340c10f1990604401600060405180830381600087803b158015610b2157600080fd5b505af1158015610b35573d6000803e3d6000fd5b505050505b6001600160a01b03808a16600090815260026020526040902054166340c10f1987610b658487612067565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610bc357600080fd5b505af1158015610bd7573d6000803e3d6000fd5b505050506004546001610bea919061207e565b60045560408051610160810182523381526001600160a01b038b16602082015242918101919091526060810188905260808101839052600160a0820152600060c082015260e08101610c3c8386612067565b81526020808201849052600060408084018290526060938401829052600480548352600680855292829020865181546001600160a01b03199081166001600160a01b039283161783559588015160018301805490971691161790945590850151600284015592840151600383015560808401519282019290925560a083015160058201805460ff191691151591909117905560c08301519181019190915560e082015160078201556101008201516008820155610120820151600982015561014090910151600a909101558415610d1a57610d1860045461048e565b505b7feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca27600454604051610d4d91815260200190565b60405180910390a150506004805460009081526006602081815260409283902083516101608101855281546001600160a01b0390811682526001830154169281019290925260028101549382019390935260038301546060820152928201546080840152600582015460ff16151560a084015281015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a01546101408201529150506001805595945050505050565b6000610e1187878730866107a8565b60e001516001600160a01b038881166000818152600260205260409081902054905163095ea7b360e01b8152600481019290925260248201849052929350911690819063095ea7b390604401602060405180830381600087803b158015610e7757600080fd5b505af1158015610e8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaf9190612096565b50604051632ca6634360e11b815260048101839052602481018690526001600160a01b03858116604483015289169063594cc68690606401602060405180830381600087803b158015610f0157600080fd5b505af1158015610f15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f399190611ff7565b505050505050505050565b60008060026001541415610f9a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024b565b600260018190555061101360405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008086156111d95750505060008581526003602081815260408084205480855260068084529482902082516101608101845281546001600160a01b0390811682526001830154169481019490945260028101549284019290925292810154606083015260048101546080830152600581015460ff16151560a08301529283015460c08201819052600784015460e083015260088401546101008301526009840154610120830152600a9093015461014082015291339088146110fe5760405162461bcd60e51b8152602060048201526003602482015262534e4d60e81b604482015260640161024b565b6040516331a9108f60e11b81526004810189905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e9060240160206040518083038186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111989190611fda565b6001600160a01b0316146111d45760405162461bcd60e51b81526020600482015260036024820152624e4e4f60e81b604482015260640161024b565b6112f0565b50505060008581526006602081815260409283902083516101608101855281546001600160a01b039081168083526001840154909116938201939093526002820154948101949094526003810154606085015260048101546080850152600581015460ff16151560a08501529182015460c08401819052600783015460e085015260088301546101008501526009830154610120850152600a909201546101408401528791156112b15760405162461bcd60e51b8152602060048201526003602482015262272a2960e91b604482015260640161024b565b82516001600160a01b031633146112f05760405162461bcd60e51b81526020600482015260036024820152624e534f60e81b604482015260640161024b565b60a0830151151560011461132c5760405162461bcd60e51b8152602060048201526003602482015262534e4560e81b604482015260640161024b565b600080600085606001518660400151426113469190612067565b61135890670de0b6b3a7640000612026565b6113629190612045565b9050670de0b6b3a764000081106113975785610140015186608001516113889190612067565b915060009850600192506115b2565b60408601516113a890610e1061207e565b4210156113f75760405162461bcd60e51b815260206004820152600b60248201527f4d494e2044555220314852000000000000000000000000000000000000000000604482015260640161024b565b6000670de0b6b3a76400008761010001518860e00151611417919061207e565b61142984670de0b6b3a7640000612067565b6114339190612026565b61143d9190612045565b905080876101200151111561145457506000611467565b6101208701516114649082612067565b90505b808a1115611473578099505b808a141561149b5786610140015187608001516114909190612067565b9250600193506114f1565b670de0b6b3a764000087608001518861010001518960e001516114be919061207e565b6114d08d670de0b6b3a7640000612026565b6114da9190612045565b6114e49190612026565b6114ee9190612045565b92505b6020878101516001600160a01b039081166000908152600290925260409182902054915163079cc67960e41b8152336004820152602481018d90529116906379cc679090604401600060405180830381600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050508987610120015161157b919061207e565b60008781526006602052604090206009015561014087015161159e90849061207e565b6000878152600660205260409020600a0155505b600082116115bf57600080fd5b6000858152600660205260409020600a0154608087015110156115e157600080fd5b8215611653576000858152600660208190526040822080546001600160a01b03199081168255600182018054909116905560028101839055600381018390556004810183905560058101805460ff19169055908101829055600781018290556008810182905560098101829055600a01555b82801561165d5750895b156116725760008b8152600360205260408120555b60408051868152602081018490529081018a905283151560608201527faf205e167b226d804a6329a560f0412a7673e16c1f60c47c5fedb8d2fad745509060800160405180910390a160208601516040516319638a2960e21b8152600481018490526001600160a01b039091169063658e28a490602401600060405180830381600087803b15801561170357600080fd5b505af1158015611717573d6000803e3d6000fd5b5050506020808801516001600160a01b039081166000908152600290925260409091206001015461174b9250168584611945565b506001805599969850959650505050505050565b6000546001600160a01b031633146117b95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161024b565b6117c3600061197a565b565b6000546001600160a01b0316331461181f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161024b565b6001600160a01b03811661189b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161024b565b6118a48161197a565b50565b6040516001600160a01b038085166024830152831660448201526064810182905261193f9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526119ca565b50505050565b6040516001600160a01b03831660248201526044810182905261197590849063a9059cbb60e01b906064016118db565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611a1f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611aaf9092919063ffffffff16565b8051909150156119755780806020019051810190611a3d9190612096565b6119755760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161024b565b6060611abe8484600085611ac8565b90505b9392505050565b606082471015611b405760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161024b565b6001600160a01b0385163b611b975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024b565b600080866001600160a01b03168587604051611bb391906120df565b60006040518083038185875af1925050503d8060008114611bf0576040519150601f19603f3d011682016040523d82523d6000602084013e611bf5565b606091505b5091509150611c05828286611c10565b979650505050505050565b60608315611c1f575081611ac1565b825115611c2f5782518084602001fd5b8160405162461bcd60e51b815260040161024b91906120fb565b6001600160a01b03811681146118a457600080fd5b60008060408385031215611c7157600080fd5b8235611c7c81611c49565b915060208301356bffffffffffffffffffffffff81168114611c9d57600080fd5b809150509250929050565b60008083601f840112611cba57600080fd5b50813567ffffffffffffffff811115611cd257600080fd5b602083019150836020828501011115611cea57600080fd5b9250929050565b60008060008060008060808789031215611d0a57600080fd5b8635611d1581611c49565b95506020870135611d2581611c49565b9450604087013567ffffffffffffffff80821115611d4257600080fd5b611d4e8a838b01611ca8565b90965094506060890135915080821115611d6757600080fd5b50611d7489828a01611ca8565b979a9699509497509295939492505050565b600060208284031215611d9857600080fd5b5035919050565b80151581146118a457600080fd5b60008060408385031215611dc057600080fd5b823591506020830135611c9d81611d9f565b81516001600160a01b0316815261016081016020830151611dfe60208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a0830151611e3060a084018215159052565b5060c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525092915050565b600080600080600060a08688031215611e8757600080fd5b8535611e9281611c49565b945060208601359350604086013592506060860135611eb081611c49565b91506080860135611ec081611d9f565b809150509295509295909350565b60008060008060008060c08789031215611ee757600080fd5b8635611ef281611c49565b95506020870135945060408701359350606087013592506080870135611f1781611c49565b915060a0870135611f2781611d9f565b809150509295509295509295565b600080600060608486031215611f4a57600080fd5b833592506020840135611f5c81611d9f565b929592945050506040919091013590565b600060208284031215611f7f57600080fd5b8135611ac181611c49565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000611fc7604083018688611f8a565b8281036020840152611c05818587611f8a565b600060208284031215611fec57600080fd5b8151611ac181611c49565b60006020828403121561200957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561204057612040612010565b500290565b60008261206257634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561207957612079612010565b500390565b6000821982111561209157612091612010565b500190565b6000602082840312156120a857600080fd5b8151611ac181611d9f565b60005b838110156120ce5781810151838201526020016120b6565b8381111561193f5750506000910152565b600082516120f18184602087016120b3565b9190910192915050565b602081526000825180602084015261211a8160408501602087016120b3565b601f01601f1916919091016040019291505056fea164736f6c6343000809000a0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f00000000000000000000000005736a8d6bc208b9e3c9a7e20e7f53674aea6ab1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063570587cf11610081578063715018a61161005b578063715018a6146101c95780638da5cb5b146101d1578063f2fde38b146101e257600080fd5b8063570587cf1461014f5780635b64f391146101625780636ba1c61c1461018a57600080fd5b806310b7e794116100b257806310b7e794146100f657806341614f001461011c578063436045171461013c57600080fd5b806308d3f998146100ce5780630bdb00d4146100e3575b600080fd5b6100e16100dc366004611c5e565b6101f5565b005b6100e16100f1366004611cf1565b6102ae565b610109610104366004611d86565b61048e565b6040519081526020015b60405180910390f35b61012f61012a366004611dad565b61065a565b6040516101139190611dd2565b61012f61014a366004611e6f565b6107a8565b6100e161015d366004611ece565b610e02565b610175610170366004611f35565b610f44565b60408051928352602083019190915201610113565b6101b17f0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f81565b6040516001600160a01b039091168152602001610113565b6100e161175f565b6000546001600160a01b03166101b1565b6100e16101f0366004611f6d565b6117c5565b6000546001600160a01b031633146102545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107d0816bffffffffffffffffffffffff16111561027157600080fd5b6bffffffffffffffffffffffff166001600160a01b039091166c01000000000000000000000000026bffffffffffffffffffffffff191617600555565b6001600160a01b03868116600090815260026020526040902060010154161580156102e157506001600160a01b03861615155b80156102f557506001600160a01b03851615155b6102fe57600080fd5b60405163182a775760e11b81526000906001600160a01b037f00000000000000000000000005736a8d6bc208b9e3c9a7e20e7f53674aea6ab11690633054eeae90610353908890889088908890600401611fb3565b602060405180830381600087803b15801561036d57600080fd5b505af1158015610381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a59190611fda565b6001600160a01b038881166000818152600260205260409081902080546001600160a01b0319908116868616908117835560019092018054909116948c16949094179093555163e68c84cb60e01b8152600481019290925291925063e68c84cb90602401600060405180830381600087803b15801561042357600080fd5b505af1158015610437573d6000803e3d6000fd5b50505050806001600160a01b0316866001600160a01b0316886001600160a01b03167fc775f148b1505cf5c3c3158b3bd09e79026cae37c17f0851eff0cac3a39027fb60405160405180910390a450505050505050565b600081815260066020818152604080842081516101608101835281546001600160a01b039081168252600180840154909116948201949094526002820154928101929092526003810154606083015260048101546080830152600581015460ff16151560a083018190529381015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a01546101408201529114801561053b575060c0810151155b8015610550575080516001600160a01b031633145b61055957600080fd5b6040516335313c2160e11b81523360048201526000907f0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f6001600160a01b031690636a62784290602401602060405180830381600087803b1580156105bd57600080fd5b505af11580156105d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f59190611ff7565b6000858152600660208181526040808420909201849055838352600381529181902087905580518781529182018390529192507faca8712d748b9083cefccea89348bfc648176370ecc0c882ab01b686203abbcd910160405180910390a19392505050565b6106cb60405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000821561070357506000838152600360209081526040808320548084526006928390529220015484146106fe57600080fd5b610706565b50825b60009081526006602081815260409283902083516101608101855281546001600160a01b039081168252600183015416928101929092526002810154938201939093526003830154606082015260048301546080820152600583015460ff16151560a08201529082015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a909101546101408201529392505050565b61081960405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6002600154141561086c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024b565b600260018181556001600160a01b038881166000908152602093909352604090922001541661089a57600080fd5b603c841015801561091b5750856001600160a01b031663769729996040518163ffffffff1660e01b815260040160206040518083038186803b1580156108df57600080fd5b505afa1580156108f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109179190611ff7565b8411155b61094d5760405162461bcd60e51b81526020600482015260036024820152621254d160ea1b604482015260640161024b565b6001600160a01b0380871660009081526002602052604090206001015461097791163388886118a7565b6040516307b027af60e41b815260048101869052602481018590526000906001600160a01b03881690637b027af09060440160206040518083038186803b1580156109c157600080fd5b505afa1580156109d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f99190611ff7565b604051633be3525960e21b8152600481018890529091506000906001600160a01b0389169063ef8d496490602401602060405180830381600087803b158015610a4157600080fd5b505af1158015610a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a799190611ff7565b60055490915060009061271090610a9e906bffffffffffffffffffffffff1685612026565b610aa89190612045565b90508015610b3a576001600160a01b03898116600090815260026020526040908190205460055491516340c10f1960e01b81526c010000000000000000000000009092048316600483015260248201849052909116906340c10f1990604401600060405180830381600087803b158015610b2157600080fd5b505af1158015610b35573d6000803e3d6000fd5b505050505b6001600160a01b03808a16600090815260026020526040902054166340c10f1987610b658487612067565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610bc357600080fd5b505af1158015610bd7573d6000803e3d6000fd5b505050506004546001610bea919061207e565b60045560408051610160810182523381526001600160a01b038b16602082015242918101919091526060810188905260808101839052600160a0820152600060c082015260e08101610c3c8386612067565b81526020808201849052600060408084018290526060938401829052600480548352600680855292829020865181546001600160a01b03199081166001600160a01b039283161783559588015160018301805490971691161790945590850151600284015592840151600383015560808401519282019290925560a083015160058201805460ff191691151591909117905560c08301519181019190915560e082015160078201556101008201516008820155610120820151600982015561014090910151600a909101558415610d1a57610d1860045461048e565b505b7feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca27600454604051610d4d91815260200190565b60405180910390a150506004805460009081526006602081815260409283902083516101608101855281546001600160a01b0390811682526001830154169281019290925260028101549382019390935260038301546060820152928201546080840152600582015460ff16151560a084015281015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a01546101408201529150506001805595945050505050565b6000610e1187878730866107a8565b60e001516001600160a01b038881166000818152600260205260409081902054905163095ea7b360e01b8152600481019290925260248201849052929350911690819063095ea7b390604401602060405180830381600087803b158015610e7757600080fd5b505af1158015610e8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaf9190612096565b50604051632ca6634360e11b815260048101839052602481018690526001600160a01b03858116604483015289169063594cc68690606401602060405180830381600087803b158015610f0157600080fd5b505af1158015610f15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f399190611ff7565b505050505050505050565b60008060026001541415610f9a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024b565b600260018190555061101360405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008086156111d95750505060008581526003602081815260408084205480855260068084529482902082516101608101845281546001600160a01b0390811682526001830154169481019490945260028101549284019290925292810154606083015260048101546080830152600581015460ff16151560a08301529283015460c08201819052600784015460e083015260088401546101008301526009840154610120830152600a9093015461014082015291339088146110fe5760405162461bcd60e51b8152602060048201526003602482015262534e4d60e81b604482015260640161024b565b6040516331a9108f60e11b81526004810189905233906001600160a01b037f0000000000000000000000003b090839c26fe3b2bdfa2f4cd7f3ab001ccdf73f1690636352211e9060240160206040518083038186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111989190611fda565b6001600160a01b0316146111d45760405162461bcd60e51b81526020600482015260036024820152624e4e4f60e81b604482015260640161024b565b6112f0565b50505060008581526006602081815260409283902083516101608101855281546001600160a01b039081168083526001840154909116938201939093526002820154948101949094526003810154606085015260048101546080850152600581015460ff16151560a08501529182015460c08401819052600783015460e085015260088301546101008501526009830154610120850152600a909201546101408401528791156112b15760405162461bcd60e51b8152602060048201526003602482015262272a2960e91b604482015260640161024b565b82516001600160a01b031633146112f05760405162461bcd60e51b81526020600482015260036024820152624e534f60e81b604482015260640161024b565b60a0830151151560011461132c5760405162461bcd60e51b8152602060048201526003602482015262534e4560e81b604482015260640161024b565b600080600085606001518660400151426113469190612067565b61135890670de0b6b3a7640000612026565b6113629190612045565b9050670de0b6b3a764000081106113975785610140015186608001516113889190612067565b915060009850600192506115b2565b60408601516113a890610e1061207e565b4210156113f75760405162461bcd60e51b815260206004820152600b60248201527f4d494e2044555220314852000000000000000000000000000000000000000000604482015260640161024b565b6000670de0b6b3a76400008761010001518860e00151611417919061207e565b61142984670de0b6b3a7640000612067565b6114339190612026565b61143d9190612045565b905080876101200151111561145457506000611467565b6101208701516114649082612067565b90505b808a1115611473578099505b808a141561149b5786610140015187608001516114909190612067565b9250600193506114f1565b670de0b6b3a764000087608001518861010001518960e001516114be919061207e565b6114d08d670de0b6b3a7640000612026565b6114da9190612045565b6114e49190612026565b6114ee9190612045565b92505b6020878101516001600160a01b039081166000908152600290925260409182902054915163079cc67960e41b8152336004820152602481018d90529116906379cc679090604401600060405180830381600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050508987610120015161157b919061207e565b60008781526006602052604090206009015561014087015161159e90849061207e565b6000878152600660205260409020600a0155505b600082116115bf57600080fd5b6000858152600660205260409020600a0154608087015110156115e157600080fd5b8215611653576000858152600660208190526040822080546001600160a01b03199081168255600182018054909116905560028101839055600381018390556004810183905560058101805460ff19169055908101829055600781018290556008810182905560098101829055600a01555b82801561165d5750895b156116725760008b8152600360205260408120555b60408051868152602081018490529081018a905283151560608201527faf205e167b226d804a6329a560f0412a7673e16c1f60c47c5fedb8d2fad745509060800160405180910390a160208601516040516319638a2960e21b8152600481018490526001600160a01b039091169063658e28a490602401600060405180830381600087803b15801561170357600080fd5b505af1158015611717573d6000803e3d6000fd5b5050506020808801516001600160a01b039081166000908152600290925260409091206001015461174b9250168584611945565b506001805599969850959650505050505050565b6000546001600160a01b031633146117b95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161024b565b6117c3600061197a565b565b6000546001600160a01b0316331461181f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161024b565b6001600160a01b03811661189b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161024b565b6118a48161197a565b50565b6040516001600160a01b038085166024830152831660448201526064810182905261193f9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526119ca565b50505050565b6040516001600160a01b03831660248201526044810182905261197590849063a9059cbb60e01b906064016118db565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611a1f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611aaf9092919063ffffffff16565b8051909150156119755780806020019051810190611a3d9190612096565b6119755760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161024b565b6060611abe8484600085611ac8565b90505b9392505050565b606082471015611b405760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161024b565b6001600160a01b0385163b611b975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024b565b600080866001600160a01b03168587604051611bb391906120df565b60006040518083038185875af1925050503d8060008114611bf0576040519150601f19603f3d011682016040523d82523d6000602084013e611bf5565b606091505b5091509150611c05828286611c10565b979650505050505050565b60608315611c1f575081611ac1565b825115611c2f5782518084602001fd5b8160405162461bcd60e51b815260040161024b91906120fb565b6001600160a01b03811681146118a457600080fd5b60008060408385031215611c7157600080fd5b8235611c7c81611c49565b915060208301356bffffffffffffffffffffffff81168114611c9d57600080fd5b809150509250929050565b60008083601f840112611cba57600080fd5b50813567ffffffffffffffff811115611cd257600080fd5b602083019150836020828501011115611cea57600080fd5b9250929050565b60008060008060008060808789031215611d0a57600080fd5b8635611d1581611c49565b95506020870135611d2581611c49565b9450604087013567ffffffffffffffff80821115611d4257600080fd5b611d4e8a838b01611ca8565b90965094506060890135915080821115611d6757600080fd5b50611d7489828a01611ca8565b979a9699509497509295939492505050565b600060208284031215611d9857600080fd5b5035919050565b80151581146118a457600080fd5b60008060408385031215611dc057600080fd5b823591506020830135611c9d81611d9f565b81516001600160a01b0316815261016081016020830151611dfe60208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a0830151611e3060a084018215159052565b5060c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525092915050565b600080600080600060a08688031215611e8757600080fd5b8535611e9281611c49565b945060208601359350604086013592506060860135611eb081611c49565b91506080860135611ec081611d9f565b809150509295509295909350565b60008060008060008060c08789031215611ee757600080fd5b8635611ef281611c49565b95506020870135945060408701359350606087013592506080870135611f1781611c49565b915060a0870135611f2781611d9f565b809150509295509295509295565b600080600060608486031215611f4a57600080fd5b833592506020840135611f5c81611d9f565b929592945050506040919091013590565b600060208284031215611f7f57600080fd5b8135611ac181611c49565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000611fc7604083018688611f8a565b8281036020840152611c05818587611f8a565b600060208284031215611fec57600080fd5b8151611ac181611c49565b60006020828403121561200957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561204057612040612010565b500290565b60008261206257634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561207957612079612010565b500390565b6000821982111561209157612091612010565b500190565b6000602082840312156120a857600080fd5b8151611ac181611d9f565b60005b838110156120ce5781810151838201526020016120b6565b8381111561193f5750506000910152565b600082516120f18184602087016120b3565b9190910192915050565b602081526000825180602084015261211a8160408501602087016120b3565b601f01601f1916919091016040019291505056fea164736f6c6343000809000a

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
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

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