ETH Price: $2,606.78 (+1.52%)

Contract

0x8113E6335ddf1E6227113B429CD1F57e8E007760
 
Transaction Hash
Method
Block
From
To
Redeem82393092024-09-02 14:47:1342 days ago1725288433IN
0x8113E633...e8E007760
0 ETH0.000000020.00028844
Redeem79475952024-08-26 20:43:2549 days ago1724705005IN
0x8113E633...e8E007760
0 ETH0.00000010.00111715
Redeem75077282024-08-16 16:21:1159 days ago1723825271IN
0x8113E633...e8E007760
0 ETH0.000000180.00225703
Redeem74627612024-08-15 15:22:1760 days ago1723735337IN
0x8113E633...e8E007760
0 ETH0.000000270.00337001
Redeem74182722024-08-14 14:39:1961 days ago1723646359IN
0x8113E633...e8E007760
0 ETH0.00000050.00511282
Redeem73951922024-08-14 1:49:5962 days ago1723600199IN
0x8113E633...e8E007760
0 ETH0.000000250.002597
Redeem73758692024-08-13 15:05:5362 days ago1723561553IN
0x8113E633...e8E007760
0 ETH0.000000280.00290233
Redeem73457792024-08-12 22:22:5363 days ago1723501373IN
0x8113E633...e8E007760
0 ETH0.000000190.00233178
Redeem73317822024-08-12 14:36:1963 days ago1723473379IN
0x8113E633...e8E007760
0 ETH0.000000380.0047
Redeem72883332024-08-11 14:28:0164 days ago1723386481IN
0x8113E633...e8E007760
0 ETH0.000000160.00206887
Redeem72601122024-08-10 22:47:1965 days ago1723330039IN
0x8113E633...e8E007760
0 ETH0.000000170.00218282
Redeem72454582024-08-10 14:38:5165 days ago1723300731IN
0x8113E633...e8E007760
0 ETH0.000000430.00535256
Redeem72220212024-08-10 1:37:3766 days ago1723253857IN
0x8113E633...e8E007760
0 ETH0.000000180.00219854
Attempt Batch Mi...70171292024-08-05 7:47:5371 days ago1722844073IN
0x8113E633...e8E007760
0.085 ETH0.000000490.0021194
Redeem70162182024-08-05 7:17:3171 days ago1722842251IN
0x8113E633...e8E007760
0 ETH0.000000280.00399011
Attempt Batch Mi...70085252024-08-05 3:01:0571 days ago1722826865IN
0x8113E633...e8E007760
0.0025 ETH0.000039220.15628395
Redeem69898372024-08-04 16:38:0971 days ago1722789489IN
0x8113E633...e8E007760
0 ETH0.000000160.00225606
Redeem69691022024-08-04 5:06:5972 days ago1722748019IN
0x8113E633...e8E007760
0 ETH00.00003388
Redeem69690232024-08-04 5:04:2172 days ago1722747861IN
0x8113E633...e8E007760
0 ETH0.000000070.00100054
Attempt Batch Mi...69429952024-08-03 14:36:4572 days ago1722695805IN
0x8113E633...e8E007760
0.0025 ETH0.000002390.00955007
Attempt Batch Mi...69429622024-08-03 14:35:3972 days ago1722695739IN
0x8113E633...e8E007760
0.025 ETH0.000002260.0096771
Redeem69424822024-08-03 14:19:3972 days ago1722694779IN
0x8113E633...e8E007760
0 ETH0.00000070.00987517
Redeem69364032024-08-03 10:57:0173 days ago1722682621IN
0x8113E633...e8E007760
0 ETH0.00000030.00420557
Redeem69201622024-08-03 1:55:3973 days ago1722650139IN
0x8113E633...e8E007760
0 ETH0.000001910.02033361
Attempt Batch Mi...69088222024-08-02 19:37:3973 days ago1722627459IN
0x8113E633...e8E007760
0 ETH0.000001150.00389392
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
82389662024-09-02 14:35:4742 days ago1725287747
0x8113E633...e8E007760
486.82667188 ETH
79475952024-08-26 20:43:2549 days ago1724705005
0x8113E633...e8E007760
0.00123658 ETH
75077282024-08-16 16:21:1159 days ago1723825271
0x8113E633...e8E007760
0.0482942 ETH
74627612024-08-15 15:22:1760 days ago1723735337
0x8113E633...e8E007760
0.09947355 ETH
74182722024-08-14 14:39:1961 days ago1723646359
0x8113E633...e8E007760
0.42171355 ETH
73951922024-08-14 1:49:5962 days ago1723600199
0x8113E633...e8E007760
0.61095925 ETH
73758692024-08-13 15:05:5362 days ago1723561553
0x8113E633...e8E007760
0.54483925 ETH
73457792024-08-12 22:22:5363 days ago1723501373
0x8113E633...e8E007760
0.3435162 ETH
73317822024-08-12 14:36:1963 days ago1723473379
0x8113E633...e8E007760
0.02151845 ETH
72883332024-08-11 14:28:0164 days ago1723386481
0x8113E633...e8E007760
0.0675773 ETH
72601122024-08-10 22:47:1965 days ago1723330039
0x8113E633...e8E007760
0.04858775 ETH
72454582024-08-10 14:38:5165 days ago1723300731
0x8113E633...e8E007760
0.08092195 ETH
72220212024-08-10 1:37:3766 days ago1723253857
0x8113E633...e8E007760
0.1709354 ETH
70284852024-08-05 14:06:2570 days ago1722866785
0x8113E633...e8E007760
72.79276 ETH
70281142024-08-05 13:54:0370 days ago1722866043
0x8113E633...e8E007760
34.60309053 ETH
70276272024-08-05 13:37:4970 days ago1722865069
0x8113E633...e8E007760
10 ETH
70232672024-08-05 11:12:2971 days ago1722856349
0x8113E633...e8E007760
100 ETH
70208072024-08-05 9:50:2971 days ago1722851429
0x8113E633...e8E007760
100 ETH
70162182024-08-05 7:17:3171 days ago1722842251
0x8113E633...e8E007760
0.37203936 ETH
70153982024-08-05 6:50:1171 days ago1722840611
0x8113E633...e8E007760
100 ETH
69950622024-08-04 19:32:1971 days ago1722799939
0x8113E633...e8E007760
50 ETH
69914652024-08-04 17:32:2571 days ago1722792745
0x8113E633...e8E007760
10 ETH
69898372024-08-04 16:38:0971 days ago1722789489
0x8113E633...e8E007760
0.46843324 ETH
69691022024-08-04 5:06:5972 days ago1722748019
0x8113E633...e8E007760
0.00035785 ETH
69690232024-08-04 5:04:2172 days ago1722747861
0x8113E633...e8E007760
0.00062623 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CoreBlast

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
paris EvmVersion
File 1 of 45 : Core.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

import { Core } from "../Core.sol";
import { GasMode, IBlast, YieldMode } from "./IBlast.sol";
import { IBlastPoints } from "./IBlastPoints.sol";

/// @title CoreBlast
/// @dev The Blast-specific Core Diamond.
contract CoreBlast is Core {
    constructor(
        address mintToken,
        string memory receiptName,
        string memory receiptSymbol
    ) Core(mintToken, receiptName, receiptSymbol) {
        // Configure the yield & claimable gas settings for the Blast Core diamond
        IBlast(0x4300000000000000000000000000000000000002).configure(
            YieldMode.CLAIMABLE,
            GasMode.CLAIMABLE,
            address(this)
        );

        // Configure the points operator for the Blast Core diamond on Blast mainnet
        IBlastPoints(0x2536FE9ab3F511540F2f9e2eC2A805005C3Dd800)
            .configurePointsOperator(
                0x4E85280e5C025A99bCB815759a4b03Fd3f48E936
            );
    }
}

File 2 of 45 : Core.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

import { SolidStateDiamond } from "@solidstate/contracts/proxy/diamond/SolidStateDiamond.sol";

import { ERC1155MetadataExtensionStorage } from "../../facets/PerpetualMint/ERC1155MetadataExtensionStorage.sol";
import { PerpetualMintStorage } from "../../facets/PerpetualMint/Storage.sol";

/// @title Core
/// @dev The Core Diamond.
contract Core is SolidStateDiamond {
    constructor(
        address mintToken,
        string memory receiptName,
        string memory receiptSymbol
    ) {
        ERC1155MetadataExtensionStorage.Layout
            storage metadataExtensionLayout = ERC1155MetadataExtensionStorage
                .layout();

        PerpetualMintStorage.layout().mintToken = mintToken;

        metadataExtensionLayout.name = receiptName;

        metadataExtensionLayout.symbol = receiptSymbol;
    }
}

File 3 of 45 : IBlast.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

import { GasMode, YieldMode } from "./DataTypes.sol";

/// @title IBlast
/// @notice Interface for the Blast precompile contract
interface IBlast {
    /// @notice Claims all gas for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract for which all gas is to be claimed
    /// @param recipientOfGas The address of the recipient of the gas
    /// @return gasClaimed The amount of gas that was claimed
    function claimAllGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256 gasClaimed);

    /// @notice Claims all yield for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract for which all yield is to be claimed
    /// @param recipientOfYield The address of the recipient of the yield
    /// @return yieldClaimed The amount of yield that was claimed
    function claimAllYield(
        address contractAddress,
        address recipientOfYield
    ) external returns (uint256 yieldClaimed);

    /// @notice Claims a specific amount of gas for a specific contract. claim rate governed by integral of gas over time
    /// @param contractAddress The address of the contract for which gas is to be claimed
    /// @param recipientOfGas The address of the recipient of the gas
    /// @param gasToClaim The amount of gas to be claimed
    /// @param gasSecondsToConsume The amount of gas seconds to consume
    /// @return gasClaimed The amount of gas that was claimed
    function claimGas(
        address contractAddress,
        address recipientOfGas,
        uint256 gasToClaim,
        uint256 gasSecondsToConsume
    ) external returns (uint256 gasClaimed);

    /// @notice Claims gas at a minimum claim rate for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract for which gas is to be claimed
    /// @param recipientOfGas The address of the recipient of the gas
    /// @param minClaimRateBips The minimum claim rate in basis points
    /// @return gasClaimed The amount of gas that was claimed
    function claimGasAtMinClaimRate(
        address contractAddress,
        address recipientOfGas,
        uint256 minClaimRateBips
    ) external returns (uint256 gasClaimed);

    /// @notice Claims gas available to be claimed at max claim rate for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract for which maximum gas is to be claimed
    /// @param recipientOfGas The address of the recipient of the gas
    /// @return gasClaimed The amount of gas that was claimed
    function claimMaxGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256 gasClaimed);

    /// @notice Claims yield for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract for which yield is to be claimed
    /// @param recipientOfYield The address of the recipient of the yield
    /// @param amount The amount of yield to be claimed
    /// @return yieldClaimed The amount of yield that was claimed
    function claimYield(
        address contractAddress,
        address recipientOfYield,
        uint256 amount
    ) external returns (uint256 yieldClaimed);

    /// @notice contract configures its yield and gas modes and sets the governor. called by contract
    /// @param yieldMode The yield mode to be set
    /// @param gasMode The gas mode to be set
    /// @param governor The address of the governor to be set
    function configure(
        YieldMode yieldMode,
        GasMode gasMode,
        address governor
    ) external;

    /// @notice Configures the yield mode to AUTOMATIC for the contract that calls this function
    function configureAutomaticYield() external;

    /// @notice Configures the yield mode to AUTOMATIC for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract to be configured
    function configureAutomaticYieldOnBehalf(address contractAddress) external;

    /// @notice Configures the gas mode to CLAIMABLE for the contract that calls this function
    function configureClaimableGas() external;

    /// @notice Configures the gas mode to CLAIMABLE for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract to be configured
    function configureClaimableGasOnBehalf(address contractAddress) external;

    /// @notice Configures the yield mode to CLAIMABLE for the contract that calls this function
    function configureClaimableYield() external;

    /// @notice Configures the yield mode to CLAIMABLE for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract to be configured
    function configureClaimableYieldOnBehalf(address contractAddress) external;

    ///@notice Configures the yield and gas modes and sets the governor for a specific contract. called by authorized user
    /// @param contractAddress The address of the contract to be configured
    /// @param yieldMode The yield mode to be set
    /// @param gasMode The gas mode to be set
    /// @param newGovernor The address of the new governor to be set
    function configureContract(
        address contractAddress,
        YieldMode yieldMode,
        GasMode gasMode,
        address newGovernor
    ) external;

    /// @notice Configures the governor for the contract that calls this function
    /// @param governor The address of the governor to be configured for the contract
    function configureGovernor(address governor) external;

    /// @notice Configures the governor for a specific contract. Called by an authorized user
    /// @param newGovernor The address of the new governor to be configured for the contract
    /// @param contractAddress The address of the contract to be configured
    function configureGovernorOnBehalf(
        address newGovernor,
        address contractAddress
    ) external;

    /// @notice Configures the gas mode to VOID for the contract that calls this function
    function configureVoidGas() external;

    /// @notice Configures the gas mode to void for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract to be configured
    function configureVoidGasOnBehalf(address contractAddress) external;

    /// @notice Configures the yield mode to VOID for the contract that calls this function
    function configureVoidYield() external;

    /// @notice Configures the yield mode to VOID for a specific contract. Called by an authorized user
    /// @param contractAddress The address of the contract to be configured
    function configureVoidYieldOnBehalf(address contractAddress) external;

    /// @notice Used to read the amount of yield that can be claimed for a contract
    /// @param contractAddress The address of the contract to read the claimable yield for
    /// @return claimableYield The claimable yield
    function readClaimableYield(
        address contractAddress
    ) external view returns (uint256 claimableYield);

    /// @notice Reads the gas parameters for a specific contract.
    /// @param contractAddress The address of the contract for which the gas parameters are to be read
    /// @return etherSeconds uint256 representing the accumulated ether seconds
    /// @return etherBalance uint256 representing ether balance
    /// @return lastUpdated uint256 representing last update timestamp
    /// @return gasMode The uint8 gas mode enum for the contract
    function readGasParams(
        address contractAddress
    )
        external
        view
        returns (
            uint256 etherSeconds,
            uint256 etherBalance,
            uint256 lastUpdated,
            GasMode gasMode
        );

    /// @notice Reads the yield configuration for a specific contract
    /// @param contractAddress The address of the contract for which the yield configuration is to be read
    /// @return yieldMode The uint8 yield mode enum for the contract
    function readYieldConfiguration(
        address contractAddress
    ) external view returns (YieldMode yieldMode);
}

