ETH Price: $2,729.27 (-1.11%)

Contract

0x29eB035Dd926b6F1D3B953627b28616cA290FC00

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SequentialTokenIdERC1155

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 10000 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

import {Module} from "../../../Module.sol";

import {Role} from "../../../Role.sol";

import {UpdateTokenIdCallbackERC1155} from "../../../callback/UpdateTokenIdERC1155.sol";
import {IInstallationCallback} from "../../../interface/IInstallationCallback.sol";

library SequentialTokenIdStorage {

    /// @custom:storage-location erc7201:token.minting.tokenId
    bytes32 public constant SEQUENTIAL_TOKEN_ID_STORAGE_POSITION =
        keccak256(abi.encode(uint256(keccak256("token.tokenId.erc1155")) - 1)) & ~bytes32(uint256(0xff));

    struct Data {
        uint256 nextTokenId;
    }

    function data() internal pure returns (Data storage data_) {
        bytes32 position = SEQUENTIAL_TOKEN_ID_STORAGE_POSITION;
        assembly {
            data_.slot := position
        }
    }

}

contract SequentialTokenIdERC1155 is Module, UpdateTokenIdCallbackERC1155 {

    /*//////////////////////////////////////////////////////////////
                                ERRORS
    //////////////////////////////////////////////////////////////*/

    /// @dev Emitted when the tokenId is invalid.
    error SequentialTokenIdInvalidTokenId();

    /*//////////////////////////////////////////////////////////////
                                MODULE CONFIG
    //////////////////////////////////////////////////////////////*/

    /// @notice Returns all implemented callback and fallback functions.
    function getModuleConfig() external pure override returns (ModuleConfig memory config) {
        config.callbackFunctions = new CallbackFunction[](1);
        config.fallbackFunctions = new FallbackFunction[](1);

        config.callbackFunctions[0] = CallbackFunction(this.updateTokenIdERC1155.selector);

        config.fallbackFunctions[0] = FallbackFunction({selector: this.getNextTokenId.selector, permissionBits: 0});

        config.requiredInterfaces = new bytes4[](1);
        config.requiredInterfaces[0] = 0xd9b67a26; // ERC1155

        config.registerInstallationCallback = true;
    }

    /*//////////////////////////////////////////////////////////////
                            CALLBACK FUNCTION
    //////////////////////////////////////////////////////////////*/

    function updateTokenIdERC1155(uint256 _tokenId) external payable override returns (uint256) {
        uint256 _nextTokenId = _tokenIdStorage().nextTokenId;

        if (_tokenId == type(uint256).max) {
            _tokenIdStorage().nextTokenId = _nextTokenId + 1;

            return _nextTokenId;
        }

        if (_tokenId > _nextTokenId) {
            revert SequentialTokenIdInvalidTokenId();
        }

        return _tokenId;
    }

    /// @dev Called by a Core into an Module during the installation of the Module.
    function onInstall(bytes calldata data) external {
        uint256 nextTokenId = abi.decode(data, (uint256));
        _tokenIdStorage().nextTokenId = nextTokenId;
    }

    /// @dev Called by a Core into an Module during the uninstallation of the Module.
    function onUninstall(bytes calldata data) external {}

    /*//////////////////////////////////////////////////////////////
                    Encode install / uninstall data
    //////////////////////////////////////////////////////////////*/

    /// @dev Returns bytes encoded install params, to be sent to `onInstall` function
    function encodeBytesOnInstall(uint256 startTokenId) external pure returns (bytes memory) {
        return abi.encode(startTokenId);
    }

    /// @dev Returns bytes encoded uninstall params, to be sent to `onUninstall` function
    function encodeBytesOnUninstall() external pure returns (bytes memory) {
        return "";
    }

    /*//////////////////////////////////////////////////////////////
                            FALLBACK FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /// @notice Returns the sale configuration for a token.
    function getNextTokenId() external view returns (uint256) {
        return _tokenIdStorage().nextTokenId;
    }

    function _tokenIdStorage() internal pure returns (SequentialTokenIdStorage.Data storage) {
        return SequentialTokenIdStorage.data();
    }

}

File 2 of 7 : Module.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

import {IModule} from "./interface/IModule.sol";

abstract contract Module is IModule {

    function getModuleConfig() external pure virtual returns (ModuleConfig memory);

}

File 3 of 7 : Role.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

library Role {

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                   NAMED ROLE CONSTANTS                     */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    uint256 internal constant _MINTER_ROLE = 1 << 0;
    uint256 internal constant _MANAGER_ROLE = 1 << 1;

    uint256 internal constant _INSTALLER_ROLE = 1 << 255;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       ROLE CONSTANTS                       */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    uint256 internal constant _ROLE_0 = 1 << 0;
    uint256 internal constant _ROLE_1 = 1 << 1;
    uint256 internal constant _ROLE_2 = 1 << 2;
    uint256 internal constant _ROLE_3 = 1 << 3;
    uint256 internal constant _ROLE_4 = 1 << 4;
    uint256 internal constant _ROLE_5 = 1 << 5;
    uint256 internal constant _ROLE_6 = 1 << 6;
    uint256 internal constant _ROLE_7 = 1 << 7;
    uint256 internal constant _ROLE_8 = 1 << 8;
    uint256 internal constant _ROLE_9 = 1 << 9;
    uint256 internal constant _ROLE_10 = 1 << 10;
    uint256 internal constant _ROLE_11 = 1 << 11;
    uint256 internal constant _ROLE_12 = 1 << 12;
    uint256 internal constant _ROLE_13 = 1 << 13;
    uint256 internal constant _ROLE_14 = 1 << 14;
    uint256 internal constant _ROLE_15 = 1 << 15;
    uint256 internal constant _ROLE_16 = 1 << 16;
    uint256 internal constant _ROLE_17 = 1 << 17;
    uint256 internal constant _ROLE_18 = 1 << 18;
    uint256 internal constant _ROLE_19 = 1 << 19;
    uint256 internal constant _ROLE_20 = 1 << 20;
    uint256 internal constant _ROLE_21 = 1 << 21;
    uint256 internal constant _ROLE_22 = 1 << 22;
    uint256 internal constant _ROLE_23 = 1 << 23;
    uint256 internal constant _ROLE_24 = 1 << 24;
    uint256 internal constant _ROLE_25 = 1 << 25;
    uint256 internal constant _ROLE_26 = 1 << 26;
    uint256 internal constant _ROLE_27 = 1 << 27;
    uint256 internal constant _ROLE_28 = 1 << 28;
    uint256 internal constant _ROLE_29 = 1 << 29;
    uint256 internal constant _ROLE_30 = 1 << 30;
    uint256 internal constant _ROLE_31 = 1 << 31;
    uint256 internal constant _ROLE_32 = 1 << 32;
    uint256 internal constant _ROLE_33 = 1 << 33;
    uint256 internal constant _ROLE_34 = 1 << 34;
    uint256 internal constant _ROLE_35 = 1 << 35;
    uint256 internal constant _ROLE_36 = 1 << 36;
    uint256 internal constant _ROLE_37 = 1 << 37;
    uint256 internal constant _ROLE_38 = 1 << 38;
    uint256 internal constant _ROLE_39 = 1 << 39;
    uint256 internal constant _ROLE_40 = 1 << 40;
    uint256 internal constant _ROLE_41 = 1 << 41;
    uint256 internal constant _ROLE_42 = 1 << 42;
    uint256 internal constant _ROLE_43 = 1 << 43;
    uint256 internal constant _ROLE_44 = 1 << 44;
    uint256 internal constant _ROLE_45 = 1 << 45;
    uint256 internal constant _ROLE_46 = 1 << 46;
    uint256 internal constant _ROLE_47 = 1 << 47;
    uint256 internal constant _ROLE_48 = 1 << 48;
    uint256 internal constant _ROLE_49 = 1 << 49;
    uint256 internal constant _ROLE_50 = 1 << 50;
    uint256 internal constant _ROLE_51 = 1 << 51;
    uint256 internal constant _ROLE_52 = 1 << 52;
    uint256 internal constant _ROLE_53 = 1 << 53;
    uint256 internal constant _ROLE_54 = 1 << 54;
    uint256 internal constant _ROLE_55 = 1 << 55;
    uint256 internal constant _ROLE_56 = 1 << 56;
    uint256 internal constant _ROLE_57 = 1 << 57;
    uint256 internal constant _ROLE_58 = 1 << 58;
    uint256 internal constant _ROLE_59 = 1 << 59;
    uint256 internal constant _ROLE_60 = 1 << 60;
    uint256 internal constant _ROLE_61 = 1 << 61;
    uint256 internal constant _ROLE_62 = 1 << 62;
    uint256 internal constant _ROLE_63 = 1 << 63;
    uint256 internal constant _ROLE_64 = 1 << 64;
    uint256 internal constant _ROLE_65 = 1 << 65;
    uint256 internal constant _ROLE_66 = 1 << 66;
    uint256 internal constant _ROLE_67 = 1 << 67;
    uint256 internal constant _ROLE_68 = 1 << 68;
    uint256 internal constant _ROLE_69 = 1 << 69;
    uint256 internal constant _ROLE_70 = 1 << 70;
    uint256 internal constant _ROLE_71 = 1 << 71;
    uint256 internal constant _ROLE_72 = 1 << 72;
    uint256 internal constant _ROLE_73 = 1 << 73;
    uint256 internal constant _ROLE_74 = 1 << 74;
    uint256 internal constant _ROLE_75 = 1 << 75;
    uint256 internal constant _ROLE_76 = 1 << 76;
    uint256 internal constant _ROLE_77 = 1 << 77;
    uint256 internal constant _ROLE_78 = 1 << 78;
    uint256 internal constant _ROLE_79 = 1 << 79;
    uint256 internal constant _ROLE_80 = 1 << 80;
    uint256 internal constant _ROLE_81 = 1 << 81;
    uint256 internal constant _ROLE_82 = 1 << 82;
    uint256 internal constant _ROLE_83 = 1 << 83;
    uint256 internal constant _ROLE_84 = 1 << 84;
    uint256 internal constant _ROLE_85 = 1 << 85;
    uint256 internal constant _ROLE_86 = 1 << 86;
    uint256 internal constant _ROLE_87 = 1 << 87;
    uint256 internal constant _ROLE_88 = 1 << 88;
    uint256 internal constant _ROLE_89 = 1 << 89;
    uint256 internal constant _ROLE_90 = 1 << 90;
    uint256 internal constant _ROLE_91 = 1 << 91;
    uint256 internal constant _ROLE_92 = 1 << 92;
    uint256 internal constant _ROLE_93 = 1 << 93;
    uint256 internal constant _ROLE_94 = 1 << 94;
    uint256 internal constant _ROLE_95 = 1 << 95;
    uint256 internal constant _ROLE_96 = 1 << 96;
    uint256 internal constant _ROLE_97 = 1 << 97;
    uint256 internal constant _ROLE_98 = 1 << 98;
    uint256 internal constant _ROLE_99 = 1 << 99;
    uint256 internal constant _ROLE_100 = 1 << 100;
    uint256 internal constant _ROLE_101 = 1 << 101;
    uint256 internal constant _ROLE_102 = 1 << 102;
    uint256 internal constant _ROLE_103 = 1 << 103;
    uint256 internal constant _ROLE_104 = 1 << 104;
    uint256 internal constant _ROLE_105 = 1 << 105;
    uint256 internal constant _ROLE_106 = 1 << 106;
    uint256 internal constant _ROLE_107 = 1 << 107;
    uint256 internal constant _ROLE_108 = 1 << 108;
    uint256 internal constant _ROLE_109 = 1 << 109;
    uint256 internal constant _ROLE_110 = 1 << 110;
    uint256 internal constant _ROLE_111 = 1 << 111;
    uint256 internal constant _ROLE_112 = 1 << 112;
    uint256 internal constant _ROLE_113 = 1 << 113;
    uint256 internal constant _ROLE_114 = 1 << 114;
    uint256 internal constant _ROLE_115 = 1 << 115;
    uint256 internal constant _ROLE_116 = 1 << 116;
    uint256 internal constant _ROLE_117 = 1 << 117;
    uint256 internal constant _ROLE_118 = 1 << 118;
    uint256 internal constant _ROLE_119 = 1 << 119;
    uint256 internal constant _ROLE_120 = 1 << 120;
    uint256 internal constant _ROLE_121 = 1 << 121;
    uint256 internal constant _ROLE_122 = 1 << 122;
    uint256 internal constant _ROLE_123 = 1 << 123;
    uint256 internal constant _ROLE_124 = 1 << 124;
    uint256 internal constant _ROLE_125 = 1 << 125;
    uint256 internal constant _ROLE_126 = 1 << 126;
    uint256 internal constant _ROLE_127 = 1 << 127;
    uint256 internal constant _ROLE_128 = 1 << 128;
    uint256 internal constant _ROLE_129 = 1 << 129;
    uint256 internal constant _ROLE_130 = 1 << 130;
    uint256 internal constant _ROLE_131 = 1 << 131;
    uint256 internal constant _ROLE_132 = 1 << 132;
    uint256 internal constant _ROLE_133 = 1 << 133;
    uint256 internal constant _ROLE_134 = 1 << 134;
    uint256 internal constant _ROLE_135 = 1 << 135;
    uint256 internal constant _ROLE_136 = 1 << 136;
    uint256 internal constant _ROLE_137 = 1 << 137;
    uint256 internal constant _ROLE_138 = 1 << 138;
    uint256 internal constant _ROLE_139 = 1 << 139;
    uint256 internal constant _ROLE_140 = 1 << 140;
    uint256 internal constant _ROLE_141 = 1 << 141;
    uint256 internal constant _ROLE_142 = 1 << 142;
    uint256 internal constant _ROLE_143 = 1 << 143;
    uint256 internal constant _ROLE_144 = 1 << 144;
    uint256 internal constant _ROLE_145 = 1 << 145;
    uint256 internal constant _ROLE_146 = 1 << 146;
    uint256 internal constant _ROLE_147 = 1 << 147;
    uint256 internal constant _ROLE_148 = 1 << 148;
    uint256 internal constant _ROLE_149 = 1 << 149;
    uint256 internal constant _ROLE_150 = 1 << 150;
    uint256 internal constant _ROLE_151 = 1 << 151;
    uint256 internal constant _ROLE_152 = 1 << 152;
    uint256 internal constant _ROLE_153 = 1 << 153;
    uint256 internal constant _ROLE_154 = 1 << 154;
    uint256 internal constant _ROLE_155 = 1 << 155;
    uint256 internal constant _ROLE_156 = 1 << 156;
    uint256 internal constant _ROLE_157 = 1 << 157;
    uint256 internal constant _ROLE_158 = 1 << 158;
    uint256 internal constant _ROLE_159 = 1 << 159;
    uint256 internal constant _ROLE_160 = 1 << 160;
    uint256 internal constant _ROLE_161 = 1 << 161;
    uint256 internal constant _ROLE_162 = 1 << 162;
    uint256 internal constant _ROLE_163 = 1 << 163;
    uint256 internal constant _ROLE_164 = 1 << 164;
    uint256 internal constant _ROLE_165 = 1 << 165;
    uint256 internal constant _ROLE_166 = 1 << 166;
    uint256 internal constant _ROLE_167 = 1 << 167;
    uint256 internal constant _ROLE_168 = 1 << 168;
    uint256 internal constant _ROLE_169 = 1 << 169;
    uint256 internal constant _ROLE_170 = 1 << 170;
    uint256 internal constant _ROLE_171 = 1 << 171;
    uint256 internal constant _ROLE_172 = 1 << 172;
    uint256 internal constant _ROLE_173 = 1 << 173;
    uint256 internal constant _ROLE_174 = 1 << 174;
    uint256 internal constant _ROLE_175 = 1 << 175;
    uint256 internal constant _ROLE_176 = 1 << 176;
    uint256 internal constant _ROLE_177 = 1 << 177;
    uint256 internal constant _ROLE_178 = 1 << 178;
    uint256 internal constant _ROLE_179 = 1 << 179;
    uint256 internal constant _ROLE_180 = 1 << 180;
    uint256 internal constant _ROLE_181 = 1 << 181;
    uint256 internal constant _ROLE_182 = 1 << 182;
    uint256 internal constant _ROLE_183 = 1 << 183;
    uint256 internal constant _ROLE_184 = 1 << 184;
    uint256 internal constant _ROLE_185 = 1 << 185;
    uint256 internal constant _ROLE_186 = 1 << 186;
    uint256 internal constant _ROLE_187 = 1 << 187;
    uint256 internal constant _ROLE_188 = 1 << 188;
    uint256 internal constant _ROLE_189 = 1 << 189;
    uint256 internal constant _ROLE_190 = 1 << 190;
    uint256 internal constant _ROLE_191 = 1 << 191;
    uint256 internal constant _ROLE_192 = 1 << 192;
    uint256 internal constant _ROLE_193 = 1 << 193;
    uint256 internal constant _ROLE_194 = 1 << 194;
    uint256 internal constant _ROLE_195 = 1 << 195;
    uint256 internal constant _ROLE_196 = 1 << 196;
    uint256 internal constant _ROLE_197 = 1 << 197;
    uint256 internal constant _ROLE_198 = 1 << 198;
    uint256 internal constant _ROLE_199 = 1 << 199;
    uint256 internal constant _ROLE_200 = 1 << 200;
    uint256 internal constant _ROLE_201 = 1 << 201;
    uint256 internal constant _ROLE_202 = 1 << 202;
    uint256 internal constant _ROLE_203 = 1 << 203;
    uint256 internal constant _ROLE_204 = 1 << 204;
    uint256 internal constant _ROLE_205 = 1 << 205;
    uint256 internal constant _ROLE_206 = 1 << 206;
    uint256 internal constant _ROLE_207 = 1 << 207;
    uint256 internal constant _ROLE_208 = 1 << 208;
    uint256 internal constant _ROLE_209 = 1 << 209;
    uint256 internal constant _ROLE_210 = 1 << 210;
    uint256 internal constant _ROLE_211 = 1 << 211;
    uint256 internal constant _ROLE_212 = 1 << 212;
    uint256 internal constant _ROLE_213 = 1 << 213;
    uint256 internal constant _ROLE_214 = 1 << 214;
    uint256 internal constant _ROLE_215 = 1 << 215;
    uint256 internal constant _ROLE_216 = 1 << 216;
    uint256 internal constant _ROLE_217 = 1 << 217;
    uint256 internal constant _ROLE_218 = 1 << 218;
    uint256 internal constant _ROLE_219 = 1 << 219;
    uint256 internal constant _ROLE_220 = 1 << 220;
    uint256 internal constant _ROLE_221 = 1 << 221;
    uint256 internal constant _ROLE_222 = 1 << 222;
    uint256 internal constant _ROLE_223 = 1 << 223;
    uint256 internal constant _ROLE_224 = 1 << 224;
    uint256 internal constant _ROLE_225 = 1 << 225;
    uint256 internal constant _ROLE_226 = 1 << 226;
    uint256 internal constant _ROLE_227 = 1 << 227;
    uint256 internal constant _ROLE_228 = 1 << 228;
    uint256 internal constant _ROLE_229 = 1 << 229;
    uint256 internal constant _ROLE_230 = 1 << 230;
    uint256 internal constant _ROLE_231 = 1 << 231;
    uint256 internal constant _ROLE_232 = 1 << 232;
    uint256 internal constant _ROLE_233 = 1 << 233;
    uint256 internal constant _ROLE_234 = 1 << 234;
    uint256 internal constant _ROLE_235 = 1 << 235;
    uint256 internal constant _ROLE_236 = 1 << 236;
    uint256 internal constant _ROLE_237 = 1 << 237;
    uint256 internal constant _ROLE_238 = 1 << 238;
    uint256 internal constant _ROLE_239 = 1 << 239;
    uint256 internal constant _ROLE_240 = 1 << 240;
    uint256 internal constant _ROLE_241 = 1 << 241;
    uint256 internal constant _ROLE_242 = 1 << 242;
    uint256 internal constant _ROLE_243 = 1 << 243;
    uint256 internal constant _ROLE_244 = 1 << 244;
    uint256 internal constant _ROLE_245 = 1 << 245;
    uint256 internal constant _ROLE_246 = 1 << 246;
    uint256 internal constant _ROLE_247 = 1 << 247;
    uint256 internal constant _ROLE_248 = 1 << 248;
    uint256 internal constant _ROLE_249 = 1 << 249;
    uint256 internal constant _ROLE_250 = 1 << 250;
    uint256 internal constant _ROLE_251 = 1 << 251;
    uint256 internal constant _ROLE_252 = 1 << 252;
    uint256 internal constant _ROLE_253 = 1 << 253;
    uint256 internal constant _ROLE_254 = 1 << 254;
    uint256 internal constant _ROLE_255 = 1 << 255;

}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

