ETH Price: $2,633.68 (+0.88%)

Token

LUSDBondNFT (LUSDBOND)
 

Overview

Max Total Supply

2,634 LUSDBOND

Holders

1,374

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 LUSDBOND
0x7777775bda294e14d56195182c0d995789b7776d
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xc96265c8...Ae63995a6
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
BondNFT

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 27 : BondNFT.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-contracts/contracts/access/Ownable.sol";
import "openzeppelin-contracts/contracts/utils/math/Math.sol";
import "./Interfaces/ITroveManager.sol";
import "./Interfaces/ILQTYStaking.sol";
import "./Interfaces/IPickleJar.sol";
import "./Interfaces/ICurveGaugeController.sol";
import "./Interfaces/IBondNFTArtwork.sol";
import "./Interfaces/IBondNFT.sol";

//import "forge-std/console.sol";

contract BondNFT is ERC721Enumerable, Ownable, IBondNFT {
    uint256 public constant CURVE_GAUGE_SLOPES_PRECISION = 1e9; // The minimum slope to get extra weight 1e-9

    IChickenBondManager public chickenBondManager;
    IBondNFTArtwork public artwork;
    ITroveManager immutable public troveManager;
    IERC20 immutable public lqtyToken;
    ILQTYStaking immutable public lqtyStaking;
    IPickleJar immutable public pickleLQTYJar;
    IERC20 immutable public pickleLQTYFarm;
    ICurveGaugeController immutable public curveGaugeController;
    address immutable public curveLUSD3CRVGauge;
    address immutable public curveLUSDFRAXGauge;

    uint256 immutable public transferLockoutPeriodSeconds;

    mapping (uint256 => BondExtraData) private idToBondExtraData;

    struct LiquityDataAddresses {
        address troveManagerAddress;
        address lqtyToken;
        address lqtyStaking;
        address pickleLQTYJar;
        address pickleLQTYFarm;
        address curveGaugeController;
        address curveLUSD3CRVGauge;
        address curveLUSDFRAXGauge;
    }

    constructor(
        string memory name_,
        string memory symbol_,
        address _initialArtworkAddress,
        uint256 _transferLockoutPeriodSeconds,
        LiquityDataAddresses memory _liquityDataAddresses // to avoid stack too deep issues
    )
        ERC721(name_, symbol_)
    {
        require(_liquityDataAddresses.troveManagerAddress != address(0), "BondNFT: _troveManagerAddress must be non-zero");
        require(_liquityDataAddresses.lqtyToken != address(0), "BondNFT: _lqtyToken must be non-zero");
        require(_liquityDataAddresses.lqtyStaking != address(0), "BondNFT: _lqtyStaking must be non-zero");
        require(_liquityDataAddresses.pickleLQTYJar != address(0), "BondNFT: _pickleLQTYJar must be non-zero");
        require(_liquityDataAddresses.pickleLQTYFarm != address(0), "BondNFT: _pickleLQTYFarm must be non-zero");
        require(_liquityDataAddresses.curveGaugeController != address(0), "BondNFT: _curveGaugeController must be non-zero");
        require(_liquityDataAddresses.curveLUSD3CRVGauge != address(0), "BondNFT: _curveLUSD3CRVGauge must be non-zero");
        require(_liquityDataAddresses.curveLUSDFRAXGauge != address(0), "BondNFT: _curveLUSDFRAXGauge must be non-zero");

        artwork = IBondNFTArtwork(_initialArtworkAddress);
        transferLockoutPeriodSeconds = _transferLockoutPeriodSeconds;
        troveManager = ITroveManager(_liquityDataAddresses.troveManagerAddress);
        lqtyToken = IERC20(_liquityDataAddresses.lqtyToken);
        lqtyStaking = ILQTYStaking(_liquityDataAddresses.lqtyStaking);
        pickleLQTYJar = IPickleJar(_liquityDataAddresses.pickleLQTYJar);
        pickleLQTYFarm = IERC20(_liquityDataAddresses.pickleLQTYFarm);
        curveGaugeController = ICurveGaugeController(_liquityDataAddresses.curveGaugeController);
        curveLUSD3CRVGauge = _liquityDataAddresses.curveLUSD3CRVGauge;
        curveLUSDFRAXGauge = _liquityDataAddresses.curveLUSDFRAXGauge;
    }

    function setAddresses(address _chickenBondManagerAddress) external onlyOwner {
        require(_chickenBondManagerAddress != address(0), "BondNFT: _chickenBondManagerAddress must be non-zero");
        require(address(chickenBondManager) == address(0), "BondNFT: setAddresses() can only be called once");

        chickenBondManager = IChickenBondManager(_chickenBondManagerAddress);
    }

    function setArtworkAddress(address _artworkAddress) external onlyOwner {
        // Make sure addresses have been set, as we'll be renouncing ownership
        require(address(chickenBondManager) != address(0), "BondNFT: setAddresses() must be called first");

        artwork = IBondNFTArtwork(_artworkAddress);
        renounceOwnership();
    }

    function mint(address _bonder, uint256 _permanentSeed) external returns (uint256, uint80) {
        requireCallerIsChickenBondsManager();

        // We actually increase totalSupply in `ERC721Enumerable._beforeTokenTransfer` when we `_mint`.
        uint256 tokenID = totalSupply() + 1;

        //Record first half of DNA
        BondExtraData memory bondExtraData;
        uint80 initialHalfDna = getHalfDna(tokenID, _permanentSeed);
        bondExtraData.initialHalfDna = initialHalfDna;
        idToBondExtraData[tokenID] = bondExtraData;

        _mint(_bonder, tokenID);

        return (tokenID, initialHalfDna);
    }

    function _uint256ToUint32(uint256 _inputAmount) internal pure returns (uint32) {
        return uint32(Math.min(_inputAmount / 1e18, type(uint32).max));
    }

    function setFinalExtraData(address _bonder, uint256 _tokenID, uint256 _permanentSeed) external returns (uint80) {
        requireCallerIsChickenBondsManager();

        // let’s build the struct first in memory
        BondExtraData memory tmpBondExtraData = idToBondExtraData[_tokenID];

        uint80 newDna = getHalfDna(_tokenID, _permanentSeed);
        tmpBondExtraData.finalHalfDna = newDna;

        // Liquity Data
        // Trove
        tmpBondExtraData.troveSize = _uint256ToUint32(troveManager.getTroveDebt(_bonder));
        // LQTY
        uint256 pickleLQTYAmount;
        if (pickleLQTYJar.totalSupply() > 0) {
            pickleLQTYAmount = (pickleLQTYJar.balanceOf(_bonder) + pickleLQTYFarm.balanceOf(_bonder)) * pickleLQTYJar.getRatio();
        }
        tmpBondExtraData.lqtyAmount = _uint256ToUint32(
            lqtyToken.balanceOf(_bonder) + lqtyStaking.stakes(_bonder) + pickleLQTYAmount
        );
        // Curve Gauge votes
        (uint256 curveLUSD3CRVGaugeSlope,,) = curveGaugeController.vote_user_slopes(_bonder, curveLUSD3CRVGauge);
        (uint256 curveLUSDFRAXGaugeSlope,,) = curveGaugeController.vote_user_slopes(_bonder, curveLUSDFRAXGauge);
        tmpBondExtraData.curveGaugeSlopes = _uint256ToUint32((curveLUSD3CRVGaugeSlope + curveLUSDFRAXGaugeSlope) * CURVE_GAUGE_SLOPES_PRECISION);

        // finally copy from memory to storage
        idToBondExtraData[_tokenID] = tmpBondExtraData;

        return newDna;
    }

    function getHalfDna(uint256 _tokenID, uint256 _permanentSeed) internal view returns (uint80) {
        return uint80(uint256(keccak256(abi.encode(_tokenID, block.timestamp, _permanentSeed))));
    }

    function requireCallerIsChickenBondsManager() internal view {
        require(msg.sender == address(chickenBondManager), "BondNFT: Caller must be ChickenBondManager");
    }

    function tokenURI(uint256 _tokenID) public view virtual override returns (string memory) {
        require(_exists(_tokenID), "BondNFT: URI query for nonexistent token");

        return address(artwork) != address(0) ? artwork.tokenURI(_tokenID, idToBondExtraData[_tokenID]) : "";
    }

    // Prevent transfers for a period of time after chickening in or out
    function _beforeTokenTransfer(address _from, address _to, uint256 _tokenID) internal virtual override {
        if (_from != address(0)) {
            (,,, uint256 endTime, uint8 status) = chickenBondManager.getBondData(_tokenID);

            require(
                status == uint8(IChickenBondManager.BondStatus.active) ||
                block.timestamp >= endTime + transferLockoutPeriodSeconds,
                "BondNFT: cannot transfer during lockout period"
            );
        }

        super._beforeTokenTransfer(_from, _to, _tokenID);
    }

    function getBondAmount(uint256 _tokenID) external view returns (uint256 amount) {
        (amount,,,,) = chickenBondManager.getBondData(_tokenID);
    }

    function getBondClaimedBLUSD(uint256 _tokenID) external view returns (uint256 claimedBLUSD) {
        (,claimedBLUSD,,,) = chickenBondManager.getBondData(_tokenID);
    }

    function getBondStartTime(uint256 _tokenID) external view returns (uint256 startTime) {
        (,,startTime,,) = chickenBondManager.getBondData(_tokenID);
    }

    function getBondEndTime(uint256 _tokenID) external view returns (uint256 endTime) {
        (,,, endTime,) = chickenBondManager.getBondData(_tokenID);
    }

    function getBondInitialHalfDna(uint256 _tokenID) external view returns (uint80 initialHalfDna) {
        return idToBondExtraData[_tokenID].initialHalfDna;
    }

    function getBondInitialDna(uint256 _tokenID) external view returns (uint256 initialDna) {
        return uint256(idToBondExtraData[_tokenID].initialHalfDna);
    }

    function getBondFinalHalfDna(uint256 _tokenID) external view returns (uint80 finalHalfDna) {
        return idToBondExtraData[_tokenID].finalHalfDna;
    }

    function getBondFinalDna(uint256 _tokenID) external view returns (uint256 finalDna) {
        BondExtraData memory bondExtraData = idToBondExtraData[_tokenID];
        return (uint256(bondExtraData.initialHalfDna) << 128) + uint256(bondExtraData.finalHalfDna);
    }

    function getBondStatus(uint256 _tokenID) external view returns (uint8 status) {
        (,,,, status) = chickenBondManager.getBondData(_tokenID);
    }

    function getBondExtraData(uint256 _tokenID)
        external
        view
        returns (
            uint80 initialHalfDna,
            uint80 finalHalfDna,
            uint32 troveSize,
            uint32 lqtyAmount,
            uint32 curveGaugeSlopes
        )
    {
        BondExtraData memory bondExtraData = idToBondExtraData[_tokenID];
        return (
            bondExtraData.initialHalfDna,
            bondExtraData.finalHalfDna,
            bondExtraData.troveSize,
            bondExtraData.lqtyAmount,
            bondExtraData.curveGaugeSlopes
        );
    }
}