File 4 of 45 : IBlastPoints.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

/// @title IBlastPoints
/// @notice Interface for the Blast Points contract
interface IBlastPoints {
    /// @notice Configures the points operator for the caller's address.
    /// @dev Sets the points operator for the contract making the call.
    /// @param operator The address to set as the points operator.
    function configurePointsOperator(address operator) external;

    /// @notice Configures a new points operator on behalf of a contract address.
    /// @dev Sets the new points operator for a specified contract address.
    /// Only callable by the current points operator.
    /// @param contractAddress The contract address for which to set the new points operator.
    /// @param newOperator The address to set as the new points operator.
    function configurePointsOperatorOnBehalf(
        address contractAddress,
        address newOperator
    ) external;

    /// @notice Reads the points operator for a given contract address.
    /// @param contractAddress The address of the contract to query.
    /// @return operator The address of the points operator for the given contract.
    function operatorMap(
        address contractAddress
    ) external view returns (address operator);

    /// @notice Reads the status of a given contract address.
    /// @dev Returns the operator address, ban status, and contract code length for the specified contract.
    /// @param contractAddress The address of the contract to query.
    /// @return operator The address of the operator for the given contract.
    /// @return isBanned Indicates whether the contract is banned.
    /// @return codeLength The length of the contract's code.
    function readStatus(
        address contractAddress
    )
        external
        view
        returns (address operator, bool isBanned, uint256 codeLength);
}

File 5 of 45 : SolidStateDiamond.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IOwnable, Ownable, OwnableInternal } from '../../access/ownable/Ownable.sol';
import { ISafeOwnable, SafeOwnable } from '../../access/ownable/SafeOwnable.sol';
import { IERC165 } from '../../interfaces/IERC165.sol';
import { IERC173 } from '../../interfaces/IERC173.sol';
import { ERC165Base, ERC165BaseStorage } from '../../introspection/ERC165/base/ERC165Base.sol';
import { DiamondBase } from './base/DiamondBase.sol';
import { DiamondFallback, IDiamondFallback } from './fallback/DiamondFallback.sol';
import { DiamondReadable, IDiamondReadable } from './readable/DiamondReadable.sol';
import { DiamondWritable, IDiamondWritable } from './writable/DiamondWritable.sol';
import { ISolidStateDiamond } from './ISolidStateDiamond.sol';

/**
 * @title SolidState "Diamond" proxy reference implementation
 */
abstract contract SolidStateDiamond is
    ISolidStateDiamond,
    DiamondBase,
    DiamondFallback,
    DiamondReadable,
    DiamondWritable,
    SafeOwnable,
    ERC165Base
{
    constructor() {
        bytes4[] memory selectors = new bytes4[](12);
        uint256 selectorIndex;

        // register DiamondFallback

        selectors[selectorIndex++] = IDiamondFallback
            .getFallbackAddress
            .selector;
        selectors[selectorIndex++] = IDiamondFallback
            .setFallbackAddress
            .selector;

        _setSupportsInterface(type(IDiamondFallback).interfaceId, true);

        // register DiamondWritable

        selectors[selectorIndex++] = IDiamondWritable.diamondCut.selector;

        _setSupportsInterface(type(IDiamondWritable).interfaceId, true);

        // register DiamondReadable

        selectors[selectorIndex++] = IDiamondReadable.facets.selector;
        selectors[selectorIndex++] = IDiamondReadable
            .facetFunctionSelectors
            .selector;
        selectors[selectorIndex++] = IDiamondReadable.facetAddresses.selector;
        selectors[selectorIndex++] = IDiamondReadable.facetAddress.selector;

        _setSupportsInterface(type(IDiamondReadable).interfaceId, true);

        // register ERC165

        selectors[selectorIndex++] = IERC165.supportsInterface.selector;

        _setSupportsInterface(type(IERC165).interfaceId, true);

        // register SafeOwnable

        selectors[selectorIndex++] = Ownable.owner.selector;
        selectors[selectorIndex++] = SafeOwnable.nomineeOwner.selector;
        selectors[selectorIndex++] = Ownable.transferOwnership.selector;
        selectors[selectorIndex++] = SafeOwnable.acceptOwnership.selector;

        _setSupportsInterface(type(IERC173).interfaceId, true);

        // diamond cut

        FacetCut[] memory facetCuts = new FacetCut[](1);

        facetCuts[0] = FacetCut({
            target: address(this),
            action: FacetCutAction.ADD,
            selectors: selectors
        });

        _diamondCut(facetCuts, address(0), '');

        // set owner

        _setOwner(msg.sender);
    }

    receive() external payable {}

    function _transferOwnership(
        address account
    ) internal virtual override(OwnableInternal, SafeOwnable) {
        super._transferOwnership(account);
    }

    /**
     * @inheritdoc DiamondFallback
     */
    function _getImplementation()
        internal
        view
        override(DiamondBase, DiamondFallback)
        returns (address implementation)
    {
        implementation = super._getImplementation();
    }
}

File 6 of 45 : ERC1155MetadataExtensionStorage.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

/// @title ERC1155MetadataExtensionStorage
library ERC1155MetadataExtensionStorage {
    struct Layout {
        string name;
        string symbol;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256("insrt.contracts.storage.ERC1155MetadataExtensionStorage");

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;

        assembly {
            l.slot := slot
        }
    }
}

File 7 of 45 : Storage.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

import "./types/DataTypes.sol";

/// @title PerpetualMintStorage
/// @dev defines storage layout for the PerpetualMint facet
library PerpetualMintStorage {
    struct Layout {
        /// @dev $MINT mint for collection consolation tiers data
        TiersData tiers;
        /// @dev all variables related to Chainlink VRF configuration
        VRFConfig vrfConfig;
        /// @dev mint for collection consolation fee in basis points
        uint32 collectionConsolationFeeBP;
        /// @dev mint fee in basis points
        uint32 mintFeeBP;
        /// @dev redemption fee in basis points
        uint32 redemptionFeeBP;
        /// @dev The minimum threshold for the VRF subscription balance in LINK tokens.
        uint96 vrfSubscriptionBalanceThreshold;
        /// @dev amount of consolation fees accrued in ETH (native token) from mint attempts
        uint256 consolationFees;
        /// @dev amount of mint earnings accrued in ETH (native token) from mint attempts
        uint256 mintEarnings;
        /// @dev amount of protocol fees accrued in ETH (native token) from mint attempts
        uint256 protocolFees;
        /// @dev ratio of ETH (native token) to $MINT for mint attempts using $MINT as payment
        uint256 ethToMintRatio;
        /// @dev mapping of collection addresses to collection-specific data
        mapping(address collection => CollectionData) collections;
        /// @dev mapping of mint attempt VRF requests which have not yet been fulfilled
        mapping(uint256 requestId => RequestData) requests;
        /// @dev address of the current $MINT token
        address mintToken;
        /// @dev status of whether redeem is paused
        bool redeemPaused;
        /// @dev mint for $MINT consolation fee in basis points
        uint32 mintTokenConsolationFeeBP;
        /// @dev $MINT mint for $MINT consolation tiers data
        MintTokenTiersData mintTokenTiers;
        /// @dev default mint referral fee for a collection in basis points
        uint32 defaultCollectionReferralFeeBP;
        /// @dev the risk or probability of winning yield from a mint attempt, applicable only to Blast as of writing
        uint32 yieldRisk;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256("insrt.contracts.storage.PerpetualMint");

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 8 of 45 : DataTypes.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

/// @dev DataTypes.sol defines the enum data types used in the Blast yield contract

/// @dev GasMode defines the gas mode options for the Blast yield contract
enum GasMode {
    VOID,
    CLAIMABLE
}

/// @dev YieldMode defines the yield mode options for the Blast yield contract
enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
}

File 9 of 45 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC173 } from '../../interfaces/IERC173.sol';
import { IOwnable } from './IOwnable.sol';
import { OwnableInternal } from './OwnableInternal.sol';

/**
 * @title Ownership access control based on ERC173
 */
abstract contract Ownable is IOwnable, OwnableInternal {
    /**
     * @inheritdoc IERC173
     */
    function owner() public view virtual returns (address) {
        return _owner();
    }

    /**
     * @inheritdoc IERC173
     */
    function transferOwnership(address account) public virtual onlyOwner {
        _transferOwnership(account);
    }
}

File 10 of 45 : SafeOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { Ownable } from './Ownable.sol';
import { ISafeOwnable } from './ISafeOwnable.sol';
import { OwnableInternal } from './OwnableInternal.sol';
import { SafeOwnableInternal } from './SafeOwnableInternal.sol';

/**
 * @title Ownership access control based on ERC173 with ownership transfer safety check
 */
abstract contract SafeOwnable is ISafeOwnable, Ownable, SafeOwnableInternal {
    /**
     * @inheritdoc ISafeOwnable
     */
    function nomineeOwner() public view virtual returns (address) {
        return _nomineeOwner();
    }

    /**
     * @inheritdoc ISafeOwnable
     */
    function acceptOwnership() public virtual onlyNomineeOwner {
        _acceptOwnership();
    }

    function _transferOwnership(
        address account
    ) internal virtual override(OwnableInternal, SafeOwnableInternal) {
        super._transferOwnership(account);
    }
}

File 11 of 45 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC165Internal } from './IERC165Internal.sol';

/**
 * @title ERC165 interface registration interface
 * @dev see https://eips.ethereum.org/EIPS/eip-165
 */
interface IERC165 is IERC165Internal {
    /**
     * @notice query whether contract has registered support for given interface
     * @param interfaceId interface id
     * @return bool whether interface is supported
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 12 of 45 : IERC173.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC173Internal } from './IERC173Internal.sol';

/**
 * @title Contract ownership standard interface
 * @dev see https://eips.ethereum.org/EIPS/eip-173
 */
interface IERC173 is IERC173Internal {
    /**
     * @notice get the ERC173 contract owner
     * @return contract owner
     */
    function owner() external view returns (address);