contract UpdateTokenIdCallbackERC1155 {

    /*//////////////////////////////////////////////////////////////
                                ERRORS
    //////////////////////////////////////////////////////////////*/

    error UpdateTokenIdCallbackERC1155NotImplemented();

    /*//////////////////////////////////////////////////////////////
                            EXTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice The updateTokenIdERC1155 hook that is called by a core token before minting tokens.
     *
     *  @dev If the tokenId is type(uint256).max, the next tokenId will be set to the current next tokenId + amount.
     *
     *  @param _tokenId The tokenId to mint.
     *  @return result tokenId to mint.
     */
    function updateTokenIdERC1155(uint256 _tokenId) external payable virtual returns (uint256) {
        revert UpdateTokenIdCallbackERC1155NotImplemented();
    }

}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

interface IInstallationCallback {

    /*//////////////////////////////////////////////////////////////
                            EXTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     *  @dev Called by a Core into an Module during the installation of the Module.
     *
     *  @param data The data passed to the Core's installModule function.
     */
    function onInstall(bytes calldata data) external;

    /**
     *  @dev Called by a Core into an Module during the uninstallation of the Module.
     *
     *  @param data The data passed to the Core's uninstallModule function.
     */
    function onUninstall(bytes calldata data) external;

}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

import {IModuleConfig} from "./IModuleConfig.sol";

