Contract 0x1126f0e0acb860e6f7afeab52b89152f8be8fbec

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe4b8eaf3ebe39e0875c5ab06a51118e4b86370eca9e54fe4b2240b34b7030f570x60a06040449923892022-08-16 0:28:0939 days 20 hrs ago0x8303669539068a6907d3a08e7f84d05ab71052fd IN  Create: NFTDescriptorSingle46260 FTM0.00482936893
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xe4b8eaf3ebe39e0875c5ab06a51118e4b86370eca9e54fe4b2240b34b7030f57449923892022-08-16 0:28:0939 days 20 hrs ago 0x8303669539068a6907d3a08e7f84d05ab71052fd  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NFTDescriptorSingle4626

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 17 : NFTDescriptorSingle4626.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import "./NFTDescriptor.sol";
import "openzeppelin-contracts/contracts/interfaces/IERC4626.sol";

contract NFTDescriptorSingle4626 is NFTDescriptor {
    constructor(IReliquary _reliquary) NFTDescriptor(_reliquary) {}

    function generateTextFromToken(
        address underlying,
        uint amount,
        string memory amountString
    ) internal view override returns (string memory text) {
        IERC4626 vault = IERC4626(underlying);
        IERC20Values asset = IERC20Values(vault.asset());

        string memory assetAmount = generateDecimalString(vault.convertToAssets(amount), asset.decimals());
        text = string.concat(
            '<text x="50%" y="340" class="bit" style="font-size: 8">', asset.symbol(), ':', assetAmount
        );
    }
}

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

import 'openzeppelin-contracts/contracts/utils/Strings.sol';
import 'base64/base64.sol';
import '../interfaces/INFTDescriptor.sol';
import '../interfaces/IReliquary.sol';

interface IERC20Values {
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
}