    /**
     * @notice transfer contract ownership to new account
     * @param account address of new owner
     */
    function transferOwnership(address account) external;
}

File 13 of 45 : ERC165Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC165 } from '../../../interfaces/IERC165.sol';
import { IERC165Base } from './IERC165Base.sol';
import { ERC165BaseInternal } from './ERC165BaseInternal.sol';
import { ERC165BaseStorage } from './ERC165BaseStorage.sol';

/**
 * @title ERC165 implementation
 */
abstract contract ERC165Base is IERC165Base, ERC165BaseInternal {
    /**
     * @inheritdoc IERC165
     */
    function supportsInterface(bytes4 interfaceId) public view returns (bool) {
        return _supportsInterface(interfaceId);
    }
}

File 14 of 45 : DiamondBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { Proxy } from '../../Proxy.sol';
import { IDiamondBase } from './IDiamondBase.sol';
import { DiamondBaseStorage } from './DiamondBaseStorage.sol';

/**
 * @title EIP-2535 "Diamond" proxy base contract
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
abstract contract DiamondBase is IDiamondBase, Proxy {
    /**
     * @inheritdoc Proxy
     */
    function _getImplementation()
        internal
        view
        virtual
        override
        returns (address implementation)
    {
        // inline storage layout retrieval uses less gas
        DiamondBaseStorage.Layout storage l;
        bytes32 slot = DiamondBaseStorage.STORAGE_SLOT;
        assembly {
            l.slot := slot
        }

        implementation = address(bytes20(l.facets[msg.sig]));
    }
}

File 15 of 45 : DiamondFallback.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { OwnableInternal } from '../../../access/ownable/OwnableInternal.sol';
import { DiamondBase } from '../base/DiamondBase.sol';
import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol';
import { IDiamondFallback } from './IDiamondFallback.sol';

/**
 * @title Fallback feature for EIP-2535 "Diamond" proxy
 */
abstract contract DiamondFallback is
    IDiamondFallback,
    OwnableInternal,
    DiamondBase
{
    /**
     * @inheritdoc IDiamondFallback
     */
    function getFallbackAddress()
        external
        view
        returns (address fallbackAddress)
    {
        fallbackAddress = _getFallbackAddress();
    }

    /**
     * @inheritdoc IDiamondFallback
     */
    function setFallbackAddress(address fallbackAddress) external onlyOwner {
        _setFallbackAddress(fallbackAddress);
    }

    /**
     * @inheritdoc DiamondBase
     * @notice query custom fallback address is no implementation is found
     */
    function _getImplementation()
        internal
        view
        virtual
        override
        returns (address implementation)
    {
        implementation = super._getImplementation();

        if (implementation == address(0)) {
            implementation = _getFallbackAddress();
        }
    }

    /**
     * @notice query the address of the fallback implementation
     * @return fallbackAddress address of fallback implementation
     */
    function _getFallbackAddress()
        internal
        view
        virtual
        returns (address fallbackAddress)
    {
        fallbackAddress = DiamondBaseStorage.layout().fallbackAddress;
    }

    /**
     * @notice set the address of the fallback implementation
     * @param fallbackAddress address of fallback implementation
     */
    function _setFallbackAddress(address fallbackAddress) internal virtual {
        DiamondBaseStorage.layout().fallbackAddress = fallbackAddress;
    }
}

File 16 of 45 : DiamondReadable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol';
import { IDiamondReadable } from './IDiamondReadable.sol';

/**
 * @title EIP-2535 "Diamond" proxy introspection contract
 * @dev derived from https://github.com/mudgen/diamond-2 (MIT license)
 */
abstract contract DiamondReadable is IDiamondReadable {
    /**
     * @inheritdoc IDiamondReadable
     */
    function facets() external view returns (Facet[] memory diamondFacets) {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        diamondFacets = new Facet[](l.selectorCount);

        uint8[] memory numFacetSelectors = new uint8[](l.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;

        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));
                address facet = address(bytes20(l.facets[selector]));

                bool continueLoop;

                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (diamondFacets[facetIndex].target == facet) {
                        diamondFacets[facetIndex].selectors[
                            numFacetSelectors[facetIndex]
                        ] = selector;
                        // probably will never have more than 256 functions from one facet contract
                        require(numFacetSelectors[facetIndex] < 255);
                        numFacetSelectors[facetIndex]++;
                        continueLoop = true;
                        break;
                    }
                }

                if (continueLoop) {
                    continue;
                }

                diamondFacets[numFacets].target = facet;
                diamondFacets[numFacets].selectors = new bytes4[](
                    l.selectorCount
                );
                diamondFacets[numFacets].selectors[0] = selector;
                numFacetSelectors[numFacets] = 1;
                numFacets++;
            }
        }

        for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
            uint256 numSelectors = numFacetSelectors[facetIndex];
            bytes4[] memory selectors = diamondFacets[facetIndex].selectors;

            // setting the number of selectors
            assembly {
                mstore(selectors, numSelectors)
            }
        }

        // setting the number of facets
        assembly {
            mstore(diamondFacets, numFacets)
        }
    }

    /**
     * @inheritdoc IDiamondReadable
     */
    function facetFunctionSelectors(
        address facet
    ) external view returns (bytes4[] memory selectors) {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        selectors = new bytes4[](l.selectorCount);

        uint256 numSelectors;
        uint256 selectorIndex;

        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));

                if (facet == address(bytes20(l.facets[selector]))) {
                    selectors[numSelectors] = selector;
                    numSelectors++;
                }
            }
        }

        // set the number of selectors in the array
        assembly {
            mstore(selectors, numSelectors)
        }
    }

    /**
     * @inheritdoc IDiamondReadable
     */
    function facetAddresses()
        external
        view
        returns (address[] memory addresses)
    {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        addresses = new address[](l.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;

        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));
                address facet = address(bytes20(l.facets[selector]));

                bool continueLoop;

                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (facet == addresses[facetIndex]) {
                        continueLoop = true;
                        break;
                    }
                }

                if (continueLoop) {
                    continue;
                }

                addresses[numFacets] = facet;
                numFacets++;
            }
        }

        // set the number of facet addresses in the array
        assembly {
            mstore(addresses, numFacets)
        }
    }

    /**
     * @inheritdoc IDiamondReadable
     */
    function facetAddress(
        bytes4 selector
    ) external view returns (address facet) {
        facet = address(bytes20(DiamondBaseStorage.layout().facets[selector]));
    }
}

File 17 of 45 : DiamondWritable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { OwnableInternal } from '../../../access/ownable/OwnableInternal.sol';
import { IDiamondWritable } from './IDiamondWritable.sol';
import { DiamondWritableInternal } from './DiamondWritableInternal.sol';

/**
 * @title EIP-2535 "Diamond" proxy update contract
 */
abstract contract DiamondWritable is
    IDiamondWritable,
    DiamondWritableInternal,
    OwnableInternal
{
    /**
     * @inheritdoc IDiamondWritable
     */
    function diamondCut(
        FacetCut[] calldata facetCuts,
        address target,
        bytes calldata data
    ) external onlyOwner {
        _diamondCut(facetCuts, target, data);
    }
}

File 18 of 45 : ISolidStateDiamond.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { ISafeOwnable } from '../../access/ownable/ISafeOwnable.sol';
import { IERC165 } from '../../interfaces/IERC165.sol';
import { IDiamondBase } from './base/IDiamondBase.sol';
import { IDiamondFallback } from './fallback/IDiamondFallback.sol';
import { IDiamondReadable } from './readable/IDiamondReadable.sol';
import { IDiamondWritable } from './writable/IDiamondWritable.sol';

interface ISolidStateDiamond is
    IDiamondBase,
    IDiamondFallback,
    IDiamondReadable,
    IDiamondWritable,
    ISafeOwnable,
    IERC165
{
    receive() external payable;
}

File 19 of 45 : DataTypes.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.19;

import { EnumerableSet } from "@solidstate/contracts/data/EnumerableSet.sol";

/// @dev DataTypes.sol defines the PerpetualMint struct data types used in the PerpetualMintStorage layout

/// @dev Represents data specific to a collection
struct CollectionData {
    /// @dev keeps track of mint requests which have not yet been fulfilled
    /// @dev used to implement the collection risk & collection mint multiplier update "state-machine" check
    EnumerableSet.UintSet pendingRequests;
    /// @dev price of mint attempt in ETH (native token) for a collection
    uint256 mintPrice;
    /// @dev risk of ruin for a collection
    uint32 risk;
    /// @dev mint fee distribution ratio for a collection in basis points
    uint32 mintFeeDistributionRatioBP;
    /// @dev mint consolation multiplier for a collection
    uint256 mintMultiplier;
    /// @dev collection-specific mint referral fee in basis points
    uint32 referralFeeBP;
}

/// @dev Represents the outcome of a single mint attempt.
struct MintOutcome {
    /// @dev The index of the tier in which the outcome falls under
    uint256 tierIndex;
    /// @dev The multiplier of the tier, scaled by BASIS
    uint256 tierMultiplier;
    /// @dev The risk or probability of landing in this tier, scaled by BASIS
    uint256 tierRisk;
    /// @dev The amount of $MINT to be issued if this outcome is hit, in units of wei
    uint256 mintAmount;
}

/// @dev Represents the total result of a batch mint attempt.
struct MintResultData {
    /// @dev An array containing the outcomes of each individual mint attempt
    MintOutcome[] mintOutcomes;
    /// @dev The total amount of $MINT to be issued based on all outcomes, in units of wei
    uint256 totalMintAmount;
    /// @dev The total number of successful mint attempts where a prize ticket was awarded
    uint256 totalSuccessfulMints;
}

/// @dev Represents the total result of a batch mint attempt on Blast.
struct MintResultDataBlast {
    /// @dev An array containing the outcomes of each individual mint attempt
    MintOutcome[] mintOutcomes;
    /// @dev The total amount of Blast yield received, in units of wei
    uint256 totalBlastYieldAmount;
    /// @dev The total amount of $MINT to be issued based on all outcomes, in units of wei
    uint256 totalMintAmount;
    /// @dev The total number of successful mint attempts where a prize ticket was awarded
    uint256 totalSuccessfulMints;
}

/// @dev Represents data specific to $MINT mint for $MINT consolation tiers
struct MintTokenTiersData {
    /// @dev assumed ordered array of risks for each tier
    uint32[] tierRisks;
    /// @dev assumed ordered array of $MINT consolation multipliers for each tier
    uint256[] tierMultipliers;
}

/// @dev Represents data specific to mint requests
/// @dev Updated as a new request is made and removed when the request is fulfilled
struct RequestData {
    /// @dev address of collection for mint attempt
    address collection;
    /// @dev address of minter who made the request
    address minter;
    /// @dev adjustment factor based on the ratio of the price per mint paid to the full price per mint
    uint256 mintPriceAdjustmentFactor;
}

/// @dev Represents data specific to $MINT mint for collection consolation tiers
struct TiersData {
    /// @dev assumed ordered array of risks for each tier
    uint32[] tierRisks;
    /// @dev assumed ordered array of $MINT consolation multipliers for each tier
    uint256[] tierMultipliers;
}

/// @dev Encapsulates variables related to Chainlink VRF
/// @dev see: https://docs.chain.link/vrf/v2/subscription#set-up-your-contract-and-request
struct VRFConfig {
    /// @dev Chainlink identifier for prioritizing transactions
    /// different keyhashes have different gas prices thus different priorities
    bytes32 keyHash;
    /// @dev id of Chainlink subscription to VRF for PerpetualMint contract
    uint64 subscriptionId;
    /// @dev maximum amount of gas a user is willing to pay for completing the callback VRF function
    uint32 callbackGasLimit;
    /// @dev number of block confirmations the VRF service will wait to respond
    uint16 minConfirmations;
}

File 20 of 45 : IOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC173 } from '../../interfaces/IERC173.sol';
import { IOwnableInternal } from './IOwnableInternal.sol';

interface IOwnable is IOwnableInternal, IERC173 {}

File 21 of 45 : OwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC173 } from '../../interfaces/IERC173.sol';
import { AddressUtils } from '../../utils/AddressUtils.sol';
import { IOwnableInternal } from './IOwnableInternal.sol';
import { OwnableStorage } from './OwnableStorage.sol';