interface IModule is IModuleConfig {

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     *  @dev Returns the ModuleConfig of the Module contract.
     */
    function getModuleConfig() external pure returns (ModuleConfig memory);

}

File 7 of 7 : IModuleConfig.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

interface IModuleConfig {

    /*//////////////////////////////////////////////////////////////
                            STRUCTS & ENUMS
    //////////////////////////////////////////////////////////////*/

    /**
     *  @dev Struct for a callback function. Called by a Core into an Module during the execution of some fixed function.
     *
     *  @param selector The 4-byte selector of the function.
     *  @param callType The type of call to be made to the function.
     */
    struct CallbackFunction {
        bytes4 selector;
    }

    /**
     *  @dev Struct for a fallback function. Called by a Core into an Module via the Core's fallback.
     *
     *  @param selector The 4-byte selector of the function.
     *  @param callType The type of call to be made to the function.
     *  @param permissionBits Core’s fallback function MUST check that msg.sender has these permissions before
     *                        performing a call on the Module. (OPTIONAL field)
     */
    struct FallbackFunction {
        bytes4 selector;
        uint256 permissionBits;
    }

    /**
     *  @dev Struct containing all information that a Core uses to check whether an Module is compatible for installation.
     *
     *  @param registerInstallationCallback Whether the Module expects onInstall and onUninstall callback function calls at
     *                                      installation and uninstallation time, respectively
     *  @param requiredInterfaces The ERC-165 interface that a Core MUST support to be compatible for installation. OPTIONAL -- can be bytes4(0)
     *                             if there is no required interface id.
     *  @param supportedInterfaces The ERC-165 interfaces that a Core supports upon installing the Module.
     *  @param callbackFunctions List of callback functions that the Core MUST call at some point in the execution of its fixed functions.
     *  @param fallbackFunctions List of functions that the Core MUST call via its fallback function with the Module as the call destination.
     */
    struct ModuleConfig {
        bool registerInstallationCallback;
        bytes4[] requiredInterfaces;
        bytes4[] supportedInterfaces;
        CallbackFunction[] callbackFunctions;
        FallbackFunction[] fallbackFunctions;
    }

}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "evmVersion": "paris",
  "remappings": [
    ":@erc721a-upgradeable/=lib/ERC721A-Upgradeable/contracts/",
    ":@erc721a/=lib/erc721a/contracts/",
    ":@limitbreak/creator-token-standards/=lib/creator-token-standards/src/",
    ":@limitbreak/permit-c/=lib/PermitC/src/",
    ":@opensea/tstorish/=lib/creator-token-standards/lib/tstorish/src/",
    ":@openzeppelin/=lib/creator-token-contracts/node_modules/@openzeppelin/",
    ":@rari-capital/solmate/=lib/PermitC/lib/solmate/",
    ":@solady/=lib/solady/src/",
    ":ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
    ":ERC721A/=lib/creator-token-standards/lib/ERC721A/contracts/",
    ":PermitC/=lib/PermitC/",
    ":creator-token-contracts/=lib/creator-token-contracts/contracts/",
    ":creator-token-standards/=lib/creator-token-standards/",
    ":ds-test/=lib/forge-std/lib/ds-test/src/",
    ":erc4626-tests/=lib/PermitC/lib/openzeppelin-contracts/lib/erc4626-tests/",
    ":erc721a/=lib/erc721a/contracts/",
    ":forge-gas-metering/=lib/PermitC/lib/forge-gas-metering/",
    ":forge-std/=lib/forge-std/src/",
    ":hardhat/=lib/creator-token-contracts/node_modules/hardhat/",
    ":murky/=lib/creator-token-standards/lib/murky/",
    ":openzeppelin-contracts/=lib/creator-token-standards/lib/openzeppelin-contracts/",
    ":openzeppelin/=lib/PermitC/lib/openzeppelin-contracts/contracts/",
    ":solady/=lib/solady/src/",
    ":solmate/=lib/PermitC/lib/solmate/src/",
    ":tstorish/=lib/creator-token-standards/lib/tstorish/src/"
  ],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"SequentialTokenIdInvalidTokenId","type":"error"},{"inputs":[],"name":"UpdateTokenIdCallbackERC1155NotImplemented","type":"error"},{"inputs":[{"internalType":"uint256","name":"startTokenId","type":"uint256"}],"name":"encodeBytesOnInstall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"encodeBytesOnUninstall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getModuleConfig","outputs":[{"components":[{"internalType":"bool","name":"registerInstallationCallback","type":"bool"},{"internalType":"bytes4[]","name":"requiredInterfaces","type":"bytes4[]"},{"internalType":"bytes4[]","name":"supportedInterfaces","type":"bytes4[]"},{"components":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"internalType":"struct IModuleConfig.CallbackFunction[]","name":"callbackFunctions","type":"tuple[]"},{"components":[{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"uint256","name":"permissionBits","type":"uint256"}],"internalType":"struct IModuleConfig.FallbackFunction[]","name":"fallbackFunctions","type":"tuple[]"}],"internalType":"struct IModuleConfig.ModuleConfig","name":"config","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onInstall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onUninstall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"updateTokenIdERC1155","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"}]