contract NFTDescriptor is INFTDescriptor {
    using Strings for uint;

    /// @notice Constants for drawing graph
    uint private constant GRAPH_WIDTH = 210;
    uint private constant GRAPH_HEIGHT = 30;

    // TODO: testing account, not ipfs to be used in production
    string private constant IPFS = 'https://gateway.pinata.cloud/ipfs/QmaayJ6EGM4JmK8P4eenopFrvExn6cwpeTapxti85ETJP4/';
    uint private constant NUM_CHARACTERS = 3;

    IReliquary public immutable reliquary;

    constructor(IReliquary _reliquary) {
        reliquary = _reliquary;
    }

    /// @notice Generate tokenURI as a base64 encoding from live on-chain values
    function constructTokenURI(uint relicId) external view override returns (string memory uri) {
        PositionInfo memory position = reliquary.getPositionForId(relicId);
        PoolInfo memory pool = reliquary.getPoolInfo(position.poolId);
        LevelInfo memory levelInfo = reliquary.getLevelInfo(position.poolId);
        address underlying = address(reliquary.poolToken(position.poolId));
        string memory amount = generateDecimalString(position.amount, IERC20Values(underlying).decimals());
        string memory pendingOath = generateDecimalString(reliquary.pendingOath(relicId), 18);
        uint maturity = (block.timestamp - position.entry) / 1 days;

        uint characterId = uint(keccak256(abi.encodePacked(relicId, address(reliquary)))) % NUM_CHARACTERS;

        string memory description = generateDescription(pool.name);
        string memory attributes = generateAttributes(
            position,
            amount,
            pendingOath,
            maturity
        );
        string memory image =
            Base64.encode(
                bytes(
                    string.concat(
                        generateSVGImage(
                            position.level,
                            levelInfo.balance.length,
                            characterId
                        ),
                        generateImageText(
                            relicId,
                            pool.name,
                            pendingOath,
                            maturity
                        ),
                        generateTextFromToken(
                            underlying,
                            position.amount,
                            amount
                        ),
                        '</text>',
                        generateBars(
                            position.level,
                            levelInfo
                        ),
                        '</svg></svg>'
                    )
                )
            );

        uri = string.concat(
            'data:application/json;base64,',
            Base64.encode(
                bytes(
                    abi.encodePacked(
                        '{"name":"',
                        string.concat(
                            'Relic #', relicId.toString(), ': ', pool.name
                        ),
                        '", "description":"',
                        description,
                        '", "attributes": [',
                        attributes,
                        '], "image": "',
                        'data:image/svg+xml;base64,',
                        image,
                        '"}'
                    )
                )
            )
        );
    }

    /// @notice Generate description of the liquidity position for NFT metadata
    /// @param poolName Name of pool as provided by operator
    function generateDescription(
        string memory poolName
    ) internal pure returns (string memory description) {
        description = string.concat(
            'This NFT represents a position in a Reliquary ', poolName, ' pool. ',
            'The owner of this NFT can modify or redeem the position.'
        );
    }

    /// @notice Generate attributes for NFT metadata
    /// @param position Position represented by this Relic
    /// @param pendingOath Amount of OATH that can currently be harvested from this position
    /// @param maturity Weighted average of the maturity deposits into this position
    function generateAttributes(
        PositionInfo memory position,
        string memory amount,
        string memory pendingOath,
        uint maturity
    ) internal pure returns (string memory attributes) {
        attributes = string.concat(
            '{"trait_type": "Pool ID", "value": ',
            position.poolId.toString(),
            '}, {"trait_type": "Amount Deposited", "value": "',
            amount,
            '"}, {"trait_type": "Pending Oath", "value": "',
            pendingOath,
            '"}, {"trait_type": "Maturity", "value": "',
            maturity.toString(), ' day', (maturity == 1) ? '' : 's',
            '"}, {"trait_type": "Level", "value": ',
            (position.level + 1).toString(), '}'
        );
    }

    /// @notice Generate the first part of the SVG for this NFT
    /// @param level Current maturity level of the position
    /// @param numLevels Total number of levels in the pool
    function generateSVGImage(
        uint level,
        uint numLevels,
        uint characterId
    ) internal pure returns (string memory svg) {
        level = (level + 1) * 5 / numLevels;
        svg = string.concat(
            '<svg width="290" height="450" viewBox="0 0 290 450" style="background-color:#131313" xmlns="http://www.w3.org/2000/svg">',
            '<style>',
            "@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&amp;display=swap');",
            '.bit { text-anchor: middle; dominant-baseline: middle; font-family: "Press Start 2P", "Courier New", Courier, monospace; fill: white }',
            '.art { image-rendering: pixelated }',
            '.shape { shape-rendering: crispEdges }',
            '</style>',
            '<image href="', IPFS, characterId.toString(), '/', (level == 0) ? '1' : level.toString(), '.gif', '" height="450" width="290" class="art"/>'
        );
    }

    /// @notice Generate the first part of text labels for this NFT image
    /// @param relicId ID of the NFT/position
    /// @param poolName Name of pool as provided by operator
    /// @param pendingOath Amount of OATH that can currently be harvested from this position
    /// @param maturity Weighted average of the maturity deposits into this position
    function generateImageText(
        uint relicId,
        string memory poolName,
        string memory pendingOath,
        uint maturity
    ) internal pure returns (string memory text) {
        text = string.concat(
            '<text x="50%" y="20" class="bit" style="font-size: 12">RELIC #', relicId.toString(),
            '</text><text x="50%" y="280" class="bit" style="font-size: 12">', poolName,
            '</text><text x="50%" y="360" class="bit" style="font-size: 8">PENDING:', pendingOath,
            ' OATH</text><text x="50%" y="380" class="bit" style="font-size: 8">MATURITY:', maturity.toString(),
            ' DAY', (maturity == 1) ? '' : 'S', '</text>'
        );
    }

    /// @notice Generate further text labels specific to the underlying token
    /// @param underlying Address of underlying token for this position
    /// @param amount Amount of underlying tokens deposited in this position
    function generateTextFromToken(
        address underlying,
        uint amount,
        string memory amountString
    ) internal view virtual returns (string memory text) {
        text = string.concat(
            '<text x="50%" y="340" class="bit" style="font-size: 8">AMOUNT:', amountString
        );
    }

    /// @notice Generate bar graph of this pool's bonding curve and indicator of the position's placement
    /// @param level Current level of the position
    /// @param levelInfo Level info for this pool
    function generateBars(uint level, LevelInfo memory levelInfo) internal pure returns (string memory bars) {
        uint highestAllocPoint = levelInfo.allocPoint[0];
        for (uint i = 1; i < levelInfo.allocPoint.length; i++) {
            if (levelInfo.allocPoint[i] > highestAllocPoint) {
                highestAllocPoint = levelInfo.allocPoint[i];
            }
        }

        uint barWidth = GRAPH_WIDTH * 10 / levelInfo.allocPoint.length;
        uint barWidthInt = barWidth / 10;
        string memory barWidthString = string.concat((barWidthInt > 5 ? barWidthInt - 5 : barWidthInt).toString(), '.', (barWidth % 10).toString());
        bars = '<svg x="43" y="226" width="210" height="30">';
        for (uint i; i < levelInfo.allocPoint.length; i++) {
            uint barHeight = levelInfo.allocPoint[i] * GRAPH_HEIGHT / highestAllocPoint;
            bars = string.concat(
                bars,
                '<rect x="', (barWidth * i / 10).toString(), '.', (barWidth * i % 10).toString(),
                '" y="', (GRAPH_HEIGHT - barHeight).toString(),
                '" class="shape',
                '" width="', barWidthString,
                '" height="', barHeight.toString(),
                '" style="fill:#', (i == level) ? 'e6de59' : 'fff', '"/>'
            );
        }
    }

    /// @notice Generate human-readable string from a number with given decimal places.
    /// Does not work for amounts with more than 18 digits before decimal point.
    /// @param num A number
    /// @param decimals Number of decimal places
    function generateDecimalString(uint num, uint decimals) internal pure returns (string memory decString) {
        if (num == 0) {
            return '0';
        }

        uint numLength;
        uint result;
        do {
            result = num / 10 ** (++numLength);
        } while (result != 0);

        bool lessThanOne = numLength <= decimals;
        uint bufferLength;
        if (lessThanOne) {
            bufferLength = decimals + 2;
        } else if (numLength > 19) {
            uint difference = numLength - 19;
            decimals -= difference > decimals ? decimals : difference;
            num /= 10 ** difference;
            bufferLength = 20;
        } else {
            bufferLength = numLength + 1;
        }
        bytes memory buffer = new bytes(bufferLength);

        if (lessThanOne) {
            buffer[0] = '0';
            buffer[1] = '.';
            for (uint i = 0; i < decimals - numLength; i++) {
                buffer[i + 2] = '0';
            }
        }
        uint index = bufferLength - 1;
        while (num != 0) {
            if (!lessThanOne && index == bufferLength - decimals - 1) {
                buffer[index--] = '.';
            }
            buffer[index] = bytes1(uint8(48 + num % 10));
            num /= 10;
            unchecked {
                index--;
            }
        }

        decString = string(buffer);
    }
}