abstract contract OwnableInternal is IOwnableInternal {
    using AddressUtils for address;

    modifier onlyOwner() {
        if (msg.sender != _owner()) revert Ownable__NotOwner();
        _;
    }

    modifier onlyTransitiveOwner() {
        if (msg.sender != _transitiveOwner())
            revert Ownable__NotTransitiveOwner();
        _;
    }

    function _owner() internal view virtual returns (address) {
        return OwnableStorage.layout().owner;
    }

    function _transitiveOwner() internal view virtual returns (address owner) {
        owner = _owner();

        while (owner.isContract()) {
            try IERC173(owner).owner() returns (address transitiveOwner) {
                owner = transitiveOwner;
            } catch {
                break;
            }
        }
    }

    function _transferOwnership(address account) internal virtual {
        _setOwner(account);
    }

    function _setOwner(address account) internal virtual {
        OwnableStorage.Layout storage l = OwnableStorage.layout();
        emit OwnershipTransferred(l.owner, account);
        l.owner = account;
    }
}

File 22 of 45 : ISafeOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IOwnable } from './IOwnable.sol';
import { ISafeOwnableInternal } from './ISafeOwnableInternal.sol';

interface ISafeOwnable is ISafeOwnableInternal, IOwnable {
    /**
     * @notice get the nominated owner who has permission to call acceptOwnership
     */
    function nomineeOwner() external view returns (address);

    /**
     * @notice accept transfer of contract ownership
     */
    function acceptOwnership() external;
}

File 23 of 45 : SafeOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { ISafeOwnableInternal } from './ISafeOwnableInternal.sol';
import { OwnableInternal } from './OwnableInternal.sol';
import { SafeOwnableStorage } from './SafeOwnableStorage.sol';

abstract contract SafeOwnableInternal is ISafeOwnableInternal, OwnableInternal {
    modifier onlyNomineeOwner() {
        if (msg.sender != _nomineeOwner())
            revert SafeOwnable__NotNomineeOwner();
        _;
    }

    /**
     * @notice get the nominated owner who has permission to call acceptOwnership
     */
    function _nomineeOwner() internal view virtual returns (address) {
        return SafeOwnableStorage.layout().nomineeOwner;
    }

    /**
     * @notice accept transfer of contract ownership
     */
    function _acceptOwnership() internal virtual {
        _setOwner(msg.sender);
        delete SafeOwnableStorage.layout().nomineeOwner;
    }

    /**
     * @notice grant permission to given address to claim contract ownership
     */
    function _transferOwnership(address account) internal virtual override {
        _setNomineeOwner(account);
    }

    /**
     * @notice set nominee owner
     */
    function _setNomineeOwner(address account) internal virtual {
        SafeOwnableStorage.layout().nomineeOwner = account;
    }
}

File 24 of 45 : IERC165Internal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

/**
 * @title ERC165 interface registration interface
 */
interface IERC165Internal {

}

File 25 of 45 : IERC173Internal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

/**
 * @title Partial ERC173 interface needed by internal functions
 */
interface IERC173Internal {
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );
}

File 26 of 45 : IERC165Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC165 } from '../../../interfaces/IERC165.sol';
import { IERC165BaseInternal } from './IERC165BaseInternal.sol';

interface IERC165Base is IERC165, IERC165BaseInternal {}

File 27 of 45 : ERC165BaseInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC165BaseInternal } from './IERC165BaseInternal.sol';
import { ERC165BaseStorage } from './ERC165BaseStorage.sol';

/**
 * @title ERC165 implementation
 */
abstract contract ERC165BaseInternal is IERC165BaseInternal {
    /**
     * @notice indicates whether an interface is already supported based on the interfaceId
     * @param interfaceId id of interface to check
     * @return bool indicating whether interface is supported
     */
    function _supportsInterface(
        bytes4 interfaceId
    ) internal view virtual returns (bool) {
        return ERC165BaseStorage.layout().supportedInterfaces[interfaceId];
    }

    /**
     * @notice sets status of interface support
     * @param interfaceId id of interface to set status for
     * @param status boolean indicating whether interface will be set as supported
     */
    function _setSupportsInterface(
        bytes4 interfaceId,
        bool status
    ) internal virtual {
        if (interfaceId == 0xffffffff) revert ERC165Base__InvalidInterfaceId();
        ERC165BaseStorage.layout().supportedInterfaces[interfaceId] = status;
    }
}

File 28 of 45 : ERC165BaseStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

library ERC165BaseStorage {
    struct Layout {
        mapping(bytes4 => bool) supportedInterfaces;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.ERC165Base');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 29 of 45 : Proxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { AddressUtils } from '../utils/AddressUtils.sol';
import { IProxy } from './IProxy.sol';

/**
 * @title Base proxy contract
 */
abstract contract Proxy is IProxy {
    using AddressUtils for address;

    /**
     * @notice delegate all calls to implementation contract
     * @dev reverts if implementation address contains no code, for compatibility with metamorphic contracts
     * @dev memory location in use by assembly may be unsafe in other contexts
     */
    fallback() external payable virtual {
        address implementation = _getImplementation();

        if (!implementation.isContract())
            revert Proxy__ImplementationIsNotContract();

        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(
                gas(),
                implementation,
                0,
                calldatasize(),
                0,
                0
            )
            returndatacopy(0, 0, returndatasize())

            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @notice get logic implementation address
     * @return implementation address
     */
    function _getImplementation() internal virtual returns (address);
}

File 30 of 45 : IDiamondBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IProxy } from '../../IProxy.sol';

interface IDiamondBase is IProxy {}

File 31 of 45 : DiamondBaseStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

/**
 * @dev derived from https://github.com/mudgen/diamond-2 (MIT license)
 */
library DiamondBaseStorage {
    struct Layout {
        // function selector => (facet address, selector slot position)
        mapping(bytes4 => bytes32) facets;
        // total number of selectors registered
        uint16 selectorCount;
        // array of selector slots with 8 selectors per slot
        mapping(uint256 => bytes32) selectorSlots;
        address fallbackAddress;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.DiamondBase');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 32 of 45 : IDiamondFallback.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IDiamondBase } from '../base/IDiamondBase.sol';

interface IDiamondFallback is IDiamondBase {
    /**
     * @notice query the address of the fallback implementation
     * @return fallbackAddress address of fallback implementation
     */
    function getFallbackAddress()
        external
        view
        returns (address fallbackAddress);

    /**
     * @notice set the address of the fallback implementation
     * @param fallbackAddress address of fallback implementation
     */
    function setFallbackAddress(address fallbackAddress) external;
}

File 33 of 45 : IDiamondReadable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

/**
 * @title Diamond proxy introspection interface
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
interface IDiamondReadable {
    struct Facet {
        address target;
        bytes4[] selectors;
    }

    /**
     * @notice get all facets and their selectors
     * @return diamondFacets array of structured facet data
     */
    function facets() external view returns (Facet[] memory diamondFacets);

    /**
     * @notice get all selectors for given facet address
     * @param facet address of facet to query
     * @return selectors array of function selectors
     */
    function facetFunctionSelectors(
        address facet
    ) external view returns (bytes4[] memory selectors);

    /**
     * @notice get addresses of all facets used by diamond
     * @return addresses array of facet addresses
     */
    function facetAddresses()
        external
        view
        returns (address[] memory addresses);

    /**
     * @notice get the address of the facet associated with given selector
     * @param selector function selector to query
     * @return facet facet address (zero address if not found)
     */
    function facetAddress(
        bytes4 selector
    ) external view returns (address facet);
}

File 34 of 45 : IDiamondWritable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IDiamondWritableInternal } from './IDiamondWritableInternal.sol';

/**
 * @title Diamond proxy upgrade interface
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
interface IDiamondWritable is IDiamondWritableInternal {
    /**
     * @notice update diamond facets and optionally execute arbitrary initialization function
     * @param facetCuts array of structured Diamond facet update data
     * @param target optional target of initialization delegatecall
     * @param data optional initialization function call data
     */
    function diamondCut(
        FacetCut[] calldata facetCuts,
        address target,
        bytes calldata data
    ) external;
}

File 35 of 45 : DiamondWritableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { AddressUtils } from '../../../utils/AddressUtils.sol';
import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol';
import { IDiamondWritableInternal } from './IDiamondWritableInternal.sol';

abstract contract DiamondWritableInternal is IDiamondWritableInternal {
    using AddressUtils for address;

    bytes32 private constant CLEAR_ADDRESS_MASK =
        bytes32(uint256(0xffffffffffffffffffffffff));
    bytes32 private constant CLEAR_SELECTOR_MASK =
        bytes32(uint256(0xffffffff << 224));

    /**
     * @notice update functions callable on Diamond proxy
     * @param facetCuts array of structured Diamond facet update data
     * @param target optional recipient of initialization delegatecall
     * @param data optional initialization call data
     */
    function _diamondCut(
        FacetCut[] memory facetCuts,
        address target,
        bytes memory data
    ) internal {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        unchecked {
            uint256 originalSelectorCount = l.selectorCount;
            uint256 selectorCount = originalSelectorCount;
            bytes32 selectorSlot;

            // Check if last selector slot is not full
            if (selectorCount & 7 > 0) {
                // get last selectorSlot
                selectorSlot = l.selectorSlots[selectorCount >> 3];
            }

            for (uint256 i; i < facetCuts.length; i++) {
                FacetCut memory facetCut = facetCuts[i];
                FacetCutAction action = facetCut.action;

                if (facetCut.selectors.length == 0)
                    revert DiamondWritable__SelectorNotSpecified();

                if (action == FacetCutAction.ADD) {
                    (selectorCount, selectorSlot) = _addFacetSelectors(
                        l,
                        selectorCount,
                        selectorSlot,
                        facetCut
                    );
                } else if (action == FacetCutAction.REPLACE) {
                    _replaceFacetSelectors(l, facetCut);
                } else if (action == FacetCutAction.REMOVE) {
                    (selectorCount, selectorSlot) = _removeFacetSelectors(
                        l,
                        selectorCount,
                        selectorSlot,
                        facetCut
                    );
                }
            }

            if (selectorCount != originalSelectorCount) {
                l.selectorCount = uint16(selectorCount);
            }

            // If last selector slot is not full
            if (selectorCount & 7 > 0) {
                l.selectorSlots[selectorCount >> 3] = selectorSlot;
            }

            emit DiamondCut(facetCuts, target, data);
            _initialize(target, data);
        }
    }

    function _addFacetSelectors(
        DiamondBaseStorage.Layout storage l,
        uint256 selectorCount,
        bytes32 selectorSlot,
        FacetCut memory facetCut
    ) internal returns (uint256, bytes32) {
        unchecked {
            if (
                facetCut.target != address(this) &&
                !facetCut.target.isContract()
            ) revert DiamondWritable__TargetHasNoCode();

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];

                if (address(bytes20(oldFacet)) != address(0))
                    revert DiamondWritable__SelectorAlreadyAdded();

                // add facet for selector
                l.facets[selector] =
                    bytes20(facetCut.target) |
                    bytes32(selectorCount);
                uint256 selectorInSlotPosition = (selectorCount & 7) << 5;

                // clear selector position in slot and add selector
                selectorSlot =
                    (selectorSlot &
                        ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) |
                    (bytes32(selector) >> selectorInSlotPosition);

                // if slot is full then write it to storage
                if (selectorInSlotPosition == 224) {
                    l.selectorSlots[selectorCount >> 3] = selectorSlot;
                    selectorSlot = 0;
                }

                selectorCount++;
            }

            return (selectorCount, selectorSlot);
        }
    }

    function _removeFacetSelectors(
        DiamondBaseStorage.Layout storage l,
        uint256 selectorCount,
        bytes32 selectorSlot,
        FacetCut memory facetCut
    ) internal returns (uint256, bytes32) {
        unchecked {
            if (facetCut.target != address(0))
                revert DiamondWritable__RemoveTargetNotZeroAddress();

            uint256 selectorSlotCount = selectorCount >> 3;
            uint256 selectorInSlotIndex = selectorCount & 7;

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];

                if (address(bytes20(oldFacet)) == address(0))
                    revert DiamondWritable__SelectorNotFound();

                if (address(bytes20(oldFacet)) == address(this))
                    revert DiamondWritable__SelectorIsImmutable();

                if (selectorSlot == 0) {
                    selectorSlotCount--;
                    selectorSlot = l.selectorSlots[selectorSlotCount];
                    selectorInSlotIndex = 7;
                } else {
                    selectorInSlotIndex--;
                }

                bytes4 lastSelector;
                uint256 oldSelectorsSlotCount;
                uint256 oldSelectorInSlotPosition;

                // adding a block here prevents stack too deep error
                {
                    // replace selector with last selector in l.facets
                    lastSelector = bytes4(
                        selectorSlot << (selectorInSlotIndex << 5)
                    );

                    if (lastSelector != selector) {
                        // update last selector slot position info
                        l.facets[lastSelector] =
                            (oldFacet & CLEAR_ADDRESS_MASK) |
                            bytes20(l.facets[lastSelector]);
                    }

                    delete l.facets[selector];
                    uint256 oldSelectorCount = uint16(uint256(oldFacet));
                    oldSelectorsSlotCount = oldSelectorCount >> 3;
                    oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
                }

                if (oldSelectorsSlotCount != selectorSlotCount) {
                    bytes32 oldSelectorSlot = l.selectorSlots[
                        oldSelectorsSlotCount
                    ];

                    // clears the selector we are deleting and puts the last selector in its place.
                    oldSelectorSlot =
                        (oldSelectorSlot &
                            ~(CLEAR_SELECTOR_MASK >>
                                oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);

                    // update storage with the modified slot
                    l.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
                } else {
                    // clears the selector we are deleting and puts the last selector in its place.
                    selectorSlot =
                        (selectorSlot &
                            ~(CLEAR_SELECTOR_MASK >>
                                oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);
                }

                if (selectorInSlotIndex == 0) {
                    delete l.selectorSlots[selectorSlotCount];
                    selectorSlot = 0;
                }
            }

            selectorCount = (selectorSlotCount << 3) | selectorInSlotIndex;

            return (selectorCount, selectorSlot);
        }
    }

    function _replaceFacetSelectors(
        DiamondBaseStorage.Layout storage l,
        FacetCut memory facetCut
    ) internal {
        unchecked {
            if (!facetCut.target.isContract())
                revert DiamondWritable__TargetHasNoCode();

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];
                address oldFacetAddress = address(bytes20(oldFacet));

                if (oldFacetAddress == address(0))
                    revert DiamondWritable__SelectorNotFound();
                if (oldFacetAddress == address(this))
                    revert DiamondWritable__SelectorIsImmutable();
                if (oldFacetAddress == facetCut.target)
                    revert DiamondWritable__ReplaceTargetIsIdentical();

                // replace old facet address
                l.facets[selector] =
                    (oldFacet & CLEAR_ADDRESS_MASK) |
                    bytes20(facetCut.target);
            }
        }
    }

    function _initialize(address target, bytes memory data) private {
        if ((target == address(0)) != (data.length == 0))
            revert DiamondWritable__InvalidInitializationParameters();

        if (target != address(0)) {
            if (target != address(this)) {
                if (!target.isContract())
                    revert DiamondWritable__TargetHasNoCode();
            }

            (bool success, ) = target.delegatecall(data);

            if (!success) {
                assembly {
                    returndatacopy(0, 0, returndatasize())
                    revert(0, returndatasize())
                }
            }
        }
    }
}