6080604052348015600f57600080fd5b506108708061001f6000396000f3fe6080604052600436106100705760003560e01c806389e04e0e1161004e57806389e04e0e146100ea5780638a91b0e31461010c578063caa0f92a1461012b578063f5b75d2a1461014057600080fd5b8063034eb4dd14610075578063579a60211461009b5780636d61fe70146100c8575b600080fd5b6100886100833660046104c7565b610161565b6040519081526020015b60405180910390f35b3480156100a757600080fd5b506100bb6100b63660046104c7565b6101d2565b60405161009291906104e0565b3480156100d457600080fd5b506100e86100e336600461054c565b6101fd565b005b3480156100f657600080fd5b506100ff61021c565b604051610092919061067e565b34801561011857600080fd5b506100e861012736600461054c565b5050565b34801561013757600080fd5b5061008861040a565b34801561014c57600080fd5b506040805160208101909152600081526100bb565b60008061016c61041a565b54905060018301610191576101828160016107df565b61018a61041a565b5592915050565b808311156101cb576040517f995fc89300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090919050565b6060816040516020016101e791815260200190565b6040516020818303038152906040529050919050565b600061020b828401846104c7565b90508061021661041a565b55505050565b6102506040518060a00160405280600015158152602001606081526020016060815260200160608152602001606081525090565b60408051600180825281830190925290816020015b604080516020810190915260008152815260200190600190039081610265575050606082015260408051600180825281830190925290602082015b60408051808201909152600080825260208201528152602001906001900390816102a0575050608082015260408051602081019091527f034eb4dd0000000000000000000000000000000000000000000000000000000081526060820151805160009061030f5761030f6107f8565b6020026020010181905250604051806040016040528063caa0f92a60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815250816080015160008151811061036d5761036d6107f8565b6020908102919091010152604080516001808252818301909252908160200160208202803683375050506020820181905280517fd9b67a260000000000000000000000000000000000000000000000000000000091906000906103d2576103d26107f8565b7fffffffff00000000000000000000000000000000000000000000000000000000909216602092830291909101909101526001815290565b600061041461041a565b54919050565b6000610424610429565b905090565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0061047860017f8bd62731f429252dd1cca31d9fafd2e8c095dcc3c6f7699f39c9915a41e0cc86610827565b60405160200161048a91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101201692915050565b6000602082840312156104d957600080fd5b5035919050565b602081526000825180602084015260005b8181101561050e57602081860181015160408684010152016104f1565b5060006040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b6000806020838503121561055f57600080fd5b823567ffffffffffffffff81111561057657600080fd5b8301601f8101851361058757600080fd5b803567ffffffffffffffff81111561059e57600080fd5b8560208284010111156105b057600080fd5b6020919091019590945092505050565b600081518084526020840193506020830160005b828110156106145781517fffffffff00000000000000000000000000000000000000000000000000000000168652602095860195909101906001016105d4565b5093949350505050565b600081518084526020840193506020830160005b8281101561061457815180517fffffffff000000000000000000000000000000000000000000000000000000001687526020908101518188015260409096019590910190600101610632565b602081528151151560208201526000602083015160a060408401526106a660c08401826105c0565b905060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160608501526106e182826105c0565b60608601518582037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016080870152805180835260209182019450600093509101905b8083101561076a577fffffffff00000000000000000000000000000000000000000000000000000000845151168252602082019150602084019350600183019250610724565b50608086015192507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08582030160a08601526107a6818461061e565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156107f2576107f26107b0565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b818103818111156107f2576107f26107b056fea2646970667358221220030949c7b79d16de06ff0ea751639dbdae520621deaabdb74b6df9a601229c6f64736f6c634300081a0033