File 3 of 17 : IERC4626.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";
import "../token/ERC20/extensions/IERC20Metadata.sol";

/**
 * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
 * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
 *
 * _Available since v4.7._
 */
interface IERC4626 is IERC20, IERC20Metadata {
    event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);

    event Withdraw(
        address indexed caller,
        address indexed receiver,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    /**
     * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
     *
     * - MUST be an ERC-20 token contract.
     * - MUST NOT revert.
     */
    function asset() external view returns (address assetTokenAddress);

    /**
     * @dev Returns the total amount of the underlying asset that is “managed” by Vault.
     *
     * - SHOULD include any compounding that occurs from yield.
     * - MUST be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT revert.
     */
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /**
     * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToShares(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
     * through a deposit call.
     *
     * - MUST return a limited value if receiver is subject to some deposit limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
     * - MUST NOT revert.
     */
    function maxDeposit(address receiver) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
     *   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
     *   in the same transaction.
     * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
     *   deposit would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewDeposit(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   deposit execution, and are accounted for during deposit.
     * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
     * - MUST return a limited value if receiver is subject to some mint limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
     * - MUST NOT revert.
     */
    function maxMint(address receiver) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
     *   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
     *   same transaction.
     * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
     *   would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by minting.
     */
    function previewMint(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
     *   execution, and are accounted for during mint.
     * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function mint(uint256 shares, address receiver) external returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
     * Vault, through a withdraw call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
     *   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
     *   called
     *   in the same transaction.
     * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
     *   the withdrawal would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewWithdraw(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   withdraw execution, and are accounted for during withdraw.
     * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function withdraw(
        uint256 assets,
        address receiver,
        address owner
    ) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
     * through a redeem call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
     *   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
     *   same transaction.
     * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
     *   redemption would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by redeeming.
     */
    function previewRedeem(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   redeem execution, and are accounted for during redeem.
     * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function redeem(
        uint256 shares,
        address receiver,
        address owner
    ) external returns (uint256 assets);
}

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

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

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

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 6 of 17 : INFTDescriptor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

interface INFTDescriptor {
    function constructTokenURI(uint relicId) external view returns (string memory);
}

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

pragma solidity ^0.8.15;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "./IEmissionCurve.sol";
import "./INFTDescriptor.sol";
import "./IRewarder.sol";

/*
 + @notice Info for each Reliquary position.
 + `amount` LP token amount the position owner has provided
 + `rewardDebt` OATH accumalated before the position's entry or last harvest
 + `rewardCredit` OATH owed to the user on next harvest
 + `entry` Used to determine the maturity of the position
 + `poolId` ID of the pool to which this position belongs
 + `level` Index of this position's level within the pool's array of levels
*/
struct PositionInfo {
    uint amount;
    uint rewardDebt;
    uint rewardCredit;
    uint entry; // position owner's relative entry into the pool.
    uint poolId; // ensures that a single Relic is only used for one pool.
    uint level;
}

/*
 + @notice Info of each Reliquary pool
 + `accOathPerShare` Accumulated OATH per share of pool (1 / 1e12)
 + `lastRewardTime` Last timestamp the accumulated OATH was updated
 + `allocPoint` Pool's individual allocation - ratio of the total allocation
 + `name` Name of pool to be displayed in NFT image
*/
struct PoolInfo {
    uint accOathPerShare;
    uint lastRewardTime;
    uint allocPoint;
    string name;
}

/*
 + @notice Level that determines how maturity is rewarded
 + `requiredMaturity` The minimum maturity (in seconds) required to reach this Level
 + `allocPoint` Level's individual allocation - ratio of the total allocation
 + `balance` Total number of tokens deposited in positions at this Level
*/
struct LevelInfo {
    uint[] requiredMaturity;
    uint[] allocPoint;
    uint[] balance;
}

interface IReliquary is IERC721Enumerable {

  function setEmissionCurve(IEmissionCurve _emissionCurve) external;
  function supportsInterface(bytes4 interfaceId) external view returns (bool);
  function addPool(
        uint allocPoint,
        IERC20 _poolToken,
        IRewarder _rewarder,
        uint[] calldata requiredMaturity,
        uint[] calldata allocPoints,
        string memory name,
        INFTDescriptor _nftDescriptor
    ) external;
  function modifyPool(
        uint pid,
        uint allocPoint,
        IRewarder _rewarder,
        string calldata name,
        INFTDescriptor _nftDescriptor,
        bool overwriteRewarder
    ) external;
  function pendingOath(uint relicId) external view returns (uint pending);
  function massUpdatePools(uint[] calldata pids) external;
  function updatePool(uint pid) external;
  function createRelicAndDeposit(
        address to,
        uint pid,
        uint amount
    ) external returns (uint id);
  function deposit(uint amount, uint relicId) external;
  function withdraw(uint amount, uint relicId) external;
  function harvest(uint relicId) external;
  function withdrawAndHarvest(uint amount, uint relicId) external;
  function emergencyWithdraw(uint relicId) external;
  function updatePosition(uint relicId) external;
  function split(uint relicId, uint amount) external returns (uint newId);
  function shift(uint fromId, uint toId, uint amount) external;
  function merge(uint fromId, uint toId) external;

  // State

  function oath() external view returns (IERC20);
  function nftDescriptor(uint) external view returns (INFTDescriptor);
  function emissionCurve() external view returns (IEmissionCurve);
  function getPoolInfo(uint) external view returns (PoolInfo memory);
  function getLevelInfo(uint) external view returns (LevelInfo memory);
  function poolToken(uint) external view returns (IERC20);
  function rewarder(uint) external view returns (IRewarder);

  function getPositionForId(uint) external view returns (PositionInfo memory);
  function totalAllocPoint() external view returns (uint);
  function poolLength() external view returns (uint);

}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 9 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 10 of 17 : 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 11 of 17 : IEmissionCurve.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.15;

interface IEmissionCurve {
    function getRate() external view returns (uint rate);
}

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

pragma solidity ^0.8.15;

import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";

interface IRewarder {
    function onOathReward(
        uint relicId,
        uint oathAmount
    ) external;

    function onDeposit(
        uint relicId,
        uint depositAmount
    ) external;

    function onWithdraw(
        uint relicId,
        uint withdrawalAmount
    ) external;

    function pendingTokens(
        uint relicId,
        uint oathAmount
    ) external view returns (IERC20[] memory, uint[] memory);
}

File 13 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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`.
     *
     * 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;

    /**
     * @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 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IReliquary","name":"_reliquary","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"relicId","type":"uint256"}],"name":"constructTokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reliquary","outputs":[{"internalType":"contract IReliquary","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b50604051620023793803806200237983398101604081905261003191610042565b6001600160a01b0316608052610072565b60006020828403121561005457600080fd5b81516001600160a01b038116811461006b57600080fd5b9392505050565b6080516122c3620000b66000396000818160690152818160c701528181610138015281816101d30152818161026e0152818161037e015261043d01526122c36000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063894b4c2e1461003b578063e754de6314610064575b600080fd5b61004e6100493660046110a0565b6100a3565b60405161005b91906110e9565b60405180910390f35b61008b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161005b565b60405163e48dc13560e01b8152600481018290526060906000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e48dc1359060240160c060405180830381865afa15801561010e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610132919061118c565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632f380b3583608001516040518263ffffffff1660e01b815260040161018891815260200190565b600060405180830381865afa1580156101a5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101cd919081019061126a565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663030101db84608001516040518263ffffffff1660e01b815260040161022391815260200190565b600060405180830381865afa158015610240573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610268919081019061138d565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e7d401985608001516040518263ffffffff1660e01b81526004016102be91815260200190565b602060405180830381865afa1580156102db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ff919061145a565b905060006103758560000151836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036d919061147e565b60ff166105b3565b905060006104127f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639c7518058a6040518263ffffffff1660e01b81526004016103ca91815260200190565b602060405180830381865afa1580156103e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040b91906114a1565b60126105b3565b905060006201518087606001514261042a91906114d0565b61043491906114fd565b9050600060038a7f000000000000000000000000000000000000000000000000000000000000000060405160200161048892919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b6040516020818303038152906040528051906020012060001c6104ab9190611511565b905060006104bc8860600151610873565b905060006104cc8a87878761089c565b9050600061053b6104e78c60a001518b604001515187610935565b6104f78f8d606001518a8a6109d5565b6105068b8f600001518c610a37565b6105148f60a001518e610beb565b6040516020016105279493929190611541565b604051602081830303815290604052610e32565b90506105826105498e610f97565b8b6060015160405160200161055f9291906115c4565b60408051601f198184030181529082905261052791869086908690602001611614565b604051602001610592919061170f565b6040516020818303038152906040529b505050505050505050505050919050565b6060826000036105db57506040805180820190915260018152600360fc1b602082015261086d565b6000805b6105e882611754565b91506105f582600a611851565b6105ff90866114fd565b9050806000036105df578382118015906000906106285761062186600261185d565b905061068a565b601384111561067c57600061063e6013866114d0565b905086811161064d578061064f565b865b61065990886114d0565b965061066681600a611851565b61067090896114fd565b9750601491505061068a565b61068784600161185d565b90505b60008167ffffffffffffffff8111156106a5576106a561111c565b6040519080825280601f01601f1916602001820160405280156106cf576020820181803683370190505b509050821561079657600360fc1b816000815181106106f0576106f0611875565b60200101906001600160f81b031916908160001a905350601760f91b8160018151811061071f5761071f611875565b60200101906001600160f81b031916908160001a90535060005b61074386896114d0565b81101561079457600360fc1b8261075b83600261185d565b8151811061076b5761076b611875565b60200101906001600160f81b031916908160001a9053508061078c81611754565b915050610739565b505b60006107a36001846114d0565b90505b881561086557831580156107ce575060016107c189856114d0565b6107cb91906114d0565b81145b1561080d57601760f91b82826107e38161188b565b9350815181106107f5576107f5611875565b60200101906001600160f81b031916908160001a9053505b610818600a8a611511565b61082390603061185d565b60f81b82828151811061083857610838611875565b60200101906001600160f81b031916908160001a90535061085a600a8a6114fd565b9850600019016107a6565b509450505050505b92915050565b60608160405160200161088691906118a2565b6040516020818303038152906040529050919050565b60606108ab8560800151610f97565b84846108b685610f97565b856001146108dd57604051806040016040528060018152602001607360f81b8152506108ee565b604051806020016040528060008152505b6109078a60a001516001610902919061185d565b610f97565b60405160200161091c9695949392919061195b565b6040516020818303038152906040529050949350505050565b60608261094385600161185d565b61094e906005611afd565b61095891906114fd565b93506040518060800160405280605181526020016121fd6051913961097c83610f97565b85156109905761098b86610f97565b6109ab565b604051806040016040528060018152602001603160f81b8152505b6040516020016109bd93929190611b1c565b60405160208183030381529060405290509392505050565b60606109e085610f97565b84846109eb85610f97565b85600114610a1257604051806040016040528060018152602001605360f81b815250610a23565b604051806020016040528060008152505b60405160200161091c959493929190611ded565b606060008490506000816001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa2919061145a565b90506000610b56836001600160a01b03166307a2d13a886040518263ffffffff1660e01b8152600401610ad791815260200190565b602060405180830381865afa158015610af4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1891906114a1565b836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610349573d6000803e3d6000fd5b9050816001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b96573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bbe9190810190611fba565b81604051602001610bd0929190611fef565b60405160208183030381529060405293505050509392505050565b606060008260200151600081518110610c0657610c06611875565b602002602001015190506000600190505b836020015151811015610c7c578184602001518281518110610c3b57610c3b611875565b60200260200101511115610c6a5783602001518181518110610c5f57610c5f611875565b602002602001015191505b80610c7481611754565b915050610c17565b50602083015151600090610c9260d2600a611afd565b610c9c91906114fd565b90506000610cab600a836114fd565b90506000610ccb60058311610cc05782610f97565b6109026005846114d0565b610cd9610902600a86611511565b604051602001610cea92919061207a565b60408051601f1981840301815260608301909152602c8083529092506121d16020830139945060005b866020015151811015610e2757600085601e89602001518481518110610d3b57610d3b611875565b6020026020010151610d4d9190611afd565b610d5791906114fd565b905086610d73600a610d698589611afd565b61090291906114fd565b610d8c600a610d82868a611afd565b6109029190611511565b610d9a61090285601e6114d0565b86610da486610f97565b8e8814610dcc576040518060400160405280600381526020016233333360e91b815250610dec565b6040518060400160405280600681526020016565366465353960d01b8152505b604051602001610e0297969594939291906120b6565b6040516020818303038152906040529650508080610e1f90611754565b915050610d13565b505050505092915050565b60608151600003610e5157505060408051602081019091526000815290565b600060405180606001604052806040815260200161224e6040913990506000600384516002610e80919061185d565b610e8a91906114fd565b610e95906004611afd565b90506000610ea482602061185d565b67ffffffffffffffff811115610ebc57610ebc61111c565b6040519080825280601f01601f191660200182016040528015610ee6576020820181803683370190505b509050818152600183018586518101602084015b81831015610f52576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101610efa565b600389510660018114610f6c5760028114610f7d57610f89565b613d3d60f01b600119830152610f89565b603d60f81b6000198301525b509398975050505050505050565b606081600003610fbe5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610fe85780610fd281611754565b9150610fe19050600a836114fd565b9150610fc2565b60008167ffffffffffffffff8111156110035761100361111c565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090505b8415611098576110426001836114d0565b915061104f600a86611511565b61105a90603061185d565b60f81b81838151811061106f5761106f611875565b60200101906001600160f81b031916908160001a905350611091600a866114fd565b9450611031565b949350505050565b6000602082840312156110b257600080fd5b5035919050565b60005b838110156110d45781810151838201526020016110bc565b838111156110e3576000848401525b50505050565b60208152600082518060208401526111088160408501602087016110b9565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156111555761115561111c565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156111845761118461111c565b604052919050565b600060c0828403121561119e57600080fd5b60405160c0810181811067ffffffffffffffff821117156111c1576111c161111c565b8060405250825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201528091505092915050565b600082601f83011261121757600080fd5b815167ffffffffffffffff8111156112315761123161111c565b611244601f8201601f191660200161115b565b81815284602083860101111561125957600080fd5b6110988260208301602087016110b9565b60006020828403121561127c57600080fd5b815167ffffffffffffffff8082111561129457600080fd5b90830190608082860312156112a857600080fd5b6040516080810181811083821117156112c3576112c361111c565b80604052508251815260208301516020820152604083015160408201526060830151828111156112f257600080fd5b6112fe87828601611206565b60608301525095945050505050565b600082601f83011261131e57600080fd5b8151602067ffffffffffffffff82111561133a5761133a61111c565b8160051b61134982820161115b565b928352848101820192828101908785111561136357600080fd5b83870192505b8483101561138257825182529183019190830190611369565b979650505050505050565b60006020828403121561139f57600080fd5b815167ffffffffffffffff808211156113b757600080fd5b90830190606082860312156113cb57600080fd5b6113d3611132565b8251828111156113e257600080fd5b6113ee8782860161130d565b82525060208301518281111561140357600080fd5b61140f8782860161130d565b60208301525060408301518281111561142757600080fd5b6114338782860161130d565b60408301525095945050505050565b6001600160a01b038116811461145757600080fd5b50565b60006020828403121561146c57600080fd5b815161147781611442565b9392505050565b60006020828403121561149057600080fd5b815160ff8116811461147757600080fd5b6000602082840312156114b357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156114e2576114e26114ba565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261150c5761150c6114e7565b500490565b600082611520576115206114e7565b500690565b600081516115378185602086016110b9565b9290920192915050565b60008551611553818460208a016110b9565b855190830190611567818360208a016110b9565b855191019061157a8183602089016110b9565b661e17ba32bc3a1f60c91b9101908152835161159d8160078401602088016110b9565b6b1e17b9bb339f1e17b9bb339f60a11b600792909101918201526013019695505050505050565b6652656c6963202360c81b8152600083516115e68160078501602088016110b9565b6101d160f51b60079184019182015283516116088160098401602088016110b9565b01600901949350505050565b683d913730b6b2911d1160b91b81528451600090611639816009850160208a016110b9565b71111610113232b9b1b934b83a34b7b7111d1160711b600991840191820152855161166b81601b840160208a016110b9565b71222c202261747472696275746573223a205b60701b601b9290910191820152845161169e81602d8401602089016110b9565b6c2e96101134b6b0b3b2911d101160991b602d92909101918201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000603a82015283516116f28160548401602088016110b9565b61227d60f01b605492909101918201526056019695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161174781601d8501602087016110b9565b91909101601d0192915050565b600060018201611766576117666114ba565b5060010190565b600181815b808511156117a857816000190482111561178e5761178e6114ba565b8085161561179b57918102915b93841c9390800290611772565b509250929050565b6000826117bf5750600161086d565b816117cc5750600061086d565b81600181146117e257600281146117ec57611808565b600191505061086d565b60ff8411156117fd576117fd6114ba565b50506001821b61086d565b5060208310610133831016604e8410600b841016171561182b575081810a61086d565b611835838361176d565b8060001904821115611849576118496114ba565b029392505050565b600061147783836117b0565b60008219821115611870576118706114ba565b500190565b634e487b7160e01b600052603260045260246000fd5b60008161189a5761189a6114ba565b506000190190565b7f54686973204e465420726570726573656e7473206120706f736974696f6e206981526d0371030902932b634b8bab0b93c960951b6020820152600082516118f181602e8501602087016110b9565b660103837b7b617160cd1b602e9390910192830152507f546865206f776e6572206f662074686973204e46542063616e206d6f6469667960358201527f206f722072656465656d2074686520706f736974696f6e2e00000000000000006055820152606d01919050565b7f7b2274726169745f74797065223a2022506f6f6c204944222c202276616c75658152620111d160ed1b60208201526000875161199f816023850160208c016110b9565b7f7d2c207b2274726169745f74797065223a2022416d6f756e74204465706f73696023918401918201526f3a32b2111610113b30b63ab2911d101160811b604382015287516119f5816053840160208c016110b9565b7f227d2c207b2274726169745f74797065223a202250656e64696e67204f617468605392909101918201526c111610113b30b63ab2911d101160991b6073820152611a8a611a84611a49608084018a611525565b7f227d2c207b2274726169745f74797065223a20224d61747572697479222c20228152683b30b63ab2911d101160b91b602082015260290190565b87611525565b632064617960e01b81529050611ae6611ae0611aa96004840188611525565b7f227d2c207b2274726169745f74797065223a20224c6576656c222c202276616c81526403ab2911d160dd1b602082015260250190565b85611525565b607d60f81b81526001019998505050505050505050565b6000816000190483118215151615611b1757611b176114ba565b500290565b7f3c7376672077696474683d2232393022206865696768743d223435302220766981527f6577426f783d22302030203239302034353022207374796c653d226261636b6760208201527f726f756e642d636f6c6f723a233133313331332220786d6c6e733d226874747060408201527f3a2f2f7777772e77332e6f72672f323030302f737667223e00000000000000006060820152661e39ba3cb6329f60c91b60788201527f40696d706f72742075726c282768747470733a2f2f666f6e74732e676f6f676c607f8201527f65617069732e636f6d2f637373323f66616d696c793d50726573732b53746172609f8201527f742b325026616d703b646973706c61793d7377617027293b000000000000000060bf8201527f2e626974207b20746578742d616e63686f723a206d6964646c653b20646f6d6960d78201527f6e616e742d626173656c696e653a206d6964646c653b20666f6e742d66616d6960f78201527f6c793a20225072657373205374617274203250222c2022436f7572696572204e6101178201527f6577222c20436f75726965722c206d6f6e6f73706163653b2066696c6c3a20776101378201526568697465207d60d01b6101578201527f2e617274207b20696d6167652d72656e646572696e673a20706978656c61746561015d8201526264207d60e81b61017d8201527f2e7368617065207b2073686170652d72656e646572696e673a206372697370456101808201526564676573207d60d01b6101a082015260006101a68201671e17b9ba3cb6329f60c11b81526c1e34b6b0b3b290343932b31e9160991b6008820152611d89611d836015830188611525565b86611525565b602f60f81b81529050611d9f6001820185611525565b631733b4b360e11b81527f22206865696768743d22343530222077696474683d223239302220636c6173736004820152671e9130b93a11179f60c11b6024820152602c019695505050505050565b7f3c7465787420783d223530252220793d2232302220636c6173733d226269742281527f207374796c653d22666f6e742d73697a653a203132223e52454c494320230000602082015260008651611e4b81603e850160208b016110b9565b7f3c2f746578743e3c7465787420783d223530252220793d223238302220636c61603e918401918201527f73733d2262697422207374796c653d22666f6e742d73697a653a203132223e00605e8201528651611eae81607d840160208b016110b9565b7f3c2f746578743e3c7465787420783d223530252220793d223336302220636c61607d92909101918201527f73733d2262697422207374796c653d22666f6e742d73697a653a2038223e5045609d82015265272224a7239d60d11b60bd820152611f85611d83611f2160c3840189611525565b7f204f4154483c2f746578743e3c7465787420783d223530252220793d2233383081527f2220636c6173733d2262697422207374796c653d22666f6e742d73697a653a2060208201526b1c111f26a0aa2aa924aa2c9d60a11b6040820152604c0190565b632044415960e01b81529050611f9e6004820185611525565b661e17ba32bc3a1f60c91b815260070198975050505050505050565b600060208284031215611fcc57600080fd5b815167ffffffffffffffff811115611fe357600080fd5b61109884828501611206565b7f3c7465787420783d223530252220793d223334302220636c6173733d2262697481527f22207374796c653d22666f6e742d73697a653a2038223e00000000000000000060208201526000835161204d8160378501602088016110b9565b601d60f91b603791840191820152835161206e8160388401602088016110b9565b01603801949350505050565b6000835161208c8184602088016110b9565b601760f91b90830190815283516120aa8160018401602088016110b9565b01600101949350505050565b600088516120c8818460208d016110b9565b681e3932b1ba103c1e9160b91b90830190815288516120ee816009840160208d016110b9565b601760f91b60099290910191820152875161211081600a840160208c016110b9565b6411103c9e9160d91b600a9290910191820152865161213681600f840160208b016110b9565b01612154600f82016d2220636c6173733d22736861706560901b9052565b6811103bb4b23a341e9160b91b601d8201526121736026820187611525565b6911103432b4b3b43a1e9160b11b81529050612192600a820186611525565b6e22207374796c653d2266696c6c3a2360881b815290506121b6600f820185611525565b6211179f60e91b81526003019a995050505050505050505056fe3c73766720783d2234332220793d22323236222077696474683d2232313022206865696768743d223330223e68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d6161794a3645474d344a6d4b38503465656e6f7046727645786e3663777065546170787469383545544a50342f4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220b3296efb81895690961b625e834b4dc90e4b0f52e26c551677790080b1133d3a64736f6c634300080f003300000000000000000000000001316f5b9d851e0a553c2851103880b5142aea66

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

00000000000000000000000001316f5b9d851e0a553c2851103880b5142aea66

-----Decoded View---------------
Arg [0] : _reliquary (address): 0x01316f5b9d851e0a553c2851103880b5142aea66

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000001316f5b9d851e0a553c2851103880b5142aea66


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.