File 36 of 45 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

/**
 * @title Set implementation with enumeration functions
 * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts (MIT license)
 */
library EnumerableSet {
    error EnumerableSet__IndexOutOfBounds();

    struct Set {
        bytes32[] _values;
        // 1-indexed to allow 0 to signify nonexistence
        mapping(bytes32 => uint256) _indexes;
    }

    struct Bytes32Set {
        Set _inner;
    }

    struct AddressSet {
        Set _inner;
    }

    struct UintSet {
        Set _inner;
    }

    function at(
        Bytes32Set storage set,
        uint256 index
    ) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    function at(
        AddressSet storage set,
        uint256 index
    ) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    function at(
        UintSet storage set,
        uint256 index
    ) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    function contains(
        Bytes32Set storage set,
        bytes32 value
    ) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    function contains(
        AddressSet storage set,
        address value
    ) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    function contains(
        UintSet storage set,
        uint256 value
    ) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    function indexOf(
        Bytes32Set storage set,
        bytes32 value
    ) internal view returns (uint256) {
        return _indexOf(set._inner, value);
    }

    function indexOf(
        AddressSet storage set,
        address value
    ) internal view returns (uint256) {
        return _indexOf(set._inner, bytes32(uint256(uint160(value))));
    }

    function indexOf(
        UintSet storage set,
        uint256 value
    ) internal view returns (uint256) {
        return _indexOf(set._inner, bytes32(value));
    }

    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    function add(
        Bytes32Set storage set,
        bytes32 value
    ) internal returns (bool) {
        return _add(set._inner, value);
    }

    function add(
        AddressSet storage set,
        address value
    ) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    function remove(
        Bytes32Set storage set,
        bytes32 value
    ) internal returns (bool) {
        return _remove(set._inner, value);
    }

    function remove(
        AddressSet storage set,
        address value
    ) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    function remove(
        UintSet storage set,
        uint256 value
    ) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    function toArray(
        Bytes32Set storage set
    ) internal view returns (bytes32[] memory) {
        return set._inner._values;
    }

    function toArray(
        AddressSet storage set
    ) internal view returns (address[] memory) {
        bytes32[] storage values = set._inner._values;
        address[] storage array;

        assembly {
            array.slot := values.slot
        }

        return array;
    }

    function toArray(
        UintSet storage set
    ) internal view returns (uint256[] memory) {
        bytes32[] storage values = set._inner._values;
        uint256[] storage array;

        assembly {
            array.slot := values.slot
        }

        return array;
    }

    function _at(
        Set storage set,
        uint256 index
    ) private view returns (bytes32) {
        if (index >= set._values.length)
            revert EnumerableSet__IndexOutOfBounds();
        return set._values[index];
    }

    function _contains(
        Set storage set,
        bytes32 value
    ) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    function _indexOf(
        Set storage set,
        bytes32 value
    ) private view returns (uint256) {
        unchecked {
            return set._indexes[value] - 1;
        }
    }

    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    function _add(
        Set storage set,
        bytes32 value
    ) private returns (bool status) {
        if (!_contains(set, value)) {
            set._values.push(value);
            set._indexes[value] = set._values.length;
            status = true;
        }
    }

    function _remove(
        Set storage set,
        bytes32 value
    ) private returns (bool status) {
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            unchecked {
                bytes32 last = set._values[set._values.length - 1];

                // move last value to now-vacant index

                set._values[valueIndex - 1] = last;
                set._indexes[last] = valueIndex;
            }
            // clear last index

            set._values.pop();
            delete set._indexes[value];

            status = true;
        }
    }
}

File 37 of 45 : IOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IERC173Internal } from '../../interfaces/IERC173Internal.sol';

interface IOwnableInternal is IERC173Internal {
    error Ownable__NotOwner();
    error Ownable__NotTransitiveOwner();
}

File 38 of 45 : AddressUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { UintUtils } from './UintUtils.sol';

library AddressUtils {
    using UintUtils for uint256;

    error AddressUtils__InsufficientBalance();
    error AddressUtils__NotContract();
    error AddressUtils__SendValueFailed();

    function toString(address account) internal pure returns (string memory) {
        return uint256(uint160(account)).toHexString(20);
    }

    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    function sendValue(address payable account, uint256 amount) internal {
        (bool success, ) = account.call{ value: amount }('');
        if (!success) revert AddressUtils__SendValueFailed();
    }

    function functionCall(
        address target,
        bytes memory data
    ) internal returns (bytes memory) {
        return
            functionCall(target, data, 'AddressUtils: failed low-level call');
    }

    function functionCall(
        address target,
        bytes memory data,
        string memory error
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, error);
    }

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                'AddressUtils: failed low-level call with value'
            );
    }

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory error
    ) internal returns (bytes memory) {
        if (value > address(this).balance)
            revert AddressUtils__InsufficientBalance();
        return _functionCallWithValue(target, data, value, error);
    }

    /**
     * @notice execute arbitrary external call with limited gas usage and amount of copied return data
     * @dev derived from https://github.com/nomad-xyz/ExcessivelySafeCall (MIT License)
     * @param target recipient of call
     * @param gasAmount gas allowance for call
     * @param value native token value to include in call
     * @param maxCopy maximum number of bytes to copy from return data
     * @param data encoded call data
     * @return success whether call is successful
     * @return returnData copied return data
     */
    function excessivelySafeCall(
        address target,
        uint256 gasAmount,
        uint256 value,
        uint16 maxCopy,
        bytes memory data
    ) internal returns (bool success, bytes memory returnData) {
        returnData = new bytes(maxCopy);

        assembly {
            // execute external call via assembly to avoid automatic copying of return data
            success := call(
                gasAmount,
                target,
                value,
                add(data, 0x20),
                mload(data),
                0,
                0
            )

            // determine whether to limit amount of data to copy
            let toCopy := returndatasize()

            if gt(toCopy, maxCopy) {
                toCopy := maxCopy
            }

            // store the length of the copied bytes
            mstore(returnData, toCopy)

            // copy the bytes from returndata[0:toCopy]
            returndatacopy(add(returnData, 0x20), 0, toCopy)
        }
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory error
    ) private returns (bytes memory) {
        if (!isContract(target)) revert AddressUtils__NotContract();

        (bool success, bytes memory returnData) = target.call{ value: value }(
            data
        );

        if (success) {
            return returnData;
        } else if (returnData.length > 0) {
            assembly {
                let returnData_size := mload(returnData)
                revert(add(32, returnData), returnData_size)
            }
        } else {
            revert(error);
        }
    }
}

File 39 of 45 : OwnableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