Deployed Bytecode

0x6080604052600436106100705760003560e01c806389e04e0e1161004e57806389e04e0e146100ea5780638a91b0e31461010c578063caa0f92a1461012b578063f5b75d2a1461014057600080fd5b8063034eb4dd14610075578063579a60211461009b5780636d61fe70146100c8575b600080fd5b6100886100833660046104c7565b610161565b6040519081526020015b60405180910390f35b3480156100a757600080fd5b506100bb6100b63660046104c7565b6101d2565b60405161009291906104e0565b3480156100d457600080fd5b506100e86100e336600461054c565b6101fd565b005b3480156100f657600080fd5b506100ff61021c565b604051610092919061067e565b34801561011857600080fd5b506100e861012736600461054c565b5050565b34801561013757600080fd5b5061008861040a565b34801561014c57600080fd5b506040805160208101909152600081526100bb565b60008061016c61041a565b54905060018301610191576101828160016107df565b61018a61041a565b5592915050565b808311156101cb576040517f995fc89300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090919050565b6060816040516020016101e791815260200190565b6040516020818303038152906040529050919050565b600061020b828401846104c7565b90508061021661041a565b55505050565b6102506040518060a00160405280600015158152602001606081526020016060815260200160608152602001606081525090565b60408051600180825281830190925290816020015b604080516020810190915260008152815260200190600190039081610265575050606082015260408051600180825281830190925290602082015b60408051808201909152600080825260208201528152602001906001900390816102a0575050608082015260408051602081019091527f034eb4dd0000000000000000000000000000000000000000000000000000000081526060820151805160009061030f5761030f6107f8565b6020026020010181905250604051806040016040528063caa0f92a60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815250816080015160008151811061036d5761036d6107f8565b6020908102919091010152604080516001808252818301909252908160200160208202803683375050506020820181905280517fd9b67a260000000000000000000000000000000000000000000000000000000091906000906103d2576103d26107f8565b7fffffffff00000000000000000000000000000000000000000000000000000000909216602092830291909101909101526001815290565b600061041461041a565b54919050565b6000610424610429565b905090565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0061047860017f8bd62731f429252dd1cca31d9fafd2e8c095dcc3c6f7699f39c9915a41e0cc86610827565b60405160200161048a91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101201692915050565b6000602082840312156104d957600080fd5b5035919050565b602081526000825180602084015260005b8181101561050e57602081860181015160408684010152016104f1565b5060006040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b6000806020838503121561055f57600080fd5b823567ffffffffffffffff81111561057657600080fd5b8301601f8101851361058757600080fd5b803567ffffffffffffffff81111561059e57600080fd5b8560208284010111156105b057600080fd5b6020919091019590945092505050565b600081518084526020840193506020830160005b828110156106145781517fffffffff00000000000000000000000000000000000000000000000000000000168652602095860195909101906001016105d4565b5093949350505050565b600081518084526020840193506020830160005b8281101561061457815180517fffffffff000000000000000000000000000000000000000000000000000000001687526020908101518188015260409096019590910190600101610632565b602081528151151560208201526000602083015160a060408401526106a660c08401826105c0565b905060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160608501526106e182826105c0565b60608601518582037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016080870152805180835260209182019450600093509101905b8083101561076a577fffffffff00000000000000000000000000000000000000000000000000000000845151168252602082019150602084019350600183019250610724565b50608086015192507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08582030160a08601526107a6818461061e565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156107f2576107f26107b0565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b818103818111156107f2576107f26107b056fea2646970667358221220030949c7b79d16de06ff0ea751639dbdae520621deaabdb74b6df9a601229c6f64736f6c634300081a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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.