File 2 of 27 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

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

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 3 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `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);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 4 of 27 : 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 5 of 27 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

File 6 of 27 : ITroveManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.11;


// Common interface for the Trove Manager.
interface ITroveManager {
    /*
    function getTroveOwnersCount() external view returns (uint);

    function getTroveFromTroveOwnersArray(uint _index) external view returns (address);

    function getNominalICR(address _borrower) external view returns (uint);
    function getCurrentICR(address _borrower, uint _price) external view returns (uint);

    function liquidate(address _borrower) external;

    function liquidateTroves(uint _n) external;

    function batchLiquidateTroves(address[] calldata _troveArray) external;

    function redeemCollateral(
        uint _LUSDAmount,
        address _firstRedemptionHint,
        address _upperPartialRedemptionHint,
        address _lowerPartialRedemptionHint,
        uint _partialRedemptionHintNICR,
        uint _maxIterations,
        uint _maxFee
    ) external;

    function updateStakeAndTotalStakes(address _borrower) external returns (uint);

    function updateTroveRewardSnapshots(address _borrower) external;

    function addTroveOwnerToArray(address _borrower) external returns (uint index);

    function applyPendingRewards(address _borrower) external;

    function getPendingETHReward(address _borrower) external view returns (uint);

    function getPendingLUSDDebtReward(address _borrower) external view returns (uint);

     function hasPendingRewards(address _borrower) external view returns (bool);

    function getEntireDebtAndColl(address _borrower) external view returns (
        uint debt,
        uint coll,
        uint pendingLUSDDebtReward,
        uint pendingETHReward
    );

    function closeTrove(address _borrower) external;

    function removeStake(address _borrower) external;

    function getRedemptionRate() external view returns (uint);
    function getRedemptionRateWithDecay() external view returns (uint);

    function getRedemptionFeeWithDecay(uint _ETHDrawn) external view returns (uint);

    function getBorrowingRate() external view returns (uint);
    function getBorrowingRateWithDecay() external view returns (uint);

    function getBorrowingFee(uint LUSDDebt) external view returns (uint);
    function getBorrowingFeeWithDecay(uint _LUSDDebt) external view returns (uint);

    function decayBaseRateFromBorrowing() external;

    function getTroveStatus(address _borrower) external view returns (uint);

    function getTroveStake(address _borrower) external view returns (uint);
    */

    function getTroveDebt(address _borrower) external view returns (uint);

    /*
    function getTroveColl(address _borrower) external view returns (uint);

    function setTroveStatus(address _borrower, uint num) external;

    function increaseTroveColl(address _borrower, uint _collIncrease) external returns (uint);

    function decreaseTroveColl(address _borrower, uint _collDecrease) external returns (uint);

    function increaseTroveDebt(address _borrower, uint _debtIncrease) external returns (uint);

    function decreaseTroveDebt(address _borrower, uint _collDecrease) external returns (uint);

    function getTCR(uint _price) external view returns (uint);

    function checkRecoveryMode(uint _price) external view returns (bool);
    */
}

File 7 of 27 : ILQTYStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.11;

interface ILQTYStaking {
    /*
    function stake(uint _LQTYamount) external;

    function unstake(uint _LQTYamount) external;

    function increaseF_ETH(uint _ETHFee) external; 

    function increaseF_LUSD(uint _LQTYFee) external;  

    function getPendingETHGain(address _user) external view returns (uint);

    function getPendingLUSDGain(address _user) external view returns (uint);
    */

    function stakes(address) external view returns (uint256);
}

File 8 of 27 : IPickleJar.sol
pragma solidity ^0.8.11;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";


interface IPickleJar is IERC20 {
    function getRatio() external view returns (uint256);
}

File 9 of 27 : ICurveGaugeController.sol
pragma solidity ^0.8.11;


interface ICurveGaugeController {
    function vote_user_slopes(address, address) external view returns (uint256, uint256, uint256);
}

File 10 of 27 : IBondNFTArtwork.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "../Interfaces/IBondNFT.sol";


interface IBondNFTArtwork {
    function tokenURI(uint256 _tokenID, IBondNFT.BondExtraData calldata _bondExtraData) external view returns (string memory);
}

File 11 of 27 : IBondNFT.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "./IChickenBondManager.sol";


interface IBondNFT is IERC721Enumerable {
    struct BondExtraData {
        uint80 initialHalfDna;
        uint80 finalHalfDna;
        uint32 troveSize;         // Debt in LUSD
        uint32 lqtyAmount;        // Holding LQTY, staking or deposited into Pickle
        uint32 curveGaugeSlopes;  // For 3CRV and Frax pools combined
    }

    function mint(address _bonder, uint256 _permanentSeed) external returns (uint256, uint80);
    function setFinalExtraData(address _bonder, uint256 _tokenID, uint256 _permanentSeed) external returns (uint80);
    function chickenBondManager() external view returns (IChickenBondManager);
    function getBondAmount(uint256 _tokenID) external view returns (uint256 amount);
    function getBondStartTime(uint256 _tokenID) external view returns (uint256 startTime);
    function getBondEndTime(uint256 _tokenID) external view returns (uint256 endTime);
    function getBondInitialHalfDna(uint256 _tokenID) external view returns (uint80 initialHalfDna);
    function getBondInitialDna(uint256 _tokenID) external view returns (uint256 initialDna);
    function getBondFinalHalfDna(uint256 _tokenID) external view returns (uint80 finalHalfDna);
    function getBondFinalDna(uint256 _tokenID) external view returns (uint256 finalDna);
    function getBondStatus(uint256 _tokenID) external view returns (uint8 status);
    function getBondExtraData(uint256 _tokenID) external view returns (uint80 initialHalfDna, uint80 finalHalfDna, uint32 troveSize, uint32 lqtyAmount, uint32 curveGaugeSlopes);
}

File 12 of 27 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

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

        _transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

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

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

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

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

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

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

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

        _afterTokenTransfer(address(0), to, tokenId);
    }

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

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

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

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

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

        _afterTokenTransfer(owner, address(0), tokenId);
    }

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 13 of 27 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 14 of 27 : 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 15 of 27 : IChickenBondManager.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "./ILUSDToken.sol";
import "./IBLUSDToken.sol";
import "./ICurvePool.sol";
import "./IYearnVault.sol";
import "./IBAMM.sol";

interface IChickenBondManager {
    // Valid values for `status` returned by `getBondData()`
    enum BondStatus {
        nonExistent,
        active,
        chickenedOut,
        chickenedIn
    }

    function lusdToken() external view returns (ILUSDToken);
    function bLUSDToken() external view returns (IBLUSDToken);
    function curvePool() external view returns (ICurvePool);
    function bammSPVault() external view returns (IBAMM);
    function yearnCurveVault() external view returns (IYearnVault);
    // constants
    function INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL() external pure returns (int128);

    function createBond(uint256 _lusdAmount) external returns (uint256);
    function createBondWithPermit(
        address owner, 
        uint256 amount, 
        uint256 deadline, 
        uint8 v, 
        bytes32 r, 
        bytes32 s
    ) external  returns (uint256);
    function chickenOut(uint256 _bondID, uint256 _minLUSD) external;
    function chickenIn(uint256 _bondID) external;
    function redeem(uint256 _bLUSDToRedeem, uint256 _minLUSDFromBAMMSPVault) external returns (uint256, uint256);

    // getters
    function calcRedemptionFeePercentage(uint256 _fractionOfBLUSDToRedeem) external view returns (uint256);
    function getBondData(uint256 _bondID) external view returns (uint256 lusdAmount, uint64 claimedBLUSD, uint64 startTime, uint64 endTime, uint8 status);
    function getLUSDToAcquire(uint256 _bondID) external view returns (uint256);
    function calcAccruedBLUSD(uint256 _bondID) external view returns (uint256);
    function calcBondBLUSDCap(uint256 _bondID) external view returns (uint256);
    function getLUSDInBAMMSPVault() external view returns (uint256);
    function calcTotalYearnCurveVaultShareValue() external view returns (uint256);
    function calcTotalLUSDValue() external view returns (uint256);
    function getPendingLUSD() external view returns (uint256);
    function getAcquiredLUSDInSP() external view returns (uint256);
    function getAcquiredLUSDInCurve() external view returns (uint256);
    function getTotalAcquiredLUSD() external view returns (uint256);
    function getPermanentLUSD() external view returns (uint256);
    function getOwnedLUSDInSP() external view returns (uint256);
    function getOwnedLUSDInCurve() external view returns (uint256);
    function calcSystemBackingRatio() external view returns (uint256);
    function calcUpdatedAccrualParameter() external view returns (uint256);
    function getBAMMLUSDDebt() external view returns (uint256);
}

File 16 of 27 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 17 of 27 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 18 of 27 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 19 of 27 : 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);
            }
        }
    }
}

File 20 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 22 of 27 : ILUSDToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";

interface ILUSDToken is IERC20 { 
    
    // --- Events ---

    event TroveManagerAddressChanged(address _troveManagerAddress);
    event StabilityPoolAddressChanged(address _newStabilityPoolAddress);
    event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress);
    event LUSDTokenBalanceUpdated(address _user, uint _amount);

    // --- Functions ---

    function mint(address _account, uint256 _amount) external;

    function burn(address _account, uint256 _amount) external;

    function sendToPool(address _sender,  address poolAddress, uint256 _amount) external;

    function returnFromPool(address poolAddress, address user, uint256 _amount ) external;

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 23 of 27 : IBLUSDToken.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";

interface IBLUSDToken is IERC20 {
    function mint(address _to, uint256 _bLUSDAmount) external;

    function burn(address _from, uint256 _bLUSDAmount) external;
}

File 24 of 27 : ICurvePool.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";

interface ICurvePool is IERC20 { 
    function add_liquidity(uint256[2] memory _amounts, uint256 _min_mint_amount) external returns (uint256 mint_amount);

    function remove_liquidity(uint256 burn_amount, uint256[2] memory _min_amounts) external;

    function remove_liquidity_one_coin(uint256 _burn_amount, int128 i, uint256 _min_received) external;

    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy, address _receiver) external returns (uint256);

    function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 min_dy, address _receiver) external returns (uint256);

    function calc_withdraw_one_coin(uint256 _burn_amount, int128 i) external view returns (uint256);

    function calc_token_amount(uint256[2] memory _amounts, bool _is_deposit) external view returns (uint256);

    function balances(uint256 arg0) external view returns (uint256);

    function token() external view returns (address);

    function totalSupply() external view returns (uint256);

    function get_dy(int128 i,int128 j, uint256 dx) external view returns (uint256);

    function get_dy_underlying(int128 i,int128 j, uint256 dx) external view returns (uint256);

    function get_virtual_price() external view returns (uint256);

    function fee() external view returns (uint256);

    function D() external returns (uint256);

    function future_A_gamma_time() external returns (uint256);
}

File 25 of 27 : IYearnVault.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";

interface IYearnVault is IERC20 { 
    function deposit(uint256 _tokenAmount) external returns (uint256);

    function withdraw(uint256 _tokenAmount) external returns (uint256);

    function lastReport() external view returns (uint256);

    function totalDebt() external view returns (uint256);

    function calcTokenToYToken(uint256 _tokenAmount) external pure returns (uint256); 

    function token() external view returns (address);

    function availableDepositLimit() external view returns (uint256);

    function pricePerShare() external view returns (uint256);

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

    function setDepositLimit(uint256 limit) external;

    function withdrawalQueue(uint256) external returns (address);
}

File 26 of 27 : IBAMM.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;


interface IBAMM {
    function deposit(uint256 lusdAmount) external;

    function withdraw(uint256 lusdAmount, address to) external;

    function swap(uint lusdAmount, uint minEthReturn, address payable dest) external returns(uint);

    function getSwapEthAmount(uint lusdQty) external view returns(uint ethAmount, uint feeLusdAmount);

    function getLUSDValue() external view returns (uint256, uint256, uint256);

    function setChicken(address _chicken) external;
}

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

pragma solidity ^0.8.0;

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

Settings
{
  "remappings": [
    "b-protocol/=lib/b-protocol/",
    "datetime/=lib/datetime/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"_initialArtworkAddress","type":"address"},{"internalType":"uint256","name":"_transferLockoutPeriodSeconds","type":"uint256"},{"components":[{"internalType":"address","name":"troveManagerAddress","type":"address"},{"internalType":"address","name":"lqtyToken","type":"address"},{"internalType":"address","name":"lqtyStaking","type":"address"},{"internalType":"address","name":"pickleLQTYJar","type":"address"},{"internalType":"address","name":"pickleLQTYFarm","type":"address"},{"internalType":"address","name":"curveGaugeController","type":"address"},{"internalType":"address","name":"curveLUSD3CRVGauge","type":"address"},{"internalType":"address","name":"curveLUSDFRAXGauge","type":"address"}],"internalType":"struct BondNFT.LiquityDataAddresses","name":"_liquityDataAddresses","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CURVE_GAUGE_SLOPES_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artwork","outputs":[{"internalType":"contract IBondNFTArtwork","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chickenBondManager","outputs":[{"internalType":"contract IChickenBondManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveGaugeController","outputs":[{"internalType":"contract ICurveGaugeController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveLUSD3CRVGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveLUSDFRAXGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondClaimedBLUSD","outputs":[{"internalType":"uint256","name":"claimedBLUSD","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondEndTime","outputs":[{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondExtraData","outputs":[{"internalType":"uint80","name":"initialHalfDna","type":"uint80"},{"internalType":"uint80","name":"finalHalfDna","type":"uint80"},{"internalType":"uint32","name":"troveSize","type":"uint32"},{"internalType":"uint32","name":"lqtyAmount","type":"uint32"},{"internalType":"uint32","name":"curveGaugeSlopes","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondFinalDna","outputs":[{"internalType":"uint256","name":"finalDna","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondFinalHalfDna","outputs":[{"internalType":"uint80","name":"finalHalfDna","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondInitialDna","outputs":[{"internalType":"uint256","name":"initialDna","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondInitialHalfDna","outputs":[{"internalType":"uint80","name":"initialHalfDna","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondStartTime","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getBondStatus","outputs":[{"internalType":"uint8","name":"status","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lqtyStaking","outputs":[{"internalType":"contract ILQTYStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lqtyToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bonder","type":"address"},{"internalType":"uint256","name":"_permanentSeed","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pickleLQTYFarm","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pickleLQTYJar","outputs":[{"internalType":"contract IPickleJar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_chickenBondManagerAddress","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_artworkAddress","type":"address"}],"name":"setArtworkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bonder","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_permanentSeed","type":"uint256"}],"name":"setFinalExtraData","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferLockoutPeriodSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"troveManager","outputs":[{"internalType":"contract ITroveManager","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101a06040523480156200001257600080fd5b5060405162003969380380620039698339810160408190526200003591620005e5565b84846000620000458382620007bc565b506001620000548282620007bc565b505050620000716200006b6200046860201b60201c565b6200046c565b80516001600160a01b0316620000e55760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a205f74726f76654d616e6167657241646472657373206d7560448201526d7374206265206e6f6e2d7a65726f60901b60648201526084015b60405180910390fd5b60208101516001600160a01b03166200014d5760405162461bcd60e51b8152602060048201526024808201527f426f6e644e46543a205f6c717479546f6b656e206d757374206265206e6f6e2d6044820152637a65726f60e01b6064820152608401620000dc565b60408101516001600160a01b0316620001b85760405162461bcd60e51b815260206004820152602660248201527f426f6e644e46543a205f6c7174795374616b696e67206d757374206265206e6f6044820152656e2d7a65726f60d01b6064820152608401620000dc565b60608101516001600160a01b0316620002255760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a205f7069636b6c654c5154594a6172206d757374206265206044820152676e6f6e2d7a65726f60c01b6064820152608401620000dc565b60808101516001600160a01b0316620002935760405162461bcd60e51b815260206004820152602960248201527f426f6e644e46543a205f7069636b6c654c5154594661726d206d757374206265604482015268206e6f6e2d7a65726f60b81b6064820152608401620000dc565b60a08101516001600160a01b0316620003075760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a205f63757276654761756765436f6e74726f6c6c6572206d60448201526e757374206265206e6f6e2d7a65726f60881b6064820152608401620000dc565b60c08101516001600160a01b0316620003795760405162461bcd60e51b815260206004820152602d60248201527f426f6e644e46543a205f63757276654c555344334352564761756765206d757360448201526c74206265206e6f6e2d7a65726f60981b6064820152608401620000dc565b60e08101516001600160a01b0316620003eb5760405162461bcd60e51b815260206004820152602d60248201527f426f6e644e46543a205f63757276654c555344465241584761756765206d757360448201526c74206265206e6f6e2d7a65726f60981b6064820152608401620000dc565b600c80546001600160a01b0319166001600160a01b03948516179055610180919091528051821660809081526020820151831660a09081526040830151841660c09081526060840151851660e090815292840151851661010052908301518416610120528201518316610140520151166101605250620008889050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715620004fa57620004fa620004be565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200052b576200052b620004be565b604052919050565b600082601f8301126200054557600080fd5b81516001600160401b03811115620005615762000561620004be565b602062000577601f8301601f1916820162000500565b82815285828487010111156200058c57600080fd5b60005b83811015620005ac5785810183015182820184015282016200058f565b83811115620005be5760008385840101525b5095945050505050565b80516001600160a01b0381168114620005e057600080fd5b919050565b60008060008060008587036101808112156200060057600080fd5b86516001600160401b03808211156200061857600080fd5b620006268a838b0162000533565b975060208901519150808211156200063d57600080fd5b506200064c89828a0162000533565b9550506200065d60408801620005c8565b93506060870151925061010080607f19830112156200067b57600080fd5b62000685620004d4565b91506200069560808901620005c8565b8252620006a560a08901620005c8565b6020830152620006b860c08901620005c8565b6040830152620006cb60e08901620005c8565b6060830152620006dd818901620005c8565b608083015250620006f26101208801620005c8565b60a0820152620007066101408801620005c8565b60c08201526200071a6101608801620005c8565b60e0820152809150509295509295909350565b600181811c908216806200074257607f821691505b6020821081036200076357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620007b757600081815260208120601f850160051c81016020861015620007925750805b601f850160051c820191505b81811015620007b3578281556001016200079e565b5050505b505050565b81516001600160401b03811115620007d857620007d8620004be565b620007f081620007e984546200072d565b8462000769565b602080601f8311600181146200082857600084156200080f5750858301515b600019600386901b1c1916600185901b178555620007b3565b600085815260208120601f198616915b82811015620008595788860151825594840194600190910190840162000838565b5085821015620008785787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516101205161014051610160516101805161301c6200094d6000396000818161049501526125f401526000818161044801526117d2015260008181610797015261171901526000818161059301528181611744015261180001526000818161040e01526114b50152600081816103c00152818161138e01528181611416015261153f01526000818161062701526115e60152600081816103e701526116700152600081816104bc0152611302015261301c6000f3fe608060405234801561001057600080fd5b50600436106102cf5760003560e01c80636c15314f1161018c578063a948f0ae116100ee578063d7aecbb711610097578063e985e9c511610071578063e985e9c5146107de578063ec8e1e131461081a578063f2fde38b1461082d57600080fd5b8063d7aecbb71461077f578063de2c100814610792578063e91b0a41146107b957600080fd5b8063c4720663116100c8578063c47206631461069f578063c87b56dd146106aa578063d345366e146106bd57600080fd5b8063a948f0ae14610649578063aec0932d14610679578063b88d4fde1461068c57600080fd5b806381d3c435116101505780639841a0181161012a5780639841a018146105fc578063a22cb4651461060f578063a3a640171461062257600080fd5b806381d3c435146105d05780638da5cb5b146105e357806395d89b41146105f457600080fd5b80636c15314f1461056d5780636df881ae146105805780636eef94971461058e57806370a08231146105b5578063715018a6146105c857600080fd5b8063244788b51161023557806340c10f19116101f957806356d83ed9116101d357806356d83ed91461053457806360e1753f146105475780636352211e1461055a57600080fd5b806340c10f19146104de57806342842e0e1461050e5780634f6ccce71461052157600080fd5b8063244788b51461044357806326cc133e1461046a5780632f745c591461047d57806337c79730146104905780633d83908a146104b757600080fd5b806310a6b766116102975780631f7af3c3116102715780631f7af3c3146103e25780632155c0b01461040957806323b872dd1461043057600080fd5b806310a6b7661461039257806318160ddd146103b35780631d00bcdb146103bb57600080fd5b806301ffc9a7146102d457806306fdde03146102fc578063081812fc14610311578063095ea7b31461033c578063106d8bbb14610351575b600080fd5b6102e76102e2366004612a5d565b610840565b60405190151581526020015b60405180910390f35b61030461086b565b6040516102f39190612ad2565b61032461031f366004612ae5565b6108fd565b6040516001600160a01b0390911681526020016102f3565b61034f61034a366004612b1a565b610997565b005b61037a61035f366004612ae5565b6000908152600d60205260409020546001600160501b031690565b6040516001600160501b0390911681526020016102f3565b6103a56103a0366004612ae5565b610aac565b6040519081526020016102f3565b6008546103a5565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b61034f61043e366004612b44565b610b25565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b600c54610324906001600160a01b031681565b6103a561048b366004612b1a565b610ba0565b6103a57f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6104f16104ec366004612b1a565b610c36565b604080519283526001600160501b039091166020830152016102f3565b61034f61051c366004612b44565b610d76565b6103a561052f366004612ae5565b610d91565b600b54610324906001600160a01b031681565b6103a5610555366004612ae5565b610e24565b610324610568366004612ae5565b610ea6565b6103a561057b366004612ae5565b610f1d565b6103a561035f366004612ae5565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103a56105c3366004612b80565b610fbb565b61034f611042565b61034f6105de366004612b80565b6110a8565b600a546001600160a01b0316610324565b61030461121f565b61037a61060a366004612b9b565b61122e565b61034f61061d366004612bce565b611946565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b61037a610657366004612ae5565b6000908152600d6020526040902054600160501b90046001600160501b031690565b6103a5610687366004612ae5565b611955565b61034f61069a366004612c79565b6119d7565b6103a5633b9aca0081565b6103046106b8366004612ae5565b611a59565b6107416106cb366004612ae5565b6000818152600d6020908152604091829020825160a08101845290546001600160501b03808216808452600160501b830490911693830184905263ffffffff600160a01b83048116958401869052600160c01b8304811660608501819052600160e01b9093041660809093018390529590929450565b604080516001600160501b03968716815295909416602086015263ffffffff928316938501939093528116606084015216608082015260a0016102f3565b6103a561078d366004612ae5565b611bb7565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6107cc6107c7366004612ae5565b611c39565b60405160ff90911681526020016102f3565b6102e76107ec366004612d24565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61034f610828366004612b80565b611cb1565b61034f61083b366004612b80565b611d9e565b60006001600160e01b0319821663780e9d6360e01b1480610865575061086582611e66565b92915050565b60606000805461087a90612d57565b80601f01602080910402602001604051908101604052809291908181526020018280546108a690612d57565b80156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661097b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109a282610ea6565b9050806001600160a01b0316836001600160a01b031603610a0f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610972565b336001600160a01b0382161480610a2b5750610a2b81336107ec565b610a9d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610972565b610aa78383611eb6565b505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190612da9565b509295945050505050565b610b2f3382611f24565b610b955760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b610aa783838361201b565b6000610bab83610fbb565b8210610c0d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610972565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600080610c416121c2565b6000610c4c60085490565b610c57906001612e27565b6040805160a0810182526000808252602080830182905282840182905260608084018390526080808501849052855180840188905242818801528083018c905286518082039093018352019094528351930192909220929350916001600160501b0380821684526000858152600d6020908152604091829020865181549288015193880151606089015160808a015163ffffffff908116600160e01b026001600160e01b03928216600160c01b0263ffffffff60c01b1992909416600160a01b029190911667ffffffffffffffff60a01b19978916600160501b026001600160a01b0319909716949098169390931794909417949094169490941792909217169190911790559050610d69878461222f565b9196919550909350505050565b610aa7838383604051806020016040528060008152506119d7565b6000610d9c60085490565b8210610dff5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610972565b60088281548110610e1257610e12612e3f565b90600052602060002001549050919050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190612da9565b50505067ffffffffffffffff169392505050565b6000818152600260205260408120546001600160a01b0316806108655760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610972565b6000818152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b820416938201849052600160a01b810463ffffffff90811693830193909352600160c01b810483166060830152600160e01b81049092166080808301919091529092610fb49290911b79ffffffffffffffffffff0000000000000000000000000000000016612e27565b9392505050565b60006001600160a01b0382166110265760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610972565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461109c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6110a6600061237d565b565b600a546001600160a01b031633146111025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b03811661117e5760405162461bcd60e51b815260206004820152603460248201527f426f6e644e46543a205f636869636b656e426f6e644d616e616765724164647260448201527f657373206d757374206265206e6f6e2d7a65726f0000000000000000000000006064820152608401610972565b600b546001600160a01b0316156111fd5760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a2073657441646472657373657328292063616e206f6e6c7960448201527f2062652063616c6c6564206f6e636500000000000000000000000000000000006064820152608401610972565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805461087a90612d57565b60006112386121c2565b6000838152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b8204168285015263ffffffff600160a01b8204811683850152600160c01b82048116606080850191909152600160e01b9092041660808084019190915283518086018a905242818601528083018990528451808203909301835201909252815191909201209091906001600160501b038116602084015260405163d66a255360e01b81526001600160a01b038881166004830152919250611372917f0000000000000000000000000000000000000000000000000000000000000000169063d66a255390602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612e55565b6123cf565b826040019063ffffffff16908163ffffffff16815250506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612e55565b11156115c1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ec1ebd7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190612e55565b6040516370a0823160e01b81526001600160a01b0389811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115209190612e55565b6040516370a0823160e01b81526001600160a01b038a811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611586573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115aa9190612e55565b6115b49190612e27565b6115be9190612e6e565b90505b6040516305a4d3f160e21b81526001600160a01b0388811660048301526116ef9183917f000000000000000000000000000000000000000000000000000000000000000016906316934fc490602401602060405180830381865afa15801561162d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116519190612e55565b6040516370a0823160e01b81526001600160a01b038b811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156116b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116db9190612e55565b6116e59190612e27565b61136d9190612e27565b63ffffffff1660608401526040516301e8cff360e31b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690630f467f9890604401606060405180830381865afa15801561178d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b19190612e8d565b50506040516301e8cff360e31b81526001600160a01b038a811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301529192506000917f00000000000000000000000000000000000000000000000000000000000000001690630f467f9890604401606060405180830381865afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b9190612e8d565b5050905061188d633b9aca0082846118839190612e27565b61136d9190612e6e565b63ffffffff908116608087019081526000998a52600d602090815260409a8b902088518154928a01519c8a01516060909a015193518516600160e01b026001600160e01b03948616600160c01b0263ffffffff60c01b199b909616600160a01b029a909a1667ffffffffffffffff60a01b196001600160501b039e8f16600160501b026001600160a01b03199095169e9092169d909d1792909217919091169a909a179190911716949094179096555095945050505050565b6119513383836123f0565b5050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa15801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190612da9565b5067ffffffffffffffff1695945050505050565b6119e13383611f24565b611a475760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b611a53848484846124be565b50505050565b6000818152600260205260409020546060906001600160a01b0316611ad15760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a2055524920717565727920666f72206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610972565b600c546001600160a01b0316611af65760405180602001604052806000815250610865565b600c546000838152600d602052604090819020905163b58d3bd160e01b81526004810185905290546001600160501b038082166024840152605082901c16604483015263ffffffff60a082901c8116606484015260c082901c16608483015260e01c60a48201526001600160a01b039091169063b58d3bd19060c401600060405180830381865afa158015611b8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108659190810190612ebb565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612da9565b505067ffffffffffffffff16949350505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca79190612da9565b9695505050505050565b600a546001600160a01b03163314611d0b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b600b546001600160a01b0316611d785760405162461bcd60e51b815260206004820152602c60248201527f426f6e644e46543a207365744164647265737365732829206d7573742062652060448201526b18d85b1b195908199a5c9cdd60a21b6064820152608401610972565b600c80546001600160a01b0319166001600160a01b038316179055611d9b611042565b50565b600a546001600160a01b03163314611df85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b038116611e5d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610972565b611d9b8161237d565b60006001600160e01b031982166380ac58cd60e01b1480611e9757506001600160e01b03198216635b5e139f60e01b145b8061086557506301ffc9a760e01b6001600160e01b0319831614610865565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611eeb82610ea6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611f9d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610972565b6000611fa883610ea6565b9050806001600160a01b0316846001600160a01b03161480611fef57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120135750836001600160a01b0316612008846108fd565b6001600160a01b0316145b949350505050565b826001600160a01b031661202e82610ea6565b6001600160a01b0316146120925760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610972565b6001600160a01b0382166120f45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610972565b6120ff83838361253c565b61210a600082611eb6565b6001600160a01b0383166000908152600360205260408120805460019290612133908490612f32565b90915550506001600160a01b0382166000908152600360205260408120805460019290612161908490612e27565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b546001600160a01b031633146110a65760405162461bcd60e51b815260206004820152602a60248201527f426f6e644e46543a2043616c6c6572206d75737420626520436869636b656e4260448201526937b73226b0b730b3b2b960b11b6064820152608401610972565b6001600160a01b0382166122855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610972565b6000818152600260205260409020546001600160a01b0316156122ea5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610972565b6122f66000838361253c565b6001600160a01b038216600090815260036020526040812080546001929061231f908490612e27565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006108656123e6670de0b6b3a764000084612f49565b63ffffffff61269d565b816001600160a01b0316836001600160a01b0316036124515760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610972565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6124c984848461201b565b6124d5848484846126b3565b611a535760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b6001600160a01b0383161561269257600b5460405163da10594360e01b81526004810183905260009182916001600160a01b039091169063da1059439060240160a060405180830381865afa158015612599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bd9190612da9565b945067ffffffffffffffff169450505050600160038111156125e1576125e1612f6b565b60ff168160ff16148061261d57506126197f000000000000000000000000000000000000000000000000000000000000000083612e27565b4210155b61268f5760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a2063616e6e6f74207472616e7366657220647572696e672060448201527f6c6f636b6f757420706572696f640000000000000000000000000000000000006064820152608401610972565b50505b610aa78383836127ff565b60008183106126ac5781610fb4565b5090919050565b60006001600160a01b0384163b156127f457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126f7903390899088908890600401612f81565b6020604051808303816000875af1925050508015612732575060408051601f3d908101601f1916820190925261272f91810190612fb3565b60015b6127da573d808015612760576040519150601f19603f3d011682016040523d82523d6000602084013e612765565b606091505b5080516000036127d25760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612013565b506001949350505050565b6001600160a01b03831661285a5761285581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61287d565b816001600160a01b0316836001600160a01b03161461287d5761287d83826128b7565b6001600160a01b03821661289457610aa781612954565b826001600160a01b0316826001600160a01b031614610aa757610aa78282612a03565b600060016128c484610fbb565b6128ce9190612f32565b600083815260076020526040902054909150808214612921576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061296690600190612f32565b6000838152600960205260408120546008805493945090928490811061298e5761298e612e3f565b9060005260206000200154905080600883815481106129af576129af612e3f565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129e7576129e7612fd0565b6001900381819060005260206000200160009055905550505050565b6000612a0e83610fbb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981168114611d9b57600080fd5b600060208284031215612a6f57600080fd5b8135610fb481612a47565b60005b83811015612a95578181015183820152602001612a7d565b83811115611a535750506000910152565b60008151808452612abe816020860160208601612a7a565b601f01601f19169290920160200192915050565b602081526000610fb46020830184612aa6565b600060208284031215612af757600080fd5b5035919050565b80356001600160a01b0381168114612b1557600080fd5b919050565b60008060408385031215612b2d57600080fd5b612b3683612afe565b946020939093013593505050565b600080600060608486031215612b5957600080fd5b612b6284612afe565b9250612b7060208501612afe565b9150604084013590509250925092565b600060208284031215612b9257600080fd5b610fb482612afe565b600080600060608486031215612bb057600080fd5b612bb984612afe565b95602085013595506040909401359392505050565b60008060408385031215612be157600080fd5b612bea83612afe565b915060208301358015158114612bff57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c4957612c49612c0a565b604052919050565b600067ffffffffffffffff821115612c6b57612c6b612c0a565b50601f01601f191660200190565b60008060008060808587031215612c8f57600080fd5b612c9885612afe565b9350612ca660208601612afe565b925060408501359150606085013567ffffffffffffffff811115612cc957600080fd5b8501601f81018713612cda57600080fd5b8035612ced612ce882612c51565b612c20565b818152886020838501011115612d0257600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612d3757600080fd5b612d4083612afe565b9150612d4e60208401612afe565b90509250929050565b600181811c90821680612d6b57607f821691505b602082108103612d8b57634e487b7160e01b600052602260045260246000fd5b50919050565b805167ffffffffffffffff81168114612b1557600080fd5b600080600080600060a08688031215612dc157600080fd5b85519450612dd160208701612d91565b9350612ddf60408701612d91565b9250612ded60608701612d91565b9150608086015160ff81168114612e0357600080fd5b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b60008219821115612e3a57612e3a612e11565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612e6757600080fd5b5051919050565b6000816000190483118215151615612e8857612e88612e11565b500290565b600080600060608486031215612ea257600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215612ecd57600080fd5b815167ffffffffffffffff811115612ee457600080fd5b8201601f81018413612ef557600080fd5b8051612f03612ce882612c51565b818152856020838501011115612f1857600080fd5b612f29826020830160208601612a7a565b95945050505050565b600082821015612f4457612f44612e11565b500390565b600082612f6657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152611ca76080830184612aa6565b600060208284031215612fc557600080fd5b8151610fb481612a47565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220256e2c83c1f151ddabcc94ec2d35b5880e5813a1fba15203974e240c88322cc164736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000743377926033cad0770e0f2b0d4cd33d7430fd560000000000000000000000000000000000000000000000000000000000015180000000000000000000000000a39739ef8b0231dbfa0dcda07d7e29faabcf4bb20000000000000000000000006dea81c8171d0ba574754ef6f8b412f2ed88c54d0000000000000000000000004f9fbb3f1e99b56e0fe2892e623ed36a76fc605d00000000000000000000000065b2532474f717d5a8ba38078b78106d56118bbb000000000000000000000000a7bc844a76e727ec5250f3849148c21f4b43ceea0000000000000000000000002f50d538606fa9edd2b11e2446beb18c9d5846bb0000000000000000000000009b8519a9a00100720ccdc8a120fbed319ca47a14000000000000000000000000389fc079a15354e9cbce8258433cc0f85b755a42000000000000000000000000000000000000000000000000000000000000000b4c555344426f6e644e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c555344424f4e44000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102cf5760003560e01c80636c15314f1161018c578063a948f0ae116100ee578063d7aecbb711610097578063e985e9c511610071578063e985e9c5146107de578063ec8e1e131461081a578063f2fde38b1461082d57600080fd5b8063d7aecbb71461077f578063de2c100814610792578063e91b0a41146107b957600080fd5b8063c4720663116100c8578063c47206631461069f578063c87b56dd146106aa578063d345366e146106bd57600080fd5b8063a948f0ae14610649578063aec0932d14610679578063b88d4fde1461068c57600080fd5b806381d3c435116101505780639841a0181161012a5780639841a018146105fc578063a22cb4651461060f578063a3a640171461062257600080fd5b806381d3c435146105d05780638da5cb5b146105e357806395d89b41146105f457600080fd5b80636c15314f1461056d5780636df881ae146105805780636eef94971461058e57806370a08231146105b5578063715018a6146105c857600080fd5b8063244788b51161023557806340c10f19116101f957806356d83ed9116101d357806356d83ed91461053457806360e1753f146105475780636352211e1461055a57600080fd5b806340c10f19146104de57806342842e0e1461050e5780634f6ccce71461052157600080fd5b8063244788b51461044357806326cc133e1461046a5780632f745c591461047d57806337c79730146104905780633d83908a146104b757600080fd5b806310a6b766116102975780631f7af3c3116102715780631f7af3c3146103e25780632155c0b01461040957806323b872dd1461043057600080fd5b806310a6b7661461039257806318160ddd146103b35780631d00bcdb146103bb57600080fd5b806301ffc9a7146102d457806306fdde03146102fc578063081812fc14610311578063095ea7b31461033c578063106d8bbb14610351575b600080fd5b6102e76102e2366004612a5d565b610840565b60405190151581526020015b60405180910390f35b61030461086b565b6040516102f39190612ad2565b61032461031f366004612ae5565b6108fd565b6040516001600160a01b0390911681526020016102f3565b61034f61034a366004612b1a565b610997565b005b61037a61035f366004612ae5565b6000908152600d60205260409020546001600160501b031690565b6040516001600160501b0390911681526020016102f3565b6103a56103a0366004612ae5565b610aac565b6040519081526020016102f3565b6008546103a5565b6103247f00000000000000000000000065b2532474f717d5a8ba38078b78106d56118bbb81565b6103247f0000000000000000000000006dea81c8171d0ba574754ef6f8b412f2ed88c54d81565b6103247f000000000000000000000000a7bc844a76e727ec5250f3849148c21f4b43ceea81565b61034f61043e366004612b44565b610b25565b6103247f000000000000000000000000389fc079a15354e9cbce8258433cc0f85b755a4281565b600c54610324906001600160a01b031681565b6103a561048b366004612b1a565b610ba0565b6103a57f000000000000000000000000000000000000000000000000000000000001518081565b6103247f000000000000000000000000a39739ef8b0231dbfa0dcda07d7e29faabcf4bb281565b6104f16104ec366004612b1a565b610c36565b604080519283526001600160501b039091166020830152016102f3565b61034f61051c366004612b44565b610d76565b6103a561052f366004612ae5565b610d91565b600b54610324906001600160a01b031681565b6103a5610555366004612ae5565b610e24565b610324610568366004612ae5565b610ea6565b6103a561057b366004612ae5565b610f1d565b6103a561035f366004612ae5565b6103247f0000000000000000000000002f50d538606fa9edd2b11e2446beb18c9d5846bb81565b6103a56105c3366004612b80565b610fbb565b61034f611042565b61034f6105de366004612b80565b6110a8565b600a546001600160a01b0316610324565b61030461121f565b61037a61060a366004612b9b565b61122e565b61034f61061d366004612bce565b611946565b6103247f0000000000000000000000004f9fbb3f1e99b56e0fe2892e623ed36a76fc605d81565b61037a610657366004612ae5565b6000908152600d6020526040902054600160501b90046001600160501b031690565b6103a5610687366004612ae5565b611955565b61034f61069a366004612c79565b6119d7565b6103a5633b9aca0081565b6103046106b8366004612ae5565b611a59565b6107416106cb366004612ae5565b6000818152600d6020908152604091829020825160a08101845290546001600160501b03808216808452600160501b830490911693830184905263ffffffff600160a01b83048116958401869052600160c01b8304811660608501819052600160e01b9093041660809093018390529590929450565b604080516001600160501b03968716815295909416602086015263ffffffff928316938501939093528116606084015216608082015260a0016102f3565b6103a561078d366004612ae5565b611bb7565b6103247f0000000000000000000000009b8519a9a00100720ccdc8a120fbed319ca47a1481565b6107cc6107c7366004612ae5565b611c39565b60405160ff90911681526020016102f3565b6102e76107ec366004612d24565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61034f610828366004612b80565b611cb1565b61034f61083b366004612b80565b611d9e565b60006001600160e01b0319821663780e9d6360e01b1480610865575061086582611e66565b92915050565b60606000805461087a90612d57565b80601f01602080910402602001604051908101604052809291908181526020018280546108a690612d57565b80156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661097b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109a282610ea6565b9050806001600160a01b0316836001600160a01b031603610a0f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610972565b336001600160a01b0382161480610a2b5750610a2b81336107ec565b610a9d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610972565b610aa78383611eb6565b505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190612da9565b509295945050505050565b610b2f3382611f24565b610b955760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b610aa783838361201b565b6000610bab83610fbb565b8210610c0d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610972565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600080610c416121c2565b6000610c4c60085490565b610c57906001612e27565b6040805160a0810182526000808252602080830182905282840182905260608084018390526080808501849052855180840188905242818801528083018c905286518082039093018352019094528351930192909220929350916001600160501b0380821684526000858152600d6020908152604091829020865181549288015193880151606089015160808a015163ffffffff908116600160e01b026001600160e01b03928216600160c01b0263ffffffff60c01b1992909416600160a01b029190911667ffffffffffffffff60a01b19978916600160501b026001600160a01b0319909716949098169390931794909417949094169490941792909217169190911790559050610d69878461222f565b9196919550909350505050565b610aa7838383604051806020016040528060008152506119d7565b6000610d9c60085490565b8210610dff5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610972565b60088281548110610e1257610e12612e3f565b90600052602060002001549050919050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190612da9565b50505067ffffffffffffffff169392505050565b6000818152600260205260408120546001600160a01b0316806108655760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610972565b6000818152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b820416938201849052600160a01b810463ffffffff90811693830193909352600160c01b810483166060830152600160e01b81049092166080808301919091529092610fb49290911b79ffffffffffffffffffff0000000000000000000000000000000016612e27565b9392505050565b60006001600160a01b0382166110265760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610972565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461109c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6110a6600061237d565b565b600a546001600160a01b031633146111025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b03811661117e5760405162461bcd60e51b815260206004820152603460248201527f426f6e644e46543a205f636869636b656e426f6e644d616e616765724164647260448201527f657373206d757374206265206e6f6e2d7a65726f0000000000000000000000006064820152608401610972565b600b546001600160a01b0316156111fd5760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a2073657441646472657373657328292063616e206f6e6c7960448201527f2062652063616c6c6564206f6e636500000000000000000000000000000000006064820152608401610972565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805461087a90612d57565b60006112386121c2565b6000838152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b8204168285015263ffffffff600160a01b8204811683850152600160c01b82048116606080850191909152600160e01b9092041660808084019190915283518086018a905242818601528083018990528451808203909301835201909252815191909201209091906001600160501b038116602084015260405163d66a255360e01b81526001600160a01b038881166004830152919250611372917f000000000000000000000000a39739ef8b0231dbfa0dcda07d7e29faabcf4bb2169063d66a255390602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612e55565b6123cf565b826040019063ffffffff16908163ffffffff16815250506000807f00000000000000000000000065b2532474f717d5a8ba38078b78106d56118bbb6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612e55565b11156115c1577f00000000000000000000000065b2532474f717d5a8ba38078b78106d56118bbb6001600160a01b031663ec1ebd7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190612e55565b6040516370a0823160e01b81526001600160a01b0389811660048301527f000000000000000000000000a7bc844a76e727ec5250f3849148c21f4b43ceea16906370a0823190602401602060405180830381865afa1580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115209190612e55565b6040516370a0823160e01b81526001600160a01b038a811660048301527f00000000000000000000000065b2532474f717d5a8ba38078b78106d56118bbb16906370a0823190602401602060405180830381865afa158015611586573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115aa9190612e55565b6115b49190612e27565b6115be9190612e6e565b90505b6040516305a4d3f160e21b81526001600160a01b0388811660048301526116ef9183917f0000000000000000000000004f9fbb3f1e99b56e0fe2892e623ed36a76fc605d16906316934fc490602401602060405180830381865afa15801561162d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116519190612e55565b6040516370a0823160e01b81526001600160a01b038b811660048301527f0000000000000000000000006dea81c8171d0ba574754ef6f8b412f2ed88c54d16906370a0823190602401602060405180830381865afa1580156116b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116db9190612e55565b6116e59190612e27565b61136d9190612e27565b63ffffffff1660608401526040516301e8cff360e31b81526001600160a01b0388811660048301527f0000000000000000000000009b8519a9a00100720ccdc8a120fbed319ca47a14811660248301526000917f0000000000000000000000002f50d538606fa9edd2b11e2446beb18c9d5846bb90911690630f467f9890604401606060405180830381865afa15801561178d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b19190612e8d565b50506040516301e8cff360e31b81526001600160a01b038a811660048301527f000000000000000000000000389fc079a15354e9cbce8258433cc0f85b755a42811660248301529192506000917f0000000000000000000000002f50d538606fa9edd2b11e2446beb18c9d5846bb1690630f467f9890604401606060405180830381865afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b9190612e8d565b5050905061188d633b9aca0082846118839190612e27565b61136d9190612e6e565b63ffffffff908116608087019081526000998a52600d602090815260409a8b902088518154928a01519c8a01516060909a015193518516600160e01b026001600160e01b03948616600160c01b0263ffffffff60c01b199b909616600160a01b029a909a1667ffffffffffffffff60a01b196001600160501b039e8f16600160501b026001600160a01b03199095169e9092169d909d1792909217919091169a909a179190911716949094179096555095945050505050565b6119513383836123f0565b5050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa15801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190612da9565b5067ffffffffffffffff1695945050505050565b6119e13383611f24565b611a475760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b611a53848484846124be565b50505050565b6000818152600260205260409020546060906001600160a01b0316611ad15760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a2055524920717565727920666f72206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610972565b600c546001600160a01b0316611af65760405180602001604052806000815250610865565b600c546000838152600d602052604090819020905163b58d3bd160e01b81526004810185905290546001600160501b038082166024840152605082901c16604483015263ffffffff60a082901c8116606484015260c082901c16608483015260e01c60a48201526001600160a01b039091169063b58d3bd19060c401600060405180830381865afa158015611b8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108659190810190612ebb565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612da9565b505067ffffffffffffffff16949350505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca79190612da9565b9695505050505050565b600a546001600160a01b03163314611d0b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b600b546001600160a01b0316611d785760405162461bcd60e51b815260206004820152602c60248201527f426f6e644e46543a207365744164647265737365732829206d7573742062652060448201526b18d85b1b195908199a5c9cdd60a21b6064820152608401610972565b600c80546001600160a01b0319166001600160a01b038316179055611d9b611042565b50565b600a546001600160a01b03163314611df85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b038116611e5d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610972565b611d9b8161237d565b60006001600160e01b031982166380ac58cd60e01b1480611e9757506001600160e01b03198216635b5e139f60e01b145b8061086557506301ffc9a760e01b6001600160e01b0319831614610865565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611eeb82610ea6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611f9d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610972565b6000611fa883610ea6565b9050806001600160a01b0316846001600160a01b03161480611fef57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120135750836001600160a01b0316612008846108fd565b6001600160a01b0316145b949350505050565b826001600160a01b031661202e82610ea6565b6001600160a01b0316146120925760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610972565b6001600160a01b0382166120f45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610972565b6120ff83838361253c565b61210a600082611eb6565b6001600160a01b0383166000908152600360205260408120805460019290612133908490612f32565b90915550506001600160a01b0382166000908152600360205260408120805460019290612161908490612e27565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b546001600160a01b031633146110a65760405162461bcd60e51b815260206004820152602a60248201527f426f6e644e46543a2043616c6c6572206d75737420626520436869636b656e4260448201526937b73226b0b730b3b2b960b11b6064820152608401610972565b6001600160a01b0382166122855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610972565b6000818152600260205260409020546001600160a01b0316156122ea5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610972565b6122f66000838361253c565b6001600160a01b038216600090815260036020526040812080546001929061231f908490612e27565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006108656123e6670de0b6b3a764000084612f49565b63ffffffff61269d565b816001600160a01b0316836001600160a01b0316036124515760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610972565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6124c984848461201b565b6124d5848484846126b3565b611a535760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b6001600160a01b0383161561269257600b5460405163da10594360e01b81526004810183905260009182916001600160a01b039091169063da1059439060240160a060405180830381865afa158015612599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bd9190612da9565b945067ffffffffffffffff169450505050600160038111156125e1576125e1612f6b565b60ff168160ff16148061261d57506126197f000000000000000000000000000000000000000000000000000000000001518083612e27565b4210155b61268f5760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a2063616e6e6f74207472616e7366657220647572696e672060448201527f6c6f636b6f757420706572696f640000000000000000000000000000000000006064820152608401610972565b50505b610aa78383836127ff565b60008183106126ac5781610fb4565b5090919050565b60006001600160a01b0384163b156127f457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126f7903390899088908890600401612f81565b6020604051808303816000875af1925050508015612732575060408051601f3d908101601f1916820190925261272f91810190612fb3565b60015b6127da573d808015612760576040519150601f19603f3d011682016040523d82523d6000602084013e612765565b606091505b5080516000036127d25760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612013565b506001949350505050565b6001600160a01b03831661285a5761285581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61287d565b816001600160a01b0316836001600160a01b03161461287d5761287d83826128b7565b6001600160a01b03821661289457610aa781612954565b826001600160a01b0316826001600160a01b031614610aa757610aa78282612a03565b600060016128c484610fbb565b6128ce9190612f32565b600083815260076020526040902054909150808214612921576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061296690600190612f32565b6000838152600960205260408120546008805493945090928490811061298e5761298e612e3f565b9060005260206000200154905080600883815481106129af576129af612e3f565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129e7576129e7612fd0565b6001900381819060005260206000200160009055905550505050565b6000612a0e83610fbb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981168114611d9b57600080fd5b600060208284031215612a6f57600080fd5b8135610fb481612a47565b60005b83811015612a95578181015183820152602001612a7d565b83811115611a535750506000910152565b60008151808452612abe816020860160208601612a7a565b601f01601f19169290920160200192915050565b602081526000610fb46020830184612aa6565b600060208284031215612af757600080fd5b5035919050565b80356001600160a01b0381168114612b1557600080fd5b919050565b60008060408385031215612b2d57600080fd5b612b3683612afe565b946020939093013593505050565b600080600060608486031215612b5957600080fd5b612b6284612afe565b9250612b7060208501612afe565b9150604084013590509250925092565b600060208284031215612b9257600080fd5b610fb482612afe565b600080600060608486031215612bb057600080fd5b612bb984612afe565b95602085013595506040909401359392505050565b60008060408385031215612be157600080fd5b612bea83612afe565b915060208301358015158114612bff57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c4957612c49612c0a565b604052919050565b600067ffffffffffffffff821115612c6b57612c6b612c0a565b50601f01601f191660200190565b60008060008060808587031215612c8f57600080fd5b612c9885612afe565b9350612ca660208601612afe565b925060408501359150606085013567ffffffffffffffff811115612cc957600080fd5b8501601f81018713612cda57600080fd5b8035612ced612ce882612c51565b612c20565b818152886020838501011115612d0257600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612d3757600080fd5b612d4083612afe565b9150612d4e60208401612afe565b90509250929050565b600181811c90821680612d6b57607f821691505b602082108103612d8b57634e487b7160e01b600052602260045260246000fd5b50919050565b805167ffffffffffffffff81168114612b1557600080fd5b600080600080600060a08688031215612dc157600080fd5b85519450612dd160208701612d91565b9350612ddf60408701612d91565b9250612ded60608701612d91565b9150608086015160ff81168114612e0357600080fd5b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b60008219821115612e3a57612e3a612e11565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612e6757600080fd5b5051919050565b6000816000190483118215151615612e8857612e88612e11565b500290565b600080600060608486031215612ea257600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215612ecd57600080fd5b815167ffffffffffffffff811115612ee457600080fd5b8201601f81018413612ef557600080fd5b8051612f03612ce882612c51565b818152856020838501011115612f1857600080fd5b612f29826020830160208601612a7a565b95945050505050565b600082821015612f4457612f44612e11565b500390565b600082612f6657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152611ca76080830184612aa6565b600060208284031215612fc557600080fd5b8151610fb481612a47565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220256e2c83c1f151ddabcc94ec2d35b5880e5813a1fba15203974e240c88322cc164736f6c634300080f0033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.