library OwnableStorage {
    struct Layout {
        address owner;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.Ownable');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 40 of 45 : ISafeOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import { IOwnableInternal } from './IOwnableInternal.sol';

interface ISafeOwnableInternal is IOwnableInternal {
    error SafeOwnable__NotNomineeOwner();
}

File 41 of 45 : SafeOwnableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

library SafeOwnableStorage {
    struct Layout {
        address nomineeOwner;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.SafeOwnable');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 42 of 45 : IERC165BaseInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC165Internal } from '../../../interfaces/IERC165Internal.sol';

interface IERC165BaseInternal is IERC165Internal {
    error ERC165Base__InvalidInterfaceId();
}

File 43 of 45 : IProxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

interface IProxy {
    error Proxy__ImplementationIsNotContract();

    fallback() external payable;
}

File 44 of 45 : IDiamondWritableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

interface IDiamondWritableInternal {
    enum FacetCutAction {
        ADD,
        REPLACE,
        REMOVE
    }

    event DiamondCut(FacetCut[] facetCuts, address target, bytes data);

    error DiamondWritable__InvalidInitializationParameters();
    error DiamondWritable__RemoveTargetNotZeroAddress();
    error DiamondWritable__ReplaceTargetIsIdentical();
    error DiamondWritable__SelectorAlreadyAdded();
    error DiamondWritable__SelectorIsImmutable();
    error DiamondWritable__SelectorNotFound();
    error DiamondWritable__SelectorNotSpecified();
    error DiamondWritable__TargetHasNoCode();

    struct FacetCut {
        address target;
        FacetCutAction action;
        bytes4[] selectors;
    }
}

File 45 of 45 : UintUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

/**
 * @title utility functions for uint256 operations
 * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license)
 */
library UintUtils {
    error UintUtils__InsufficientHexLength();

    bytes16 private constant HEX_SYMBOLS = '0123456789abcdef';

    function add(uint256 a, int256 b) internal pure returns (uint256) {
        return b < 0 ? sub(a, -b) : a + uint256(b);
    }

    function sub(uint256 a, int256 b) internal pure returns (uint256) {
        return b < 0 ? add(a, -b) : a - uint256(b);
    }

    function toString(uint256 value) internal pure returns (string memory) {
        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);
    }

    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return '0x00';
        }

        uint256 length = 0;

        for (uint256 temp = value; temp != 0; temp >>= 8) {
            unchecked {
                length++;
            }
        }

        return toHexString(value, 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';

        unchecked {
            for (uint256 i = 2 * length + 1; i > 1; --i) {
                buffer[i] = HEX_SYMBOLS[value & 0xf];
                value >>= 4;
            }
        }

        if (value != 0) revert UintUtils__InsufficientHexLength();

        return string(buffer);
    }
}

Settings
{
  "remappings": [
    "@chainlink/=lib/chainlink/contracts/src/v0.8/",
    "@solidstate/contracts/=lib/solidstate-solidity/contracts/",
    "forge-safe/=lib/forge-safe/src/",
    "forge-std/=lib/forge-std/src/",
    "chainlink/=lib/chainlink/contracts/",
    "ds-test/=lib/forge-safe/lib/ds-test/src/",
    "solidity-stringutils/=lib/forge-safe/lib/surl/lib/solidity-stringutils/",
    "solidstate-solidity/=lib/solidstate-solidity/contracts/",
    "solmate/=lib/forge-safe/lib/solmate/src/",
    "surl/=lib/forge-safe/lib/surl/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"mintToken","type":"address"},{"internalType":"string","name":"receiptName","type":"string"},{"internalType":"string","name":"receiptSymbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DiamondWritable__InvalidInitializationParameters","type":"error"},{"inputs":[],"name":"DiamondWritable__RemoveTargetNotZeroAddress","type":"error"},{"inputs":[],"name":"DiamondWritable__ReplaceTargetIsIdentical","type":"error"},{"inputs":[],"name":"DiamondWritable__SelectorAlreadyAdded","type":"error"},{"inputs":[],"name":"DiamondWritable__SelectorIsImmutable","type":"error"},{"inputs":[],"name":"DiamondWritable__SelectorNotFound","type":"error"},{"inputs":[],"name":"DiamondWritable__SelectorNotSpecified","type":"error"},{"inputs":[],"name":"DiamondWritable__TargetHasNoCode","type":"error"},{"inputs":[],"name":"ERC165Base__InvalidInterfaceId","type":"error"},{"inputs":[],"name":"Ownable__NotOwner","type":"error"},{"inputs":[],"name":"Ownable__NotTransitiveOwner","type":"error"},{"inputs":[],"name":"Proxy__ImplementationIsNotContract","type":"error"},{"inputs":[],"name":"SafeOwnable__NotNomineeOwner","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondWritableInternal.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondWritableInternal.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DiamondCut","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondWritableInternal.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondWritableInternal.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facet","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondReadable.Facet[]","name":"diamondFacets","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackAddress","outputs":[{"internalType":"address","name":"fallbackAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nomineeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fallbackAddress","type":"address"}],"name":"setFallbackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620037f9380380620037f9833981016040819052620000349162000f9d565b60408051600c8082526101a082019092528491849184916000919060208201610180803683370190505090506000632c40805960e01b8282620000778162001027565b9350815181106200008c576200008c6200104f565b6001600160e01b031990921660209283029190910190910152639142376560e01b8282620000ba8162001027565b935081518110620000cf57620000cf6200104f565b6001600160e01b031990921660209283029190910190910152620000fc632f40adcf60e21b60016200060a565b6307e4c70760e21b8282620001118162001027565b9350815181106200012657620001266200104f565b6001600160e01b031990921660209283029190910190910152620001536307e4c70760e21b60016200060a565b637a0ed62760e01b8282620001688162001027565b9350815181106200017d576200017d6200104f565b6001600160e01b0319909216602092830291909101909101526356fe50af60e11b8282620001ab8162001027565b935081518110620001c057620001c06200104f565b6001600160e01b0319909216602092830291909101909101526314bbdacb60e21b8282620001ee8162001027565b9350815181106200020357620002036200104f565b6001600160e01b0319909216602092830291909101909101526366ffd66360e11b8282620002318162001027565b9350815181106200024657620002466200104f565b6001600160e01b031990921660209283029190910190910152620002736348e2b09360e01b60016200060a565b6301ffc9a760e01b8282620002888162001027565b9350815181106200029d576200029d6200104f565b6001600160e01b031990921660209283029190910190910152620002ca6301ffc9a760e01b60016200060a565b638da5cb5b60e01b8282620002df8162001027565b935081518110620002f457620002f46200104f565b6001600160e01b03199092166020928302919091019091015263455a8a8560e11b8282620003228162001027565b9350815181106200033757620003376200104f565b6001600160e01b03199092166020928302919091019091015263f2fde38b60e01b8282620003658162001027565b9350815181106200037a576200037a6200104f565b6001600160e01b0319909216602092830291909101909101526379ba509760e01b8282620003a88162001027565b935081518110620003bd57620003bd6200104f565b6001600160e01b031990921660209283029190910190910152620003ea6307f5828d60e41b60016200060a565b604080516001808252818301909252600091816020015b6040805160608082018352600080835260208301529181019190915281526020019060019003908162000401579050506040805160608101909152308152909150602081016000815260200184815250816000815181106200046757620004676200104f565b602002602001018190525062000495816000604051806020016040528060008152506200068160201b60201c565b620004a03362000882565b5050506000620004b5620008fc60201b60201c565b7ffe3a0719868082e8c1c3ef42e99a1907498c2e824c5510b6bad715236e96a40180546001600160a01b0319166001600160a01b038716179055905080620004fe848262001109565b50600181016200050f838262001109565b505060405163c8992e6160e01b8152734300000000000000000000000000000000000002935063c8992e6192506200055391506002906001903090600401620011eb565b600060405180830381600087803b1580156200056e57600080fd5b505af115801562000583573d6000803e3d6000fd5b50506040516336b91f2b60e01b8152734e85280e5c025a99bcb815759a4b03fd3f48e9366004820152732536fe9ab3f511540f2f9e2ec2a805005c3dd80092506336b91f2b9150602401600060405180830381600087803b158015620005e857600080fd5b505af1158015620005fd573d6000803e3d6000fd5b505050505050506200136f565b6001600160e01b03198083169003620006365760405163b0a19dd560e01b815260040160405180910390fd5b6001600160e01b03199190911660009081527ffc606c433378e3a7e0a6a531deac289b66caa1b4aa8554fd4ab2c6f1570f92d860205260409020805460ff1916911515919091179055565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94547f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff811690819060009060071615620006f15750600381901c60009081526002840160205260409020545b60005b8751811015620007f05760008882815181106200071557620007156200104f565b602002602001015190506000816020015190508160400151516000036200074f5760405163eb6c3aeb60e01b815260040160405180910390fd5b600081600281111562000766576200076662001065565b0362000785576200077a8786868562000920565b9095509350620007e5565b60018160028111156200079c576200079c62001065565b03620007b457620007ae878362000a68565b620007e5565b6002816002811115620007cb57620007cb62001065565b03620007e557620007df8786868562000bb7565b90955093505b5050600101620006f4565b508282146200080d5760018401805461ffff191661ffff84161790555b60078216156200083057600382901c600090815260028501602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67387878760405162000865939291906200125d565b60405180910390a162000879868662000de3565b50505050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046080546040516001600160a01b038481169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a380546001600160a01b0319166001600160a01b0392909216919091179055565b7f52bfbcfc92034947ca356582e906865f97f74bd80fb770b31bd1f81e02bf0b5190565b805160009081906001600160a01b0316301480159062000949575082516001600160a01b03163b155b156200096857604051633ddc5cab60e21b815260040160405180910390fd5b60005b83604001515181101562000a5b576000846040015182815181106200099457620009946200104f565b6020908102919091018101516001600160e01b031981166000908152918a9052604090912054909150606081901c15620009e157604051634923a77160e11b815260040160405180910390fd5b85516001600160e01b0319838116600081815260208d90526040902060609390931b6001600160601b0319168b1790925560058a901b60e090811692831c91831c1999909916179781900362000a4b57600389901c600090815260028b0160205260408120989098555b505050600195860195016200096b565b5093959294509192505050565b80516001600160a01b03163b62000a9257604051633ddc5cab60e21b815260040160405180910390fd5b60005b81604001515181101562000bb25760008260400151828151811062000abe5762000abe6200104f565b6020908102919091018101516001600160e01b03198116600090815291869052604090912054909150606081901c8062000b0b576040516337e25a9760e11b815260040160405180910390fd5b306001600160a01b0382160362000b355760405163e983573160e01b815260040160405180910390fd5b84600001516001600160a01b0316816001600160a01b03160362000b6c576040516330baabf360e11b815260040160405180910390fd5b5083516001600160e01b031992909216600090815260208690526040902060609290921b6001600160601b0319166001600160601b039190911617905560010162000a95565b505050565b805160009081906001600160a01b03161562000be657604051633ab3490960e21b815260040160405180910390fd5b600385901c6007861660005b85604001515181101562000dcf5760008660400151828151811062000c1b5762000c1b6200104f565b6020908102919091018101516001600160e01b031981166000908152918c9052604090912054909150606081901c62000c67576040516337e25a9760e11b815260040160405180910390fd5b30606082901c0362000c8c5760405163e983573160e01b815260040160405180910390fd5b600089900362000cba57600019909401600081815260028c0160205260409020549850936007935062000cc2565b600019909301925b600584901b89901b6000806001600160e01b03198084169086161462000d15576001600160e01b03198316600090815260208f90526040902080546001600160601b0319166001600160601b0386161790555b50506001600160e01b03198316600090815260208d90526040812055611fff600383901c1660e0600584901b1687821462000d7a57600082815260028f016020526040902080546001600160e01b031980841c19909116908516831c17905562000d9e565b80836001600160e01b031916901c816001600160e01b031960001b901c198d16179b505b8660000362000dbd57600088815260028f01602052604081208190559b505b50506001909301925062000bf2915050565b5060039190911b1796939550929350505050565b8051156001600160a01b038316151462000e10576040516326df4ccd60e01b815260040160405180910390fd5b6001600160a01b0382161562000ecc576001600160a01b038216301462000e5a576001600160a01b0382163b62000e5a57604051633ddc5cab60e21b815260040160405180910390fd5b6000826001600160a01b03168260405162000e76919062001351565b600060405180830381855af49150503d806000811462000eb3576040519150601f19603f3d011682016040523d82523d6000602084013e62000eb8565b606091505b505090508062000bb2573d6000803e3d6000fd5b5050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000f0357818101518382015260200162000ee9565b50506000910152565b600082601f83011262000f1e57600080fd5b81516001600160401b038082111562000f3b5762000f3b62000ed0565b604051601f8301601f19908116603f0116810190828211818310171562000f665762000f6662000ed0565b8160405283815286602085880101111562000f8057600080fd5b62000f9384602083016020890162000ee6565b9695505050505050565b60008060006060848603121562000fb357600080fd5b83516001600160a01b038116811462000fcb57600080fd5b60208501519093506001600160401b038082111562000fe957600080fd5b62000ff78783880162000f0c565b935060408601519150808211156200100e57600080fd5b506200101d8682870162000f0c565b9150509250925092565b6000600182016200104857634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b600181811c908216806200109057607f821691505b602082108103620010b157634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000bb257600081815260208120601f850160051c81016020861015620010e05750805b601f850160051c820191505b818110156200110157828155600101620010ec565b505050505050565b81516001600160401b0381111562001125576200112562000ed0565b6200113d816200113684546200107b565b84620010b7565b602080601f8311600181146200117557600084156200115c5750858301515b600019600386901b1c1916600185901b17855562001101565b600085815260208120601f198616915b82811015620011a65788860151825594840194600190910190840162001185565b5085821015620011c55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60038110620011e857620011e862001065565b50565b60608101620011fa85620011d5565b8482526002841062001210576200121062001065565b60208201939093526001600160a01b0391909116604090910152919050565b600081518084526200124981602086016020860162000ee6565b601f01601f19169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b016000805b858110156200131e578a8503607f19018752825180516001600160a01b03168652848101518a870190620012bb81620011d5565b878701526040918201519187018b90528151908190529085019083908a8801905b80831015620013085783516001600160e01b0319168252928701926001929092019190870190620012dc565b5098860198965050509183019160010162001287565b5050506001600160a01b038a169088015286810360408801526200134381896200122f565b9a9950505050505050505050565b600082516200136581846020870162000ee6565b9190910192915050565b61247a806200137f6000396000f3fe6080604052600436106100cb5760003560e01c80638ab5150a11610074578063adfca15e1161004e578063adfca15e146102d5578063cdffacc614610302578063f2fde38b14610373576100d2565b80638ab5150a1461028b5780638da5cb5b146102a057806391423765146102b5576100d2565b806352ef6b2c116100a557806352ef6b2c1461023257806379ba5097146102545780637a0ed62714610269576100d2565b806301ffc9a7146101525780631f931c1c146101d85780632c408059146101f8576100d2565b366100d257005b60006100dc610393565b905073ffffffffffffffffffffffffffffffffffffffff81163b61012c576040517f87c9fc3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3660008037600080366000845af43d6000803e80801561014b573d6000f35b3d6000fd5b005b34801561015e57600080fd5b506101c361016d366004611ca8565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081527ffc606c433378e3a7e0a6a531deac289b66caa1b4aa8554fd4ab2c6f1570f92d8602052604090205460ff1690565b60405190151581526020015b60405180910390f35b3480156101e457600080fd5b506101506101f3366004611d37565b6103a2565b34801561020457600080fd5b5061020d61045f565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101cf565b34801561023e57600080fd5b5061024761049f565b6040516101cf9190611de9565b34801561026057600080fd5b506101506106b4565b34801561027557600080fd5b5061027e61072a565b6040516101cf9190611ea0565b34801561029757600080fd5b5061020d610c18565b3480156102ac57600080fd5b5061020d610c22565b3480156102c157600080fd5b506101506102d0366004611f48565b610c2c565b3480156102e157600080fd5b506102f56102f0366004611f48565b610cfd565b6040516101cf9190611f63565b34801561030e57600080fd5b5061020d61031d366004611ca8565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081527f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc93602052604090205460601c90565b34801561037f57600080fd5b5061015061038e366004611f48565b610eb9565b600061039d610f2e565b905090565b6103aa610fc6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040e576040517f2f7a8ee100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61045861041b8587612088565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061100692505050565b5050505050565b600061039d7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc965473ffffffffffffffffffffffffffffffffffffffff1690565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94546060907f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff1667ffffffffffffffff81111561050257610502611fbd565b60405190808252806020026020018201604052801561052b578160200160208202803683370190505b50915060008060005b600184015461ffff168210156106ac576000818152600285016020526040812054905b6008811015610697578361056a816121eb565b600188015490955061ffff168511905061069757600581901b82901b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020889052604081205460601c90805b8881101561062d578a81815181106105d8576105d8612223565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361061b576001915061062d565b80610625816121eb565b9150506105be565b50801561063c57505050610685565b818a898151811061064f5761064f612223565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101528761067e816121eb565b9850505050505b8061068f816121eb565b915050610557565b505080806106a4906121eb565b915050610534565b505082525090565b6106bc61121c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610720576040517fefd1052d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610728611244565b565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94546060907f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff1667ffffffffffffffff81111561078d5761078d611fbd565b6040519080825280602002602001820160405280156107d357816020015b6040805180820190915260008152606060208201528152602001906001900390816107ab5790505b50600182015490925060009061ffff1667ffffffffffffffff8111156107fb576107fb611fbd565b604051908082528060200260200182016040528015610824578160200160208202803683370190505b50905060008060005b600185015461ffff16821015610ba6576000818152600286016020526040812054905b6008811015610b915783610863816121eb565b600189015490955061ffff1685119050610b9157600581901b82901b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020899052604081205460601c90805b88811015610a18578273ffffffffffffffffffffffffffffffffffffffff168c82815181106108e8576108e8612223565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1603610a0657838c828151811061092257610922612223565b6020026020010151602001518b838151811061094057610940612223565b602002602001015160ff168151811061095b5761095b612223565b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060ff8a82815181106109bb576109bb612223565b602002602001015160ff16106109d057600080fd5b8981815181106109e2576109e2612223565b6020026020010180518091906109f790612252565b60ff1690525060019150610a18565b80610a10816121eb565b9150506108b7565b508015610a2757505050610b7f565b818b8981518110610a3a57610a3a612223565b602090810291909101015173ffffffffffffffffffffffffffffffffffffffff909116905260018a015461ffff1667ffffffffffffffff811115610a8057610a80611fbd565b604051908082528060200260200182016040528015610aa9578160200160208202803683370190505b508b8981518110610abc57610abc612223565b602002602001015160200181905250828b8981518110610ade57610ade612223565b602002602001015160200151600081518110610afc57610afc612223565b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815250506001898981518110610b5c57610b5c612223565b60ff9092166020928302919091019091015287610b78816121eb565b9850505050505b80610b89816121eb565b915050610850565b50508080610b9e906121eb565b91505061082d565b5060005b82811015610c0d576000848281518110610bc657610bc6612223565b602002602001015160ff1690506000878381518110610be757610be7612223565b602002602001015160200151905081815250508080610c05906121eb565b915050610baa565b508185525050505090565b600061039d61121c565b600061039d610fc6565b610c34610fc6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c98576040517f2f7a8ee100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc9680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905550565b50565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94546060907f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff1667ffffffffffffffff811115610d6057610d60611fbd565b604051908082528060200260200182016040528015610d89578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610eaf576000818152600285016020526040812054905b6008811015610e9a5783610dc8816121eb565b600188015490955061ffff1685119050610e9a57600581901b82901b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020889052604090205460601c73ffffffffffffffffffffffffffffffffffffffff8a1603610e875780888781518110610e4857610e48612223565b7fffffffff000000000000000000000000000000000000000000000000000000009092166020928302919091019091015285610e83816121eb565b9650505b5080610e92816121eb565b915050610db5565b50508080610ea7906121eb565b915050610d92565b5050825250919050565b610ec1610fc6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f25576040517f2f7a8ee100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cfa81611296565b600080357fffffffff000000000000000000000000000000000000000000000000000000001681527f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc93602052604090205460601c80610fc357507f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc965473ffffffffffffffffffffffffffffffffffffffff1690565b90565b60007f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f6716804605b5473ffffffffffffffffffffffffffffffffffffffff16919050565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94547f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff8116908190600090600716156110755750600381901c60009081526002840160205260409020545b60005b875181101561117357600088828151811061109557611095612223565b602002602001015190506000816020015190508160400151516000036110e7576040517feb6c3aeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008160028111156110fb576110fb612271565b036111165761110c878686856112fe565b9095509350611169565b600181600281111561112a5761112a612271565b0361113e5761113987836114d1565b611169565b600281600281111561115257611152612271565b0361116957611163878686856116fc565b90955093505b5050600101611078565b508282146111ac576001840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff84161790555b60078216156111ce57600382901c600090815260028501602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738787876040516112019392919061230e565b60405180910390a16112138686611a70565b50505050505050565b60007f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce6617890610fea565b61124d33611bc7565b7f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce661789080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b7f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce661789080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316179055610cfa81818181565b8051600090819073ffffffffffffffffffffffffffffffffffffffff1630148015906113405750825173ffffffffffffffffffffffffffffffffffffffff163b155b15611377576040517ff77172ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8360400151518110156114c45760008460400151828151811061139f5761139f612223565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918a9052604090912054909150606081901c1561141c576040517f92474ee200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85517fffffffff00000000000000000000000000000000000000000000000000000000838116600081815260208d90526040902060609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168b1790925560058a901b60e090811692831c91831c199990991617978190036114b557600389901c600090815260028b0160205260408120989098555b5050506001958601950161137a565b5093959294509192505050565b805173ffffffffffffffffffffffffffffffffffffffff163b611520576040517ff77172ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8160400151518110156116f75760008260400151828151811061154857611548612223565b6020908102919091018101517fffffffff000000000000000000000000000000000000000000000000000000008116600090815291869052604090912054909150606081901c806115c5576040517f6fc4b52e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff821603611614576040517fe983573100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846000015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361167d576040517f617557e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5083517fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260208690526040902060609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff91909116179055600101611523565b505050565b8051600090819073ffffffffffffffffffffffffffffffffffffffff1615611750576040517feacd242400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600385901c6007861660005b856040015151811015611a5c5760008660400151828151811061178157611781612223565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918c9052604090912054909150606081901c6117fd576040517f6fc4b52e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b30606082901c0361183a576040517fe983573100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000899003611884577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909401600081815260028c016020526040902054985093600793506118aa565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909301925b600584901b89901b6000807fffffffff0000000000000000000000000000000000000000000000000000000080841690861614611949577fffffffff000000000000000000000000000000000000000000000000000000008316600090815260208f90526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff86161790555b50507fffffffff000000000000000000000000000000000000000000000000000000008316600090815260208d90526040812055611fff600383901c1660e0600584901b168782146119dc57600082815260028f016020526040902080547fffffffff0000000000000000000000000000000000000000000000000000000080841c19909116908516831c179055611a2d565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198d16179b505b86600003611a4b57600088815260028f01602052604081208190559b505b50506001909301925061175c915050565b5060039190911b1796939550929350505050565b80511573ffffffffffffffffffffffffffffffffffffffff83161514611ac2576040517f26df4ccd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821615611bc35773ffffffffffffffffffffffffffffffffffffffff82163014611b495773ffffffffffffffffffffffffffffffffffffffff82163b611b49576040517ff77172ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611b709190612428565b600060405180830381855af49150503d8060008114611bab576040519150601f19603f3d011682016040523d82523d6000602084013e611bb0565b606091505b50509050806116f7573d6000803e3d6000fd5b5050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f671680460805460405173ffffffffffffffffffffffffffffffffffffffff8481169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611ca357600080fd5b919050565b600060208284031215611cba57600080fd5b611cc382611c73565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ca357600080fd5b60008083601f840112611d0057600080fd5b50813567ffffffffffffffff811115611d1857600080fd5b602083019150836020828501011115611d3057600080fd5b9250929050565b600080600080600060608688031215611d4f57600080fd5b853567ffffffffffffffff80821115611d6757600080fd5b818801915088601f830112611d7b57600080fd5b813581811115611d8a57600080fd5b8960208260051b8501011115611d9f57600080fd5b60208301975080965050611db560208901611cca565b94506040880135915080821115611dcb57600080fd5b50611dd888828901611cee565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b81811015611e3757835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611e05565b50909695505050505050565b600081518084526020808501945080840160005b83811015611e955781517fffffffff000000000000000000000000000000000000000000000000000000001687529582019590820190600101611e57565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611f3a578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff168452870151878401879052611f2787850182611e43565b9588019593505090860190600101611ec7565b509098975050505050505050565b600060208284031215611f5a57600080fd5b611cc382611cca565b6020808252825182820181905260009190848201906040850190845b81811015611e375783517fffffffff000000000000000000000000000000000000000000000000000000001683529284019291840191600101611f7f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561200f5761200f611fbd565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561205c5761205c611fbd565b604052919050565b600067ffffffffffffffff82111561207e5761207e611fbd565b5060051b60200190565b600061209b61209684612064565b612015565b83815260208082019190600586811b8601368111156120b957600080fd5b865b818110156121af57803567ffffffffffffffff808211156120dc5760008081fd5b818a019150606082360312156120f25760008081fd5b6120fa611fec565b61210383611cca565b815286830135600381106121175760008081fd5b818801526040838101358381111561212f5760008081fd5b939093019236601f85011261214657600092508283fd5b8335925061215661209684612064565b83815292871b840188019288810190368511156121735760008081fd5b948901945b848610156121985761218986611c73565b82529489019490890190612178565b9183019190915250885250509483019483016120bb565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361221c5761221c6121bc565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060ff821660ff8103612268576122686121bc565b60010192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60005b838110156122bb5781810151838201526020016122a3565b50506000910152565b600081518084526122dc8160208601602086016122a0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000606080830181845280875180835260808601915060808160051b87010192506020808a016000805b848110156123eb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8803018652825173ffffffffffffffffffffffffffffffffffffffff815116885284810151600381106123bc577f4e487b710000000000000000000000000000000000000000000000000000000084526021600452602484fd5b888601526040908101519088018990526123d889890182611e43565b9750509483019491830191600101612338565b50505073ffffffffffffffffffffffffffffffffffffffff8916908701525050838103604085015261241d81866122c4565b979650505050505050565b6000825161243a8184602087016122a0565b919091019291505056fea2646970667358221220ab80c46c57ccc5a633ab2179788acf94fb8936ccd8aec6e1509ab3ed0cfac65664736f6c63430008130033000000000000000000000000fd6afd6dbe40d9d248d2b688d74ba0761ecb99f9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000065469636b6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065449434b45540000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100cb5760003560e01c80638ab5150a11610074578063adfca15e1161004e578063adfca15e146102d5578063cdffacc614610302578063f2fde38b14610373576100d2565b80638ab5150a1461028b5780638da5cb5b146102a057806391423765146102b5576100d2565b806352ef6b2c116100a557806352ef6b2c1461023257806379ba5097146102545780637a0ed62714610269576100d2565b806301ffc9a7146101525780631f931c1c146101d85780632c408059146101f8576100d2565b366100d257005b60006100dc610393565b905073ffffffffffffffffffffffffffffffffffffffff81163b61012c576040517f87c9fc3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3660008037600080366000845af43d6000803e80801561014b573d6000f35b3d6000fd5b005b34801561015e57600080fd5b506101c361016d366004611ca8565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081527ffc606c433378e3a7e0a6a531deac289b66caa1b4aa8554fd4ab2c6f1570f92d8602052604090205460ff1690565b60405190151581526020015b60405180910390f35b3480156101e457600080fd5b506101506101f3366004611d37565b6103a2565b34801561020457600080fd5b5061020d61045f565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101cf565b34801561023e57600080fd5b5061024761049f565b6040516101cf9190611de9565b34801561026057600080fd5b506101506106b4565b34801561027557600080fd5b5061027e61072a565b6040516101cf9190611ea0565b34801561029757600080fd5b5061020d610c18565b3480156102ac57600080fd5b5061020d610c22565b3480156102c157600080fd5b506101506102d0366004611f48565b610c2c565b3480156102e157600080fd5b506102f56102f0366004611f48565b610cfd565b6040516101cf9190611f63565b34801561030e57600080fd5b5061020d61031d366004611ca8565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081527f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc93602052604090205460601c90565b34801561037f57600080fd5b5061015061038e366004611f48565b610eb9565b600061039d610f2e565b905090565b6103aa610fc6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040e576040517f2f7a8ee100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61045861041b8587612088565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061100692505050565b5050505050565b600061039d7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc965473ffffffffffffffffffffffffffffffffffffffff1690565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94546060907f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff1667ffffffffffffffff81111561050257610502611fbd565b60405190808252806020026020018201604052801561052b578160200160208202803683370190505b50915060008060005b600184015461ffff168210156106ac576000818152600285016020526040812054905b6008811015610697578361056a816121eb565b600188015490955061ffff168511905061069757600581901b82901b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020889052604081205460601c90805b8881101561062d578a81815181106105d8576105d8612223565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361061b576001915061062d565b80610625816121eb565b9150506105be565b50801561063c57505050610685565b818a898151811061064f5761064f612223565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101528761067e816121eb565b9850505050505b8061068f816121eb565b915050610557565b505080806106a4906121eb565b915050610534565b505082525090565b6106bc61121c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610720576040517fefd1052d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610728611244565b565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94546060907f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff1667ffffffffffffffff81111561078d5761078d611fbd565b6040519080825280602002602001820160405280156107d357816020015b6040805180820190915260008152606060208201528152602001906001900390816107ab5790505b50600182015490925060009061ffff1667ffffffffffffffff8111156107fb576107fb611fbd565b604051908082528060200260200182016040528015610824578160200160208202803683370190505b50905060008060005b600185015461ffff16821015610ba6576000818152600286016020526040812054905b6008811015610b915783610863816121eb565b600189015490955061ffff1685119050610b9157600581901b82901b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020899052604081205460601c90805b88811015610a18578273ffffffffffffffffffffffffffffffffffffffff168c82815181106108e8576108e8612223565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1603610a0657838c828151811061092257610922612223565b6020026020010151602001518b838151811061094057610940612223565b602002602001015160ff168151811061095b5761095b612223565b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060ff8a82815181106109bb576109bb612223565b602002602001015160ff16106109d057600080fd5b8981815181106109e2576109e2612223565b6020026020010180518091906109f790612252565b60ff1690525060019150610a18565b80610a10816121eb565b9150506108b7565b508015610a2757505050610b7f565b818b8981518110610a3a57610a3a612223565b602090810291909101015173ffffffffffffffffffffffffffffffffffffffff909116905260018a015461ffff1667ffffffffffffffff811115610a8057610a80611fbd565b604051908082528060200260200182016040528015610aa9578160200160208202803683370190505b508b8981518110610abc57610abc612223565b602002602001015160200181905250828b8981518110610ade57610ade612223565b602002602001015160200151600081518110610afc57610afc612223565b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815250506001898981518110610b5c57610b5c612223565b60ff9092166020928302919091019091015287610b78816121eb565b9850505050505b80610b89816121eb565b915050610850565b50508080610b9e906121eb565b91505061082d565b5060005b82811015610c0d576000848281518110610bc657610bc6612223565b602002602001015160ff1690506000878381518110610be757610be7612223565b602002602001015160200151905081815250508080610c05906121eb565b915050610baa565b508185525050505090565b600061039d61121c565b600061039d610fc6565b610c34610fc6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c98576040517f2f7a8ee100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc9680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905550565b50565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94546060907f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff1667ffffffffffffffff811115610d6057610d60611fbd565b604051908082528060200260200182016040528015610d89578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610eaf576000818152600285016020526040812054905b6008811015610e9a5783610dc8816121eb565b600188015490955061ffff1685119050610e9a57600581901b82901b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020889052604090205460601c73ffffffffffffffffffffffffffffffffffffffff8a1603610e875780888781518110610e4857610e48612223565b7fffffffff000000000000000000000000000000000000000000000000000000009092166020928302919091019091015285610e83816121eb565b9650505b5080610e92816121eb565b915050610db5565b50508080610ea7906121eb565b915050610d92565b5050825250919050565b610ec1610fc6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f25576040517f2f7a8ee100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cfa81611296565b600080357fffffffff000000000000000000000000000000000000000000000000000000001681527f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc93602052604090205460601c80610fc357507f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc965473ffffffffffffffffffffffffffffffffffffffff1690565b90565b60007f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f6716804605b5473ffffffffffffffffffffffffffffffffffffffff16919050565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc94547f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc939061ffff8116908190600090600716156110755750600381901c60009081526002840160205260409020545b60005b875181101561117357600088828151811061109557611095612223565b602002602001015190506000816020015190508160400151516000036110e7576040517feb6c3aeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008160028111156110fb576110fb612271565b036111165761110c878686856112fe565b9095509350611169565b600181600281111561112a5761112a612271565b0361113e5761113987836114d1565b611169565b600281600281111561115257611152612271565b0361116957611163878686856116fc565b90955093505b5050600101611078565b508282146111ac576001840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff84161790555b60078216156111ce57600382901c600090815260028501602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738787876040516112019392919061230e565b60405180910390a16112138686611a70565b50505050505050565b60007f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce6617890610fea565b61124d33611bc7565b7f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce661789080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b7f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce661789080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316179055610cfa81818181565b8051600090819073ffffffffffffffffffffffffffffffffffffffff1630148015906113405750825173ffffffffffffffffffffffffffffffffffffffff163b155b15611377576040517ff77172ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8360400151518110156114c45760008460400151828151811061139f5761139f612223565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918a9052604090912054909150606081901c1561141c576040517f92474ee200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85517fffffffff00000000000000000000000000000000000000000000000000000000838116600081815260208d90526040902060609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168b1790925560058a901b60e090811692831c91831c199990991617978190036114b557600389901c600090815260028b0160205260408120989098555b5050506001958601950161137a565b5093959294509192505050565b805173ffffffffffffffffffffffffffffffffffffffff163b611520576040517ff77172ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8160400151518110156116f75760008260400151828151811061154857611548612223565b6020908102919091018101517fffffffff000000000000000000000000000000000000000000000000000000008116600090815291869052604090912054909150606081901c806115c5576040517f6fc4b52e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff821603611614576040517fe983573100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846000015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361167d576040517f617557e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5083517fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260208690526040902060609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff91909116179055600101611523565b505050565b8051600090819073ffffffffffffffffffffffffffffffffffffffff1615611750576040517feacd242400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600385901c6007861660005b856040015151811015611a5c5760008660400151828151811061178157611781612223565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918c9052604090912054909150606081901c6117fd576040517f6fc4b52e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b30606082901c0361183a576040517fe983573100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000899003611884577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909401600081815260028c016020526040902054985093600793506118aa565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909301925b600584901b89901b6000807fffffffff0000000000000000000000000000000000000000000000000000000080841690861614611949577fffffffff000000000000000000000000000000000000000000000000000000008316600090815260208f90526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff86161790555b50507fffffffff000000000000000000000000000000000000000000000000000000008316600090815260208d90526040812055611fff600383901c1660e0600584901b168782146119dc57600082815260028f016020526040902080547fffffffff0000000000000000000000000000000000000000000000000000000080841c19909116908516831c179055611a2d565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198d16179b505b86600003611a4b57600088815260028f01602052604081208190559b505b50506001909301925061175c915050565b5060039190911b1796939550929350505050565b80511573ffffffffffffffffffffffffffffffffffffffff83161514611ac2576040517f26df4ccd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821615611bc35773ffffffffffffffffffffffffffffffffffffffff82163014611b495773ffffffffffffffffffffffffffffffffffffffff82163b611b49576040517ff77172ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611b709190612428565b600060405180830381855af49150503d8060008114611bab576040519150601f19603f3d011682016040523d82523d6000602084013e611bb0565b606091505b50509050806116f7573d6000803e3d6000fd5b5050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f671680460805460405173ffffffffffffffffffffffffffffffffffffffff8481169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611ca357600080fd5b919050565b600060208284031215611cba57600080fd5b611cc382611c73565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ca357600080fd5b60008083601f840112611d0057600080fd5b50813567ffffffffffffffff811115611d1857600080fd5b602083019150836020828501011115611d3057600080fd5b9250929050565b600080600080600060608688031215611d4f57600080fd5b853567ffffffffffffffff80821115611d6757600080fd5b818801915088601f830112611d7b57600080fd5b813581811115611d8a57600080fd5b8960208260051b8501011115611d9f57600080fd5b60208301975080965050611db560208901611cca565b94506040880135915080821115611dcb57600080fd5b50611dd888828901611cee565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b81811015611e3757835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611e05565b50909695505050505050565b600081518084526020808501945080840160005b83811015611e955781517fffffffff000000000000000000000000000000000000000000000000000000001687529582019590820190600101611e57565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611f3a578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff168452870151878401879052611f2787850182611e43565b9588019593505090860190600101611ec7565b509098975050505050505050565b600060208284031215611f5a57600080fd5b611cc382611cca565b6020808252825182820181905260009190848201906040850190845b81811015611e375783517fffffffff000000000000000000000000000000000000000000000000000000001683529284019291840191600101611f7f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561200f5761200f611fbd565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561205c5761205c611fbd565b604052919050565b600067ffffffffffffffff82111561207e5761207e611fbd565b5060051b60200190565b600061209b61209684612064565b612015565b83815260208082019190600586811b8601368111156120b957600080fd5b865b818110156121af57803567ffffffffffffffff808211156120dc5760008081fd5b818a019150606082360312156120f25760008081fd5b6120fa611fec565b61210383611cca565b815286830135600381106121175760008081fd5b818801526040838101358381111561212f5760008081fd5b939093019236601f85011261214657600092508283fd5b8335925061215661209684612064565b83815292871b840188019288810190368511156121735760008081fd5b948901945b848610156121985761218986611c73565b82529489019490890190612178565b9183019190915250885250509483019483016120bb565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361221c5761221c6121bc565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060ff821660ff8103612268576122686121bc565b60010192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60005b838110156122bb5781810151838201526020016122a3565b50506000910152565b600081518084526122dc8160208601602086016122a0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000606080830181845280875180835260808601915060808160051b87010192506020808a016000805b848110156123eb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8803018652825173ffffffffffffffffffffffffffffffffffffffff815116885284810151600381106123bc577f4e487b710000000000000000000000000000000000000000000000000000000084526021600452602484fd5b888601526040908101519088018990526123d889890182611e43565b9750509483019491830191600101612338565b50505073ffffffffffffffffffffffffffffffffffffffff8916908701525050838103604085015261241d81866122c4565b979650505050505050565b6000825161243a8184602087016122a0565b919091019291505056fea2646970667358221220ab80c46c57ccc5a633ab2179788acf94fb8936ccd8aec6e1509ab3ed0cfac65664736f6c63430008130033

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

000000000000000000000000fd6afd6dbe40d9d248d2b688d74ba0761ecb99f9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000065469636b6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065449434b45540000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : mintToken (address): 0xfd6Afd6dBe40d9D248D2B688d74ba0761EcB99F9
Arg [1] : receiptName (string): Ticket
Arg [2] : receiptSymbol (string): TICKET

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000fd6afd6dbe40d9d248d2b688d74ba0761ecb99f9
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [4] : 5469636b65740000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [6] : 5449434b45540000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.